Skip to content

Commit

Permalink
Release 0.2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Aug 29, 2023
1 parent 5cd4bbf commit c8b9c76
Show file tree
Hide file tree
Showing 21 changed files with 68 additions and 1,659 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.11"
version = "v0.2.12"
description = ""
readme = "README.md"
authors = []
Expand All @@ -10,8 +10,8 @@ packages = [

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

[tool.poetry.dev-dependencies]
mypy = "0.971"
Expand Down
24 changes: 0 additions & 24 deletions src/mercoa/resources/bank_lookup/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
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_types.errors.entity_foreign_id_already_exists import EntityForeignIdAlreadyExists
from ..entity_types.errors.invalid_tax_id import InvalidTaxId
from .types.bank_lookup_response import BankLookupResponse


Expand Down Expand Up @@ -47,16 +43,6 @@ 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
if _response_json["errorName"] == "EntityForeignIdAlreadyExists":
raise EntityForeignIdAlreadyExists(
pydantic.parse_obj_as(str, _response_json["content"]) # type: ignore
)
raise ApiError(status_code=_response.status_code, body=_response_json)


Expand Down Expand Up @@ -89,14 +75,4 @@ 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
if _response_json["errorName"] == "EntityForeignIdAlreadyExists":
raise EntityForeignIdAlreadyExists(
pydantic.parse_obj_as(str, _response_json["content"]) # type: ignore
)
raise ApiError(status_code=_response.status_code, body=_response_json)
340 changes: 40 additions & 300 deletions src/mercoa/resources/entity/client.py

Large diffs are not rendered by default.

104 changes: 0 additions & 104 deletions src/mercoa/resources/entity/resources/approval_policy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
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_types.errors.entity_foreign_id_already_exists import EntityForeignIdAlreadyExists
from ....entity_types.errors.invalid_tax_id import InvalidTaxId
from ....entity_types.types.approval_policy_id import ApprovalPolicyId
from ....entity_types.types.approval_policy_request import ApprovalPolicyRequest
from ....entity_types.types.approval_policy_response import ApprovalPolicyResponse
Expand Down Expand Up @@ -54,16 +50,6 @@ def get_all(self, entity_id: EntityId) -> typing.List[ApprovalPolicyResponse]:
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
if _response_json["errorName"] == "EntityForeignIdAlreadyExists":
raise EntityForeignIdAlreadyExists(
pydantic.parse_obj_as(str, _response_json["content"]) # type: ignore
)
raise ApiError(status_code=_response.status_code, body=_response_json)

def create(self, entity_id: EntityId, *, request: ApprovalPolicyRequest) -> ApprovalPolicyResponse:
Expand Down Expand Up @@ -95,16 +81,6 @@ def create(self, entity_id: EntityId, *, request: ApprovalPolicyRequest) -> Appr
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
if _response_json["errorName"] == "EntityForeignIdAlreadyExists":
raise EntityForeignIdAlreadyExists(
pydantic.parse_obj_as(str, _response_json["content"]) # type: ignore
)
raise ApiError(status_code=_response.status_code, body=_response_json)

def get(self, entity_id: EntityId, policy_id: ApprovalPolicyId) -> ApprovalPolicyResponse:
Expand All @@ -129,16 +105,6 @@ def get(self, entity_id: EntityId, policy_id: ApprovalPolicyId) -> ApprovalPolic
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
if _response_json["errorName"] == "EntityForeignIdAlreadyExists":
raise EntityForeignIdAlreadyExists(
pydantic.parse_obj_as(str, _response_json["content"]) # type: ignore
)
raise ApiError(status_code=_response.status_code, body=_response_json)

def update(
Expand Down Expand Up @@ -172,16 +138,6 @@ def update(
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
if _response_json["errorName"] == "EntityForeignIdAlreadyExists":
raise EntityForeignIdAlreadyExists(
pydantic.parse_obj_as(str, _response_json["content"]) # type: ignore
)
raise ApiError(status_code=_response.status_code, body=_response_json)

def delete(self, entity_id: EntityId, policy_id: ApprovalPolicyId) -> None:
Expand All @@ -206,16 +162,6 @@ def delete(self, entity_id: EntityId, policy_id: ApprovalPolicyId) -> None:
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
if _response_json["errorName"] == "EntityForeignIdAlreadyExists":
raise EntityForeignIdAlreadyExists(
pydantic.parse_obj_as(str, _response_json["content"]) # type: ignore
)
raise ApiError(status_code=_response.status_code, body=_response_json)


Expand Down Expand Up @@ -247,16 +193,6 @@ async def get_all(self, entity_id: EntityId) -> typing.List[ApprovalPolicyRespon
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
if _response_json["errorName"] == "EntityForeignIdAlreadyExists":
raise EntityForeignIdAlreadyExists(
pydantic.parse_obj_as(str, _response_json["content"]) # type: ignore
)
raise ApiError(status_code=_response.status_code, body=_response_json)

async def create(self, entity_id: EntityId, *, request: ApprovalPolicyRequest) -> ApprovalPolicyResponse:
Expand Down Expand Up @@ -289,16 +225,6 @@ async def create(self, entity_id: EntityId, *, request: ApprovalPolicyRequest) -
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
if _response_json["errorName"] == "EntityForeignIdAlreadyExists":
raise EntityForeignIdAlreadyExists(
pydantic.parse_obj_as(str, _response_json["content"]) # type: ignore
)
raise ApiError(status_code=_response.status_code, body=_response_json)

async def get(self, entity_id: EntityId, policy_id: ApprovalPolicyId) -> ApprovalPolicyResponse:
Expand All @@ -324,16 +250,6 @@ async def get(self, entity_id: EntityId, policy_id: ApprovalPolicyId) -> Approva
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
if _response_json["errorName"] == "EntityForeignIdAlreadyExists":
raise EntityForeignIdAlreadyExists(
pydantic.parse_obj_as(str, _response_json["content"]) # type: ignore
)
raise ApiError(status_code=_response.status_code, body=_response_json)

async def update(
Expand Down Expand Up @@ -368,16 +284,6 @@ async def update(
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
if _response_json["errorName"] == "EntityForeignIdAlreadyExists":
raise EntityForeignIdAlreadyExists(
pydantic.parse_obj_as(str, _response_json["content"]) # type: ignore
)
raise ApiError(status_code=_response.status_code, body=_response_json)

async def delete(self, entity_id: EntityId, policy_id: ApprovalPolicyId) -> None:
Expand All @@ -403,14 +309,4 @@ async def delete(self, entity_id: EntityId, policy_id: ApprovalPolicyId) -> None
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
if _response_json["errorName"] == "EntityForeignIdAlreadyExists":
raise EntityForeignIdAlreadyExists(
pydantic.parse_obj_as(str, _response_json["content"]) # type: ignore
)
raise ApiError(status_code=_response.status_code, body=_response_json)
Loading

0 comments on commit c8b9c76

Please sign in to comment.