Skip to content

Commit

Permalink
Release v0.3.34
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed May 13, 2024
1 parent 844ba8d commit 70dfb92
Show file tree
Hide file tree
Showing 80 changed files with 2,309 additions and 454 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.3.33"
version = "v0.3.34"
description = ""
readme = "README.md"
authors = []
Expand Down
18 changes: 14 additions & 4 deletions src/mercoa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
bank_lookup,
commons,
custom_payment_method_schema,
email_log_types,
entity,
entity_types,
fees,
Expand Down Expand Up @@ -31,6 +32,7 @@
Unauthorized,
Unimplemented,
)
from .email_log_types import EmailLog, EmailLogId, EmailLogResponse
from .entity_types import (
AccountType,
AmountTrigger,
Expand Down Expand Up @@ -145,7 +147,6 @@
PaymentDestinationOptions,
PaymentDestinationOptions_BankAccount,
PaymentDestinationOptions_Check,
SourceEmailResponse,
VendorNotFound,
)
from .ocr import OcrAsyncResponse, OcrFailure, OcrJobResponse, OcrJobStatus, OcrResponse
Expand All @@ -155,18 +156,19 @@
CodatProviderResponse,
ColorSchemeRequest,
ColorSchemeResponse,
EmailLog,
EmailLogResponse,
EmailProviderRequest,
EmailProviderResponse,
EmailSenderProvider,
EmailSenderRequest,
EmailSenderResponse,
ExternalAccountingSystemProviderRequest,
ExternalAccountingSystemProviderRequest_Codat,
ExternalAccountingSystemProviderRequest_None,
ExternalAccountingSystemProviderRequest_Rutter,
ExternalAccountingSystemProviderResponse,
ExternalAccountingSystemProviderResponse_Codat,
ExternalAccountingSystemProviderResponse_None,
ExternalAccountingSystemProviderResponse_Rutter,
IndividualOnboardingOptions,
InvoiceNotificationConfigurationRequest,
InvoiceNotificationConfigurationResponse,
Expand All @@ -189,6 +191,8 @@
PaymentRailMarkupType,
PaymentRailRequest,
PaymentRailResponse,
RutterProviderRequest,
RutterProviderResponse,
)
from .payment_method_types import (
BankAccountCheckOptions,
Expand Down Expand Up @@ -307,6 +311,7 @@
"DuplicateInvoiceNumber",
"Ein",
"EmailLog",
"EmailLogId",
"EmailLogResponse",
"EmailProviderRequest",
"EmailProviderResponse",
Expand All @@ -332,9 +337,12 @@
"EntityWithPaymentMethodResponse",
"ExternalAccountingSystemProviderRequest",
"ExternalAccountingSystemProviderRequest_Codat",
"ExternalAccountingSystemProviderRequest_None",
"ExternalAccountingSystemProviderRequest_Rutter",
"ExternalAccountingSystemProviderResponse",
"ExternalAccountingSystemProviderResponse_Codat",
"ExternalAccountingSystemProviderResponse_None",
"ExternalAccountingSystemProviderResponse_Rutter",
"FindCounterpartiesResponse",
"FindEntityResponse",
"FindInvoiceResponse",
Expand Down Expand Up @@ -442,7 +450,8 @@
"Responsibilities",
"Rule",
"Rule_Approver",
"SourceEmailResponse",
"RutterProviderRequest",
"RutterProviderResponse",
"TaxId",
"TokenGenerationEntityOptions",
"TokenGenerationFailed",
Expand All @@ -466,6 +475,7 @@
"bank_lookup",
"commons",
"custom_payment_method_schema",
"email_log_types",
"entity",
"entity_types",
"fees",
Expand Down
15 changes: 15 additions & 0 deletions src/mercoa/commons/types/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@


class Address(pydantic_v1.BaseModel):
"""
Examples
--------
from mercoa import Address
Address(
address_line_1="123 Main St",
address_line_2="Unit 1",
city="San Francisco",
state_or_province="CA",
postal_code="94105",
country="US",
)
"""

address_line_1: str = pydantic_v1.Field(alias="addressLine1")
address_line_2: typing.Optional[str] = pydantic_v1.Field(alias="addressLine2", default=None)
city: str
Expand Down
12 changes: 12 additions & 0 deletions src/mercoa/commons/types/birth_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@


class BirthDate(pydantic_v1.BaseModel):
"""
Examples
--------
from mercoa import BirthDate
BirthDate(
day="1",
month="1",
year="1980",
)
"""

day: typing.Optional[str] = None
month: typing.Optional[str] = None
year: typing.Optional[str] = None
Expand Down
13 changes: 13 additions & 0 deletions src/mercoa/commons/types/full_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@


class FullName(pydantic_v1.BaseModel):
"""
Examples
--------
from mercoa import FullName
FullName(
first_name="John",
middle_name="Quincy",
last_name="Adams",
suffix="Jr.",
)
"""

first_name: str = pydantic_v1.Field(alias="firstName")
middle_name: typing.Optional[str] = pydantic_v1.Field(alias="middleName", default=None)
last_name: str = pydantic_v1.Field(alias="lastName")
Expand Down
10 changes: 10 additions & 0 deletions src/mercoa/commons/types/individual_government_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@


class IndividualGovernmentId(pydantic_v1.BaseModel):
"""
Examples
--------
from mercoa import IndividualGovernmentId
IndividualGovernmentId(
ssn="123-45-6789",
)
"""

ssn: str = pydantic_v1.Field()
"""
Full Social Security Number. Must be in the format 123-45-6789.
Expand Down
11 changes: 11 additions & 0 deletions src/mercoa/commons/types/phone_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@


class PhoneNumber(pydantic_v1.BaseModel):
"""
Examples
--------
from mercoa import PhoneNumber
PhoneNumber(
country_code="1",
number="4155551234",
)
"""

country_code: str = pydantic_v1.Field(alias="countryCode")
number: 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": "v0.3.33",
"X-Fern-SDK-Version": "v0.3.34",
}
headers["Authorization"] = f"Bearer {self._get_token()}"
return headers
Expand Down
5 changes: 5 additions & 0 deletions src/mercoa/email_log_types/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file was auto-generated by Fern from our API Definition.

from .types import EmailLog, EmailLogId, EmailLogResponse

__all__ = ["EmailLog", "EmailLogId", "EmailLogResponse"]
7 changes: 7 additions & 0 deletions src/mercoa/email_log_types/types/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was auto-generated by Fern from our API Definition.

from .email_log import EmailLog
from .email_log_id import EmailLogId
from .email_log_response import EmailLogResponse

__all__ = ["EmailLog", "EmailLogId", "EmailLogResponse"]
56 changes: 56 additions & 0 deletions src/mercoa/email_log_types/types/email_log.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ...core.datetime_utils import serialize_datetime
from ...core.pydantic_utilities import pydantic_v1
from ...invoice_types.types.invoice_id import InvoiceId
from .email_log_id import EmailLogId


class EmailLog(pydantic_v1.BaseModel):
"""
Examples
--------
import datetime
from mercoa import EmailLog
EmailLog(
id="1234",
subject="Invoice #1234",
from_="John Doe <john.doe@example.com>",
to="Jane Doe <jane.doe@example.com>",
html_body="<html><body><p>Hi Jane,</p><p>Please find attached the invoice for your recent purchase.</p><p>Thanks,</p><p>John</p></body></html>",
text_body="Hi Jane,\n\nPlease find attached the invoice for your recent purchase.\n\nThanks,\nJohn",
created_at=datetime.datetime.fromisoformat(
"2021-01-01 00:00:00+00:00",
),
)
"""

id: EmailLogId
subject: str
from_: str = pydantic_v1.Field(alias="from")
to: str
html_body: str = pydantic_v1.Field(alias="htmlBody")
text_body: str = pydantic_v1.Field(alias="textBody")
created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
invoice_id: typing.Optional[InvoiceId] = pydantic_v1.Field(alias="invoiceId", default=None)

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().dict(**kwargs_with_defaults)

class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = pydantic_v1.Extra.allow
json_encoders = {dt.datetime: serialize_datetime}
3 changes: 3 additions & 0 deletions src/mercoa/email_log_types/types/email_log_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file was auto-generated by Fern from our API Definition.

EmailLogId = str
64 changes: 64 additions & 0 deletions src/mercoa/email_log_types/types/email_log_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ...core.datetime_utils import serialize_datetime
from ...core.pydantic_utilities import pydantic_v1
from .email_log import EmailLog


class EmailLogResponse(pydantic_v1.BaseModel):
"""
Examples
--------
import datetime
from mercoa import EmailLog, EmailLogResponse
EmailLogResponse(
count=1,
has_more=False,
data=[
EmailLog(
id="1234",
subject="Invoice #1234",
from_="John Doe <john.doe@example.com>",
to="Jane Doe <jane.doe@example.com>",
html_body="<html><body><p>Hi Jane,</p><p>Please find attached the invoice for your recent purchase.</p><p>Thanks,</p><p>John</p></body></html>",
text_body="Hi Jane,\n\nPlease find attached the invoice for your recent purchase.\n\nThanks,\nJohn",
created_at=datetime.datetime.fromisoformat(
"2021-01-01 00:00:00+00:00",
),
)
],
)
"""

count: int = pydantic_v1.Field()
"""
Total number of logs for the given filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available.
"""

has_more: bool = pydantic_v1.Field(alias="hasMore")
"""
True if there are more logs available for the given filters.
"""

data: typing.List[EmailLog]

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().dict(**kwargs_with_defaults)

class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = pydantic_v1.Extra.allow
json_encoders = {dt.datetime: serialize_datetime}
10 changes: 10 additions & 0 deletions src/mercoa/entity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from . import (
approval_policy,
counterparty,
email_log,
external_accounting_system,
invoice,
metadata,
Expand All @@ -17,21 +18,30 @@
CodatCompanyResponse,
ExternalAccountingSystemCompanyCreationRequest,
ExternalAccountingSystemCompanyCreationRequest_Codat,
ExternalAccountingSystemCompanyCreationRequest_Rutter,
ExternalAccountingSystemCompanyResponse,
ExternalAccountingSystemCompanyResponse_Codat,
ExternalAccountingSystemCompanyResponse_Rutter,
RutterCompanyCreationRequest,
RutterCompanyResponse,
)

__all__ = [
"CodatCompanyCreationRequest",
"CodatCompanyResponse",
"ExternalAccountingSystemCompanyCreationRequest",
"ExternalAccountingSystemCompanyCreationRequest_Codat",
"ExternalAccountingSystemCompanyCreationRequest_Rutter",
"ExternalAccountingSystemCompanyResponse",
"ExternalAccountingSystemCompanyResponse_Codat",
"ExternalAccountingSystemCompanyResponse_Rutter",
"NumApproverLessThanOneError",
"NumApproversUserListMismatchError",
"RutterCompanyCreationRequest",
"RutterCompanyResponse",
"approval_policy",
"counterparty",
"email_log",
"external_accounting_system",
"invoice",
"metadata",
Expand Down
Loading

0 comments on commit 70dfb92

Please sign in to comment.