Skip to content

Commit

Permalink
Release 0.4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jul 23, 2024
1 parent 94e22cf commit dd800e5
Show file tree
Hide file tree
Showing 44 changed files with 1,218 additions and 65 deletions.
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 = "mercoa"
version = "0.4.7"
version = "0.4.8"
description = ""
readme = "README.md"
authors = []
Expand Down
186 changes: 186 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3065,6 +3065,109 @@ client.invoice.delete(
</dl>


</dd>
</dl>
</details>

## Invoice LineItem
<details><summary><code>client.invoice.line_item.<a href="src/mercoa/invoice/line_item/client.py">update</a>(...)</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Update invoice line item
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
import datetime

from mercoa import InvoiceLineItemIndividualUpdateRequest
from mercoa.client import Mercoa

client = Mercoa(
token="YOUR_TOKEN",
)
client.invoice.line_item.update(
invoice_id="in_d8f68285-1c6d-4d5a-a9e3-252c3180fac4",
line_item_id="inli_8aa84cb8-2ae7-4579-8fa3-87586e7c14a7",
request=InvoiceLineItemIndividualUpdateRequest(
name="Product A",
description="Product A",
service_start_date=datetime.datetime.fromisoformat(
"2021-01-01 00:00:00+00:00",
),
service_end_date=datetime.datetime.fromisoformat(
"2021-01-31 00:00:00+00:00",
),
metadata={"key1": "value1", "key2": "value2"},
gl_account_id="600394",
),
)

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**invoice_id:** `InvoiceId` — Invoice ID

</dd>
</dl>

<dl>
<dd>

**line_item_id:** `InvoiceLineItemId` — Invoice Line Item ID

</dd>
</dl>

<dl>
<dd>

**request:** `InvoiceLineItemIndividualUpdateRequest`

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down Expand Up @@ -10593,3 +10696,86 @@ client.organization.notification_configuration.reset(
</dl>
</details>

## PaymentMethods
<details><summary><code>client.payment_methods.<a href="src/mercoa/payment_methods/client.py">find</a>(...)</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
from mercoa.client import Mercoa

client = Mercoa(
token="YOUR_TOKEN",
)
client.payment_methods.find(
entity_id="ent_8545a84e-a45f-41bf-bdf1-33b42a55812c",
)

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**limit:** `typing.Optional[int]` — Number of payment methods to return. Limit can range between 1 and 100, and the default is 10.

</dd>
</dl>

<dl>
<dd>

**starting_after:** `typing.Optional[PaymentMethodId]` — The ID of the payment method to start after. If not provided, the first page of payment methods will be returned.

</dd>
</dl>

<dl>
<dd>

**type:** `typing.Optional[
typing.Union[PaymentMethodType, typing.Sequence[PaymentMethodType]]
]` — Type of payment method to filter

</dd>
</dl>

<dl>
<dd>

**entity_id:** `typing.Optional[typing.Union[EntityId, typing.Sequence[EntityId]]]` — Entity ID to filter

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

18 changes: 16 additions & 2 deletions src/mercoa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
organization,
organization_types,
payment_method_types,
payment_methods,
webhooks,
)
from .bank_lookup import BankAddress, BankLookupResponse
Expand Down Expand Up @@ -151,8 +152,12 @@
InvoiceFeesRequest,
InvoiceFeesResponse,
InvoiceId,
InvoiceLineItemRequest,
InvoiceLineItemCreationRequest,
InvoiceLineItemId,
InvoiceLineItemIndividualUpdateRequest,
InvoiceLineItemRequestBase,
InvoiceLineItemResponse,
InvoiceLineItemUpdateRequest,
InvoiceMetadataFilter,
InvoiceMetricsPerDateGroupBy,
InvoiceMetricsPerDateResponse,
Expand Down Expand Up @@ -265,6 +270,8 @@
PaymentMethodUpdateRequest_Custom,
PaymentMethodUpdateRequest_OffPlatform,
PaymentMethodUpdateRequest_Utility,
PaymentMethodWithEntityFindResponse,
PaymentMethodWithEntityResponse,
PlaidLinkRequest,
UtilityPaymentMethodRequest,
UtilityPaymentMethodResponse,
Expand Down Expand Up @@ -416,8 +423,12 @@
"InvoiceFeesRequest",
"InvoiceFeesResponse",
"InvoiceId",
"InvoiceLineItemRequest",
"InvoiceLineItemCreationRequest",
"InvoiceLineItemId",
"InvoiceLineItemIndividualUpdateRequest",
"InvoiceLineItemRequestBase",
"InvoiceLineItemResponse",
"InvoiceLineItemUpdateRequest",
"InvoiceMetadataFilter",
"InvoiceMetricsPerDateGroupBy",
"InvoiceMetricsPerDateResponse",
Expand Down Expand Up @@ -498,6 +509,8 @@
"PaymentMethodUpdateRequest_OffPlatform",
"PaymentMethodUpdateRequest_Utility",
"PaymentMethodWebhook",
"PaymentMethodWithEntityFindResponse",
"PaymentMethodWithEntityResponse",
"PaymentMethodsRequest",
"PaymentMethodsResponse",
"PaymentRailRequest",
Expand Down Expand Up @@ -550,5 +563,6 @@
"organization",
"organization_types",
"payment_method_types",
"payment_methods",
"webhooks",
]
3 changes: 3 additions & 0 deletions src/mercoa/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from .invoice.client import AsyncInvoiceClient, InvoiceClient
from .ocr.client import AsyncOcrClient, OcrClient
from .organization.client import AsyncOrganizationClient, OrganizationClient
from .payment_methods.client import AsyncPaymentMethodsClient, PaymentMethodsClient


class Mercoa:
Expand Down Expand Up @@ -82,6 +83,7 @@ def __init__(
self.calculate = CalculateClient(client_wrapper=self._client_wrapper)
self.custom_payment_method_schema = CustomPaymentMethodSchemaClient(client_wrapper=self._client_wrapper)
self.ocr = OcrClient(client_wrapper=self._client_wrapper)
self.payment_methods = PaymentMethodsClient(client_wrapper=self._client_wrapper)


class AsyncMercoa:
Expand Down Expand Up @@ -150,6 +152,7 @@ def __init__(
self.calculate = AsyncCalculateClient(client_wrapper=self._client_wrapper)
self.custom_payment_method_schema = AsyncCustomPaymentMethodSchemaClient(client_wrapper=self._client_wrapper)
self.ocr = AsyncOcrClient(client_wrapper=self._client_wrapper)
self.payment_methods = AsyncPaymentMethodsClient(client_wrapper=self._client_wrapper)


def _get_base_url(*, base_url: typing.Optional[str] = None, environment: MercoaEnvironment) -> str:
Expand Down
2 changes: 1 addition & 1 deletion src/mercoa/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "mercoa",
"X-Fern-SDK-Version": "0.4.7",
"X-Fern-SDK-Version": "0.4.8",
}
headers["Authorization"] = f"Bearer {self._get_token()}"
return headers
Expand Down
2 changes: 2 additions & 0 deletions src/mercoa/entity_types/types/counterparty_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class CounterpartyResponse(EntityResponse):
is_default_source=True,
is_default_destination=True,
supported_currencies=["USD"],
metadata={},
frozen=False,
created_at=datetime.datetime.fromisoformat(
"2021-01-01 00:00:00+00:00",
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ class EntityWithPaymentMethodResponse(EntityResponse):
is_default_source=True,
is_default_destination=True,
supported_currencies=["USD"],
metadata={},
frozen=False,
created_at=datetime.datetime.fromisoformat(
"2021-01-01 00:00:00+00:00",
),
Expand Down
2 changes: 2 additions & 0 deletions src/mercoa/entity_types/types/find_counterparties_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class FindCounterpartiesResponse(pydantic_v1.BaseModel):
is_default_source=True,
is_default_destination=True,
supported_currencies=["USD"],
metadata={},
frozen=False,
created_at=datetime.datetime.fromisoformat(
"2021-01-01 00:00:00+00:00",
),
Expand Down
2 changes: 2 additions & 0 deletions src/mercoa/entity_types/types/find_entity_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class FindEntityResponse(pydantic_v1.BaseModel):
is_default_source=True,
is_default_destination=True,
supported_currencies=["USD"],
metadata={},
frozen=False,
created_at=datetime.datetime.fromisoformat(
"2021-01-01 00:00:00+00:00",
),
Expand Down
4 changes: 2 additions & 2 deletions src/mercoa/invoice/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was auto-generated by Fern from our API Definition.

from . import approval, comment, document, payment_links
from . import approval, comment, document, line_item, payment_links

__all__ = ["approval", "comment", "document", "payment_links"]
__all__ = ["approval", "comment", "document", "line_item", "payment_links"]
Loading

0 comments on commit dd800e5

Please sign in to comment.