Skip to content

Commit

Permalink
Release 0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jun 21, 2024
1 parent bbf240f commit 8ac4ddb
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 2 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 = "0.4.1"
version = "0.4.2"
description = ""
readme = "README.md"
authors = []
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": "0.4.1",
"X-Fern-SDK-Version": "0.4.2",
}
headers["Authorization"] = f"Bearer {self._get_token()}"
return headers
Expand Down
24 changes: 24 additions & 0 deletions src/mercoa/custom_payment_method_schema/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def create(
is_source: bool,
is_destination: bool,
fields: typing.Sequence[CustomPaymentMethodSchemaField],
estimated_processing_time: typing.Optional[int] = OMIT,
supported_currencies: typing.Optional[typing.Sequence[CurrencyCode]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CustomPaymentMethodSchemaResponse:
Expand All @@ -103,6 +104,9 @@ def create(
fields : typing.Sequence[CustomPaymentMethodSchemaField]
estimated_processing_time : typing.Optional[int]
Estimated time in days for this payment method to process a payments. Set as 0 for same-day payment methods, -1 for unknown processing time.
supported_currencies : typing.Optional[typing.Sequence[CurrencyCode]]
List of currencies that this payment method supports. If not provided, the payment method will support only USD.
Expand Down Expand Up @@ -153,6 +157,7 @@ def create(
optional=False,
),
],
estimated_processing_time=0,
)
"""
_response = self._client_wrapper.httpx_client.request(
Expand All @@ -162,6 +167,7 @@ def create(
"name": name,
"isSource": is_source,
"isDestination": is_destination,
"estimatedProcessingTime": estimated_processing_time,
"supportedCurrencies": supported_currencies,
"fields": fields,
},
Expand Down Expand Up @@ -199,6 +205,7 @@ def update(
is_source: bool,
is_destination: bool,
fields: typing.Sequence[CustomPaymentMethodSchemaField],
estimated_processing_time: typing.Optional[int] = OMIT,
supported_currencies: typing.Optional[typing.Sequence[CurrencyCode]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CustomPaymentMethodSchemaResponse:
Expand All @@ -219,6 +226,9 @@ def update(
fields : typing.Sequence[CustomPaymentMethodSchemaField]
estimated_processing_time : typing.Optional[int]
Estimated time in days for this payment method to process a payments. Set as 0 for same-day payment methods, -1 for unknown processing time.
supported_currencies : typing.Optional[typing.Sequence[CurrencyCode]]
List of currencies that this payment method supports. If not provided, the payment method will support only USD.
Expand Down Expand Up @@ -270,6 +280,7 @@ def update(
optional=False,
),
],
estimated_processing_time=7,
)
"""
_response = self._client_wrapper.httpx_client.request(
Expand All @@ -279,6 +290,7 @@ def update(
"name": name,
"isSource": is_source,
"isDestination": is_destination,
"estimatedProcessingTime": estimated_processing_time,
"supportedCurrencies": supported_currencies,
"fields": fields,
},
Expand Down Expand Up @@ -478,6 +490,7 @@ async def create(
is_source: bool,
is_destination: bool,
fields: typing.Sequence[CustomPaymentMethodSchemaField],
estimated_processing_time: typing.Optional[int] = OMIT,
supported_currencies: typing.Optional[typing.Sequence[CurrencyCode]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CustomPaymentMethodSchemaResponse:
Expand All @@ -496,6 +509,9 @@ async def create(
fields : typing.Sequence[CustomPaymentMethodSchemaField]
estimated_processing_time : typing.Optional[int]
Estimated time in days for this payment method to process a payments. Set as 0 for same-day payment methods, -1 for unknown processing time.
supported_currencies : typing.Optional[typing.Sequence[CurrencyCode]]
List of currencies that this payment method supports. If not provided, the payment method will support only USD.
Expand Down Expand Up @@ -546,6 +562,7 @@ async def create(
optional=False,
),
],
estimated_processing_time=0,
)
"""
_response = await self._client_wrapper.httpx_client.request(
Expand All @@ -555,6 +572,7 @@ async def create(
"name": name,
"isSource": is_source,
"isDestination": is_destination,
"estimatedProcessingTime": estimated_processing_time,
"supportedCurrencies": supported_currencies,
"fields": fields,
},
Expand Down Expand Up @@ -592,6 +610,7 @@ async def update(
is_source: bool,
is_destination: bool,
fields: typing.Sequence[CustomPaymentMethodSchemaField],
estimated_processing_time: typing.Optional[int] = OMIT,
supported_currencies: typing.Optional[typing.Sequence[CurrencyCode]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CustomPaymentMethodSchemaResponse:
Expand All @@ -612,6 +631,9 @@ async def update(
fields : typing.Sequence[CustomPaymentMethodSchemaField]
estimated_processing_time : typing.Optional[int]
Estimated time in days for this payment method to process a payments. Set as 0 for same-day payment methods, -1 for unknown processing time.
supported_currencies : typing.Optional[typing.Sequence[CurrencyCode]]
List of currencies that this payment method supports. If not provided, the payment method will support only USD.
Expand Down Expand Up @@ -663,6 +685,7 @@ async def update(
optional=False,
),
],
estimated_processing_time=7,
)
"""
_response = await self._client_wrapper.httpx_client.request(
Expand All @@ -672,6 +695,7 @@ async def update(
"name": name,
"isSource": is_source,
"isDestination": is_destination,
"estimatedProcessingTime": estimated_processing_time,
"supportedCurrencies": supported_currencies,
"fields": fields,
},
Expand Down
10 changes: 10 additions & 0 deletions src/mercoa/entity_types/types/approval_policy_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class ApprovalPolicyResponse(pydantic_v1.BaseModel):
"""
Examples
--------
import datetime
from mercoa import (
ApprovalPolicyResponse,
IdentifierList_RolesList,
Expand All @@ -34,13 +36,21 @@ class ApprovalPolicyResponse(pydantic_v1.BaseModel):
identifier_list=IdentifierList_RolesList(value=["Admin", "Controller"]),
),
upstream_policy_id="root",
updated_at=datetime.datetime.fromisoformat(
"2024-01-02 00:00:00+00:00",
),
created_at=datetime.datetime.fromisoformat(
"2024-01-01 00:00:00+00:00",
),
)
"""

id: ApprovalPolicyId
trigger: typing.List[Trigger]
rule: Rule
upstream_policy_id: ApprovalPolicyId = pydantic_v1.Field(alias="upstreamPolicyId")
created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
Expand Down
6 changes: 6 additions & 0 deletions src/mercoa/invoice_types/types/find_invoice_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,12 @@ class FindInvoiceResponse(pydantic_v1.BaseModel):
),
),
upstream_policy_id="root",
updated_at=datetime.datetime.fromisoformat(
"2024-01-02 00:00:00+00:00",
),
created_at=datetime.datetime.fromisoformat(
"2024-01-01 00:00:00+00:00",
),
)
],
metadata={"key1": "value1", "key2": "value2"},
Expand Down
6 changes: 6 additions & 0 deletions src/mercoa/invoice_types/types/invoice_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,12 @@ class InvoiceResponse(pydantic_v1.BaseModel):
),
),
upstream_policy_id="root",
updated_at=datetime.datetime.fromisoformat(
"2024-01-02 00:00:00+00:00",
),
created_at=datetime.datetime.fromisoformat(
"2024-01-01 00:00:00+00:00",
),
)
],
metadata={"key1": "value1", "key2": "value2"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class CustomPaymentMethodSchemaRequest(pydantic_v1.BaseModel):
optional=False,
),
],
estimated_processing_time=0,
)
"""

Expand All @@ -64,6 +65,11 @@ class CustomPaymentMethodSchemaRequest(pydantic_v1.BaseModel):
This payment method can be used as a payment destination for an invoice
"""

estimated_processing_time: typing.Optional[int] = pydantic_v1.Field(alias="estimatedProcessingTime", default=None)
"""
Estimated time in days for this payment method to process a payments. Set as 0 for same-day payment methods, -1 for unknown processing time.
"""

supported_currencies: typing.Optional[typing.List[CurrencyCode]] = pydantic_v1.Field(
alias="supportedCurrencies", default=None
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class CustomPaymentMethodSchemaResponse(pydantic_v1.BaseModel):
updated_at=datetime.datetime.fromisoformat(
"2021-01-01 00:00:00+00:00",
),
estimated_processing_time=0,
)
"""

Expand All @@ -81,6 +82,11 @@ class CustomPaymentMethodSchemaResponse(pydantic_v1.BaseModel):
"""

fields: typing.List[CustomPaymentMethodSchemaField]
estimated_processing_time: int = pydantic_v1.Field(alias="estimatedProcessingTime")
"""
Estimated time in days for this payment method to process a payments. 0 is an same-day payment methods, -1 is unknown processing time.
"""

created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")

Expand Down
6 changes: 6 additions & 0 deletions src/mercoa/webhooks/types/invoice_email_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ class InvoiceEmailWebhook(pydantic_v1.BaseModel):
),
),
upstream_policy_id="root",
updated_at=datetime.datetime.fromisoformat(
"2024-01-02 00:00:00+00:00",
),
created_at=datetime.datetime.fromisoformat(
"2024-01-01 00:00:00+00:00",
),
)
],
metadata={"key1": "value1", "key2": "value2"},
Expand Down
6 changes: 6 additions & 0 deletions src/mercoa/webhooks/types/invoice_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ class InvoiceWebhook(pydantic_v1.BaseModel):
),
),
upstream_policy_id="root",
updated_at=datetime.datetime.fromisoformat(
"2024-01-02 00:00:00+00:00",
),
created_at=datetime.datetime.fromisoformat(
"2024-01-01 00:00:00+00:00",
),
)
],
metadata={"key1": "value1", "key2": "value2"},
Expand Down

0 comments on commit 8ac4ddb

Please sign in to comment.