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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "MergePythonClient"
version = "1.0.4"
version = "1.0.5"
description = ""
readme = "README.md"
authors = []
Expand Down
10 changes: 6 additions & 4 deletions src/merge/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ def __init__(
environment: MergeEnvironment = MergeEnvironment.PRODUCTION,
account_token: typing.Optional[str] = None,
api_key: typing.Union[str, typing.Callable[[], str]],
timeout: typing.Optional[float] = 60
timeout: typing.Optional[float] = 60,
httpx_client: typing.Optional[httpx.Client] = None
):
self._client_wrapper = SyncClientWrapper(
base_url=_get_base_url(base_url=base_url, environment=environment),
account_token=account_token,
api_key=api_key,
httpx_client=httpx.Client(timeout=timeout),
httpx_client=httpx.Client(timeout=timeout) if httpx_client is None else httpx_client,
)
self.ats = AtsClient(client_wrapper=self._client_wrapper)
self.crm = CrmClient(client_wrapper=self._client_wrapper)
Expand All @@ -46,13 +47,14 @@ def __init__(
environment: MergeEnvironment = MergeEnvironment.PRODUCTION,
account_token: typing.Optional[str] = None,
api_key: typing.Union[str, typing.Callable[[], str]],
timeout: typing.Optional[float] = 60
timeout: typing.Optional[float] = 60,
httpx_client: typing.Optional[httpx.AsyncClient] = None
):
self._client_wrapper = AsyncClientWrapper(
base_url=_get_base_url(base_url=base_url, environment=environment),
account_token=account_token,
api_key=api_key,
httpx_client=httpx.AsyncClient(timeout=timeout),
httpx_client=httpx.AsyncClient(timeout=timeout) if httpx_client is None else httpx_client,
)
self.ats = AsyncAtsClient(client_wrapper=self._client_wrapper)
self.crm = AsyncCrmClient(client_wrapper=self._client_wrapper)
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": "1.0.4",
"X-Fern-SDK-Version": "1.0.5",
}
if self._account_token is not None:
headers["X-Account-Token"] = self._account_token
Expand Down
66 changes: 33 additions & 33 deletions src/merge/resources/accounting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
AccountingPeriodStatusEnum,
AccountingPhoneNumber,
AccountingPhoneNumberRequest,
AccountsListRequestRemoteFields,
AccountsListRequestShowEnumOrigins,
AccountsRetrieveRequestRemoteFields,
AccountsRetrieveRequestShowEnumOrigins,
Address,
AddressCountry,
AddressRequest,
Expand All @@ -54,8 +50,6 @@
CommonModelScopesBodyRequest,
CompanyInfo,
CompanyInfoCurrency,
CompanyInfoListRequestExpand,
CompanyInfoRetrieveRequestExpand,
ConditionSchema,
ConditionSchemaConditionType,
ConditionTypeEnum,
Expand All @@ -66,8 +60,6 @@
ContactRequestStatus,
ContactResponse,
ContactStatus,
ContactsListRequestExpand,
ContactsRetrieveRequestExpand,
CountryEnum,
CreditNote,
CreditNoteAccountingPeriod,
Expand All @@ -82,12 +74,6 @@
CreditNoteStatus,
CreditNoteStatusEnum,
CreditNoteTrackingCategoriesItem,
CreditNotesListRequestExpand,
CreditNotesListRequestRemoteFields,
CreditNotesListRequestShowEnumOrigins,
CreditNotesRetrieveRequestExpand,
CreditNotesRetrieveRequestRemoteFields,
CreditNotesRetrieveRequestShowEnumOrigins,
CurrencyEnum,
DataPassthroughRequest,
DebugModeLog,
Expand Down Expand Up @@ -125,8 +111,6 @@
ExpenseRequestTrackingCategoriesItem,
ExpenseResponse,
ExpenseTrackingCategoriesItem,
ExpensesListRequestExpand,
ExpensesRetrieveRequestExpand,
IncomeStatement,
IncomeStatementCompany,
IncomeStatementCurrency,
Expand Down Expand Up @@ -165,22 +149,14 @@
InvoiceTrackingCategoriesItem,
InvoiceType,
InvoiceTypeEnum,
InvoicesListRequestExpand,
InvoicesListRequestType,
InvoicesRetrieveRequestExpand,
Issue,
IssueStatus,
IssueStatusEnum,
IssuesListRequestStatus,
Item,
ItemCompany,
ItemPurchaseAccount,
ItemSalesAccount,
ItemStatus,
ItemsListRequestExpand,
ItemsRetrieveRequestExpand,
JournalEntriesListRequestExpand,
JournalEntriesRetrieveRequestExpand,
JournalEntry,
JournalEntryAccountingPeriod,
JournalEntryAppliedPaymentsItem,
Expand Down Expand Up @@ -212,7 +188,6 @@
LinkedAccountSelectiveSyncConfiguration,
LinkedAccountSelectiveSyncConfigurationRequest,
LinkedAccountStatus,
LinkedAccountsListRequestCategory,
MetaResponse,
MethodEnum,
ModelOperation,
Expand Down Expand Up @@ -262,8 +237,6 @@
PaymentRequestTrackingCategoriesItem,
PaymentResponse,
PaymentTrackingCategoriesItem,
PaymentsListRequestExpand,
PaymentsRetrieveRequestExpand,
PostingStatusEnum,
PurchaseOrder,
PurchaseOrderAccountingPeriod,
Expand All @@ -288,8 +261,6 @@
PurchaseOrderStatusEnum,
PurchaseOrderTrackingCategoriesItem,
PurchaseOrderVendor,
PurchaseOrdersListRequestExpand,
PurchaseOrdersRetrieveRequestExpand,
RemoteData,
RemoteKey,
RemoteResponse,
Expand All @@ -316,8 +287,6 @@
TransactionLineItemCurrency,
TransactionLineItemItem,
TransactionTrackingCategoriesItem,
TransactionsListRequestExpand,
TransactionsRetrieveRequestExpand,
ValidationProblemSource,
VendorCredit,
VendorCreditAccountingPeriod,
Expand All @@ -327,12 +296,43 @@
VendorCreditLineAccount,
VendorCreditTrackingCategoriesItem,
VendorCreditVendor,
VendorCreditsListRequestExpand,
VendorCreditsRetrieveRequestExpand,
WarningValidationProblem,
WebhookReceiver,
)
from .resources import (
AccountsListRequestRemoteFields,
AccountsListRequestShowEnumOrigins,
AccountsRetrieveRequestRemoteFields,
AccountsRetrieveRequestShowEnumOrigins,
CompanyInfoListRequestExpand,
CompanyInfoRetrieveRequestExpand,
ContactsListRequestExpand,
ContactsRetrieveRequestExpand,
CreditNotesListRequestExpand,
CreditNotesListRequestRemoteFields,
CreditNotesListRequestShowEnumOrigins,
CreditNotesRetrieveRequestExpand,
CreditNotesRetrieveRequestRemoteFields,
CreditNotesRetrieveRequestShowEnumOrigins,
ExpensesListRequestExpand,
ExpensesRetrieveRequestExpand,
InvoicesListRequestExpand,
InvoicesListRequestType,
InvoicesRetrieveRequestExpand,
IssuesListRequestStatus,
ItemsListRequestExpand,
ItemsRetrieveRequestExpand,
JournalEntriesListRequestExpand,
JournalEntriesRetrieveRequestExpand,
LinkedAccountsListRequestCategory,
PaymentsListRequestExpand,
PaymentsRetrieveRequestExpand,
PurchaseOrdersListRequestExpand,
PurchaseOrdersRetrieveRequestExpand,
TransactionsListRequestExpand,
TransactionsRetrieveRequestExpand,
VendorCreditsListRequestExpand,
VendorCreditsRetrieveRequestExpand,
account_details,
account_token,
accounting_periods,
Expand Down
59 changes: 59 additions & 0 deletions src/merge/resources/accounting/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,67 @@
vendor_credits,
webhook_receivers,
)
from .accounts import (
AccountsListRequestRemoteFields,
AccountsListRequestShowEnumOrigins,
AccountsRetrieveRequestRemoteFields,
AccountsRetrieveRequestShowEnumOrigins,
)
from .company_info import CompanyInfoListRequestExpand, CompanyInfoRetrieveRequestExpand
from .contacts import ContactsListRequestExpand, ContactsRetrieveRequestExpand
from .credit_notes import (
CreditNotesListRequestExpand,
CreditNotesListRequestRemoteFields,
CreditNotesListRequestShowEnumOrigins,
CreditNotesRetrieveRequestExpand,
CreditNotesRetrieveRequestRemoteFields,
CreditNotesRetrieveRequestShowEnumOrigins,
)
from .expenses import ExpensesListRequestExpand, ExpensesRetrieveRequestExpand
from .invoices import InvoicesListRequestExpand, InvoicesListRequestType, InvoicesRetrieveRequestExpand
from .issues import IssuesListRequestStatus
from .items import ItemsListRequestExpand, ItemsRetrieveRequestExpand
from .journal_entries import JournalEntriesListRequestExpand, JournalEntriesRetrieveRequestExpand
from .linked_accounts import LinkedAccountsListRequestCategory
from .payments import PaymentsListRequestExpand, PaymentsRetrieveRequestExpand
from .purchase_orders import PurchaseOrdersListRequestExpand, PurchaseOrdersRetrieveRequestExpand
from .transactions import TransactionsListRequestExpand, TransactionsRetrieveRequestExpand
from .vendor_credits import VendorCreditsListRequestExpand, VendorCreditsRetrieveRequestExpand

__all__ = [
"AccountsListRequestRemoteFields",
"AccountsListRequestShowEnumOrigins",
"AccountsRetrieveRequestRemoteFields",
"AccountsRetrieveRequestShowEnumOrigins",
"CompanyInfoListRequestExpand",
"CompanyInfoRetrieveRequestExpand",
"ContactsListRequestExpand",
"ContactsRetrieveRequestExpand",
"CreditNotesListRequestExpand",
"CreditNotesListRequestRemoteFields",
"CreditNotesListRequestShowEnumOrigins",
"CreditNotesRetrieveRequestExpand",
"CreditNotesRetrieveRequestRemoteFields",
"CreditNotesRetrieveRequestShowEnumOrigins",
"ExpensesListRequestExpand",
"ExpensesRetrieveRequestExpand",
"InvoicesListRequestExpand",
"InvoicesListRequestType",
"InvoicesRetrieveRequestExpand",
"IssuesListRequestStatus",
"ItemsListRequestExpand",
"ItemsRetrieveRequestExpand",
"JournalEntriesListRequestExpand",
"JournalEntriesRetrieveRequestExpand",
"LinkedAccountsListRequestCategory",
"PaymentsListRequestExpand",
"PaymentsRetrieveRequestExpand",
"PurchaseOrdersListRequestExpand",
"PurchaseOrdersRetrieveRequestExpand",
"TransactionsListRequestExpand",
"TransactionsRetrieveRequestExpand",
"VendorCreditsListRequestExpand",
"VendorCreditsRetrieveRequestExpand",
"account_details",
"account_token",
"accounting_periods",
Expand Down
13 changes: 13 additions & 0 deletions src/merge/resources/accounting/resources/accounts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# This file was auto-generated by Fern from our API Definition.

from .types import (
AccountsListRequestRemoteFields,
AccountsListRequestShowEnumOrigins,
AccountsRetrieveRequestRemoteFields,
AccountsRetrieveRequestShowEnumOrigins,
)

__all__ = [
"AccountsListRequestRemoteFields",
"AccountsListRequestShowEnumOrigins",
"AccountsRetrieveRequestRemoteFields",
"AccountsRetrieveRequestShowEnumOrigins",
]
8 changes: 4 additions & 4 deletions src/merge/resources/accounting/resources/accounts/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
from ...types.account import Account
from ...types.account_request import AccountRequest
from ...types.account_response import AccountResponse
from ...types.accounts_list_request_remote_fields import AccountsListRequestRemoteFields
from ...types.accounts_list_request_show_enum_origins import AccountsListRequestShowEnumOrigins
from ...types.accounts_retrieve_request_remote_fields import AccountsRetrieveRequestRemoteFields
from ...types.accounts_retrieve_request_show_enum_origins import AccountsRetrieveRequestShowEnumOrigins
from ...types.meta_response import MetaResponse
from ...types.paginated_account_list import PaginatedAccountList
from .types.accounts_list_request_remote_fields import AccountsListRequestRemoteFields
from .types.accounts_list_request_show_enum_origins import AccountsListRequestShowEnumOrigins
from .types.accounts_retrieve_request_remote_fields import AccountsRetrieveRequestRemoteFields
from .types.accounts_retrieve_request_show_enum_origins import AccountsRetrieveRequestShowEnumOrigins

try:
import pydantic.v1 as pydantic # type: ignore
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This file was auto-generated by Fern from our API Definition.

from .accounts_list_request_remote_fields import AccountsListRequestRemoteFields
from .accounts_list_request_show_enum_origins import AccountsListRequestShowEnumOrigins
from .accounts_retrieve_request_remote_fields import AccountsRetrieveRequestRemoteFields
from .accounts_retrieve_request_show_enum_origins import AccountsRetrieveRequestShowEnumOrigins

__all__ = [
"AccountsListRequestRemoteFields",
"AccountsListRequestShowEnumOrigins",
"AccountsRetrieveRequestRemoteFields",
"AccountsRetrieveRequestShowEnumOrigins",
]
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# This file was auto-generated by Fern from our API Definition.

from .types import CompanyInfoListRequestExpand, CompanyInfoRetrieveRequestExpand

__all__ = ["CompanyInfoListRequestExpand", "CompanyInfoRetrieveRequestExpand"]
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from .....core.datetime_utils import serialize_datetime
from .....core.remove_none_from_dict import remove_none_from_dict
from ...types.company_info import CompanyInfo
from ...types.company_info_list_request_expand import CompanyInfoListRequestExpand
from ...types.company_info_retrieve_request_expand import CompanyInfoRetrieveRequestExpand
from ...types.paginated_company_info_list import PaginatedCompanyInfoList
from .types.company_info_list_request_expand import CompanyInfoListRequestExpand
from .types.company_info_retrieve_request_expand import CompanyInfoRetrieveRequestExpand

try:
import pydantic.v1 as pydantic # type: ignore
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file was auto-generated by Fern from our API Definition.

from .company_info_list_request_expand import CompanyInfoListRequestExpand
from .company_info_retrieve_request_expand import CompanyInfoRetrieveRequestExpand

__all__ = ["CompanyInfoListRequestExpand", "CompanyInfoRetrieveRequestExpand"]
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# This file was auto-generated by Fern from our API Definition.

from .types import ContactsListRequestExpand, ContactsRetrieveRequestExpand

__all__ = ["ContactsListRequestExpand", "ContactsRetrieveRequestExpand"]
4 changes: 2 additions & 2 deletions src/merge/resources/accounting/resources/contacts/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
from ...types.contact import Contact
from ...types.contact_request import ContactRequest
from ...types.contact_response import ContactResponse
from ...types.contacts_list_request_expand import ContactsListRequestExpand
from ...types.contacts_retrieve_request_expand import ContactsRetrieveRequestExpand
from ...types.meta_response import MetaResponse
from ...types.paginated_contact_list import PaginatedContactList
from .types.contacts_list_request_expand import ContactsListRequestExpand
from .types.contacts_retrieve_request_expand import ContactsRetrieveRequestExpand

try:
import pydantic.v1 as pydantic # type: ignore
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file was auto-generated by Fern from our API Definition.

from .contacts_list_request_expand import ContactsListRequestExpand
from .contacts_retrieve_request_expand import ContactsRetrieveRequestExpand

__all__ = ["ContactsListRequestExpand", "ContactsRetrieveRequestExpand"]
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# This file was auto-generated by Fern from our API Definition.

from .types import (
CreditNotesListRequestExpand,
CreditNotesListRequestRemoteFields,
CreditNotesListRequestShowEnumOrigins,
CreditNotesRetrieveRequestExpand,
CreditNotesRetrieveRequestRemoteFields,
CreditNotesRetrieveRequestShowEnumOrigins,
)

__all__ = [
"CreditNotesListRequestExpand",
"CreditNotesListRequestRemoteFields",
"CreditNotesListRequestShowEnumOrigins",
"CreditNotesRetrieveRequestExpand",
"CreditNotesRetrieveRequestRemoteFields",
"CreditNotesRetrieveRequestShowEnumOrigins",
]
Loading