mergepythonclient 2.1.0__py3-none-any.whl → 2.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- merge/core/client_wrapper.py +2 -2
- merge/core/force_multipart.py +4 -2
- merge/core/http_response.py +1 -1
- merge/core/unchecked_base_model.py +41 -3
- merge/resources/accounting/__init__.py +64 -0
- merge/resources/accounting/client.py +5 -0
- merge/resources/accounting/resources/__init__.py +10 -0
- merge/resources/accounting/resources/accounting_periods/client.py +6 -2
- merge/resources/accounting/resources/accounts/client.py +6 -2
- merge/resources/accounting/resources/attachments/client.py +6 -2
- merge/resources/accounting/resources/audit_trail/client.py +6 -2
- merge/resources/accounting/resources/balance_sheets/client.py +6 -2
- merge/resources/accounting/resources/bank_feed_accounts/client.py +6 -2
- merge/resources/accounting/resources/bank_feed_transactions/client.py +6 -2
- merge/resources/accounting/resources/cash_flow_statements/client.py +6 -2
- merge/resources/accounting/resources/company_info/client.py +6 -2
- merge/resources/accounting/resources/contacts/client.py +195 -4
- merge/resources/accounting/resources/contacts/raw_client.py +203 -0
- merge/resources/accounting/resources/credit_notes/client.py +6 -2
- merge/resources/accounting/resources/employees/client.py +67 -2
- merge/resources/accounting/resources/employees/raw_client.py +62 -0
- merge/resources/accounting/resources/expense_reports/__init__.py +15 -0
- merge/resources/accounting/resources/expense_reports/client.py +1015 -0
- merge/resources/accounting/resources/expense_reports/raw_client.py +1020 -0
- merge/resources/accounting/resources/expense_reports/types/__init__.py +13 -0
- merge/resources/accounting/resources/expense_reports/types/expense_reports_lines_list_request_expand.py +265 -0
- merge/resources/accounting/resources/expense_reports/types/expense_reports_list_request_expand.py +73 -0
- merge/resources/accounting/resources/expense_reports/types/expense_reports_retrieve_request_expand.py +73 -0
- merge/resources/accounting/resources/expenses/client.py +18 -6
- merge/resources/accounting/resources/general_ledger_transactions/client.py +6 -2
- merge/resources/accounting/resources/income_statements/client.py +6 -2
- merge/resources/accounting/resources/invoices/client.py +18 -6
- merge/resources/accounting/resources/issues/client.py +6 -2
- merge/resources/accounting/resources/items/client.py +6 -2
- merge/resources/accounting/resources/journal_entries/client.py +18 -6
- merge/resources/accounting/resources/linked_accounts/client.py +6 -2
- merge/resources/accounting/resources/payment_methods/client.py +6 -2
- merge/resources/accounting/resources/payment_terms/client.py +6 -2
- merge/resources/accounting/resources/payments/client.py +18 -6
- merge/resources/accounting/resources/projects/client.py +67 -2
- merge/resources/accounting/resources/projects/raw_client.py +62 -0
- merge/resources/accounting/resources/purchase_orders/client.py +18 -6
- merge/resources/accounting/resources/sync_status/client.py +6 -2
- merge/resources/accounting/resources/tax_rates/client.py +6 -2
- merge/resources/accounting/resources/tracking_categories/client.py +6 -2
- merge/resources/accounting/resources/transactions/client.py +6 -2
- merge/resources/accounting/resources/transactions/types/transactions_list_request_expand.py +141 -0
- merge/resources/accounting/resources/transactions/types/transactions_retrieve_request_expand.py +141 -0
- merge/resources/accounting/resources/vendor_credits/client.py +6 -2
- merge/resources/accounting/types/__init__.py +56 -0
- merge/resources/accounting/types/expense_report.py +423 -0
- merge/resources/accounting/types/expense_report_company.py +7 -0
- merge/resources/accounting/types/expense_report_line.py +441 -0
- merge/resources/accounting/types/expense_report_line_account.py +7 -0
- merge/resources/accounting/types/expense_report_line_company.py +7 -0
- merge/resources/accounting/types/expense_report_line_contact.py +7 -0
- merge/resources/accounting/types/expense_report_line_employee.py +7 -0
- merge/resources/accounting/types/expense_report_line_project.py +7 -0
- merge/resources/accounting/types/expense_report_line_request.py +427 -0
- merge/resources/accounting/types/expense_report_line_request_account.py +7 -0
- merge/resources/accounting/types/expense_report_line_request_company.py +7 -0
- merge/resources/accounting/types/expense_report_line_request_contact.py +7 -0
- merge/resources/accounting/types/expense_report_line_request_employee.py +7 -0
- merge/resources/accounting/types/expense_report_line_request_project.py +7 -0
- merge/resources/accounting/types/expense_report_line_request_tax_rate.py +7 -0
- merge/resources/accounting/types/expense_report_line_tax_rate.py +7 -0
- merge/resources/accounting/types/expense_report_request.py +401 -0
- merge/resources/accounting/types/expense_report_request_accounting_period.py +7 -0
- merge/resources/accounting/types/expense_report_request_company.py +7 -0
- merge/resources/accounting/types/expense_report_request_employee.py +7 -0
- merge/resources/accounting/types/expense_report_response.py +27 -0
- merge/resources/accounting/types/expense_report_status.py +7 -0
- merge/resources/accounting/types/expense_report_status_enum.py +36 -0
- merge/resources/accounting/types/external_target_field_api_response.py +3 -0
- merge/resources/accounting/types/field_mapping_api_instance_response.py +3 -0
- merge/resources/accounting/types/item.py +11 -0
- merge/resources/accounting/types/item_type.py +7 -0
- merge/resources/accounting/types/paginated_expense_report_line_list.py +23 -0
- merge/resources/accounting/types/paginated_expense_report_list.py +23 -0
- merge/resources/accounting/types/patched_contact_request.py +91 -0
- merge/resources/accounting/types/patched_contact_request_addresses_item.py +7 -0
- merge/resources/accounting/types/remote_field_class.py +1 -0
- merge/resources/ats/resources/activities/client.py +6 -2
- merge/resources/ats/resources/applications/client.py +6 -2
- merge/resources/ats/resources/attachments/client.py +6 -2
- merge/resources/ats/resources/audit_trail/client.py +6 -2
- merge/resources/ats/resources/candidates/client.py +6 -2
- merge/resources/ats/resources/departments/client.py +6 -2
- merge/resources/ats/resources/eeocs/client.py +6 -2
- merge/resources/ats/resources/interviews/client.py +6 -2
- merge/resources/ats/resources/issues/client.py +6 -2
- merge/resources/ats/resources/job_interview_stages/client.py +6 -2
- merge/resources/ats/resources/job_postings/client.py +6 -2
- merge/resources/ats/resources/jobs/client.py +8 -2
- merge/resources/ats/resources/linked_accounts/client.py +6 -2
- merge/resources/ats/resources/offers/client.py +6 -2
- merge/resources/ats/resources/offices/client.py +6 -2
- merge/resources/ats/resources/reject_reasons/client.py +6 -2
- merge/resources/ats/resources/scorecards/client.py +6 -2
- merge/resources/ats/resources/sync_status/client.py +6 -2
- merge/resources/ats/resources/tags/client.py +6 -2
- merge/resources/ats/resources/users/client.py +6 -2
- merge/resources/ats/types/event_type_enum.py +4 -0
- merge/resources/crm/resources/accounts/client.py +12 -4
- merge/resources/crm/resources/association_types/client.py +2 -0
- merge/resources/crm/resources/associations/client.py +2 -0
- merge/resources/crm/resources/audit_trail/client.py +6 -2
- merge/resources/crm/resources/contacts/client.py +12 -4
- merge/resources/crm/resources/custom_object_classes/client.py +6 -2
- merge/resources/crm/resources/custom_objects/client.py +8 -2
- merge/resources/crm/resources/engagement_types/client.py +12 -4
- merge/resources/crm/resources/engagements/client.py +12 -4
- merge/resources/crm/resources/issues/client.py +6 -2
- merge/resources/crm/resources/leads/client.py +12 -4
- merge/resources/crm/resources/linked_accounts/client.py +6 -2
- merge/resources/crm/resources/notes/client.py +12 -4
- merge/resources/crm/resources/opportunities/client.py +12 -4
- merge/resources/crm/resources/stages/client.py +12 -4
- merge/resources/crm/resources/sync_status/client.py +6 -2
- merge/resources/crm/resources/tasks/client.py +12 -4
- merge/resources/crm/resources/users/client.py +12 -4
- merge/resources/crm/types/remote_field_class.py +1 -0
- merge/resources/filestorage/resources/audit_trail/client.py +6 -2
- merge/resources/filestorage/resources/drives/client.py +6 -2
- merge/resources/filestorage/resources/files/client.py +42 -4
- merge/resources/filestorage/resources/files/raw_client.py +38 -0
- merge/resources/filestorage/resources/folders/client.py +6 -2
- merge/resources/filestorage/resources/groups/client.py +6 -2
- merge/resources/filestorage/resources/issues/client.py +6 -2
- merge/resources/filestorage/resources/linked_accounts/client.py +6 -2
- merge/resources/filestorage/resources/sync_status/client.py +6 -2
- merge/resources/filestorage/resources/users/client.py +6 -2
- merge/resources/hris/resources/audit_trail/client.py +6 -2
- merge/resources/hris/resources/bank_info/client.py +6 -2
- merge/resources/hris/resources/benefits/client.py +6 -2
- merge/resources/hris/resources/companies/client.py +6 -2
- merge/resources/hris/resources/dependents/client.py +6 -2
- merge/resources/hris/resources/employee_payroll_runs/client.py +6 -2
- merge/resources/hris/resources/employees/client.py +6 -2
- merge/resources/hris/resources/employer_benefits/client.py +6 -2
- merge/resources/hris/resources/employments/client.py +6 -2
- merge/resources/hris/resources/groups/client.py +6 -2
- merge/resources/hris/resources/issues/client.py +6 -2
- merge/resources/hris/resources/linked_accounts/client.py +6 -2
- merge/resources/hris/resources/locations/client.py +6 -2
- merge/resources/hris/resources/pay_groups/client.py +6 -2
- merge/resources/hris/resources/payroll_runs/client.py +6 -2
- merge/resources/hris/resources/sync_status/client.py +6 -2
- merge/resources/hris/resources/teams/client.py +6 -2
- merge/resources/hris/resources/time_off/client.py +6 -2
- merge/resources/hris/resources/time_off_balances/client.py +6 -2
- merge/resources/hris/resources/timesheet_entries/client.py +6 -2
- merge/resources/hris/types/benefit.py +4 -4
- merge/resources/ticketing/resources/accounts/client.py +6 -2
- merge/resources/ticketing/resources/attachments/client.py +6 -2
- merge/resources/ticketing/resources/audit_trail/client.py +6 -2
- merge/resources/ticketing/resources/collections/client.py +8 -2
- merge/resources/ticketing/resources/comments/client.py +6 -2
- merge/resources/ticketing/resources/contacts/client.py +6 -2
- merge/resources/ticketing/resources/issues/client.py +6 -2
- merge/resources/ticketing/resources/linked_accounts/client.py +6 -2
- merge/resources/ticketing/resources/projects/client.py +8 -2
- merge/resources/ticketing/resources/roles/client.py +6 -2
- merge/resources/ticketing/resources/sync_status/client.py +6 -2
- merge/resources/ticketing/resources/tags/client.py +6 -2
- merge/resources/ticketing/resources/teams/client.py +6 -2
- merge/resources/ticketing/resources/tickets/client.py +24 -4
- merge/resources/ticketing/resources/tickets/raw_client.py +10 -0
- merge/resources/ticketing/resources/users/client.py +6 -2
- merge/resources/ticketing/types/patched_ticket_request.py +5 -5
- merge/resources/ticketing/types/remote_field_class.py +1 -0
- {mergepythonclient-2.1.0.dist-info → mergepythonclient-2.2.0.dist-info}/METADATA +5 -2
- {mergepythonclient-2.1.0.dist-info → mergepythonclient-2.2.0.dist-info}/RECORD +175 -140
- {mergepythonclient-2.1.0.dist-info → mergepythonclient-2.2.0.dist-info}/LICENSE.md +0 -0
- {mergepythonclient-2.1.0.dist-info → mergepythonclient-2.2.0.dist-info}/WHEEL +0 -0
|
@@ -11,6 +11,7 @@ from ...types.contact_response import ContactResponse
|
|
|
11
11
|
from ...types.meta_response import MetaResponse
|
|
12
12
|
from ...types.paginated_contact_list import PaginatedContactList
|
|
13
13
|
from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
|
|
14
|
+
from ...types.patched_contact_request import PatchedContactRequest
|
|
14
15
|
from .raw_client import AsyncRawContactsClient, RawContactsClient
|
|
15
16
|
from .types.contacts_list_request_expand import ContactsListRequestExpand
|
|
16
17
|
from .types.contacts_retrieve_request_expand import ContactsRetrieveRequestExpand
|
|
@@ -140,7 +141,9 @@ class ContactsClient:
|
|
|
140
141
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
141
142
|
api_key="YOUR_API_KEY",
|
|
142
143
|
)
|
|
143
|
-
client.accounting.contacts.list(
|
|
144
|
+
client.accounting.contacts.list(
|
|
145
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
146
|
+
)
|
|
144
147
|
"""
|
|
145
148
|
_response = self._raw_client.list(
|
|
146
149
|
company_id=company_id,
|
|
@@ -283,6 +286,88 @@ class ContactsClient:
|
|
|
283
286
|
)
|
|
284
287
|
return _response.data
|
|
285
288
|
|
|
289
|
+
def partial_update(
|
|
290
|
+
self,
|
|
291
|
+
id: str,
|
|
292
|
+
*,
|
|
293
|
+
model: PatchedContactRequest,
|
|
294
|
+
is_debug_mode: typing.Optional[bool] = None,
|
|
295
|
+
run_async: typing.Optional[bool] = None,
|
|
296
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
297
|
+
) -> ContactResponse:
|
|
298
|
+
"""
|
|
299
|
+
Updates a `Contact` object with the given `id`.
|
|
300
|
+
|
|
301
|
+
Parameters
|
|
302
|
+
----------
|
|
303
|
+
id : str
|
|
304
|
+
|
|
305
|
+
model : PatchedContactRequest
|
|
306
|
+
|
|
307
|
+
is_debug_mode : typing.Optional[bool]
|
|
308
|
+
Whether to include debug fields (such as log file links) in the response.
|
|
309
|
+
|
|
310
|
+
run_async : typing.Optional[bool]
|
|
311
|
+
Whether or not third-party updates should be run asynchronously.
|
|
312
|
+
|
|
313
|
+
request_options : typing.Optional[RequestOptions]
|
|
314
|
+
Request-specific configuration.
|
|
315
|
+
|
|
316
|
+
Returns
|
|
317
|
+
-------
|
|
318
|
+
ContactResponse
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
Examples
|
|
322
|
+
--------
|
|
323
|
+
from merge import Merge
|
|
324
|
+
from merge.resources.accounting import PatchedContactRequest
|
|
325
|
+
|
|
326
|
+
client = Merge(
|
|
327
|
+
account_token="YOUR_ACCOUNT_TOKEN",
|
|
328
|
+
api_key="YOUR_API_KEY",
|
|
329
|
+
)
|
|
330
|
+
client.accounting.contacts.partial_update(
|
|
331
|
+
id="id",
|
|
332
|
+
model=PatchedContactRequest(),
|
|
333
|
+
)
|
|
334
|
+
"""
|
|
335
|
+
_response = self._raw_client.partial_update(
|
|
336
|
+
id, model=model, is_debug_mode=is_debug_mode, run_async=run_async, request_options=request_options
|
|
337
|
+
)
|
|
338
|
+
return _response.data
|
|
339
|
+
|
|
340
|
+
def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> MetaResponse:
|
|
341
|
+
"""
|
|
342
|
+
Returns metadata for `Contact` PATCHs.
|
|
343
|
+
|
|
344
|
+
Parameters
|
|
345
|
+
----------
|
|
346
|
+
id : str
|
|
347
|
+
|
|
348
|
+
request_options : typing.Optional[RequestOptions]
|
|
349
|
+
Request-specific configuration.
|
|
350
|
+
|
|
351
|
+
Returns
|
|
352
|
+
-------
|
|
353
|
+
MetaResponse
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
Examples
|
|
357
|
+
--------
|
|
358
|
+
from merge import Merge
|
|
359
|
+
|
|
360
|
+
client = Merge(
|
|
361
|
+
account_token="YOUR_ACCOUNT_TOKEN",
|
|
362
|
+
api_key="YOUR_API_KEY",
|
|
363
|
+
)
|
|
364
|
+
client.accounting.contacts.meta_patch_retrieve(
|
|
365
|
+
id="id",
|
|
366
|
+
)
|
|
367
|
+
"""
|
|
368
|
+
_response = self._raw_client.meta_patch_retrieve(id, request_options=request_options)
|
|
369
|
+
return _response.data
|
|
370
|
+
|
|
286
371
|
def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> MetaResponse:
|
|
287
372
|
"""
|
|
288
373
|
Returns metadata for `Contact` POSTs.
|
|
@@ -364,7 +449,9 @@ class ContactsClient:
|
|
|
364
449
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
365
450
|
api_key="YOUR_API_KEY",
|
|
366
451
|
)
|
|
367
|
-
client.accounting.contacts.remote_field_classes_list(
|
|
452
|
+
client.accounting.contacts.remote_field_classes_list(
|
|
453
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
454
|
+
)
|
|
368
455
|
"""
|
|
369
456
|
_response = self._raw_client.remote_field_classes_list(
|
|
370
457
|
cursor=cursor,
|
|
@@ -505,7 +592,9 @@ class AsyncContactsClient:
|
|
|
505
592
|
|
|
506
593
|
|
|
507
594
|
async def main() -> None:
|
|
508
|
-
await client.accounting.contacts.list(
|
|
595
|
+
await client.accounting.contacts.list(
|
|
596
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
597
|
+
)
|
|
509
598
|
|
|
510
599
|
|
|
511
600
|
asyncio.run(main())
|
|
@@ -667,6 +756,106 @@ class AsyncContactsClient:
|
|
|
667
756
|
)
|
|
668
757
|
return _response.data
|
|
669
758
|
|
|
759
|
+
async def partial_update(
|
|
760
|
+
self,
|
|
761
|
+
id: str,
|
|
762
|
+
*,
|
|
763
|
+
model: PatchedContactRequest,
|
|
764
|
+
is_debug_mode: typing.Optional[bool] = None,
|
|
765
|
+
run_async: typing.Optional[bool] = None,
|
|
766
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
767
|
+
) -> ContactResponse:
|
|
768
|
+
"""
|
|
769
|
+
Updates a `Contact` object with the given `id`.
|
|
770
|
+
|
|
771
|
+
Parameters
|
|
772
|
+
----------
|
|
773
|
+
id : str
|
|
774
|
+
|
|
775
|
+
model : PatchedContactRequest
|
|
776
|
+
|
|
777
|
+
is_debug_mode : typing.Optional[bool]
|
|
778
|
+
Whether to include debug fields (such as log file links) in the response.
|
|
779
|
+
|
|
780
|
+
run_async : typing.Optional[bool]
|
|
781
|
+
Whether or not third-party updates should be run asynchronously.
|
|
782
|
+
|
|
783
|
+
request_options : typing.Optional[RequestOptions]
|
|
784
|
+
Request-specific configuration.
|
|
785
|
+
|
|
786
|
+
Returns
|
|
787
|
+
-------
|
|
788
|
+
ContactResponse
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
Examples
|
|
792
|
+
--------
|
|
793
|
+
import asyncio
|
|
794
|
+
|
|
795
|
+
from merge import AsyncMerge
|
|
796
|
+
from merge.resources.accounting import PatchedContactRequest
|
|
797
|
+
|
|
798
|
+
client = AsyncMerge(
|
|
799
|
+
account_token="YOUR_ACCOUNT_TOKEN",
|
|
800
|
+
api_key="YOUR_API_KEY",
|
|
801
|
+
)
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
async def main() -> None:
|
|
805
|
+
await client.accounting.contacts.partial_update(
|
|
806
|
+
id="id",
|
|
807
|
+
model=PatchedContactRequest(),
|
|
808
|
+
)
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
asyncio.run(main())
|
|
812
|
+
"""
|
|
813
|
+
_response = await self._raw_client.partial_update(
|
|
814
|
+
id, model=model, is_debug_mode=is_debug_mode, run_async=run_async, request_options=request_options
|
|
815
|
+
)
|
|
816
|
+
return _response.data
|
|
817
|
+
|
|
818
|
+
async def meta_patch_retrieve(
|
|
819
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
820
|
+
) -> MetaResponse:
|
|
821
|
+
"""
|
|
822
|
+
Returns metadata for `Contact` PATCHs.
|
|
823
|
+
|
|
824
|
+
Parameters
|
|
825
|
+
----------
|
|
826
|
+
id : str
|
|
827
|
+
|
|
828
|
+
request_options : typing.Optional[RequestOptions]
|
|
829
|
+
Request-specific configuration.
|
|
830
|
+
|
|
831
|
+
Returns
|
|
832
|
+
-------
|
|
833
|
+
MetaResponse
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
Examples
|
|
837
|
+
--------
|
|
838
|
+
import asyncio
|
|
839
|
+
|
|
840
|
+
from merge import AsyncMerge
|
|
841
|
+
|
|
842
|
+
client = AsyncMerge(
|
|
843
|
+
account_token="YOUR_ACCOUNT_TOKEN",
|
|
844
|
+
api_key="YOUR_API_KEY",
|
|
845
|
+
)
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
async def main() -> None:
|
|
849
|
+
await client.accounting.contacts.meta_patch_retrieve(
|
|
850
|
+
id="id",
|
|
851
|
+
)
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
asyncio.run(main())
|
|
855
|
+
"""
|
|
856
|
+
_response = await self._raw_client.meta_patch_retrieve(id, request_options=request_options)
|
|
857
|
+
return _response.data
|
|
858
|
+
|
|
670
859
|
async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> MetaResponse:
|
|
671
860
|
"""
|
|
672
861
|
Returns metadata for `Contact` POSTs.
|
|
@@ -761,7 +950,9 @@ class AsyncContactsClient:
|
|
|
761
950
|
|
|
762
951
|
|
|
763
952
|
async def main() -> None:
|
|
764
|
-
await client.accounting.contacts.remote_field_classes_list(
|
|
953
|
+
await client.accounting.contacts.remote_field_classes_list(
|
|
954
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
955
|
+
)
|
|
765
956
|
|
|
766
957
|
|
|
767
958
|
asyncio.run(main())
|
|
@@ -17,6 +17,7 @@ from ...types.contact_response import ContactResponse
|
|
|
17
17
|
from ...types.meta_response import MetaResponse
|
|
18
18
|
from ...types.paginated_contact_list import PaginatedContactList
|
|
19
19
|
from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
|
|
20
|
+
from ...types.patched_contact_request import PatchedContactRequest
|
|
20
21
|
from .types.contacts_list_request_expand import ContactsListRequestExpand
|
|
21
22
|
from .types.contacts_retrieve_request_expand import ContactsRetrieveRequestExpand
|
|
22
23
|
|
|
@@ -301,6 +302,107 @@ class RawContactsClient:
|
|
|
301
302
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
302
303
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
303
304
|
|
|
305
|
+
def partial_update(
|
|
306
|
+
self,
|
|
307
|
+
id: str,
|
|
308
|
+
*,
|
|
309
|
+
model: PatchedContactRequest,
|
|
310
|
+
is_debug_mode: typing.Optional[bool] = None,
|
|
311
|
+
run_async: typing.Optional[bool] = None,
|
|
312
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
313
|
+
) -> HttpResponse[ContactResponse]:
|
|
314
|
+
"""
|
|
315
|
+
Updates a `Contact` object with the given `id`.
|
|
316
|
+
|
|
317
|
+
Parameters
|
|
318
|
+
----------
|
|
319
|
+
id : str
|
|
320
|
+
|
|
321
|
+
model : PatchedContactRequest
|
|
322
|
+
|
|
323
|
+
is_debug_mode : typing.Optional[bool]
|
|
324
|
+
Whether to include debug fields (such as log file links) in the response.
|
|
325
|
+
|
|
326
|
+
run_async : typing.Optional[bool]
|
|
327
|
+
Whether or not third-party updates should be run asynchronously.
|
|
328
|
+
|
|
329
|
+
request_options : typing.Optional[RequestOptions]
|
|
330
|
+
Request-specific configuration.
|
|
331
|
+
|
|
332
|
+
Returns
|
|
333
|
+
-------
|
|
334
|
+
HttpResponse[ContactResponse]
|
|
335
|
+
|
|
336
|
+
"""
|
|
337
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
338
|
+
f"accounting/v1/contacts/{jsonable_encoder(id)}",
|
|
339
|
+
method="PATCH",
|
|
340
|
+
params={
|
|
341
|
+
"is_debug_mode": is_debug_mode,
|
|
342
|
+
"run_async": run_async,
|
|
343
|
+
},
|
|
344
|
+
json={
|
|
345
|
+
"model": model,
|
|
346
|
+
},
|
|
347
|
+
headers={
|
|
348
|
+
"content-type": "application/json",
|
|
349
|
+
},
|
|
350
|
+
request_options=request_options,
|
|
351
|
+
omit=OMIT,
|
|
352
|
+
)
|
|
353
|
+
try:
|
|
354
|
+
if 200 <= _response.status_code < 300:
|
|
355
|
+
_data = typing.cast(
|
|
356
|
+
ContactResponse,
|
|
357
|
+
construct_type(
|
|
358
|
+
type_=ContactResponse, # type: ignore
|
|
359
|
+
object_=_response.json(),
|
|
360
|
+
),
|
|
361
|
+
)
|
|
362
|
+
return HttpResponse(response=_response, data=_data)
|
|
363
|
+
_response_json = _response.json()
|
|
364
|
+
except JSONDecodeError:
|
|
365
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
366
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
367
|
+
|
|
368
|
+
def meta_patch_retrieve(
|
|
369
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
370
|
+
) -> HttpResponse[MetaResponse]:
|
|
371
|
+
"""
|
|
372
|
+
Returns metadata for `Contact` PATCHs.
|
|
373
|
+
|
|
374
|
+
Parameters
|
|
375
|
+
----------
|
|
376
|
+
id : str
|
|
377
|
+
|
|
378
|
+
request_options : typing.Optional[RequestOptions]
|
|
379
|
+
Request-specific configuration.
|
|
380
|
+
|
|
381
|
+
Returns
|
|
382
|
+
-------
|
|
383
|
+
HttpResponse[MetaResponse]
|
|
384
|
+
|
|
385
|
+
"""
|
|
386
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
387
|
+
f"accounting/v1/contacts/meta/patch/{jsonable_encoder(id)}",
|
|
388
|
+
method="GET",
|
|
389
|
+
request_options=request_options,
|
|
390
|
+
)
|
|
391
|
+
try:
|
|
392
|
+
if 200 <= _response.status_code < 300:
|
|
393
|
+
_data = typing.cast(
|
|
394
|
+
MetaResponse,
|
|
395
|
+
construct_type(
|
|
396
|
+
type_=MetaResponse, # type: ignore
|
|
397
|
+
object_=_response.json(),
|
|
398
|
+
),
|
|
399
|
+
)
|
|
400
|
+
return HttpResponse(response=_response, data=_data)
|
|
401
|
+
_response_json = _response.json()
|
|
402
|
+
except JSONDecodeError:
|
|
403
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
404
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
405
|
+
|
|
304
406
|
def meta_post_retrieve(
|
|
305
407
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
306
408
|
) -> HttpResponse[MetaResponse]:
|
|
@@ -690,6 +792,107 @@ class AsyncRawContactsClient:
|
|
|
690
792
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
691
793
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
692
794
|
|
|
795
|
+
async def partial_update(
|
|
796
|
+
self,
|
|
797
|
+
id: str,
|
|
798
|
+
*,
|
|
799
|
+
model: PatchedContactRequest,
|
|
800
|
+
is_debug_mode: typing.Optional[bool] = None,
|
|
801
|
+
run_async: typing.Optional[bool] = None,
|
|
802
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
803
|
+
) -> AsyncHttpResponse[ContactResponse]:
|
|
804
|
+
"""
|
|
805
|
+
Updates a `Contact` object with the given `id`.
|
|
806
|
+
|
|
807
|
+
Parameters
|
|
808
|
+
----------
|
|
809
|
+
id : str
|
|
810
|
+
|
|
811
|
+
model : PatchedContactRequest
|
|
812
|
+
|
|
813
|
+
is_debug_mode : typing.Optional[bool]
|
|
814
|
+
Whether to include debug fields (such as log file links) in the response.
|
|
815
|
+
|
|
816
|
+
run_async : typing.Optional[bool]
|
|
817
|
+
Whether or not third-party updates should be run asynchronously.
|
|
818
|
+
|
|
819
|
+
request_options : typing.Optional[RequestOptions]
|
|
820
|
+
Request-specific configuration.
|
|
821
|
+
|
|
822
|
+
Returns
|
|
823
|
+
-------
|
|
824
|
+
AsyncHttpResponse[ContactResponse]
|
|
825
|
+
|
|
826
|
+
"""
|
|
827
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
828
|
+
f"accounting/v1/contacts/{jsonable_encoder(id)}",
|
|
829
|
+
method="PATCH",
|
|
830
|
+
params={
|
|
831
|
+
"is_debug_mode": is_debug_mode,
|
|
832
|
+
"run_async": run_async,
|
|
833
|
+
},
|
|
834
|
+
json={
|
|
835
|
+
"model": model,
|
|
836
|
+
},
|
|
837
|
+
headers={
|
|
838
|
+
"content-type": "application/json",
|
|
839
|
+
},
|
|
840
|
+
request_options=request_options,
|
|
841
|
+
omit=OMIT,
|
|
842
|
+
)
|
|
843
|
+
try:
|
|
844
|
+
if 200 <= _response.status_code < 300:
|
|
845
|
+
_data = typing.cast(
|
|
846
|
+
ContactResponse,
|
|
847
|
+
construct_type(
|
|
848
|
+
type_=ContactResponse, # type: ignore
|
|
849
|
+
object_=_response.json(),
|
|
850
|
+
),
|
|
851
|
+
)
|
|
852
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
853
|
+
_response_json = _response.json()
|
|
854
|
+
except JSONDecodeError:
|
|
855
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
856
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
857
|
+
|
|
858
|
+
async def meta_patch_retrieve(
|
|
859
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
860
|
+
) -> AsyncHttpResponse[MetaResponse]:
|
|
861
|
+
"""
|
|
862
|
+
Returns metadata for `Contact` PATCHs.
|
|
863
|
+
|
|
864
|
+
Parameters
|
|
865
|
+
----------
|
|
866
|
+
id : str
|
|
867
|
+
|
|
868
|
+
request_options : typing.Optional[RequestOptions]
|
|
869
|
+
Request-specific configuration.
|
|
870
|
+
|
|
871
|
+
Returns
|
|
872
|
+
-------
|
|
873
|
+
AsyncHttpResponse[MetaResponse]
|
|
874
|
+
|
|
875
|
+
"""
|
|
876
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
877
|
+
f"accounting/v1/contacts/meta/patch/{jsonable_encoder(id)}",
|
|
878
|
+
method="GET",
|
|
879
|
+
request_options=request_options,
|
|
880
|
+
)
|
|
881
|
+
try:
|
|
882
|
+
if 200 <= _response.status_code < 300:
|
|
883
|
+
_data = typing.cast(
|
|
884
|
+
MetaResponse,
|
|
885
|
+
construct_type(
|
|
886
|
+
type_=MetaResponse, # type: ignore
|
|
887
|
+
object_=_response.json(),
|
|
888
|
+
),
|
|
889
|
+
)
|
|
890
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
891
|
+
_response_json = _response.json()
|
|
892
|
+
except JSONDecodeError:
|
|
893
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
894
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
895
|
+
|
|
693
896
|
async def meta_post_retrieve(
|
|
694
897
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
695
898
|
) -> AsyncHttpResponse[MetaResponse]:
|
|
@@ -127,7 +127,9 @@ class CreditNotesClient:
|
|
|
127
127
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
128
128
|
api_key="YOUR_API_KEY",
|
|
129
129
|
)
|
|
130
|
-
client.accounting.credit_notes.list(
|
|
130
|
+
client.accounting.credit_notes.list(
|
|
131
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
132
|
+
)
|
|
131
133
|
"""
|
|
132
134
|
_response = self._raw_client.list(
|
|
133
135
|
company_id=company_id,
|
|
@@ -399,7 +401,9 @@ class AsyncCreditNotesClient:
|
|
|
399
401
|
|
|
400
402
|
|
|
401
403
|
async def main() -> None:
|
|
402
|
-
await client.accounting.credit_notes.list(
|
|
404
|
+
await client.accounting.credit_notes.list(
|
|
405
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
406
|
+
)
|
|
403
407
|
|
|
404
408
|
|
|
405
409
|
asyncio.run(main())
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
import datetime as dt
|
|
3
4
|
import typing
|
|
4
5
|
|
|
5
6
|
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
@@ -27,12 +28,18 @@ class EmployeesClient:
|
|
|
27
28
|
def list(
|
|
28
29
|
self,
|
|
29
30
|
*,
|
|
31
|
+
company_id: typing.Optional[str] = None,
|
|
32
|
+
created_after: typing.Optional[dt.datetime] = None,
|
|
33
|
+
created_before: typing.Optional[dt.datetime] = None,
|
|
30
34
|
cursor: typing.Optional[str] = None,
|
|
31
35
|
expand: typing.Optional[typing.Literal["company"]] = None,
|
|
32
36
|
include_deleted_data: typing.Optional[bool] = None,
|
|
33
37
|
include_remote_data: typing.Optional[bool] = None,
|
|
34
38
|
include_shell_data: typing.Optional[bool] = None,
|
|
39
|
+
modified_after: typing.Optional[dt.datetime] = None,
|
|
40
|
+
modified_before: typing.Optional[dt.datetime] = None,
|
|
35
41
|
page_size: typing.Optional[int] = None,
|
|
42
|
+
remote_id: typing.Optional[str] = None,
|
|
36
43
|
request_options: typing.Optional[RequestOptions] = None,
|
|
37
44
|
) -> PaginatedEmployeeList:
|
|
38
45
|
"""
|
|
@@ -40,6 +47,15 @@ class EmployeesClient:
|
|
|
40
47
|
|
|
41
48
|
Parameters
|
|
42
49
|
----------
|
|
50
|
+
company_id : typing.Optional[str]
|
|
51
|
+
If provided, will only return employees for this company.
|
|
52
|
+
|
|
53
|
+
created_after : typing.Optional[dt.datetime]
|
|
54
|
+
If provided, will only return objects created after this datetime.
|
|
55
|
+
|
|
56
|
+
created_before : typing.Optional[dt.datetime]
|
|
57
|
+
If provided, will only return objects created before this datetime.
|
|
58
|
+
|
|
43
59
|
cursor : typing.Optional[str]
|
|
44
60
|
The pagination cursor value.
|
|
45
61
|
|
|
@@ -55,9 +71,18 @@ class EmployeesClient:
|
|
|
55
71
|
include_shell_data : typing.Optional[bool]
|
|
56
72
|
Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
|
|
57
73
|
|
|
74
|
+
modified_after : typing.Optional[dt.datetime]
|
|
75
|
+
If provided, only objects synced by Merge after this date time will be returned.
|
|
76
|
+
|
|
77
|
+
modified_before : typing.Optional[dt.datetime]
|
|
78
|
+
If provided, only objects synced by Merge before this date time will be returned.
|
|
79
|
+
|
|
58
80
|
page_size : typing.Optional[int]
|
|
59
81
|
Number of results to return per page.
|
|
60
82
|
|
|
83
|
+
remote_id : typing.Optional[str]
|
|
84
|
+
The API provider's ID for the given object.
|
|
85
|
+
|
|
61
86
|
request_options : typing.Optional[RequestOptions]
|
|
62
87
|
Request-specific configuration.
|
|
63
88
|
|
|
@@ -74,15 +99,23 @@ class EmployeesClient:
|
|
|
74
99
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
75
100
|
api_key="YOUR_API_KEY",
|
|
76
101
|
)
|
|
77
|
-
client.accounting.employees.list(
|
|
102
|
+
client.accounting.employees.list(
|
|
103
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
104
|
+
)
|
|
78
105
|
"""
|
|
79
106
|
_response = self._raw_client.list(
|
|
107
|
+
company_id=company_id,
|
|
108
|
+
created_after=created_after,
|
|
109
|
+
created_before=created_before,
|
|
80
110
|
cursor=cursor,
|
|
81
111
|
expand=expand,
|
|
82
112
|
include_deleted_data=include_deleted_data,
|
|
83
113
|
include_remote_data=include_remote_data,
|
|
84
114
|
include_shell_data=include_shell_data,
|
|
115
|
+
modified_after=modified_after,
|
|
116
|
+
modified_before=modified_before,
|
|
85
117
|
page_size=page_size,
|
|
118
|
+
remote_id=remote_id,
|
|
86
119
|
request_options=request_options,
|
|
87
120
|
)
|
|
88
121
|
return _response.data
|
|
@@ -160,12 +193,18 @@ class AsyncEmployeesClient:
|
|
|
160
193
|
async def list(
|
|
161
194
|
self,
|
|
162
195
|
*,
|
|
196
|
+
company_id: typing.Optional[str] = None,
|
|
197
|
+
created_after: typing.Optional[dt.datetime] = None,
|
|
198
|
+
created_before: typing.Optional[dt.datetime] = None,
|
|
163
199
|
cursor: typing.Optional[str] = None,
|
|
164
200
|
expand: typing.Optional[typing.Literal["company"]] = None,
|
|
165
201
|
include_deleted_data: typing.Optional[bool] = None,
|
|
166
202
|
include_remote_data: typing.Optional[bool] = None,
|
|
167
203
|
include_shell_data: typing.Optional[bool] = None,
|
|
204
|
+
modified_after: typing.Optional[dt.datetime] = None,
|
|
205
|
+
modified_before: typing.Optional[dt.datetime] = None,
|
|
168
206
|
page_size: typing.Optional[int] = None,
|
|
207
|
+
remote_id: typing.Optional[str] = None,
|
|
169
208
|
request_options: typing.Optional[RequestOptions] = None,
|
|
170
209
|
) -> PaginatedEmployeeList:
|
|
171
210
|
"""
|
|
@@ -173,6 +212,15 @@ class AsyncEmployeesClient:
|
|
|
173
212
|
|
|
174
213
|
Parameters
|
|
175
214
|
----------
|
|
215
|
+
company_id : typing.Optional[str]
|
|
216
|
+
If provided, will only return employees for this company.
|
|
217
|
+
|
|
218
|
+
created_after : typing.Optional[dt.datetime]
|
|
219
|
+
If provided, will only return objects created after this datetime.
|
|
220
|
+
|
|
221
|
+
created_before : typing.Optional[dt.datetime]
|
|
222
|
+
If provided, will only return objects created before this datetime.
|
|
223
|
+
|
|
176
224
|
cursor : typing.Optional[str]
|
|
177
225
|
The pagination cursor value.
|
|
178
226
|
|
|
@@ -188,9 +236,18 @@ class AsyncEmployeesClient:
|
|
|
188
236
|
include_shell_data : typing.Optional[bool]
|
|
189
237
|
Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
|
|
190
238
|
|
|
239
|
+
modified_after : typing.Optional[dt.datetime]
|
|
240
|
+
If provided, only objects synced by Merge after this date time will be returned.
|
|
241
|
+
|
|
242
|
+
modified_before : typing.Optional[dt.datetime]
|
|
243
|
+
If provided, only objects synced by Merge before this date time will be returned.
|
|
244
|
+
|
|
191
245
|
page_size : typing.Optional[int]
|
|
192
246
|
Number of results to return per page.
|
|
193
247
|
|
|
248
|
+
remote_id : typing.Optional[str]
|
|
249
|
+
The API provider's ID for the given object.
|
|
250
|
+
|
|
194
251
|
request_options : typing.Optional[RequestOptions]
|
|
195
252
|
Request-specific configuration.
|
|
196
253
|
|
|
@@ -212,18 +269,26 @@ class AsyncEmployeesClient:
|
|
|
212
269
|
|
|
213
270
|
|
|
214
271
|
async def main() -> None:
|
|
215
|
-
await client.accounting.employees.list(
|
|
272
|
+
await client.accounting.employees.list(
|
|
273
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
274
|
+
)
|
|
216
275
|
|
|
217
276
|
|
|
218
277
|
asyncio.run(main())
|
|
219
278
|
"""
|
|
220
279
|
_response = await self._raw_client.list(
|
|
280
|
+
company_id=company_id,
|
|
281
|
+
created_after=created_after,
|
|
282
|
+
created_before=created_before,
|
|
221
283
|
cursor=cursor,
|
|
222
284
|
expand=expand,
|
|
223
285
|
include_deleted_data=include_deleted_data,
|
|
224
286
|
include_remote_data=include_remote_data,
|
|
225
287
|
include_shell_data=include_shell_data,
|
|
288
|
+
modified_after=modified_after,
|
|
289
|
+
modified_before=modified_before,
|
|
226
290
|
page_size=page_size,
|
|
291
|
+
remote_id=remote_id,
|
|
227
292
|
request_options=request_options,
|
|
228
293
|
)
|
|
229
294
|
return _response.data
|