Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .mock/definition/accounting/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41304,6 +41304,83 @@ types:
results: optional<list<VendorCredit>>
source:
openapi: openapi/openapi.yml
PatchedContactRequestAddressesItem:
discriminated: false
union:
- type: string
validation:
format: uuid
- Address
source:
openapi: openapi/openapi.yml
inline: true
PatchedContactRequest:
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<string>
docs: The contact's name.
is_supplier:
type: optional<boolean>
docs: Whether the contact is a supplier.
is_customer:
type: optional<boolean>
docs: Whether the contact is a customer.
email_address:
type: optional<string>
docs: The contact's email address.
tax_number:
type: optional<string>
docs: The contact's tax number.
status:
type: optional<string>
docs: |-
The contact's status

* `ACTIVE` - ACTIVE
* `ARCHIVED` - ARCHIVED
currency:
type: optional<string>
docs: The currency the contact's transactions are in.
company:
type: optional<string>
docs: The company the contact belongs to.
validation:
format: uuid
addresses:
type: optional<list<optional<PatchedContactRequestAddressesItem>>>
docs: '`Address` object IDs for the given `Contacts` object.'
phone_numbers:
type: optional<list<AccountingPhoneNumberRequest>>
docs: '`AccountingPhoneNumber` object for the given `Contacts` object.'
integration_params:
type: optional<map<string, unknown>>
access: write-only
linked_account_params:
type: optional<map<string, unknown>>
access: write-only
remote_fields:
type: optional<list<RemoteFieldRequest>>
access: write-only
source:
openapi: openapi/openapi.yml
PatchedItemRequestRequestStatus:
discriminated: false
docs: |-
Expand Down
280 changes: 280 additions & 0 deletions .mock/definition/accounting/contacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,286 @@ service:
- remote_field_class: remote_field_class
value:
key: value
partialUpdate:
path: /accounting/v1/contacts/{id}
method: PATCH
auth: true
docs: Updates a `Contact` object with the given `id`.
source:
openapi: openapi/openapi.yml
path-parameters:
id: string
request:
name: PatchedContactEndpointRequest
query-parameters:
is_debug_mode:
type: optional<boolean>
docs: >-
Whether to include debug fields (such as log file links) in the
response.
run_async:
type: optional<boolean>
docs: Whether or not third-party updates should be run asynchronously.
body:
properties:
model: root.PatchedContactRequest
content-type: application/json
response:
docs: ''
type: root.ContactResponse
status-code: 200
examples:
- path-parameters:
id: id
headers:
X-Account-Token: X-Account-Token
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: [email protected]
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
metaPatchRetrieve:
path: /accounting/v1/contacts/meta/patch/{id}
method: GET
auth: true
docs: Returns metadata for `Contact` PATCHs.
source:
openapi: openapi/openapi.yml
path-parameters:
id: string
response:
docs: ''
type: root.MetaResponse
status-code: 200
examples:
- path-parameters:
id: id
headers:
X-Account-Token: X-Account-Token
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/contacts/meta/post
method: GET
Expand Down
Loading