Skip to content

Commit

Permalink
Release 0.2.14
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Sep 16, 2023
1 parent 902e9cd commit 15321d4
Show file tree
Hide file tree
Showing 49 changed files with 1,376 additions and 18 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 = "v0.2.13"
version = "v0.2.14"
description = ""
readme = "README.md"
authors = []
Expand Down
22 changes: 22 additions & 0 deletions src/mercoa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
CustomPaymentMethodResponse,
CustomPaymentMethodUpdateRequest,
DocumentResponse,
DuplicateInvoiceNumber,
Ein,
EmailLogResponse,
EmailProviderRequest,
Expand All @@ -54,6 +55,7 @@
EmailSenderResponse,
EntityAddPayeesRequest,
EntityArchivePayeesRequest,
EntityError,
EntityForeignIdAlreadyExists,
EntityId,
EntityMetadataResponse,
Expand All @@ -69,6 +71,7 @@
FindEntityResponse,
FindInvoiceResponse,
FindNotificationResponse,
Forbidden,
FullName,
IdentifierList,
IdentifierList_RolesList,
Expand All @@ -80,6 +83,7 @@
InvalidPostalCode,
InvalidStateOrProvince,
InvalidTaxId,
InvoiceError,
InvoiceFailureType,
InvoiceId,
InvoiceLineItemRequest,
Expand All @@ -91,10 +95,12 @@
InvoiceRequest,
InvoiceResponse,
InvoiceStatus,
InvoiceStatusError,
Itin,
MetadataConditional,
MetadataSchema,
MetadataType,
NotFound,
NotificationConfigurationRequest,
NotificationConfigurationRequest_Invoice,
NotificationConfigurationResponse,
Expand All @@ -104,6 +110,7 @@
NotificationPolicyResponse,
NotificationResponse,
NotificationType,
OcrFailure,
OcrResponse,
OnboardingOption,
OnboardingOptionsRequest,
Expand All @@ -114,6 +121,7 @@
OrganizationResponse,
PaymentMethodBaseRequest,
PaymentMethodBaseResponse,
PaymentMethodError,
PaymentMethodId,
PaymentMethodRequest,
PaymentMethodRequest_BankAccount,
Expand Down Expand Up @@ -154,6 +162,7 @@
Rule_Approver,
Ssn,
TaxId,
TokenGenerationFailed,
TokenGenerationInvoiceOptions,
TokenGenerationOptions,
TokenGenerationPagesOptions,
Expand All @@ -167,8 +176,10 @@
Trigger_All,
Trigger_Amount,
Unauthorized,
Unimplemented,
UserNotificationPolicyResponse,
VendorNetwork,
VendorNotFound,
bank_lookup,
commons,
entity,
Expand Down Expand Up @@ -229,6 +240,7 @@
"CustomPaymentMethodResponse",
"CustomPaymentMethodUpdateRequest",
"DocumentResponse",
"DuplicateInvoiceNumber",
"Ein",
"EmailLogResponse",
"EmailProviderRequest",
Expand All @@ -238,6 +250,7 @@
"EmailSenderResponse",
"EntityAddPayeesRequest",
"EntityArchivePayeesRequest",
"EntityError",
"EntityForeignIdAlreadyExists",
"EntityId",
"EntityMetadataResponse",
Expand All @@ -253,6 +266,7 @@
"FindEntityResponse",
"FindInvoiceResponse",
"FindNotificationResponse",
"Forbidden",
"FullName",
"IdentifierList",
"IdentifierList_RolesList",
Expand All @@ -264,6 +278,7 @@
"InvalidPostalCode",
"InvalidStateOrProvince",
"InvalidTaxId",
"InvoiceError",
"InvoiceFailureType",
"InvoiceId",
"InvoiceLineItemRequest",
Expand All @@ -275,11 +290,13 @@
"InvoiceRequest",
"InvoiceResponse",
"InvoiceStatus",
"InvoiceStatusError",
"Itin",
"MercoaEnvironment",
"MetadataConditional",
"MetadataSchema",
"MetadataType",
"NotFound",
"NotificationConfigurationRequest",
"NotificationConfigurationRequest_Invoice",
"NotificationConfigurationResponse",
Expand All @@ -289,6 +306,7 @@
"NotificationPolicyResponse",
"NotificationResponse",
"NotificationType",
"OcrFailure",
"OcrResponse",
"OnboardingOption",
"OnboardingOptionsRequest",
Expand All @@ -299,6 +317,7 @@
"OrganizationResponse",
"PaymentMethodBaseRequest",
"PaymentMethodBaseResponse",
"PaymentMethodError",
"PaymentMethodId",
"PaymentMethodRequest",
"PaymentMethodRequest_BankAccount",
Expand Down Expand Up @@ -339,6 +358,7 @@
"Rule_Approver",
"Ssn",
"TaxId",
"TokenGenerationFailed",
"TokenGenerationInvoiceOptions",
"TokenGenerationOptions",
"TokenGenerationPagesOptions",
Expand All @@ -352,8 +372,10 @@
"Trigger_All",
"Trigger_Amount",
"Unauthorized",
"Unimplemented",
"UserNotificationPolicyResponse",
"VendorNetwork",
"VendorNotFound",
"bank_lookup",
"commons",
"entity",
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.2.13",
"X-Fern-SDK-Version": "v0.2.14",
}
headers["Authorization"] = f"Bearer {self._get_token()}"
return headers
Expand Down
23 changes: 22 additions & 1 deletion src/mercoa/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@
AuthHeaderMalformedError,
AuthHeaderMissingError,
BirthDate,
Forbidden,
FullName,
IndividualGovernmentId,
InvalidPostalCode,
InvalidStateOrProvince,
Itin,
NotFound,
OrderDirection,
PhoneNumber,
Ssn,
Unauthorized,
Unimplemented,
)
from .entity_types import (
AccountType,
Expand All @@ -45,6 +48,7 @@
Ein,
EntityAddPayeesRequest,
EntityArchivePayeesRequest,
EntityError,
EntityForeignIdAlreadyExists,
EntityId,
EntityMetadataResponse,
Expand Down Expand Up @@ -79,6 +83,7 @@
Rule,
Rule_Approver,
TaxId,
TokenGenerationFailed,
TokenGenerationInvoiceOptions,
TokenGenerationOptions,
TokenGenerationPagesOptions,
Expand All @@ -101,7 +106,9 @@
CommentRequest,
CommentResponse,
DocumentResponse,
DuplicateInvoiceNumber,
FindInvoiceResponse,
InvoiceError,
InvoiceFailureType,
InvoiceId,
InvoiceLineItemRequest,
Expand All @@ -111,8 +118,10 @@
InvoiceRequest,
InvoiceResponse,
InvoiceStatus,
InvoiceStatusError,
VendorNotFound,
)
from .ocr import OcrResponse
from .ocr import OcrFailure, OcrResponse
from .organization_types import (
BusinessOnboardingOptions,
ColorSchemeRequest,
Expand Down Expand Up @@ -163,6 +172,7 @@
CustomPaymentMethodUpdateRequest,
PaymentMethodBaseRequest,
PaymentMethodBaseResponse,
PaymentMethodError,
PaymentMethodId,
PaymentMethodRequest,
PaymentMethodRequest_BankAccount,
Expand Down Expand Up @@ -234,6 +244,7 @@
"CustomPaymentMethodResponse",
"CustomPaymentMethodUpdateRequest",
"DocumentResponse",
"DuplicateInvoiceNumber",
"Ein",
"EmailLogResponse",
"EmailProviderRequest",
Expand All @@ -243,6 +254,7 @@
"EmailSenderResponse",
"EntityAddPayeesRequest",
"EntityArchivePayeesRequest",
"EntityError",
"EntityForeignIdAlreadyExists",
"EntityId",
"EntityMetadataResponse",
Expand All @@ -258,6 +270,7 @@
"FindEntityResponse",
"FindInvoiceResponse",
"FindNotificationResponse",
"Forbidden",
"FullName",
"IdentifierList",
"IdentifierList_RolesList",
Expand All @@ -269,6 +282,7 @@
"InvalidPostalCode",
"InvalidStateOrProvince",
"InvalidTaxId",
"InvoiceError",
"InvoiceFailureType",
"InvoiceId",
"InvoiceLineItemRequest",
Expand All @@ -280,10 +294,12 @@
"InvoiceRequest",
"InvoiceResponse",
"InvoiceStatus",
"InvoiceStatusError",
"Itin",
"MetadataConditional",
"MetadataSchema",
"MetadataType",
"NotFound",
"NotificationConfigurationRequest",
"NotificationConfigurationRequest_Invoice",
"NotificationConfigurationResponse",
Expand All @@ -293,6 +309,7 @@
"NotificationPolicyResponse",
"NotificationResponse",
"NotificationType",
"OcrFailure",
"OcrResponse",
"OnboardingOption",
"OnboardingOptionsRequest",
Expand All @@ -303,6 +320,7 @@
"OrganizationResponse",
"PaymentMethodBaseRequest",
"PaymentMethodBaseResponse",
"PaymentMethodError",
"PaymentMethodId",
"PaymentMethodRequest",
"PaymentMethodRequest_BankAccount",
Expand Down Expand Up @@ -343,6 +361,7 @@
"Rule_Approver",
"Ssn",
"TaxId",
"TokenGenerationFailed",
"TokenGenerationInvoiceOptions",
"TokenGenerationOptions",
"TokenGenerationPagesOptions",
Expand All @@ -356,8 +375,10 @@
"Trigger_All",
"Trigger_Amount",
"Unauthorized",
"Unimplemented",
"UserNotificationPolicyResponse",
"VendorNetwork",
"VendorNotFound",
"bank_lookup",
"commons",
"entity",
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 @@ -10,7 +10,10 @@
from ...core.remove_none_from_dict import remove_none_from_dict
from ..commons.errors.auth_header_malformed_error import AuthHeaderMalformedError
from ..commons.errors.auth_header_missing_error import AuthHeaderMissingError
from ..commons.errors.forbidden import Forbidden
from ..commons.errors.not_found import NotFound
from ..commons.errors.unauthorized import Unauthorized
from ..commons.errors.unimplemented import Unimplemented
from .types.bank_lookup_response import BankLookupResponse


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


Expand Down Expand Up @@ -79,4 +88,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"] == "Forbidden":
raise Forbidden(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
if _response_json["errorName"] == "NotFound":
raise NotFound(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
if _response_json["errorName"] == "Unimplemented":
raise Unimplemented(pydantic.parse_obj_as(str, _response_json["content"])) # type: ignore
raise ApiError(status_code=_response.status_code, body=_response_json)
6 changes: 6 additions & 0 deletions src/mercoa/resources/commons/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,29 @@
from .errors import (
AuthHeaderMalformedError,
AuthHeaderMissingError,
Forbidden,
InvalidPostalCode,
InvalidStateOrProvince,
NotFound,
Unauthorized,
Unimplemented,
)

__all__ = [
"Address",
"AuthHeaderMalformedError",
"AuthHeaderMissingError",
"BirthDate",
"Forbidden",
"FullName",
"IndividualGovernmentId",
"InvalidPostalCode",
"InvalidStateOrProvince",
"Itin",
"NotFound",
"OrderDirection",
"PhoneNumber",
"Ssn",
"Unauthorized",
"Unimplemented",
]
Loading

0 comments on commit 15321d4

Please sign in to comment.