From 05aac57418b484499c1abf16978dfa1773d17f79 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 14:34:06 +0000 Subject: [PATCH] Release 1.6.25 --- pyproject.toml | 2 +- src/flagright/__init__.py | 2 ++ src/flagright/core/client_wrapper.py | 2 +- .../business_saved_payment_details_item.py | 3 +- src/flagright/types/__init__.py | 2 ++ ...ess_optional_saved_payment_details_item.py | 3 +- ...rules_result_saved_payment_details_item.py | 3 +- src/flagright/types/cash_details.py | 28 +++++++++++++++++++ src/flagright/types/check_details.py | 14 +++++++++- ...transaction_destination_payment_details.py | 3 +- .../transaction_origin_payment_details.py | 3 +- ...n_updatable_destination_payment_details.py | 3 +- ...action_updatable_origin_payment_details.py | 3 +- ...ules_result_destination_payment_details.py | 3 +- ...ith_rules_result_origin_payment_details.py | 3 +- ...ser_optional_saved_payment_details_item.py | 3 +- .../types/user_saved_payment_details_item.py | 3 +- ...rules_result_saved_payment_details_item.py | 3 +- 18 files changed, 71 insertions(+), 15 deletions(-) create mode 100644 src/flagright/types/cash_details.py diff --git a/pyproject.toml b/pyproject.toml index 55e65ed..dc84422 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "flagright" -version = "1.6.24" +version = "1.6.25" description = "" readme = "README.md" authors = [] diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py index 939e492..7c1d755 100644 --- a/src/flagright/__init__.py +++ b/src/flagright/__init__.py @@ -52,6 +52,7 @@ CaseManagementEventCaseStatus, CaseManagementEventCaseStatusReason, CaseOpenedDetails, + CashDetails, CashPaymentMethod, CheckDeliveryStatus, CheckDetails, @@ -354,6 +355,7 @@ "CaseManagementEventCaseStatus", "CaseManagementEventCaseStatusReason", "CaseOpenedDetails", + "CashDetails", "CashPaymentMethod", "CheckDeliveryStatus", "CheckDetails", diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py index 70eba87..fdadc2f 100644 --- a/src/flagright/core/client_wrapper.py +++ b/src/flagright/core/client_wrapper.py @@ -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": "flagright", - "X-Fern-SDK-Version": "1.6.24", + "X-Fern-SDK-Version": "1.6.25", } headers["x-api-key"] = self.api_key return headers diff --git a/src/flagright/resources/business_users/types/business_saved_payment_details_item.py b/src/flagright/resources/business_users/types/business_saved_payment_details_item.py index 257172b..0bf2182 100644 --- a/src/flagright/resources/business_users/types/business_saved_payment_details_item.py +++ b/src/flagright/resources/business_users/types/business_saved_payment_details_item.py @@ -8,6 +8,7 @@ from ....types.ach_details import AchDetails from ....types.card_details import CardDetails +from ....types.cash_details import CashDetails from ....types.check_details import CheckDetails from ....types.generic_bank_account_details import GenericBankAccountDetails from ....types.iban_details import IbanDetails @@ -98,7 +99,7 @@ class Config: allow_population_by_field_name = True -class BusinessSavedPaymentDetailsItem_Cash(CheckDetails): +class BusinessSavedPaymentDetailsItem_Cash(CashDetails): method: typing_extensions.Literal["CASH"] class Config: diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py index ffd9e5e..f655108 100644 --- a/src/flagright/types/__init__.py +++ b/src/flagright/types/__init__.py @@ -55,6 +55,7 @@ from .case_management_event_case_status import CaseManagementEventCaseStatus from .case_management_event_case_status_reason import CaseManagementEventCaseStatusReason from .case_opened_details import CaseOpenedDetails +from .cash_details import CashDetails from .cash_payment_method import CashPaymentMethod from .check_delivery_status import CheckDeliveryStatus from .check_details import CheckDetails @@ -336,6 +337,7 @@ "CaseManagementEventCaseStatus", "CaseManagementEventCaseStatusReason", "CaseOpenedDetails", + "CashDetails", "CashPaymentMethod", "CheckDeliveryStatus", "CheckDetails", diff --git a/src/flagright/types/business_optional_saved_payment_details_item.py b/src/flagright/types/business_optional_saved_payment_details_item.py index 8b952fa..1b99cc7 100644 --- a/src/flagright/types/business_optional_saved_payment_details_item.py +++ b/src/flagright/types/business_optional_saved_payment_details_item.py @@ -8,6 +8,7 @@ from .ach_details import AchDetails from .card_details import CardDetails +from .cash_details import CashDetails from .check_details import CheckDetails from .generic_bank_account_details import GenericBankAccountDetails from .iban_details import IbanDetails @@ -98,7 +99,7 @@ class Config: allow_population_by_field_name = True -class BusinessOptionalSavedPaymentDetailsItem_Cash(CheckDetails): +class BusinessOptionalSavedPaymentDetailsItem_Cash(CashDetails): method: typing_extensions.Literal["CASH"] class Config: diff --git a/src/flagright/types/business_with_rules_result_saved_payment_details_item.py b/src/flagright/types/business_with_rules_result_saved_payment_details_item.py index ea0d22f..bc5407c 100644 --- a/src/flagright/types/business_with_rules_result_saved_payment_details_item.py +++ b/src/flagright/types/business_with_rules_result_saved_payment_details_item.py @@ -8,6 +8,7 @@ from .ach_details import AchDetails from .card_details import CardDetails +from .cash_details import CashDetails from .check_details import CheckDetails from .generic_bank_account_details import GenericBankAccountDetails from .iban_details import IbanDetails @@ -98,7 +99,7 @@ class Config: allow_population_by_field_name = True -class BusinessWithRulesResultSavedPaymentDetailsItem_Cash(CheckDetails): +class BusinessWithRulesResultSavedPaymentDetailsItem_Cash(CashDetails): method: typing_extensions.Literal["CASH"] class Config: diff --git a/src/flagright/types/cash_details.py b/src/flagright/types/cash_details.py new file mode 100644 index 0000000..a4cc7a9 --- /dev/null +++ b/src/flagright/types/cash_details.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ..core.datetime_utils import serialize_datetime + +try: + import pydantic.v1 as pydantic # type: ignore +except ImportError: + import pydantic # type: ignore + + +class CashDetails(pydantic.BaseModel): + identifier: typing.Optional[str] = pydantic.Field(description="Identifier for the cash transaction") + + 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 + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/flagright/types/check_details.py b/src/flagright/types/check_details.py index 90fea59..9694de8 100644 --- a/src/flagright/types/check_details.py +++ b/src/flagright/types/check_details.py @@ -4,6 +4,9 @@ import typing from ..core.datetime_utils import serialize_datetime +from .address import Address +from .check_delivery_status import CheckDeliveryStatus +from .tag import Tag try: import pydantic.v1 as pydantic # type: ignore @@ -12,7 +15,15 @@ class CheckDetails(pydantic.BaseModel): - identifier: typing.Optional[str] = pydantic.Field(description="Identifier for the cash transaction") + check_number: typing.Optional[str] = pydantic.Field(alias="checkNumber") + check_identifier: typing.Optional[str] = pydantic.Field(alias="checkIdentifier") + name: typing.Optional[str] + delivery_status: typing.Optional[CheckDeliveryStatus] = pydantic.Field(alias="deliveryStatus") + eta_timestamp: typing.Optional[float] = pydantic.Field(alias="etaTimestamp") + shipping_address: typing.Optional[Address] = pydantic.Field(alias="shippingAddress") + tags: typing.Optional[typing.List[Tag]] = pydantic.Field( + description="Additional information that can be added via tags" + ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} @@ -25,4 +36,5 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: class Config: frozen = True smart_union = True + allow_population_by_field_name = True json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py index 47ed4fa..165031b 100644 --- a/src/flagright/types/transaction_destination_payment_details.py +++ b/src/flagright/types/transaction_destination_payment_details.py @@ -8,6 +8,7 @@ from .ach_details import AchDetails from .card_details import CardDetails +from .cash_details import CashDetails from .check_details import CheckDetails from .generic_bank_account_details import GenericBankAccountDetails from .iban_details import IbanDetails @@ -98,7 +99,7 @@ class Config: allow_population_by_field_name = True -class TransactionDestinationPaymentDetails_Cash(CheckDetails): +class TransactionDestinationPaymentDetails_Cash(CashDetails): method: typing_extensions.Literal["CASH"] class Config: diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py index fa37f30..2e0820c 100644 --- a/src/flagright/types/transaction_origin_payment_details.py +++ b/src/flagright/types/transaction_origin_payment_details.py @@ -8,6 +8,7 @@ from .ach_details import AchDetails from .card_details import CardDetails +from .cash_details import CashDetails from .check_details import CheckDetails from .generic_bank_account_details import GenericBankAccountDetails from .iban_details import IbanDetails @@ -98,7 +99,7 @@ class Config: allow_population_by_field_name = True -class TransactionOriginPaymentDetails_Cash(CheckDetails): +class TransactionOriginPaymentDetails_Cash(CashDetails): method: typing_extensions.Literal["CASH"] class Config: diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py index 390ce7d..5a0dd9f 100644 --- a/src/flagright/types/transaction_updatable_destination_payment_details.py +++ b/src/flagright/types/transaction_updatable_destination_payment_details.py @@ -8,6 +8,7 @@ from .ach_details import AchDetails from .card_details import CardDetails +from .cash_details import CashDetails from .check_details import CheckDetails from .generic_bank_account_details import GenericBankAccountDetails from .iban_details import IbanDetails @@ -98,7 +99,7 @@ class Config: allow_population_by_field_name = True -class TransactionUpdatableDestinationPaymentDetails_Cash(CheckDetails): +class TransactionUpdatableDestinationPaymentDetails_Cash(CashDetails): method: typing_extensions.Literal["CASH"] class Config: diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py index 461b9f0..e6b0931 100644 --- a/src/flagright/types/transaction_updatable_origin_payment_details.py +++ b/src/flagright/types/transaction_updatable_origin_payment_details.py @@ -8,6 +8,7 @@ from .ach_details import AchDetails from .card_details import CardDetails +from .cash_details import CashDetails from .check_details import CheckDetails from .generic_bank_account_details import GenericBankAccountDetails from .iban_details import IbanDetails @@ -98,7 +99,7 @@ class Config: allow_population_by_field_name = True -class TransactionUpdatableOriginPaymentDetails_Cash(CheckDetails): +class TransactionUpdatableOriginPaymentDetails_Cash(CashDetails): method: typing_extensions.Literal["CASH"] class Config: diff --git a/src/flagright/types/transaction_with_rules_result_destination_payment_details.py b/src/flagright/types/transaction_with_rules_result_destination_payment_details.py index 8d4d2c9..468b9e3 100644 --- a/src/flagright/types/transaction_with_rules_result_destination_payment_details.py +++ b/src/flagright/types/transaction_with_rules_result_destination_payment_details.py @@ -8,6 +8,7 @@ from .ach_details import AchDetails from .card_details import CardDetails +from .cash_details import CashDetails from .check_details import CheckDetails from .generic_bank_account_details import GenericBankAccountDetails from .iban_details import IbanDetails @@ -98,7 +99,7 @@ class Config: allow_population_by_field_name = True -class TransactionWithRulesResultDestinationPaymentDetails_Cash(CheckDetails): +class TransactionWithRulesResultDestinationPaymentDetails_Cash(CashDetails): method: typing_extensions.Literal["CASH"] class Config: diff --git a/src/flagright/types/transaction_with_rules_result_origin_payment_details.py b/src/flagright/types/transaction_with_rules_result_origin_payment_details.py index 9133cb6..786a488 100644 --- a/src/flagright/types/transaction_with_rules_result_origin_payment_details.py +++ b/src/flagright/types/transaction_with_rules_result_origin_payment_details.py @@ -8,6 +8,7 @@ from .ach_details import AchDetails from .card_details import CardDetails +from .cash_details import CashDetails from .check_details import CheckDetails from .generic_bank_account_details import GenericBankAccountDetails from .iban_details import IbanDetails @@ -98,7 +99,7 @@ class Config: allow_population_by_field_name = True -class TransactionWithRulesResultOriginPaymentDetails_Cash(CheckDetails): +class TransactionWithRulesResultOriginPaymentDetails_Cash(CashDetails): method: typing_extensions.Literal["CASH"] class Config: diff --git a/src/flagright/types/user_optional_saved_payment_details_item.py b/src/flagright/types/user_optional_saved_payment_details_item.py index a74fddf..cff2417 100644 --- a/src/flagright/types/user_optional_saved_payment_details_item.py +++ b/src/flagright/types/user_optional_saved_payment_details_item.py @@ -8,6 +8,7 @@ from .ach_details import AchDetails from .card_details import CardDetails +from .cash_details import CashDetails from .check_details import CheckDetails from .generic_bank_account_details import GenericBankAccountDetails from .iban_details import IbanDetails @@ -98,7 +99,7 @@ class Config: allow_population_by_field_name = True -class UserOptionalSavedPaymentDetailsItem_Cash(CheckDetails): +class UserOptionalSavedPaymentDetailsItem_Cash(CashDetails): method: typing_extensions.Literal["CASH"] class Config: diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py index fca4af9..5ed9dec 100644 --- a/src/flagright/types/user_saved_payment_details_item.py +++ b/src/flagright/types/user_saved_payment_details_item.py @@ -8,6 +8,7 @@ from .ach_details import AchDetails from .card_details import CardDetails +from .cash_details import CashDetails from .check_details import CheckDetails from .generic_bank_account_details import GenericBankAccountDetails from .iban_details import IbanDetails @@ -98,7 +99,7 @@ class Config: allow_population_by_field_name = True -class UserSavedPaymentDetailsItem_Cash(CheckDetails): +class UserSavedPaymentDetailsItem_Cash(CashDetails): method: typing_extensions.Literal["CASH"] class Config: diff --git a/src/flagright/types/user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/user_with_rules_result_saved_payment_details_item.py index aa50121..4d052b7 100644 --- a/src/flagright/types/user_with_rules_result_saved_payment_details_item.py +++ b/src/flagright/types/user_with_rules_result_saved_payment_details_item.py @@ -8,6 +8,7 @@ from .ach_details import AchDetails from .card_details import CardDetails +from .cash_details import CashDetails from .check_details import CheckDetails from .generic_bank_account_details import GenericBankAccountDetails from .iban_details import IbanDetails @@ -98,7 +99,7 @@ class Config: allow_population_by_field_name = True -class UserWithRulesResultSavedPaymentDetailsItem_Cash(CheckDetails): +class UserWithRulesResultSavedPaymentDetailsItem_Cash(CashDetails): method: typing_extensions.Literal["CASH"] class Config: