Skip to content

Commit 0e106ae

Browse files
committed
SDK regeneration
1 parent a743df1 commit 0e106ae

File tree

383 files changed

+4735
-4274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

383 files changed

+4735
-4274
lines changed

poetry.lock

+135-135
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "MergePythonClient"
3-
version = "1.0.7"
3+
version = "1.0.8"
44
description = ""
55
readme = "README.md"
66
authors = []

src/merge/core/client_wrapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get_headers(self) -> typing.Dict[str, str]:
2121
headers: typing.Dict[str, str] = {
2222
"X-Fern-Language": "Python",
2323
"X-Fern-SDK-Name": "MergePythonClient",
24-
"X-Fern-SDK-Version": "1.0.7",
24+
"X-Fern-SDK-Version": "1.0.8",
2525
}
2626
if self._account_token is not None:
2727
headers["X-Account-Token"] = self._account_token

src/merge/environment.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55

66
class MergeEnvironment(enum.Enum):
7-
PRODUCTION = "https://api.merge.dev"
8-
SANDBOX = "https://api-sandbox.merge.dev"
9-
PRODUCTION_EU = "https://api-eu.merge.dev"
7+
PRODUCTION = "https://api.merge.dev/api"
8+
SANDBOX = "https://api-sandbox.merge.dev/api"
9+
PRODUCTION_EU = "https://api-eu.merge.dev/api"

src/merge/resources/accounting/__init__.py

+16
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,14 @@
234234
PaginatedTrackingCategoryList,
235235
PaginatedTransactionList,
236236
PaginatedVendorCreditList,
237+
PatchedPaymentRequest,
238+
PatchedPaymentRequestAccount,
239+
PatchedPaymentRequestAccountingPeriod,
240+
PatchedPaymentRequestAppliedToLinesItem,
241+
PatchedPaymentRequestCompany,
242+
PatchedPaymentRequestContact,
243+
PatchedPaymentRequestCurrency,
244+
PatchedPaymentRequestTrackingCategoriesItem,
237245
Payment,
238246
PaymentAccount,
239247
PaymentAccountingPeriod,
@@ -652,6 +660,14 @@
652660
"PaginatedTrackingCategoryList",
653661
"PaginatedTransactionList",
654662
"PaginatedVendorCreditList",
663+
"PatchedPaymentRequest",
664+
"PatchedPaymentRequestAccount",
665+
"PatchedPaymentRequestAccountingPeriod",
666+
"PatchedPaymentRequestAppliedToLinesItem",
667+
"PatchedPaymentRequestCompany",
668+
"PatchedPaymentRequestContact",
669+
"PatchedPaymentRequestCurrency",
670+
"PatchedPaymentRequestTrackingCategoriesItem",
655671
"Payment",
656672
"PaymentAccount",
657673
"PaymentAccountingPeriod",

src/merge/resources/accounting/resources/account_details/client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
3838
"""
3939
_response = self._client_wrapper.httpx_client.request(
4040
"GET",
41-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/account-details"),
41+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/account-details"),
4242
params=jsonable_encoder(
4343
request_options.get("additional_query_parameters") if request_options is not None else None
4444
),
@@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
8484
"""
8585
_response = await self._client_wrapper.httpx_client.request(
8686
"GET",
87-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/account-details"),
87+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/account-details"),
8888
params=jsonable_encoder(
8989
request_options.get("additional_query_parameters") if request_options is not None else None
9090
),

src/merge/resources/accounting/resources/account_token/client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
3737
api_key="YOUR_API_KEY",
3838
)
3939
client.accounting.account_token.retrieve(
40-
public_token="string",
40+
public_token="public_token",
4141
)
4242
"""
4343
_response = self._client_wrapper.httpx_client.request(
4444
"GET",
4545
urllib.parse.urljoin(
46-
f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/account-token/{public_token}"
46+
f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/account-token/{public_token}"
4747
),
4848
params=jsonable_encoder(
4949
request_options.get("additional_query_parameters") if request_options is not None else None
@@ -91,13 +91,13 @@ async def retrieve(
9191
api_key="YOUR_API_KEY",
9292
)
9393
await client.accounting.account_token.retrieve(
94-
public_token="string",
94+
public_token="public_token",
9595
)
9696
"""
9797
_response = await self._client_wrapper.httpx_client.request(
9898
"GET",
9999
urllib.parse.urljoin(
100-
f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/account-token/{public_token}"
100+
f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/account-token/{public_token}"
101101
),
102102
params=jsonable_encoder(
103103
request_options.get("additional_query_parameters") if request_options is not None else None

src/merge/resources/accounting/resources/accounting_periods/client.py

+6-10
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def list(
5555
"""
5656
_response = self._client_wrapper.httpx_client.request(
5757
"GET",
58-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounting-periods"),
58+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounting-periods"),
5959
params=jsonable_encoder(
6060
remove_none_from_dict(
6161
{
@@ -115,14 +115,12 @@ def retrieve(
115115
api_key="YOUR_API_KEY",
116116
)
117117
client.accounting.accounting_periods.retrieve(
118-
id="string",
118+
id="id",
119119
)
120120
"""
121121
_response = self._client_wrapper.httpx_client.request(
122122
"GET",
123-
urllib.parse.urljoin(
124-
f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/accounting-periods/{id}"
125-
),
123+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/accounting-periods/{id}"),
126124
params=jsonable_encoder(
127125
remove_none_from_dict(
128126
{
@@ -193,7 +191,7 @@ async def list(
193191
"""
194192
_response = await self._client_wrapper.httpx_client.request(
195193
"GET",
196-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounting-periods"),
194+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounting-periods"),
197195
params=jsonable_encoder(
198196
remove_none_from_dict(
199197
{
@@ -253,14 +251,12 @@ async def retrieve(
253251
api_key="YOUR_API_KEY",
254252
)
255253
await client.accounting.accounting_periods.retrieve(
256-
id="string",
254+
id="id",
257255
)
258256
"""
259257
_response = await self._client_wrapper.httpx_client.request(
260258
"GET",
261-
urllib.parse.urljoin(
262-
f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/accounting-periods/{id}"
263-
),
259+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/accounting-periods/{id}"),
264260
params=jsonable_encoder(
265261
remove_none_from_dict(
266262
{

src/merge/resources/accounting/resources/accounts/client.py

+18-62
Original file line numberDiff line numberDiff line change
@@ -80,29 +80,21 @@ def list(
8080
8181
- remote_id: typing.Optional[str]. The API provider's ID for the given object.
8282
83-
- show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form.
83+
- show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins]. 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)
8484
8585
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
8686
---
8787
from merge.client import Merge
88-
from merge.resources.accounting import (
89-
AccountsListRequestRemoteFields,
90-
AccountsListRequestShowEnumOrigins,
91-
)
9288
9389
client = Merge(
9490
account_token="YOUR_ACCOUNT_TOKEN",
9591
api_key="YOUR_API_KEY",
9692
)
97-
client.accounting.accounts.list(
98-
expand="company",
99-
remote_fields=AccountsListRequestRemoteFields.CLASSIFICATION,
100-
show_enum_origins=AccountsListRequestShowEnumOrigins.CLASSIFICATION,
101-
)
93+
client.accounting.accounts.list()
10294
"""
10395
_response = self._client_wrapper.httpx_client.request(
10496
"GET",
105-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounts"),
97+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounts"),
10698
params=jsonable_encoder(
10799
remove_none_from_dict(
108100
{
@@ -175,19 +167,12 @@ def create(
175167
api_key="YOUR_API_KEY",
176168
)
177169
client.accounting.accounts.create(
178-
model=AccountRequest(
179-
name="Cash",
180-
description="Cash",
181-
type="Asset",
182-
account_number="X12Y9AB",
183-
parent_account="22d92d6c-22f9-11ed-861d-0242ac120002",
184-
company="595c8f97-2ac4-45b7-b000-41bdf43240b5",
185-
),
170+
model=AccountRequest(),
186171
)
187172
"""
188173
_response = self._client_wrapper.httpx_client.request(
189174
"POST",
190-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounts"),
175+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounts"),
191176
params=jsonable_encoder(
192177
remove_none_from_dict(
193178
{
@@ -249,30 +234,23 @@ def retrieve(
249234
250235
- remote_fields: typing.Optional[AccountsRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins.
251236
252-
- show_enum_origins: typing.Optional[AccountsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form.
237+
- show_enum_origins: typing.Optional[AccountsRetrieveRequestShowEnumOrigins]. 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)
253238
254239
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
255240
---
256241
from merge.client import Merge
257-
from merge.resources.accounting import (
258-
AccountsRetrieveRequestRemoteFields,
259-
AccountsRetrieveRequestShowEnumOrigins,
260-
)
261242
262243
client = Merge(
263244
account_token="YOUR_ACCOUNT_TOKEN",
264245
api_key="YOUR_API_KEY",
265246
)
266247
client.accounting.accounts.retrieve(
267-
id="string",
268-
expand="company",
269-
remote_fields=AccountsRetrieveRequestRemoteFields.CLASSIFICATION,
270-
show_enum_origins=AccountsRetrieveRequestShowEnumOrigins.CLASSIFICATION,
248+
id="id",
271249
)
272250
"""
273251
_response = self._client_wrapper.httpx_client.request(
274252
"GET",
275-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/accounts/{id}"),
253+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/accounts/{id}"),
276254
params=jsonable_encoder(
277255
remove_none_from_dict(
278256
{
@@ -325,7 +303,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
325303
"""
326304
_response = self._client_wrapper.httpx_client.request(
327305
"GET",
328-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounts/meta/post"),
306+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounts/meta/post"),
329307
params=jsonable_encoder(
330308
request_options.get("additional_query_parameters") if request_options is not None else None
331309
),
@@ -400,29 +378,21 @@ async def list(
400378
401379
- remote_id: typing.Optional[str]. The API provider's ID for the given object.
402380
403-
- show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form.
381+
- show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins]. 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)
404382
405383
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
406384
---
407385
from merge.client import AsyncMerge
408-
from merge.resources.accounting import (
409-
AccountsListRequestRemoteFields,
410-
AccountsListRequestShowEnumOrigins,
411-
)
412386
413387
client = AsyncMerge(
414388
account_token="YOUR_ACCOUNT_TOKEN",
415389
api_key="YOUR_API_KEY",
416390
)
417-
await client.accounting.accounts.list(
418-
expand="company",
419-
remote_fields=AccountsListRequestRemoteFields.CLASSIFICATION,
420-
show_enum_origins=AccountsListRequestShowEnumOrigins.CLASSIFICATION,
421-
)
391+
await client.accounting.accounts.list()
422392
"""
423393
_response = await self._client_wrapper.httpx_client.request(
424394
"GET",
425-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounts"),
395+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounts"),
426396
params=jsonable_encoder(
427397
remove_none_from_dict(
428398
{
@@ -495,19 +465,12 @@ async def create(
495465
api_key="YOUR_API_KEY",
496466
)
497467
await client.accounting.accounts.create(
498-
model=AccountRequest(
499-
name="Cash",
500-
description="Cash",
501-
type="Asset",
502-
account_number="X12Y9AB",
503-
parent_account="22d92d6c-22f9-11ed-861d-0242ac120002",
504-
company="595c8f97-2ac4-45b7-b000-41bdf43240b5",
505-
),
468+
model=AccountRequest(),
506469
)
507470
"""
508471
_response = await self._client_wrapper.httpx_client.request(
509472
"POST",
510-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounts"),
473+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounts"),
511474
params=jsonable_encoder(
512475
remove_none_from_dict(
513476
{
@@ -569,30 +532,23 @@ async def retrieve(
569532
570533
- remote_fields: typing.Optional[AccountsRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins.
571534
572-
- show_enum_origins: typing.Optional[AccountsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form.
535+
- show_enum_origins: typing.Optional[AccountsRetrieveRequestShowEnumOrigins]. 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)
573536
574537
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
575538
---
576539
from merge.client import AsyncMerge
577-
from merge.resources.accounting import (
578-
AccountsRetrieveRequestRemoteFields,
579-
AccountsRetrieveRequestShowEnumOrigins,
580-
)
581540
582541
client = AsyncMerge(
583542
account_token="YOUR_ACCOUNT_TOKEN",
584543
api_key="YOUR_API_KEY",
585544
)
586545
await client.accounting.accounts.retrieve(
587-
id="string",
588-
expand="company",
589-
remote_fields=AccountsRetrieveRequestRemoteFields.CLASSIFICATION,
590-
show_enum_origins=AccountsRetrieveRequestShowEnumOrigins.CLASSIFICATION,
546+
id="id",
591547
)
592548
"""
593549
_response = await self._client_wrapper.httpx_client.request(
594550
"GET",
595-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/accounts/{id}"),
551+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/accounts/{id}"),
596552
params=jsonable_encoder(
597553
remove_none_from_dict(
598554
{
@@ -645,7 +601,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
645601
"""
646602
_response = await self._client_wrapper.httpx_client.request(
647603
"GET",
648-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounts/meta/post"),
604+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounts/meta/post"),
649605
params=jsonable_encoder(
650606
request_options.get("additional_query_parameters") if request_options is not None else None
651607
),

0 commit comments

Comments
 (0)