Skip to content

Commit

Permalink
Bump python generator version. (#56)
Browse files Browse the repository at this point in the history
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
  • Loading branch information
fern-api[bot] authored Nov 14, 2023
1 parent c4e76f3 commit 400c9a0
Show file tree
Hide file tree
Showing 182 changed files with 4,958 additions and 1,011 deletions.
519 changes: 519 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "MergePythonClient"
version = "0.2.11"
version = "1.0.0"
description = ""
readme = "README.md"
authors = []
Expand All @@ -11,7 +11,7 @@ packages = [
[tool.poetry.dependencies]
python = "^3.7"
httpx = ">=0.21.2"
pydantic = ">= 1.9.2, < 3"
pydantic = ">= 1.9.2, < 2.5.0"

[tool.poetry.dev-dependencies]
mypy = "0.971"
Expand Down
2 changes: 1 addition & 1 deletion src/merge/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "MergePythonClient",
"X-Fern-SDK-Version": "0.2.11",
"X-Fern-SDK-Version": "1.0.0",
}
if self._account_token is not None:
headers["X-Account-Token"] = self._account_token
Expand Down
14 changes: 14 additions & 0 deletions src/merge/resources/accounting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
CountryEnum,
CreditNote,
CreditNoteAccountingPeriod,
CreditNoteAppliedPaymentsItem,
CreditNoteCompany,
CreditNoteContact,
CreditNoteCurrency,
Expand Down Expand Up @@ -130,6 +131,7 @@
IncomeStatementCurrency,
Invoice,
InvoiceAccountingPeriod,
InvoiceAppliedPaymentsItem,
InvoiceCompany,
InvoiceContact,
InvoiceCurrency,
Expand Down Expand Up @@ -178,6 +180,7 @@
JournalEntriesRetrieveRequestExpand,
JournalEntry,
JournalEntryAccountingPeriod,
JournalEntryAppliedPaymentsItem,
JournalEntryCompany,
JournalEntryCurrency,
JournalEntryPaymentsItem,
Expand Down Expand Up @@ -240,12 +243,16 @@
Payment,
PaymentAccount,
PaymentAccountingPeriod,
PaymentAppliedToLinesItem,
PaymentCompany,
PaymentContact,
PaymentCurrency,
PaymentLineItem,
PaymentLineItemRequest,
PaymentRequest,
PaymentRequestAccount,
PaymentRequestAccountingPeriod,
PaymentRequestAppliedToLinesItem,
PaymentRequestCompany,
PaymentRequestContact,
PaymentRequestCurrency,
Expand Down Expand Up @@ -433,6 +440,7 @@
"CountryEnum",
"CreditNote",
"CreditNoteAccountingPeriod",
"CreditNoteAppliedPaymentsItem",
"CreditNoteCompany",
"CreditNoteContact",
"CreditNoteCurrency",
Expand Down Expand Up @@ -492,6 +500,7 @@
"IncomeStatementCurrency",
"Invoice",
"InvoiceAccountingPeriod",
"InvoiceAppliedPaymentsItem",
"InvoiceCompany",
"InvoiceContact",
"InvoiceCurrency",
Expand Down Expand Up @@ -540,6 +549,7 @@
"JournalEntriesRetrieveRequestExpand",
"JournalEntry",
"JournalEntryAccountingPeriod",
"JournalEntryAppliedPaymentsItem",
"JournalEntryCompany",
"JournalEntryCurrency",
"JournalEntryPaymentsItem",
Expand Down Expand Up @@ -602,12 +612,16 @@
"Payment",
"PaymentAccount",
"PaymentAccountingPeriod",
"PaymentAppliedToLinesItem",
"PaymentCompany",
"PaymentContact",
"PaymentCurrency",
"PaymentLineItem",
"PaymentLineItemRequest",
"PaymentRequest",
"PaymentRequestAccount",
"PaymentRequestAccountingPeriod",
"PaymentRequestAppliedToLinesItem",
"PaymentRequestCompany",
"PaymentRequestContact",
"PaymentRequestCurrency",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def retrieve(self) -> AccountDetails:
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
client.accounting.retrieve()
client.accounting.account_details.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
"GET",
Expand Down Expand Up @@ -60,7 +60,7 @@ async def retrieve(self) -> AccountDetails:
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
await client.accounting.retrieve()
await client.accounting.account_details.retrieve()
"""
_response = await self._client_wrapper.httpx_client.request(
"GET",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def list(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
client.accounting.list()
client.accounting.accounting_periods.list()
"""
_response = self._client_wrapper.httpx_client.request(
"GET",
Expand Down Expand Up @@ -85,7 +85,7 @@ def retrieve(self, id: str, *, include_remote_data: typing.Optional[bool] = None
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
client.accounting.retrieve(
client.accounting.accounting_periods.retrieve(
id="id",
)
"""
Expand Down Expand Up @@ -137,7 +137,7 @@ async def list(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
await client.accounting.list()
await client.accounting.accounting_periods.list()
"""
_response = await self._client_wrapper.httpx_client.request(
"GET",
Expand Down Expand Up @@ -176,7 +176,7 @@ async def retrieve(self, id: str, *, include_remote_data: typing.Optional[bool]
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
await client.accounting.retrieve(
await client.accounting.accounting_periods.retrieve(
id="id",
)
"""
Expand Down
36 changes: 18 additions & 18 deletions src/merge/resources/accounting/resources/accounts/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ def list(
- show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form.
---
from merge import (
from merge.client import Merge
from merge.resources.accounting import (
AccountsListRequestRemoteFields,
AccountsListRequestShowEnumOrigins,
)
from merge.client import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
client.accounting.list(
client.accounting.accounts.list(
expand="company",
remote_fields=AccountsListRequestRemoteFields.CLASSIFICATION,
show_enum_origins=AccountsListRequestShowEnumOrigins.CLASSIFICATION,
Expand Down Expand Up @@ -146,14 +146,14 @@ def create(
- model: AccountRequest.
---
from merge import AccountRequest
from merge.client import Merge
from merge.resources.accounting import AccountRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
client.accounting.create(
client.accounting.accounts.create(
model=AccountRequest(
name="Cash",
description="Cash",
Expand Down Expand Up @@ -203,17 +203,17 @@ def retrieve(
- show_enum_origins: typing.Optional[AccountsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form.
---
from merge import (
from merge.client import Merge
from merge.resources.accounting import (
AccountsRetrieveRequestRemoteFields,
AccountsRetrieveRequestShowEnumOrigins,
)
from merge.client import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
client.accounting.retrieve(
client.accounting.accounts.retrieve(
id="id",
expand="company",
remote_fields=AccountsRetrieveRequestRemoteFields.CLASSIFICATION,
Expand Down Expand Up @@ -253,7 +253,7 @@ def meta_post_retrieve(self) -> MetaResponse:
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
client.accounting.meta_post_retrieve()
client.accounting.accounts.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
"GET",
Expand Down Expand Up @@ -321,17 +321,17 @@ async def list(
- show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form.
---
from merge import (
from merge.client import AsyncMerge
from merge.resources.accounting import (
AccountsListRequestRemoteFields,
AccountsListRequestShowEnumOrigins,
)
from merge.client import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
await client.accounting.list(
await client.accounting.accounts.list(
expand="company",
remote_fields=AccountsListRequestRemoteFields.CLASSIFICATION,
show_enum_origins=AccountsListRequestShowEnumOrigins.CLASSIFICATION,
Expand Down Expand Up @@ -385,14 +385,14 @@ async def create(
- model: AccountRequest.
---
from merge import AccountRequest
from merge.client import AsyncMerge
from merge.resources.accounting import AccountRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
await client.accounting.create(
await client.accounting.accounts.create(
model=AccountRequest(
name="Cash",
description="Cash",
Expand Down Expand Up @@ -442,17 +442,17 @@ async def retrieve(
- show_enum_origins: typing.Optional[AccountsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form.
---
from merge import (
from merge.client import AsyncMerge
from merge.resources.accounting import (
AccountsRetrieveRequestRemoteFields,
AccountsRetrieveRequestShowEnumOrigins,
)
from merge.client import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
await client.accounting.retrieve(
await client.accounting.accounts.retrieve(
id="id",
expand="company",
remote_fields=AccountsRetrieveRequestRemoteFields.CLASSIFICATION,
Expand Down Expand Up @@ -492,7 +492,7 @@ async def meta_post_retrieve(self) -> MetaResponse:
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
await client.accounting.meta_post_retrieve()
await client.accounting.accounts.meta_post_retrieve()
"""
_response = await self._client_wrapper.httpx_client.request(
"GET",
Expand Down
4 changes: 2 additions & 2 deletions src/merge/resources/accounting/resources/addresses/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def retrieve(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
client.accounting.retrieve(
client.accounting.addresses.retrieve(
id="id",
remote_fields="type",
show_enum_origins="type",
Expand Down Expand Up @@ -105,7 +105,7 @@ async def retrieve(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
await client.accounting.retrieve(
await client.accounting.addresses.retrieve(
id="id",
remote_fields="type",
show_enum_origins="type",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,34 @@ def create(self, *, request: DataPassthroughRequest) -> AsyncPassthroughReciept:
Parameters:
- request: DataPassthroughRequest.
---
from merge import (DataPassthroughRequest, MethodEnum,
MultipartFormFieldRequest, RequestFormatEnum)
from merge.client import Merge
from merge.resources.accounting import (
DataPassthroughRequest,
MethodEnum,
MultipartFormFieldRequest,
RequestFormatEnum,
)
client = Merge(account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", )
client.accounting.create(request=DataPassthroughRequest(method=MethodEnum.GET, path="/scooters", data="{"company": "Lime", "model": "Gen 2.5"}", multipart_form_data=[MultipartFormFieldRequest(name="resume", data="SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U=", file_name="resume.pdf", content_type="application/pdf", )], request_format=RequestFormatEnum.JSON, ), )
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
client.accounting.async_passthrough.create(
request=DataPassthroughRequest(
method=MethodEnum.GET,
path="/scooters",
data='{"company": "Lime", "model": "Gen 2.5"}',
multipart_form_data=[
MultipartFormFieldRequest(
name="resume",
data="SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U=",
file_name="resume.pdf",
content_type="application/pdf",
)
],
request_format=RequestFormatEnum.JSON,
),
)
"""
_response = self._client_wrapper.httpx_client.request(
"POST",
Expand Down Expand Up @@ -89,12 +111,34 @@ async def create(self, *, request: DataPassthroughRequest) -> AsyncPassthroughRe
Parameters:
- request: DataPassthroughRequest.
---
from merge import (DataPassthroughRequest, MethodEnum,
MultipartFormFieldRequest, RequestFormatEnum)
from merge.client import AsyncMerge
from merge.resources.accounting import (
DataPassthroughRequest,
MethodEnum,
MultipartFormFieldRequest,
RequestFormatEnum,
)
client = AsyncMerge(account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", )
await client.accounting.create(request=DataPassthroughRequest(method=MethodEnum.GET, path="/scooters", data="{"company": "Lime", "model": "Gen 2.5"}", multipart_form_data=[MultipartFormFieldRequest(name="resume", data="SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U=", file_name="resume.pdf", content_type="application/pdf", )], request_format=RequestFormatEnum.JSON, ), )
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
await client.accounting.async_passthrough.create(
request=DataPassthroughRequest(
method=MethodEnum.GET,
path="/scooters",
data='{"company": "Lime", "model": "Gen 2.5"}',
multipart_form_data=[
MultipartFormFieldRequest(
name="resume",
data="SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U=",
file_name="resume.pdf",
content_type="application/pdf",
)
],
request_format=RequestFormatEnum.JSON,
),
)
"""
_response = await self._client_wrapper.httpx_client.request(
"POST",
Expand Down
Loading

0 comments on commit 400c9a0

Please sign in to comment.