Skip to content

Commit

Permalink
Release 0.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Aug 10, 2023
1 parent cdd6f69 commit cfbd283
Show file tree
Hide file tree
Showing 55 changed files with 1,290 additions and 431 deletions.
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 = "mercoa"
version = "v0.2.9"
version = "v0.2.10"
description = ""
readme = "README.md"
authors = []
Expand All @@ -10,8 +10,8 @@ packages = [

[tool.poetry.dependencies]
python = "^3.7"
httpx = "0.23.3"
pydantic = "^1.9.2"
httpx = "0.23.3"

[tool.poetry.dev-dependencies]
mypy = "0.971"
Expand Down
32 changes: 14 additions & 18 deletions src/mercoa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
AssociatedApprovalAction,
AuthHeaderMalformedError,
AuthHeaderMissingError,
BankAccountBaseRequest,
BankAccountBaseResponse,
BankAccountRequest,
BankAccountResponse,
BankAddress,
Expand All @@ -30,14 +28,10 @@
BusinessProfileRequest,
BusinessProfileResponse,
BusinessType,
CardBaseRequest,
CardBaseResponse,
CardBrand,
CardRequest,
CardResponse,
CardType,
CheckBaseRequest,
CheckBaseResponse,
CheckRequest,
CheckResponse,
ColorSchemeRequest,
Expand All @@ -47,11 +41,8 @@
CommentResponse,
CounterpartyResponse,
CurrencyCode,
CustomPaymentMethodBaseRequest,
CustomPaymentMethodBaseResponse,
CustomPaymentMethodRequest,
CustomPaymentMethodResponse,
CustomPaymentMethodUpdateBaseRequest,
CustomPaymentMethodUpdateRequest,
DocumentResponse,
Ein,
Expand Down Expand Up @@ -81,6 +72,8 @@
IndividualGovernmentId,
IndividualProfileRequest,
IndividualProfileResponse,
InvalidPostalCode,
InvalidStateOrProvince,
InvoiceFailureType,
InvoiceId,
InvoiceLineItemRequest,
Expand All @@ -107,6 +100,8 @@
OrganizationId,
OrganizationRequest,
OrganizationResponse,
PaymentMethodBaseRequest,
PaymentMethodBaseResponse,
PaymentMethodId,
PaymentMethodRequest,
PaymentMethodRequest_BankAccount,
Expand All @@ -127,6 +122,9 @@
PaymentMethodsResponse,
PaymentMethodType,
PaymentMethodUpdateRequest,
PaymentMethodUpdateRequest_BankAccount,
PaymentMethodUpdateRequest_Card,
PaymentMethodUpdateRequest_Check,
PaymentMethodUpdateRequest_Custom,
PaymentRailMarkup,
PaymentRailMarkupType,
Expand Down Expand Up @@ -190,8 +188,6 @@
"AssociatedApprovalAction",
"AuthHeaderMalformedError",
"AuthHeaderMissingError",
"BankAccountBaseRequest",
"BankAccountBaseResponse",
"BankAccountRequest",
"BankAccountResponse",
"BankAddress",
Expand All @@ -202,14 +198,10 @@
"BusinessProfileRequest",
"BusinessProfileResponse",
"BusinessType",
"CardBaseRequest",
"CardBaseResponse",
"CardBrand",
"CardRequest",
"CardResponse",
"CardType",
"CheckBaseRequest",
"CheckBaseResponse",
"CheckRequest",
"CheckResponse",
"ColorSchemeRequest",
Expand All @@ -219,11 +211,8 @@
"CommentResponse",
"CounterpartyResponse",
"CurrencyCode",
"CustomPaymentMethodBaseRequest",
"CustomPaymentMethodBaseResponse",
"CustomPaymentMethodRequest",
"CustomPaymentMethodResponse",
"CustomPaymentMethodUpdateBaseRequest",
"CustomPaymentMethodUpdateRequest",
"DocumentResponse",
"Ein",
Expand Down Expand Up @@ -253,6 +242,8 @@
"IndividualGovernmentId",
"IndividualProfileRequest",
"IndividualProfileResponse",
"InvalidPostalCode",
"InvalidStateOrProvince",
"InvoiceFailureType",
"InvoiceId",
"InvoiceLineItemRequest",
Expand Down Expand Up @@ -280,6 +271,8 @@
"OrganizationId",
"OrganizationRequest",
"OrganizationResponse",
"PaymentMethodBaseRequest",
"PaymentMethodBaseResponse",
"PaymentMethodId",
"PaymentMethodRequest",
"PaymentMethodRequest_BankAccount",
Expand All @@ -298,6 +291,9 @@
"PaymentMethodSchemaResponse",
"PaymentMethodType",
"PaymentMethodUpdateRequest",
"PaymentMethodUpdateRequest_BankAccount",
"PaymentMethodUpdateRequest_Card",
"PaymentMethodUpdateRequest_Check",
"PaymentMethodUpdateRequest_Custom",
"PaymentMethodsRequest",
"PaymentMethodsResponse",
Expand Down
32 changes: 14 additions & 18 deletions src/mercoa/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
BirthDate,
FullName,
IndividualGovernmentId,
InvalidPostalCode,
InvalidStateOrProvince,
Itin,
OrderDirection,
PhoneNumber,
Expand Down Expand Up @@ -132,29 +134,22 @@
PaymentRailResponse,
)
from .payment_method_types import (
BankAccountBaseRequest,
BankAccountBaseResponse,
BankAccountRequest,
BankAccountResponse,
BankStatus,
BankType,
CardBaseRequest,
CardBaseResponse,
CardBrand,
CardRequest,
CardResponse,
CardType,
CheckBaseRequest,
CheckBaseResponse,
CheckRequest,
CheckResponse,
CurrencyCode,
CustomPaymentMethodBaseRequest,
CustomPaymentMethodBaseResponse,
CustomPaymentMethodRequest,
CustomPaymentMethodResponse,
CustomPaymentMethodUpdateBaseRequest,
CustomPaymentMethodUpdateRequest,
PaymentMethodBaseRequest,
PaymentMethodBaseResponse,
PaymentMethodId,
PaymentMethodRequest,
PaymentMethodRequest_BankAccount,
Expand All @@ -173,6 +168,9 @@
PaymentMethodSchemaResponse,
PaymentMethodType,
PaymentMethodUpdateRequest,
PaymentMethodUpdateRequest_BankAccount,
PaymentMethodUpdateRequest_Card,
PaymentMethodUpdateRequest_Check,
PaymentMethodUpdateRequest_Custom,
PlaidLinkRequest,
)
Expand All @@ -195,8 +193,6 @@
"AssociatedApprovalAction",
"AuthHeaderMalformedError",
"AuthHeaderMissingError",
"BankAccountBaseRequest",
"BankAccountBaseResponse",
"BankAccountRequest",
"BankAccountResponse",
"BankAddress",
Expand All @@ -207,14 +203,10 @@
"BusinessProfileRequest",
"BusinessProfileResponse",
"BusinessType",
"CardBaseRequest",
"CardBaseResponse",
"CardBrand",
"CardRequest",
"CardResponse",
"CardType",
"CheckBaseRequest",
"CheckBaseResponse",
"CheckRequest",
"CheckResponse",
"ColorSchemeRequest",
Expand All @@ -224,11 +216,8 @@
"CommentResponse",
"CounterpartyResponse",
"CurrencyCode",
"CustomPaymentMethodBaseRequest",
"CustomPaymentMethodBaseResponse",
"CustomPaymentMethodRequest",
"CustomPaymentMethodResponse",
"CustomPaymentMethodUpdateBaseRequest",
"CustomPaymentMethodUpdateRequest",
"DocumentResponse",
"Ein",
Expand Down Expand Up @@ -258,6 +247,8 @@
"IndividualGovernmentId",
"IndividualProfileRequest",
"IndividualProfileResponse",
"InvalidPostalCode",
"InvalidStateOrProvince",
"InvoiceFailureType",
"InvoiceId",
"InvoiceLineItemRequest",
Expand All @@ -284,6 +275,8 @@
"OrganizationId",
"OrganizationRequest",
"OrganizationResponse",
"PaymentMethodBaseRequest",
"PaymentMethodBaseResponse",
"PaymentMethodId",
"PaymentMethodRequest",
"PaymentMethodRequest_BankAccount",
Expand All @@ -302,6 +295,9 @@
"PaymentMethodSchemaResponse",
"PaymentMethodType",
"PaymentMethodUpdateRequest",
"PaymentMethodUpdateRequest_BankAccount",
"PaymentMethodUpdateRequest_Card",
"PaymentMethodUpdateRequest_Check",
"PaymentMethodUpdateRequest_Custom",
"PaymentMethodsRequest",
"PaymentMethodsResponse",
Expand Down
15 changes: 15 additions & 0 deletions src/mercoa/resources/bank_lookup/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
from ...environment import MercoaEnvironment
from ..commons.errors.auth_header_malformed_error import AuthHeaderMalformedError
from ..commons.errors.auth_header_missing_error import AuthHeaderMissingError
from ..commons.errors.invalid_postal_code import InvalidPostalCode
from ..commons.errors.invalid_state_or_province import InvalidStateOrProvince
from ..commons.errors.unauthorized import Unauthorized
from ..entity.errors.invalid_tax_id import InvalidTaxId
from .types.bank_lookup_response import BankLookupResponse


Expand Down Expand Up @@ -43,6 +46,12 @@ def find(self, *, routing_number: str) -> BankLookupResponse:
raise AuthHeaderMalformedError(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
if _response_json["errorName"] == "Unauthorized":
raise Unauthorized(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
if _response_json["errorName"] == "InvalidPostalCode":
raise InvalidPostalCode(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
if _response_json["errorName"] == "InvalidStateOrProvince":
raise InvalidStateOrProvince(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
if _response_json["errorName"] == "InvalidTaxId":
raise InvalidTaxId(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
raise ApiError(status_code=_response.status_code, body=_response_json)


Expand Down Expand Up @@ -75,4 +84,10 @@ async def find(self, *, routing_number: str) -> BankLookupResponse:
raise AuthHeaderMalformedError(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
if _response_json["errorName"] == "Unauthorized":
raise Unauthorized(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
if _response_json["errorName"] == "InvalidPostalCode":
raise InvalidPostalCode(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
if _response_json["errorName"] == "InvalidStateOrProvince":
raise InvalidStateOrProvince(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
if _response_json["errorName"] == "InvalidTaxId":
raise InvalidTaxId(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
raise ApiError(status_code=_response.status_code, body=_response_json)
10 changes: 9 additions & 1 deletion src/mercoa/resources/commons/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# This file was auto-generated by Fern from our API Definition.

from .errors import AuthHeaderMalformedError, AuthHeaderMissingError, Unauthorized
from .errors import (
AuthHeaderMalformedError,
AuthHeaderMissingError,
InvalidPostalCode,
InvalidStateOrProvince,
Unauthorized,
)
from .types import Address, BirthDate, FullName, IndividualGovernmentId, Itin, OrderDirection, PhoneNumber, Ssn

__all__ = [
Expand All @@ -10,6 +16,8 @@
"BirthDate",
"FullName",
"IndividualGovernmentId",
"InvalidPostalCode",
"InvalidStateOrProvince",
"Itin",
"OrderDirection",
"PhoneNumber",
Expand Down
10 changes: 9 additions & 1 deletion src/mercoa/resources/commons/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

from .auth_header_malformed_error import AuthHeaderMalformedError
from .auth_header_missing_error import AuthHeaderMissingError
from .invalid_postal_code import InvalidPostalCode
from .invalid_state_or_province import InvalidStateOrProvince
from .unauthorized import Unauthorized

__all__ = ["AuthHeaderMalformedError", "AuthHeaderMissingError", "Unauthorized"]
__all__ = [
"AuthHeaderMalformedError",
"AuthHeaderMissingError",
"InvalidPostalCode",
"InvalidStateOrProvince",
"Unauthorized",
]
8 changes: 8 additions & 0 deletions src/mercoa/resources/commons/errors/invalid_postal_code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was auto-generated by Fern from our API Definition.

from ....core.api_error import ApiError


class InvalidPostalCode(ApiError):
def __init__(self, body: str):
super().__init__(status_code=400, body=body)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was auto-generated by Fern from our API Definition.

from ....core.api_error import ApiError


class InvalidStateOrProvince(ApiError):
def __init__(self, body: str):
super().__init__(status_code=400, body=body)
2 changes: 2 additions & 0 deletions src/mercoa/resources/entity/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file was auto-generated by Fern from our API Definition.

from .errors import InvalidTaxId
from .resources import (
NumApproverLessThanOneError,
NumApproversUserListMismatchError,
Expand All @@ -13,6 +14,7 @@
)

__all__ = [
"InvalidTaxId",
"NumApproverLessThanOneError",
"NumApproversUserListMismatchError",
"approval_policy",
Expand Down
Loading

0 comments on commit cfbd283

Please sign in to comment.