diff --git a/pyproject.toml b/pyproject.toml index fc58314..c9c4c04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "flagright" -version = "1.6.4" +version = "1.6.5" description = "" readme = "README.md" authors = [] diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py index c35c4dc..44d6a5b 100644 --- a/src/flagright/__init__.py +++ b/src/flagright/__init__.py @@ -96,6 +96,7 @@ PaymentMethod, PepStatus, Person, + PlaceOfBirth, RiskLevel, RuleAction, RuleFailureException, @@ -372,6 +373,7 @@ "PaymentMethod", "PepStatus", "Person", + "PlaceOfBirth", "RiskLevel", "RuleAction", "RuleFailureException", diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py index e32930f..4af7e89 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.4", + "X-Fern-SDK-Version": "1.6.5", } headers["x-api-key"] = self.api_key return headers diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py index 6f01b8a..1bab1bf 100644 --- a/src/flagright/types/__init__.py +++ b/src/flagright/types/__init__.py @@ -99,6 +99,7 @@ from .payment_method import PaymentMethod from .pep_status import PepStatus from .person import Person +from .place_of_birth import PlaceOfBirth from .risk_level import RiskLevel from .rule_action import RuleAction from .rule_failure_exception import RuleFailureException @@ -343,6 +344,7 @@ "PaymentMethod", "PepStatus", "Person", + "PlaceOfBirth", "RiskLevel", "RuleAction", "RuleFailureException", diff --git a/src/flagright/types/place_of_birth.py b/src/flagright/types/place_of_birth.py new file mode 100644 index 0000000..fa22c5e --- /dev/null +++ b/src/flagright/types/place_of_birth.py @@ -0,0 +1,35 @@ +# 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 .country_code import CountryCode + +try: + import pydantic.v1 as pydantic # type: ignore +except ImportError: + import pydantic # type: ignore + + +class PlaceOfBirth(pydantic.BaseModel): + """ + Place of birth of the individual + """ + + city: typing.Optional[str] + state: typing.Optional[str] + country: CountryCode + + 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/user_details.py b/src/flagright/types/user_details.py index 7c8d3de..c7c0076 100644 --- a/src/flagright/types/user_details.py +++ b/src/flagright/types/user_details.py @@ -7,6 +7,7 @@ from .consumer_name import ConsumerName from .country_code import CountryCode from .gender import Gender +from .place_of_birth import PlaceOfBirth try: import pydantic.v1 as pydantic # type: ignore @@ -26,6 +27,7 @@ class UserDetails(pydantic.BaseModel): country_of_residence: typing.Optional[CountryCode] = pydantic.Field(alias="countryOfResidence") country_of_nationality: typing.Optional[CountryCode] = pydantic.Field(alias="countryOfNationality") gender: typing.Optional[Gender] + place_of_birth: typing.Optional[PlaceOfBirth] = pydantic.Field(alias="placeOfBirth") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}