Skip to content

Commit

Permalink
Release v0.3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jan 4, 2024
1 parent f675f6a commit b50b338
Show file tree
Hide file tree
Showing 22 changed files with 266 additions and 277 deletions.
6 changes: 3 additions & 3 deletions 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 = "mercoa"
version = "v0.3.8"
version = "v0.3.10"
description = ""
readme = "README.md"
authors = []
Expand Down
10 changes: 0 additions & 10 deletions src/mercoa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
CardType,
CheckRequest,
CheckResponse,
CloudMailinAttachment,
CloudMailinEnvelope,
CloudMailinRequest,
CodatProviderRequest,
ColorSchemeRequest,
ColorSchemeResponse,
Expand Down Expand Up @@ -109,7 +106,6 @@
InvoiceResponse,
InvoiceStatus,
InvoiceStatusError,
Itin,
MetadataSchema,
MetadataShowConditions,
MetadataTrigger,
Expand Down Expand Up @@ -178,7 +174,6 @@
Responsibilities,
Rule,
Rule_Approver,
Ssn,
TaxId,
TokenGenerationEntityOptions,
TokenGenerationFailed,
Expand Down Expand Up @@ -246,9 +241,6 @@
"CardType",
"CheckRequest",
"CheckResponse",
"CloudMailinAttachment",
"CloudMailinEnvelope",
"CloudMailinRequest",
"CodatProviderRequest",
"ColorSchemeRequest",
"ColorSchemeResponse",
Expand Down Expand Up @@ -320,7 +312,6 @@
"InvoiceResponse",
"InvoiceStatus",
"InvoiceStatusError",
"Itin",
"MercoaEnvironment",
"MetadataSchema",
"MetadataShowConditions",
Expand Down Expand Up @@ -390,7 +381,6 @@
"Responsibilities",
"Rule",
"Rule_Approver",
"Ssn",
"TaxId",
"TokenGenerationEntityOptions",
"TokenGenerationFailed",
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 @@ -14,7 +14,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": "v0.3.8",
"X-Fern-SDK-Version": "v0.3.10",
}
headers["Authorization"] = f"Bearer {self._get_token()}"
return headers
Expand Down
9 changes: 1 addition & 8 deletions src/mercoa/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
IndividualGovernmentId,
InvalidPostalCode,
InvalidStateOrProvince,
Itin,
NotFound,
OrderDirection,
PhoneNumber,
Ssn,
Unauthorized,
Unimplemented,
)
Expand Down Expand Up @@ -130,7 +128,7 @@
InvoiceStatusError,
VendorNotFound,
)
from .ocr import CloudMailinAttachment, CloudMailinEnvelope, CloudMailinRequest, OcrFailure, OcrResponse
from .ocr import OcrFailure, OcrResponse
from .organization_types import (
BusinessOnboardingOptions,
CodatProviderRequest,
Expand Down Expand Up @@ -250,9 +248,6 @@
"CardType",
"CheckRequest",
"CheckResponse",
"CloudMailinAttachment",
"CloudMailinEnvelope",
"CloudMailinRequest",
"CodatProviderRequest",
"ColorSchemeRequest",
"ColorSchemeResponse",
Expand Down Expand Up @@ -324,7 +319,6 @@
"InvoiceResponse",
"InvoiceStatus",
"InvoiceStatusError",
"Itin",
"MetadataSchema",
"MetadataShowConditions",
"MetadataTrigger",
Expand Down Expand Up @@ -393,7 +387,6 @@
"Responsibilities",
"Rule",
"Rule_Approver",
"Ssn",
"TaxId",
"TokenGenerationEntityOptions",
"TokenGenerationFailed",
Expand Down
4 changes: 1 addition & 3 deletions src/mercoa/resources/commons/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file was auto-generated by Fern from our API Definition.

from .types import Address, BirthDate, FullName, IndividualGovernmentId, Itin, OrderDirection, PhoneNumber, Ssn
from .types import Address, BirthDate, FullName, IndividualGovernmentId, OrderDirection, PhoneNumber
from .errors import (
AuthHeaderMalformedError,
AuthHeaderMissingError,
Expand All @@ -22,11 +22,9 @@
"IndividualGovernmentId",
"InvalidPostalCode",
"InvalidStateOrProvince",
"Itin",
"NotFound",
"OrderDirection",
"PhoneNumber",
"Ssn",
"Unauthorized",
"Unimplemented",
]
4 changes: 1 addition & 3 deletions src/mercoa/resources/commons/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
from .birth_date import BirthDate
from .full_name import FullName
from .individual_government_id import IndividualGovernmentId
from .itin import Itin
from .order_direction import OrderDirection
from .phone_number import PhoneNumber
from .ssn import Ssn

__all__ = ["Address", "BirthDate", "FullName", "IndividualGovernmentId", "Itin", "OrderDirection", "PhoneNumber", "Ssn"]
__all__ = ["Address", "BirthDate", "FullName", "IndividualGovernmentId", "OrderDirection", "PhoneNumber"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import typing

from ....core.datetime_utils import serialize_datetime
from .itin import Itin
from .ssn import Ssn

try:
import pydantic.v1 as pydantic # type: ignore
Expand All @@ -14,8 +12,7 @@


class IndividualGovernmentId(pydantic.BaseModel):
ssn: typing.Optional[Ssn]
itin: typing.Optional[Itin]
ssn: str = pydantic.Field(description="Full Social Security Number. Must be in the format 123-45-6789.")

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
Expand Down
30 changes: 0 additions & 30 deletions src/mercoa/resources/commons/types/itin.py

This file was deleted.

30 changes: 0 additions & 30 deletions src/mercoa/resources/commons/types/ssn.py

This file was deleted.

102 changes: 98 additions & 4 deletions src/mercoa/resources/entity/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ def find(
- is_payee: typing.Optional[bool]. If true, entities that are marked as payees will be returned.
If false or not provided, entities that are marked as payees will not be returned.
- is_payor: typing.Optional[bool]. If true or not provided, entities that are marked as payors will be returned.
If false, entities that are marked as payors will not be returned.
- name: typing.Optional[str]. Filter entities by name. Partial matches are supported.
- limit: typing.Optional[int]. Number of entities to return. Limit can range between 1 and 100, and the default is 10.
Expand Down Expand Up @@ -144,6 +142,55 @@ def create(self, *, request: EntityRequest) -> EntityResponse:
"""
Parameters:
- request: EntityRequest.
---
from mercoa import (
AccountType,
Address,
BusinessProfileRequest,
BusinessType,
Ein,
EntityRequest,
PhoneNumber,
ProfileRequest,
TaxId,
)
from mercoa.client import Mercoa
client = Mercoa(
token="YOUR_TOKEN",
)
client.entity.create(
request=EntityRequest(
is_customer=True,
is_payor=True,
is_payee=False,
account_type=AccountType.BUSINESS,
profile=ProfileRequest(
business=BusinessProfileRequest(
email="customer@acme.com",
legal_business_name="Acme Inc.",
website="http://www.acme.com",
business_type=BusinessType.LLC,
phone=PhoneNumber(
country_code="1",
number="4155551234",
),
address=Address(
address_line_1="123 Main St",
city="San Francisco",
state_or_province="CA",
postal_code="94105",
country="US",
),
tax_id=TaxId(
ein=Ein(
number="12-3456789",
),
),
),
),
),
)
"""
_response = self._client_wrapper.httpx_client.request(
"POST",
Expand Down Expand Up @@ -599,10 +646,8 @@ async def find(
- is_payee: typing.Optional[bool]. If true, entities that are marked as payees will be returned.
If false or not provided, entities that are marked as payees will not be returned.
- is_payor: typing.Optional[bool]. If true or not provided, entities that are marked as payors will be returned.
If false, entities that are marked as payors will not be returned.
- name: typing.Optional[str]. Filter entities by name. Partial matches are supported.
- limit: typing.Optional[int]. Number of entities to return. Limit can range between 1 and 100, and the default is 10.
Expand Down Expand Up @@ -653,6 +698,55 @@ async def create(self, *, request: EntityRequest) -> EntityResponse:
"""
Parameters:
- request: EntityRequest.
---
from mercoa import (
AccountType,
Address,
BusinessProfileRequest,
BusinessType,
Ein,
EntityRequest,
PhoneNumber,
ProfileRequest,
TaxId,
)
from mercoa.client import AsyncMercoa
client = AsyncMercoa(
token="YOUR_TOKEN",
)
await client.entity.create(
request=EntityRequest(
is_customer=True,
is_payor=True,
is_payee=False,
account_type=AccountType.BUSINESS,
profile=ProfileRequest(
business=BusinessProfileRequest(
email="customer@acme.com",
legal_business_name="Acme Inc.",
website="http://www.acme.com",
business_type=BusinessType.LLC,
phone=PhoneNumber(
country_code="1",
number="4155551234",
),
address=Address(
address_line_1="123 Main St",
city="San Francisco",
state_or_province="CA",
postal_code="94105",
country="US",
),
tax_id=TaxId(
ein=Ein(
number="12-3456789",
),
),
),
),
),
)
"""
_response = await self._client_wrapper.httpx_client.request(
"POST",
Expand Down
Loading

0 comments on commit b50b338

Please sign in to comment.