mergepythonclient 2.1.1__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 +3 -3
- merge/resources/accounting/__init__.py +4 -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 +6 -2
- merge/resources/accounting/resources/expense_reports/client.py +20 -6
- 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 +6 -2
- 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 +4 -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.1.dist-info → mergepythonclient-2.2.0.dist-info}/METADATA +4 -2
- {mergepythonclient-2.1.1.dist-info → mergepythonclient-2.2.0.dist-info}/RECORD +136 -134
- {mergepythonclient-2.1.1.dist-info → mergepythonclient-2.2.0.dist-info}/LICENSE.md +0 -0
- {mergepythonclient-2.1.1.dist-info → mergepythonclient-2.2.0.dist-info}/WHEEL +0 -0
merge/core/client_wrapper.py
CHANGED
|
@@ -24,10 +24,10 @@ class BaseClientWrapper:
|
|
|
24
24
|
|
|
25
25
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
26
26
|
headers: typing.Dict[str, str] = {
|
|
27
|
-
"User-Agent": "MergePythonClient/2.
|
|
27
|
+
"User-Agent": "MergePythonClient/2.2.0",
|
|
28
28
|
"X-Fern-Language": "Python",
|
|
29
29
|
"X-Fern-SDK-Name": "MergePythonClient",
|
|
30
|
-
"X-Fern-SDK-Version": "2.
|
|
30
|
+
"X-Fern-SDK-Version": "2.2.0",
|
|
31
31
|
**(self.get_custom_headers() or {}),
|
|
32
32
|
}
|
|
33
33
|
if self._account_token is not None:
|
merge/core/force_multipart.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from typing import Any, Dict
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
class ForceMultipartDict(Dict[str, Any]):
|
|
5
7
|
"""
|
|
6
8
|
A dictionary subclass that always evaluates to True in boolean contexts.
|
|
7
9
|
|
|
@@ -9,7 +11,7 @@ class ForceMultipartDict(dict):
|
|
|
9
11
|
the dictionary is empty, which would normally evaluate to False.
|
|
10
12
|
"""
|
|
11
13
|
|
|
12
|
-
def __bool__(self):
|
|
14
|
+
def __bool__(self) -> bool:
|
|
13
15
|
return True
|
|
14
16
|
|
|
15
17
|
|
merge/core/http_response.py
CHANGED
|
@@ -4,8 +4,8 @@ from typing import Dict, Generic, TypeVar
|
|
|
4
4
|
|
|
5
5
|
import httpx
|
|
6
6
|
|
|
7
|
+
# Generic to represent the underlying type of the data wrapped by the HTTP response.
|
|
7
8
|
T = TypeVar("T")
|
|
8
|
-
"""Generic to represent the underlying type of the data wrapped by the HTTP response."""
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class BaseHttpResponse:
|
|
@@ -186,7 +186,7 @@ def _convert_undiscriminated_union_type(union_type: typing.Type[typing.Any], obj
|
|
|
186
186
|
def _convert_union_type(type_: typing.Type[typing.Any], object_: typing.Any) -> typing.Any:
|
|
187
187
|
base_type = get_origin(type_) or type_
|
|
188
188
|
union_type = type_
|
|
189
|
-
if base_type == typing_extensions.Annotated:
|
|
189
|
+
if base_type == typing_extensions.Annotated: # type: ignore[comparison-overlap]
|
|
190
190
|
union_type = get_args(type_)[0]
|
|
191
191
|
annotated_metadata = get_args(type_)[1:]
|
|
192
192
|
for metadata in annotated_metadata:
|
|
@@ -217,11 +217,11 @@ def construct_type(*, type_: typing.Type[typing.Any], object_: typing.Any) -> ty
|
|
|
217
217
|
return None
|
|
218
218
|
|
|
219
219
|
base_type = get_origin(type_) or type_
|
|
220
|
-
is_annotated = base_type == typing_extensions.Annotated
|
|
220
|
+
is_annotated = base_type == typing_extensions.Annotated # type: ignore[comparison-overlap]
|
|
221
221
|
maybe_annotation_members = get_args(type_)
|
|
222
222
|
is_annotated_union = is_annotated and is_union(get_origin(maybe_annotation_members[0]))
|
|
223
223
|
|
|
224
|
-
if base_type == typing.Any:
|
|
224
|
+
if base_type == typing.Any: # type: ignore[comparison-overlap]
|
|
225
225
|
return object_
|
|
226
226
|
|
|
227
227
|
if base_type == dict:
|
|
@@ -372,6 +372,8 @@ from .types import (
|
|
|
372
372
|
PaginatedTrackingCategoryList,
|
|
373
373
|
PaginatedTransactionList,
|
|
374
374
|
PaginatedVendorCreditList,
|
|
375
|
+
PatchedContactRequest,
|
|
376
|
+
PatchedContactRequestAddressesItem,
|
|
375
377
|
PatchedItemRequestRequest,
|
|
376
378
|
PatchedItemRequestRequestStatus,
|
|
377
379
|
PatchedItemRequestRequestType,
|
|
@@ -1013,6 +1015,8 @@ __all__ = [
|
|
|
1013
1015
|
"PaginatedTrackingCategoryList",
|
|
1014
1016
|
"PaginatedTransactionList",
|
|
1015
1017
|
"PaginatedVendorCreditList",
|
|
1018
|
+
"PatchedContactRequest",
|
|
1019
|
+
"PatchedContactRequestAddressesItem",
|
|
1016
1020
|
"PatchedItemRequestRequest",
|
|
1017
1021
|
"PatchedItemRequestRequestStatus",
|
|
1018
1022
|
"PatchedItemRequestRequestType",
|
|
@@ -70,7 +70,9 @@ class AccountingPeriodsClient:
|
|
|
70
70
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
71
71
|
api_key="YOUR_API_KEY",
|
|
72
72
|
)
|
|
73
|
-
client.accounting.accounting_periods.list(
|
|
73
|
+
client.accounting.accounting_periods.list(
|
|
74
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
75
|
+
)
|
|
74
76
|
"""
|
|
75
77
|
_response = self._raw_client.list(
|
|
76
78
|
cursor=cursor,
|
|
@@ -198,7 +200,9 @@ class AsyncAccountingPeriodsClient:
|
|
|
198
200
|
|
|
199
201
|
|
|
200
202
|
async def main() -> None:
|
|
201
|
-
await client.accounting.accounting_periods.list(
|
|
203
|
+
await client.accounting.accounting_periods.list(
|
|
204
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
205
|
+
)
|
|
202
206
|
|
|
203
207
|
|
|
204
208
|
asyncio.run(main())
|
|
@@ -133,7 +133,9 @@ class AccountsClient:
|
|
|
133
133
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
134
134
|
api_key="YOUR_API_KEY",
|
|
135
135
|
)
|
|
136
|
-
client.accounting.accounts.list(
|
|
136
|
+
client.accounting.accounts.list(
|
|
137
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
138
|
+
)
|
|
137
139
|
"""
|
|
138
140
|
_response = self._raw_client.list(
|
|
139
141
|
account_type=account_type,
|
|
@@ -415,7 +417,9 @@ class AsyncAccountsClient:
|
|
|
415
417
|
|
|
416
418
|
|
|
417
419
|
async def main() -> None:
|
|
418
|
-
await client.accounting.accounts.list(
|
|
420
|
+
await client.accounting.accounts.list(
|
|
421
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
422
|
+
)
|
|
419
423
|
|
|
420
424
|
|
|
421
425
|
asyncio.run(main())
|
|
@@ -101,7 +101,9 @@ class AttachmentsClient:
|
|
|
101
101
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
102
102
|
api_key="YOUR_API_KEY",
|
|
103
103
|
)
|
|
104
|
-
client.accounting.attachments.list(
|
|
104
|
+
client.accounting.attachments.list(
|
|
105
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
106
|
+
)
|
|
105
107
|
"""
|
|
106
108
|
_response = self._raw_client.list(
|
|
107
109
|
company_id=company_id,
|
|
@@ -333,7 +335,9 @@ class AsyncAttachmentsClient:
|
|
|
333
335
|
|
|
334
336
|
|
|
335
337
|
async def main() -> None:
|
|
336
|
-
await client.accounting.attachments.list(
|
|
338
|
+
await client.accounting.attachments.list(
|
|
339
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
340
|
+
)
|
|
337
341
|
|
|
338
342
|
|
|
339
343
|
asyncio.run(main())
|
|
@@ -73,7 +73,9 @@ class AuditTrailClient:
|
|
|
73
73
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
74
74
|
api_key="YOUR_API_KEY",
|
|
75
75
|
)
|
|
76
|
-
client.accounting.audit_trail.list(
|
|
76
|
+
client.accounting.audit_trail.list(
|
|
77
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
78
|
+
)
|
|
77
79
|
"""
|
|
78
80
|
_response = self._raw_client.list(
|
|
79
81
|
cursor=cursor,
|
|
@@ -157,7 +159,9 @@ class AsyncAuditTrailClient:
|
|
|
157
159
|
|
|
158
160
|
|
|
159
161
|
async def main() -> None:
|
|
160
|
-
await client.accounting.audit_trail.list(
|
|
162
|
+
await client.accounting.audit_trail.list(
|
|
163
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
164
|
+
)
|
|
161
165
|
|
|
162
166
|
|
|
163
167
|
asyncio.run(main())
|
|
@@ -99,7 +99,9 @@ class BalanceSheetsClient:
|
|
|
99
99
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
100
100
|
api_key="YOUR_API_KEY",
|
|
101
101
|
)
|
|
102
|
-
client.accounting.balance_sheets.list(
|
|
102
|
+
client.accounting.balance_sheets.list(
|
|
103
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
104
|
+
)
|
|
103
105
|
"""
|
|
104
106
|
_response = self._raw_client.list(
|
|
105
107
|
company_id=company_id,
|
|
@@ -267,7 +269,9 @@ class AsyncBalanceSheetsClient:
|
|
|
267
269
|
|
|
268
270
|
|
|
269
271
|
async def main() -> None:
|
|
270
|
-
await client.accounting.balance_sheets.list(
|
|
272
|
+
await client.accounting.balance_sheets.list(
|
|
273
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
274
|
+
)
|
|
271
275
|
|
|
272
276
|
|
|
273
277
|
asyncio.run(main())
|
|
@@ -76,7 +76,9 @@ class BankFeedAccountsClient:
|
|
|
76
76
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
77
77
|
api_key="YOUR_API_KEY",
|
|
78
78
|
)
|
|
79
|
-
client.accounting.bank_feed_accounts.list(
|
|
79
|
+
client.accounting.bank_feed_accounts.list(
|
|
80
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
81
|
+
)
|
|
80
82
|
"""
|
|
81
83
|
_response = self._raw_client.list(
|
|
82
84
|
cursor=cursor,
|
|
@@ -278,7 +280,9 @@ class AsyncBankFeedAccountsClient:
|
|
|
278
280
|
|
|
279
281
|
|
|
280
282
|
async def main() -> None:
|
|
281
|
-
await client.accounting.bank_feed_accounts.list(
|
|
283
|
+
await client.accounting.bank_feed_accounts.list(
|
|
284
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
285
|
+
)
|
|
282
286
|
|
|
283
287
|
|
|
284
288
|
asyncio.run(main())
|
|
@@ -105,7 +105,9 @@ class BankFeedTransactionsClient:
|
|
|
105
105
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
106
106
|
api_key="YOUR_API_KEY",
|
|
107
107
|
)
|
|
108
|
-
client.accounting.bank_feed_transactions.list(
|
|
108
|
+
client.accounting.bank_feed_transactions.list(
|
|
109
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
110
|
+
)
|
|
109
111
|
"""
|
|
110
112
|
_response = self._raw_client.list(
|
|
111
113
|
created_after=created_after,
|
|
@@ -347,7 +349,9 @@ class AsyncBankFeedTransactionsClient:
|
|
|
347
349
|
|
|
348
350
|
|
|
349
351
|
async def main() -> None:
|
|
350
|
-
await client.accounting.bank_feed_transactions.list(
|
|
352
|
+
await client.accounting.bank_feed_transactions.list(
|
|
353
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
354
|
+
)
|
|
351
355
|
|
|
352
356
|
|
|
353
357
|
asyncio.run(main())
|
|
@@ -99,7 +99,9 @@ class CashFlowStatementsClient:
|
|
|
99
99
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
100
100
|
api_key="YOUR_API_KEY",
|
|
101
101
|
)
|
|
102
|
-
client.accounting.cash_flow_statements.list(
|
|
102
|
+
client.accounting.cash_flow_statements.list(
|
|
103
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
104
|
+
)
|
|
103
105
|
"""
|
|
104
106
|
_response = self._raw_client.list(
|
|
105
107
|
company_id=company_id,
|
|
@@ -267,7 +269,9 @@ class AsyncCashFlowStatementsClient:
|
|
|
267
269
|
|
|
268
270
|
|
|
269
271
|
async def main() -> None:
|
|
270
|
-
await client.accounting.cash_flow_statements.list(
|
|
272
|
+
await client.accounting.cash_flow_statements.list(
|
|
273
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
274
|
+
)
|
|
271
275
|
|
|
272
276
|
|
|
273
277
|
asyncio.run(main())
|
|
@@ -97,7 +97,9 @@ class CompanyInfoClient:
|
|
|
97
97
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
98
98
|
api_key="YOUR_API_KEY",
|
|
99
99
|
)
|
|
100
|
-
client.accounting.company_info.list(
|
|
100
|
+
client.accounting.company_info.list(
|
|
101
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
102
|
+
)
|
|
101
103
|
"""
|
|
102
104
|
_response = self._raw_client.list(
|
|
103
105
|
created_after=created_after,
|
|
@@ -260,7 +262,9 @@ class AsyncCompanyInfoClient:
|
|
|
260
262
|
|
|
261
263
|
|
|
262
264
|
async def main() -> None:
|
|
263
|
-
await client.accounting.company_info.list(
|
|
265
|
+
await client.accounting.company_info.list(
|
|
266
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
267
|
+
)
|
|
264
268
|
|
|
265
269
|
|
|
266
270
|
asyncio.run(main())
|
|
@@ -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())
|