From 65b8e9849d62b2e06a4ab0db39ab8f27c5849bfa Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 17 Oct 2024 07:11:37 +0000
Subject: [PATCH 01/81] Release 1.6.36
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
src/flagright/types/sanctions_hit_context.py | 2 +-
src/flagright/types/wallet_details.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 46ae1e5..7a3668f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.35"
+version = "1.6.36"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 44bf19d..5f8ed8f 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.35",
+ "X-Fern-SDK-Version": "1.6.36",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/sanctions_hit_context.py b/src/flagright/types/sanctions_hit_context.py
index e8a1626..e129e56 100644
--- a/src/flagright/types/sanctions_hit_context.py
+++ b/src/flagright/types/sanctions_hit_context.py
@@ -14,7 +14,7 @@
class SanctionsHitContext(pydantic.BaseModel):
- entity: typing.Optional[SanctionsScreeningEntity]
+ entity: SanctionsScreeningEntity
entity_type: typing.Optional[SanctionsDetailsEntityType] = pydantic.Field(alias="entityType")
user_id: typing.Optional[str] = pydantic.Field(alias="userId")
transaction_id: typing.Optional[str] = pydantic.Field(alias="transactionId")
diff --git a/src/flagright/types/wallet_details.py b/src/flagright/types/wallet_details.py
index c8767bb..db19422 100644
--- a/src/flagright/types/wallet_details.py
+++ b/src/flagright/types/wallet_details.py
@@ -20,7 +20,7 @@ class WalletDetails(pydantic.BaseModel):
Standardized model for a Generic wallet transaction
"""
- wallet_type: str = pydantic.Field(
+ wallet_type: typing.Optional[str] = pydantic.Field(
alias="walletType",
description="Wallet type if there are various types of wallets belonging to the same user. E.g. Checking, savings, vault, different currency wallets etc.",
)
From 647f474714da8552f84b069ab38056f1c28ea624 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 17 Oct 2024 12:20:41 +0000
Subject: [PATCH 02/81] Release 1.6.37
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
src/flagright/types/list_subtype.py | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 7a3668f..4e58a8a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.36"
+version = "1.6.37"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 5f8ed8f..17c2c75 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.36",
+ "X-Fern-SDK-Version": "1.6.37",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/list_subtype.py b/src/flagright/types/list_subtype.py
index 71c21cd..93fec66 100644
--- a/src/flagright/types/list_subtype.py
+++ b/src/flagright/types/list_subtype.py
@@ -19,6 +19,7 @@ class ListSubtype(str, enum.Enum):
IP_ADDRESS = "IP_ADDRESS"
DEVICE_IDENTIFIER = "DEVICE_IDENTIFIER"
STRING = "STRING"
+ COUNTRY = "COUNTRY"
def visit(
self,
@@ -34,6 +35,7 @@ def visit(
ip_address: typing.Callable[[], T_Result],
device_identifier: typing.Callable[[], T_Result],
string: typing.Callable[[], T_Result],
+ country: typing.Callable[[], T_Result],
) -> T_Result:
if self is ListSubtype.USER_ID:
return user_id()
@@ -59,3 +61,5 @@ def visit(
return device_identifier()
if self is ListSubtype.STRING:
return string()
+ if self is ListSubtype.COUNTRY:
+ return country()
From b4dd3cf565e7f76e8a7ffb5a06f4650260f0a150 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 13 Nov 2024 09:27:14 +0000
Subject: [PATCH 03/81] Release 1.6.38
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
.../resources/business_users/client.py | 30 ++++++--
.../resources/consumer_users/client.py | 30 ++++++--
.../resources/transactions/client.py | 16 +++++
src/flagright/types/ach_details.py | 2 +
.../types/company_general_details.py | 2 +-
src/flagright/types/currency_code.py | 68 +++++++++++++++++++
.../types/generic_bank_account_details.py | 2 +
src/flagright/types/iban_details.py | 2 +
src/flagright/types/swift_details.py | 2 +
src/flagright/types/wallet_network.py | 8 +++
12 files changed, 155 insertions(+), 11 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 4e58a8a..e5b1d1d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.37"
+version = "1.6.38"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 17c2c75..4c998f9 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.37",
+ "X-Fern-SDK-Version": "1.6.38",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/resources/business_users/client.py b/src/flagright/resources/business_users/client.py
index 1d756d6..8934b5e 100644
--- a/src/flagright/resources/business_users/client.py
+++ b/src/flagright/resources/business_users/client.py
@@ -31,7 +31,12 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper
def create(
- self, *, lock_cra_risk_level: typing.Optional[BooleanString] = None, request: Business
+ self,
+ *,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ validate_user_id: typing.Optional[BooleanString] = None,
+ krs_only: typing.Optional[BooleanString] = None,
+ request: Business,
) -> BusinessUsersCreateResponse:
"""
## POST Business User
@@ -51,6 +56,10 @@ def create(
Parameters:
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
+ - validate_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate the userId
+
+ - krs_only: typing.Optional[BooleanString].
+
- request: Business.
---
from flagright import Business, CompanyGeneralDetails, LegalEntity
@@ -76,7 +85,9 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "business/users"),
- params=remove_none_from_dict({"lockCraRiskLevel": lock_cra_risk_level}),
+ params=remove_none_from_dict(
+ {"lockCraRiskLevel": lock_cra_risk_level, "validateUserId": validate_user_id, "_krsOnly": krs_only}
+ ),
json=jsonable_encoder(request),
headers=self._client_wrapper.get_headers(),
timeout=60,
@@ -141,7 +152,12 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper
async def create(
- self, *, lock_cra_risk_level: typing.Optional[BooleanString] = None, request: Business
+ self,
+ *,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ validate_user_id: typing.Optional[BooleanString] = None,
+ krs_only: typing.Optional[BooleanString] = None,
+ request: Business,
) -> BusinessUsersCreateResponse:
"""
## POST Business User
@@ -161,6 +177,10 @@ async def create(
Parameters:
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
+ - validate_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate the userId
+
+ - krs_only: typing.Optional[BooleanString].
+
- request: Business.
---
from flagright import Business, CompanyGeneralDetails, LegalEntity
@@ -186,7 +206,9 @@ async def create(
_response = await self._client_wrapper.httpx_client.request(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "business/users"),
- params=remove_none_from_dict({"lockCraRiskLevel": lock_cra_risk_level}),
+ params=remove_none_from_dict(
+ {"lockCraRiskLevel": lock_cra_risk_level, "validateUserId": validate_user_id, "_krsOnly": krs_only}
+ ),
json=jsonable_encoder(request),
headers=self._client_wrapper.get_headers(),
timeout=60,
diff --git a/src/flagright/resources/consumer_users/client.py b/src/flagright/resources/consumer_users/client.py
index fe6fd6a..7e90718 100644
--- a/src/flagright/resources/consumer_users/client.py
+++ b/src/flagright/resources/consumer_users/client.py
@@ -31,7 +31,12 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper
def create(
- self, *, lock_cra_risk_level: typing.Optional[BooleanString] = None, request: User
+ self,
+ *,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ validate_user_id: typing.Optional[BooleanString] = None,
+ krs_only: typing.Optional[BooleanString] = None,
+ request: User,
) -> ConsumerUsersCreateResponse:
"""
## POST Consumer User
@@ -50,6 +55,10 @@ def create(
Parameters:
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
+ - validate_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate the userId
+
+ - krs_only: typing.Optional[BooleanString].
+
- request: User.
---
from flagright import (
@@ -129,7 +138,9 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "consumer/users"),
- params=remove_none_from_dict({"lockCraRiskLevel": lock_cra_risk_level}),
+ params=remove_none_from_dict(
+ {"lockCraRiskLevel": lock_cra_risk_level, "validateUserId": validate_user_id, "_krsOnly": krs_only}
+ ),
json=jsonable_encoder(request),
headers=self._client_wrapper.get_headers(),
timeout=60,
@@ -194,7 +205,12 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper
async def create(
- self, *, lock_cra_risk_level: typing.Optional[BooleanString] = None, request: User
+ self,
+ *,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ validate_user_id: typing.Optional[BooleanString] = None,
+ krs_only: typing.Optional[BooleanString] = None,
+ request: User,
) -> ConsumerUsersCreateResponse:
"""
## POST Consumer User
@@ -213,6 +229,10 @@ async def create(
Parameters:
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
+ - validate_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate the userId
+
+ - krs_only: typing.Optional[BooleanString].
+
- request: User.
---
from flagright import (
@@ -292,7 +312,9 @@ async def create(
_response = await self._client_wrapper.httpx_client.request(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "consumer/users"),
- params=remove_none_from_dict({"lockCraRiskLevel": lock_cra_risk_level}),
+ params=remove_none_from_dict(
+ {"lockCraRiskLevel": lock_cra_risk_level, "validateUserId": validate_user_id, "_krsOnly": krs_only}
+ ),
json=jsonable_encoder(request),
headers=self._client_wrapper.get_headers(),
timeout=60,
diff --git a/src/flagright/resources/transactions/client.py b/src/flagright/resources/transactions/client.py
index 585010b..e0e1dd2 100644
--- a/src/flagright/resources/transactions/client.py
+++ b/src/flagright/resources/transactions/client.py
@@ -35,6 +35,8 @@ def verify(
*,
validate_origin_user_id: typing.Optional[BooleanString] = None,
validate_destination_user_id: typing.Optional[BooleanString] = None,
+ validate_transaction_id: typing.Optional[BooleanString] = None,
+ trs_only: typing.Optional[BooleanString] = None,
request: Transaction,
) -> TransactionsVerifyResponse:
"""
@@ -64,6 +66,10 @@ def verify(
- validate_destination_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+ - validate_transaction_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided transactionId exist. True by default
+
+ - trs_only: typing.Optional[BooleanString].
+
- request: Transaction.
---
from flagright import (
@@ -141,6 +147,8 @@ def verify(
{
"validateOriginUserId": validate_origin_user_id,
"validateDestinationUserId": validate_destination_user_id,
+ "validateTransactionId": validate_transaction_id,
+ "_trsOnly": trs_only,
}
),
json=jsonable_encoder(request),
@@ -211,6 +219,8 @@ async def verify(
*,
validate_origin_user_id: typing.Optional[BooleanString] = None,
validate_destination_user_id: typing.Optional[BooleanString] = None,
+ validate_transaction_id: typing.Optional[BooleanString] = None,
+ trs_only: typing.Optional[BooleanString] = None,
request: Transaction,
) -> TransactionsVerifyResponse:
"""
@@ -240,6 +250,10 @@ async def verify(
- validate_destination_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+ - validate_transaction_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided transactionId exist. True by default
+
+ - trs_only: typing.Optional[BooleanString].
+
- request: Transaction.
---
from flagright import (
@@ -317,6 +331,8 @@ async def verify(
{
"validateOriginUserId": validate_origin_user_id,
"validateDestinationUserId": validate_destination_user_id,
+ "validateTransactionId": validate_transaction_id,
+ "_trsOnly": trs_only,
}
),
json=jsonable_encoder(request),
diff --git a/src/flagright/types/ach_details.py b/src/flagright/types/ach_details.py
index 691a362..09dbd71 100644
--- a/src/flagright/types/ach_details.py
+++ b/src/flagright/types/ach_details.py
@@ -5,6 +5,7 @@
from ..core.datetime_utils import serialize_datetime
from .address import Address
+from .amount import Amount
from .email_id import EmailId
from .tag import Tag
@@ -25,6 +26,7 @@ class AchDetails(pydantic.BaseModel):
account_number: typing.Optional[str] = pydantic.Field(
alias="accountNumber", description="Bank account number of the individual"
)
+ account_balance: typing.Optional[Amount] = pydantic.Field(alias="accountBalance")
bank_name: typing.Optional[str] = pydantic.Field(alias="bankName", description="Name of the bank")
name: typing.Optional[str] = pydantic.Field(description="Name of the account holder")
bank_address: typing.Optional[Address] = pydantic.Field(alias="bankAddress")
diff --git a/src/flagright/types/company_general_details.py b/src/flagright/types/company_general_details.py
index 76a156d..d9a4710 100644
--- a/src/flagright/types/company_general_details.py
+++ b/src/flagright/types/company_general_details.py
@@ -19,7 +19,7 @@ class CompanyGeneralDetails(pydantic.BaseModel):
Model for business user company general details
"""
- legal_name: str = pydantic.Field(alias="legalName", description="Legal name of the company")
+ legal_name: typing.Optional[str] = pydantic.Field(alias="legalName", description="Legal name of the company")
business_industry: typing.Optional[typing.List[str]] = pydantic.Field(
alias="businessIndustry", description="The industry in which the business operates for a business customer"
)
diff --git a/src/flagright/types/currency_code.py b/src/flagright/types/currency_code.py
index 0121ea5..f4fca9c 100644
--- a/src/flagright/types/currency_code.py
+++ b/src/flagright/types/currency_code.py
@@ -464,6 +464,23 @@ class CurrencyCode(str, enum.Enum):
ZMW = "ZMW"
ZRX = "ZRX"
ZWD = "ZWD"
+ FDUSD = "FDUSD"
+ AGX = "AGX"
+ AUX = "AUX"
+ BNB = "BNB"
+ CUBE = "CUBE"
+ EMON = "EMON"
+ FDGT = "FDGT"
+ KGLD = "KGLD"
+ LODE = "LODE"
+ PASS = "PASS"
+ PREMIA = "PREMIA"
+ TAB_1 = "TAB1"
+ TD_USD = "TD-USD"
+ TRX = "TRX"
+ TYUGA = "TYUGA"
+ VIC = "VIC"
+ XAI = "XAI"
def visit(
self,
@@ -924,6 +941,23 @@ def visit(
zmw: typing.Callable[[], T_Result],
zrx: typing.Callable[[], T_Result],
zwd: typing.Callable[[], T_Result],
+ fdusd: typing.Callable[[], T_Result],
+ agx: typing.Callable[[], T_Result],
+ aux: typing.Callable[[], T_Result],
+ bnb: typing.Callable[[], T_Result],
+ cube: typing.Callable[[], T_Result],
+ emon: typing.Callable[[], T_Result],
+ fdgt: typing.Callable[[], T_Result],
+ kgld: typing.Callable[[], T_Result],
+ lode: typing.Callable[[], T_Result],
+ pass_: typing.Callable[[], T_Result],
+ premia: typing.Callable[[], T_Result],
+ tab_1: typing.Callable[[], T_Result],
+ td_usd: typing.Callable[[], T_Result],
+ trx: typing.Callable[[], T_Result],
+ tyuga: typing.Callable[[], T_Result],
+ vic: typing.Callable[[], T_Result],
+ xai: typing.Callable[[], T_Result],
) -> T_Result:
if self is CurrencyCode.ONE_INCH:
return one_inch()
@@ -1839,3 +1873,37 @@ def visit(
return zrx()
if self is CurrencyCode.ZWD:
return zwd()
+ if self is CurrencyCode.FDUSD:
+ return fdusd()
+ if self is CurrencyCode.AGX:
+ return agx()
+ if self is CurrencyCode.AUX:
+ return aux()
+ if self is CurrencyCode.BNB:
+ return bnb()
+ if self is CurrencyCode.CUBE:
+ return cube()
+ if self is CurrencyCode.EMON:
+ return emon()
+ if self is CurrencyCode.FDGT:
+ return fdgt()
+ if self is CurrencyCode.KGLD:
+ return kgld()
+ if self is CurrencyCode.LODE:
+ return lode()
+ if self is CurrencyCode.PASS:
+ return pass_()
+ if self is CurrencyCode.PREMIA:
+ return premia()
+ if self is CurrencyCode.TAB_1:
+ return tab_1()
+ if self is CurrencyCode.TD_USD:
+ return td_usd()
+ if self is CurrencyCode.TRX:
+ return trx()
+ if self is CurrencyCode.TYUGA:
+ return tyuga()
+ if self is CurrencyCode.VIC:
+ return vic()
+ if self is CurrencyCode.XAI:
+ return xai()
diff --git a/src/flagright/types/generic_bank_account_details.py b/src/flagright/types/generic_bank_account_details.py
index 949dca2..daa8c9c 100644
--- a/src/flagright/types/generic_bank_account_details.py
+++ b/src/flagright/types/generic_bank_account_details.py
@@ -5,6 +5,7 @@
from ..core.datetime_utils import serialize_datetime
from .address import Address
+from .amount import Amount
from .country_code import CountryCode
from .email_id import EmailId
from .tag import Tag
@@ -24,6 +25,7 @@ class GenericBankAccountDetails(pydantic.BaseModel):
account_type: typing.Optional[str] = pydantic.Field(
alias="accountType", description="Bank account type. E.g. Checking, Savings etc."
)
+ account_balance: typing.Optional[Amount] = pydantic.Field(alias="accountBalance")
bank_name: typing.Optional[str] = pydantic.Field(alias="bankName", description="Name of the bank")
bank_code: typing.Optional[str] = pydantic.Field(
alias="bankCode",
diff --git a/src/flagright/types/iban_details.py b/src/flagright/types/iban_details.py
index 676a60c..a43e28c 100644
--- a/src/flagright/types/iban_details.py
+++ b/src/flagright/types/iban_details.py
@@ -5,6 +5,7 @@
from ..core.datetime_utils import serialize_datetime
from .address import Address
+from .amount import Amount
from .country_code import CountryCode
from .email_id import EmailId
from .tag import Tag
@@ -30,6 +31,7 @@ class IbanDetails(pydantic.BaseModel):
iban: typing.Optional[str] = pydantic.Field(
alias="IBAN", description="Account number of the user. Can be account number, IBAN number etc."
)
+ account_balance: typing.Optional[Amount] = pydantic.Field(alias="accountBalance")
name: typing.Optional[str] = pydantic.Field(description="Name of the bank account holder")
email_id: typing.Optional[EmailId] = pydantic.Field(alias="emailId")
bank_branch_code: typing.Optional[str] = pydantic.Field(
diff --git a/src/flagright/types/swift_details.py b/src/flagright/types/swift_details.py
index 61822be..7ded07c 100644
--- a/src/flagright/types/swift_details.py
+++ b/src/flagright/types/swift_details.py
@@ -5,6 +5,7 @@
from ..core.datetime_utils import serialize_datetime
from .address import Address
+from .amount import Amount
from .email_id import EmailId
from .tag import Tag
@@ -23,6 +24,7 @@ class SwiftDetails(pydantic.BaseModel):
alias="swiftCode", description="SWIFT code of the financial institution"
)
account_number: typing.Optional[str] = pydantic.Field(alias="accountNumber", description="Account number")
+ account_balance: typing.Optional[Amount] = pydantic.Field(alias="accountBalance")
account_type: typing.Optional[str] = pydantic.Field(
alias="accountType", description="Account type. E.g. Checking, Savings etc."
)
diff --git a/src/flagright/types/wallet_network.py b/src/flagright/types/wallet_network.py
index f80fa07..bd85d78 100644
--- a/src/flagright/types/wallet_network.py
+++ b/src/flagright/types/wallet_network.py
@@ -19,6 +19,8 @@ class WalletNetwork(str, enum.Enum):
ARBITRUM_L_2 = "ARBITRUM_L2"
SOLANA = "SOLANA"
AVALANCHE_C_CHAIN = "AVALANCHE_C_CHAIN"
+ TEZOS = "TEZOS"
+ VICTION = "VICTION"
LITECOIN = "LITECOIN"
BITCOIN_CASH = "BITCOIN_CASH"
RIPPLE = "RIPPLE"
@@ -46,6 +48,8 @@ def visit(
arbitrum_l_2: typing.Callable[[], T_Result],
solana: typing.Callable[[], T_Result],
avalanche_c_chain: typing.Callable[[], T_Result],
+ tezos: typing.Callable[[], T_Result],
+ viction: typing.Callable[[], T_Result],
litecoin: typing.Callable[[], T_Result],
bitcoin_cash: typing.Callable[[], T_Result],
ripple: typing.Callable[[], T_Result],
@@ -79,6 +83,10 @@ def visit(
return solana()
if self is WalletNetwork.AVALANCHE_C_CHAIN:
return avalanche_c_chain()
+ if self is WalletNetwork.TEZOS:
+ return tezos()
+ if self is WalletNetwork.VICTION:
+ return viction()
if self is WalletNetwork.LITECOIN:
return litecoin()
if self is WalletNetwork.BITCOIN_CASH:
From 56bf9d2e4e2248899b72a74a6235c85bf3e3b16c Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 25 Nov 2024 16:27:33 +0000
Subject: [PATCH 04/81] Release 1.6.39
---
pyproject.toml | 2 +-
src/flagright/__init__.py | 4 +++
src/flagright/core/client_wrapper.py | 2 +-
src/flagright/types/__init__.py | 4 +++
src/flagright/types/address.py | 4 +--
src/flagright/types/device_data.py | 2 ++
src/flagright/types/executed_rules_result.py | 3 ++
src/flagright/types/file_info.py | 34 ++++++++++++++++++
src/flagright/types/hit_rules_details.py | 3 ++
src/flagright/types/person.py | 5 +++
src/flagright/types/person_attachment.py | 38 ++++++++++++++++++++
11 files changed, 97 insertions(+), 4 deletions(-)
create mode 100644 src/flagright/types/file_info.py
create mode 100644 src/flagright/types/person_attachment.py
diff --git a/pyproject.toml b/pyproject.toml
index e5b1d1d..8c2f1e8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.38"
+version = "1.6.39"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 3eddfda..bf16f4c 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -94,6 +94,7 @@
ExpectedIncome,
FailedRulesResult,
FalsePositiveDetails,
+ FileInfo,
Gender,
GeneralBankAccountPaymentMethod,
GenericBankAccountDetails,
@@ -122,6 +123,7 @@
PepRank,
PepStatus,
Person,
+ PersonAttachment,
PlaceOfBirth,
PosDetails,
PosEntryMode,
@@ -396,6 +398,7 @@
"ExpectedIncome",
"FailedRulesResult",
"FalsePositiveDetails",
+ "FileInfo",
"FlagrightEnvironment",
"Gender",
"GeneralBankAccountPaymentMethod",
@@ -425,6 +428,7 @@
"PepRank",
"PepStatus",
"Person",
+ "PersonAttachment",
"PlaceOfBirth",
"PosDetails",
"PosEntryMode",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 4c998f9..001755b 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.38",
+ "X-Fern-SDK-Version": "1.6.39",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 860204c..f235a29 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -99,6 +99,7 @@
from .expected_income import ExpectedIncome
from .failed_rules_result import FailedRulesResult
from .false_positive_details import FalsePositiveDetails
+from .file_info import FileInfo
from .gender import Gender
from .general_bank_account_payment_method import GeneralBankAccountPaymentMethod
from .generic_bank_account_details import GenericBankAccountDetails
@@ -127,6 +128,7 @@
from .pep_rank import PepRank
from .pep_status import PepStatus
from .person import Person
+from .person_attachment import PersonAttachment
from .place_of_birth import PlaceOfBirth
from .pos_details import PosDetails
from .pos_entry_mode import PosEntryMode
@@ -400,6 +402,7 @@
"ExpectedIncome",
"FailedRulesResult",
"FalsePositiveDetails",
+ "FileInfo",
"Gender",
"GeneralBankAccountPaymentMethod",
"GenericBankAccountDetails",
@@ -428,6 +431,7 @@
"PepRank",
"PepStatus",
"Person",
+ "PersonAttachment",
"PlaceOfBirth",
"PosDetails",
"PosEntryMode",
diff --git a/src/flagright/types/address.py b/src/flagright/types/address.py
index db92155..2fb8dfe 100644
--- a/src/flagright/types/address.py
+++ b/src/flagright/types/address.py
@@ -21,9 +21,9 @@ class Address(pydantic.BaseModel):
alias="addressLines", description="Address lines of the user's residence address"
)
postcode: typing.Optional[str] = pydantic.Field(description="Post code of the user's residence address")
- city: str = pydantic.Field(description="City of the user's residence address")
+ city: typing.Optional[str] = pydantic.Field(description="City of the user's residence address")
state: typing.Optional[str] = pydantic.Field(description="State of the user's residence address")
- country: str = pydantic.Field(description="User's country of residence")
+ country: typing.Optional[str] = pydantic.Field(description="User's country of residence")
address_type: typing.Optional[str] = pydantic.Field(
alias="addressType", description="Type of the address (ex - Residential, Postal, etc.)"
)
diff --git a/src/flagright/types/device_data.py b/src/flagright/types/device_data.py
index d1d9722..80754f7 100644
--- a/src/flagright/types/device_data.py
+++ b/src/flagright/types/device_data.py
@@ -4,6 +4,7 @@
import typing
from ..core.datetime_utils import serialize_datetime
+from .country_code import CountryCode
try:
import pydantic.v1 as pydantic # type: ignore
@@ -29,6 +30,7 @@ class DeviceData(pydantic.BaseModel):
ip_address: typing.Optional[str] = pydantic.Field(
alias="ipAddress", description="IP address of the device at a given timestamp for an event or transaction"
)
+ ip_country: typing.Optional[CountryCode] = pydantic.Field(alias="ipCountry")
device_identifier: typing.Optional[str] = pydantic.Field(
alias="deviceIdentifier", description="Device identifier number"
)
diff --git a/src/flagright/types/executed_rules_result.py b/src/flagright/types/executed_rules_result.py
index 4b10dec..6b88c79 100644
--- a/src/flagright/types/executed_rules_result.py
+++ b/src/flagright/types/executed_rules_result.py
@@ -27,6 +27,9 @@ class ExecutedRulesResult(pydantic.BaseModel):
rule_description: str = pydantic.Field(alias="ruleDescription", description="Description of the rule")
rule_action: RuleAction = pydantic.Field(alias="ruleAction")
rule_hit: bool = pydantic.Field(alias="ruleHit")
+ executed_at: typing.Optional[float] = pydantic.Field(
+ alias="executedAt", description="Timestamp when the rule was executed"
+ )
rule_hit_meta: typing.Optional[RuleHitMeta] = pydantic.Field(alias="ruleHitMeta")
vars: typing.Optional[typing.List[ExecutedLogicVars]]
labels: typing.Optional[typing.List[RuleLabels]]
diff --git a/src/flagright/types/file_info.py b/src/flagright/types/file_info.py
new file mode 100644
index 0000000..f5a0467
--- /dev/null
+++ b/src/flagright/types/file_info.py
@@ -0,0 +1,34 @@
+# 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 FileInfo(pydantic.BaseModel):
+ s_3_key: str = pydantic.Field(alias="s3Key")
+ bucket: typing.Optional[str]
+ filename: str
+ size: float
+ download_link: typing.Optional[str] = pydantic.Field(alias="downloadLink")
+ ai_summary: typing.Optional[str] = pydantic.Field(alias="aiSummary")
+
+ 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
+ json_encoders = {dt.datetime: serialize_datetime}
diff --git a/src/flagright/types/hit_rules_details.py b/src/flagright/types/hit_rules_details.py
index 886b06c..b2058d1 100644
--- a/src/flagright/types/hit_rules_details.py
+++ b/src/flagright/types/hit_rules_details.py
@@ -24,6 +24,9 @@ class HitRulesDetails(pydantic.BaseModel):
rule_instance_id: str = pydantic.Field(alias="ruleInstanceId")
rule_name: str = pydantic.Field(alias="ruleName", description="Name of the rule")
rule_description: str = pydantic.Field(alias="ruleDescription", description="Description of the rule")
+ executed_at: typing.Optional[float] = pydantic.Field(
+ alias="executedAt", description="Timestamp when the rule was hit"
+ )
rule_action: RuleAction = pydantic.Field(alias="ruleAction")
rule_hit_meta: typing.Optional[RuleHitMeta] = pydantic.Field(alias="ruleHitMeta")
labels: typing.Optional[typing.List[RuleLabels]]
diff --git a/src/flagright/types/person.py b/src/flagright/types/person.py
index 2252c59..56febde 100644
--- a/src/flagright/types/person.py
+++ b/src/flagright/types/person.py
@@ -7,6 +7,7 @@
from .contact_details import ContactDetails
from .legal_document import LegalDocument
from .pep_status import PepStatus
+from .person_attachment import PersonAttachment
from .tag import Tag
from .user_details import UserDetails
@@ -21,6 +22,7 @@ class Person(pydantic.BaseModel):
Model for a generic individual - different from User model by not having userId field
"""
+ user_id: typing.Optional[str] = pydantic.Field(alias="userId", description="Unique user ID for the person")
general_details: UserDetails = pydantic.Field(alias="generalDetails")
legal_documents: typing.Optional[typing.List[LegalDocument]] = pydantic.Field(
alias="legalDocuments", description="User's legal identity documents - See Document Model for details"
@@ -30,6 +32,9 @@ class Person(pydantic.BaseModel):
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
description="Additional information that can be added via tags"
)
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
+ description="User's attachments uploaded by business user"
+ )
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
diff --git a/src/flagright/types/person_attachment.py b/src/flagright/types/person_attachment.py
new file mode 100644
index 0000000..c430bdb
--- /dev/null
+++ b/src/flagright/types/person_attachment.py
@@ -0,0 +1,38 @@
+# 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 .file_info import FileInfo
+
+try:
+ import pydantic.v1 as pydantic # type: ignore
+except ImportError:
+ import pydantic # type: ignore
+
+
+class PersonAttachment(pydantic.BaseModel):
+ """
+ PersonAttachment model generalizes User's uploaded attachments
+ """
+
+ id: typing.Optional[str]
+ comment: typing.Optional[str] = pydantic.Field(description="User's comment on the attached file.")
+ files: typing.List[FileInfo]
+ user_id: str = pydantic.Field(alias="userId")
+ created_at: typing.Optional[float] = pydantic.Field(alias="createdAt")
+
+ 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
+ json_encoders = {dt.datetime: serialize_datetime}
From 1003cac547861b4b4772522f7f4abae731ea4eea Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 23 Dec 2024 08:44:49 +0000
Subject: [PATCH 05/81] Release 1.6.40
---
poetry.lock | 6 +++---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
.../resources/business_user_events/client.py | 18 +++++++++++++++--
.../resources/business_users/client.py | 20 +++++++++++++++++--
.../resources/consumer_user_events/client.py | 18 +++++++++++++++--
.../resources/consumer_users/client.py | 20 +++++++++++++++++--
src/flagright/types/business.py | 5 +++++
src/flagright/types/business_optional.py | 5 +++++
.../types/business_with_rules_result.py | 5 +++++
src/flagright/types/person_attachment.py | 1 +
src/flagright/types/user.py | 5 +++++
src/flagright/types/user_optional.py | 5 +++++
src/flagright/types/user_with_rules_result.py | 5 +++++
14 files changed, 104 insertions(+), 13 deletions(-)
diff --git a/poetry.lock b/poetry.lock
index 4bc493a..0b76b28 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -38,13 +38,13 @@ trio = ["trio (<0.22)"]
[[package]]
name = "certifi"
-version = "2024.8.30"
+version = "2024.12.14"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.6"
files = [
- {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"},
- {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"},
+ {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"},
+ {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 8c2f1e8..22237ea 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.39"
+version = "1.6.40"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 001755b..708a984 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.39",
+ "X-Fern-SDK-Version": "1.6.40",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/resources/business_user_events/client.py b/src/flagright/resources/business_user_events/client.py
index 97b5bc4..c79edc6 100644
--- a/src/flagright/resources/business_user_events/client.py
+++ b/src/flagright/resources/business_user_events/client.py
@@ -35,6 +35,7 @@ def create(
self,
*,
allow_user_type_conversion: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
lock_cra_risk_level: typing.Optional[BooleanString] = None,
request: BusinessUserEvent,
) -> BusinessWithRulesResult:
@@ -62,6 +63,8 @@ def create(
Parameters:
- allow_user_type_conversion: typing.Optional[BooleanString]. Boolean string whether Flagright should allow a Business user event to be applied to a Consumer user with the same user ID. This will converts a Consumer user to a Business user.
+ - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
+
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
- request: BusinessUserEvent.
@@ -83,7 +86,11 @@ def create(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "events/business/user"),
params=remove_none_from_dict(
- {"allowUserTypeConversion": allow_user_type_conversion, "lockCraRiskLevel": lock_cra_risk_level}
+ {
+ "allowUserTypeConversion": allow_user_type_conversion,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ }
),
json=jsonable_encoder(request),
headers=self._client_wrapper.get_headers(),
@@ -152,6 +159,7 @@ async def create(
self,
*,
allow_user_type_conversion: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
lock_cra_risk_level: typing.Optional[BooleanString] = None,
request: BusinessUserEvent,
) -> BusinessWithRulesResult:
@@ -179,6 +187,8 @@ async def create(
Parameters:
- allow_user_type_conversion: typing.Optional[BooleanString]. Boolean string whether Flagright should allow a Business user event to be applied to a Consumer user with the same user ID. This will converts a Consumer user to a Business user.
+ - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
+
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
- request: BusinessUserEvent.
@@ -200,7 +210,11 @@ async def create(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "events/business/user"),
params=remove_none_from_dict(
- {"allowUserTypeConversion": allow_user_type_conversion, "lockCraRiskLevel": lock_cra_risk_level}
+ {
+ "allowUserTypeConversion": allow_user_type_conversion,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ }
),
json=jsonable_encoder(request),
headers=self._client_wrapper.get_headers(),
diff --git a/src/flagright/resources/business_users/client.py b/src/flagright/resources/business_users/client.py
index 8934b5e..17bea5b 100644
--- a/src/flagright/resources/business_users/client.py
+++ b/src/flagright/resources/business_users/client.py
@@ -34,6 +34,7 @@ def create(
self,
*,
lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
validate_user_id: typing.Optional[BooleanString] = None,
krs_only: typing.Optional[BooleanString] = None,
request: Business,
@@ -56,6 +57,8 @@ def create(
Parameters:
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
+ - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
+
- validate_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate the userId
- krs_only: typing.Optional[BooleanString].
@@ -86,7 +89,12 @@ def create(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "business/users"),
params=remove_none_from_dict(
- {"lockCraRiskLevel": lock_cra_risk_level, "validateUserId": validate_user_id, "_krsOnly": krs_only}
+ {
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "validateUserId": validate_user_id,
+ "_krsOnly": krs_only,
+ }
),
json=jsonable_encoder(request),
headers=self._client_wrapper.get_headers(),
@@ -155,6 +163,7 @@ async def create(
self,
*,
lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
validate_user_id: typing.Optional[BooleanString] = None,
krs_only: typing.Optional[BooleanString] = None,
request: Business,
@@ -177,6 +186,8 @@ async def create(
Parameters:
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
+ - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
+
- validate_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate the userId
- krs_only: typing.Optional[BooleanString].
@@ -207,7 +218,12 @@ async def create(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "business/users"),
params=remove_none_from_dict(
- {"lockCraRiskLevel": lock_cra_risk_level, "validateUserId": validate_user_id, "_krsOnly": krs_only}
+ {
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "validateUserId": validate_user_id,
+ "_krsOnly": krs_only,
+ }
),
json=jsonable_encoder(request),
headers=self._client_wrapper.get_headers(),
diff --git a/src/flagright/resources/consumer_user_events/client.py b/src/flagright/resources/consumer_user_events/client.py
index 0956086..fc7738b 100644
--- a/src/flagright/resources/consumer_user_events/client.py
+++ b/src/flagright/resources/consumer_user_events/client.py
@@ -35,6 +35,7 @@ def create(
self,
*,
allow_user_type_conversion: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
lock_cra_risk_level: typing.Optional[BooleanString] = None,
request: ConsumerUserEvent,
) -> UserWithRulesResult:
@@ -62,6 +63,8 @@ def create(
Parameters:
- allow_user_type_conversion: typing.Optional[BooleanString]. Boolean string whether Flagright should allow a Consumer user event to be applied to a Business user with the same user ID. This will converts a Business user to a Consumer user.
+ - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
+
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
- request: ConsumerUserEvent.
@@ -83,7 +86,11 @@ def create(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "events/consumer/user"),
params=remove_none_from_dict(
- {"allowUserTypeConversion": allow_user_type_conversion, "lockCraRiskLevel": lock_cra_risk_level}
+ {
+ "allowUserTypeConversion": allow_user_type_conversion,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ }
),
json=jsonable_encoder(request),
headers=self._client_wrapper.get_headers(),
@@ -152,6 +159,7 @@ async def create(
self,
*,
allow_user_type_conversion: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
lock_cra_risk_level: typing.Optional[BooleanString] = None,
request: ConsumerUserEvent,
) -> UserWithRulesResult:
@@ -179,6 +187,8 @@ async def create(
Parameters:
- allow_user_type_conversion: typing.Optional[BooleanString]. Boolean string whether Flagright should allow a Consumer user event to be applied to a Business user with the same user ID. This will converts a Business user to a Consumer user.
+ - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
+
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
- request: ConsumerUserEvent.
@@ -200,7 +210,11 @@ async def create(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "events/consumer/user"),
params=remove_none_from_dict(
- {"allowUserTypeConversion": allow_user_type_conversion, "lockCraRiskLevel": lock_cra_risk_level}
+ {
+ "allowUserTypeConversion": allow_user_type_conversion,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ }
),
json=jsonable_encoder(request),
headers=self._client_wrapper.get_headers(),
diff --git a/src/flagright/resources/consumer_users/client.py b/src/flagright/resources/consumer_users/client.py
index 7e90718..e34324f 100644
--- a/src/flagright/resources/consumer_users/client.py
+++ b/src/flagright/resources/consumer_users/client.py
@@ -34,6 +34,7 @@ def create(
self,
*,
lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
validate_user_id: typing.Optional[BooleanString] = None,
krs_only: typing.Optional[BooleanString] = None,
request: User,
@@ -55,6 +56,8 @@ def create(
Parameters:
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
+ - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
+
- validate_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate the userId
- krs_only: typing.Optional[BooleanString].
@@ -139,7 +142,12 @@ def create(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "consumer/users"),
params=remove_none_from_dict(
- {"lockCraRiskLevel": lock_cra_risk_level, "validateUserId": validate_user_id, "_krsOnly": krs_only}
+ {
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "validateUserId": validate_user_id,
+ "_krsOnly": krs_only,
+ }
),
json=jsonable_encoder(request),
headers=self._client_wrapper.get_headers(),
@@ -208,6 +216,7 @@ async def create(
self,
*,
lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
validate_user_id: typing.Optional[BooleanString] = None,
krs_only: typing.Optional[BooleanString] = None,
request: User,
@@ -229,6 +238,8 @@ async def create(
Parameters:
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
+ - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
+
- validate_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate the userId
- krs_only: typing.Optional[BooleanString].
@@ -313,7 +324,12 @@ async def create(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "consumer/users"),
params=remove_none_from_dict(
- {"lockCraRiskLevel": lock_cra_risk_level, "validateUserId": validate_user_id, "_krsOnly": krs_only}
+ {
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "validateUserId": validate_user_id,
+ "_krsOnly": krs_only,
+ }
),
json=jsonable_encoder(request),
headers=self._client_wrapper.get_headers(),
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index 9c42833..47a5699 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -11,6 +11,7 @@
from .mcc_details import MccDetails
from .payment_method import PaymentMethod
from .person import Person
+from .person_attachment import PersonAttachment
from .risk_level import RiskLevel
from .transaction_limits import TransactionLimits
from .user_entity_link import UserEntityLink
@@ -43,6 +44,7 @@ class Business(pydantic.BaseModel):
)
transaction_limits: typing.Optional[TransactionLimits] = pydantic.Field(alias="transactionLimits")
risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="riskLevel")
+ kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
allowed_payment_methods: typing.Optional[typing.List[PaymentMethod]] = pydantic.Field(alias="allowedPaymentMethods")
last_transaction_timestamp: typing.Optional[float] = pydantic.Field(
alias="lastTransactionTimestamp", description="Timestamp of the last successful transaction of the user"
@@ -56,6 +58,9 @@ class Business(pydantic.BaseModel):
tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(
description="Additional information that can be added via tags"
)
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
+ description="User's attachments uploaded by business user"
+ )
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index 8fa913e..083bc40 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -11,6 +11,7 @@
from .mcc_details import MccDetails
from .payment_method import PaymentMethod
from .person import Person
+from .person_attachment import PersonAttachment
from .risk_level import RiskLevel
from .transaction_limits import TransactionLimits
from .user_entity_link import UserEntityLink
@@ -43,6 +44,7 @@ class BusinessOptional(pydantic.BaseModel):
)
transaction_limits: typing.Optional[TransactionLimits] = pydantic.Field(alias="transactionLimits")
risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="riskLevel")
+ kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
allowed_payment_methods: typing.Optional[typing.List[PaymentMethod]] = pydantic.Field(alias="allowedPaymentMethods")
last_transaction_timestamp: typing.Optional[float] = pydantic.Field(
alias="lastTransactionTimestamp", description="Timestamp of the last successful transaction of the user"
@@ -56,6 +58,9 @@ class BusinessOptional(pydantic.BaseModel):
tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(
description="Additional information that can be added via tags"
)
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
+ description="User's attachments uploaded by business user"
+ )
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 697663d..9357cd0 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -13,6 +13,7 @@
from .mcc_details import MccDetails
from .payment_method import PaymentMethod
from .person import Person
+from .person_attachment import PersonAttachment
from .risk_level import RiskLevel
from .transaction_limits import TransactionLimits
from .user_entity_link import UserEntityLink
@@ -46,6 +47,7 @@ class BusinessWithRulesResult(pydantic.BaseModel):
)
transaction_limits: typing.Optional[TransactionLimits] = pydantic.Field(alias="transactionLimits")
risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="riskLevel")
+ kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
allowed_payment_methods: typing.Optional[typing.List[PaymentMethod]] = pydantic.Field(alias="allowedPaymentMethods")
last_transaction_timestamp: typing.Optional[float] = pydantic.Field(
alias="lastTransactionTimestamp", description="Timestamp of the last successful transaction of the user"
@@ -59,6 +61,9 @@ class BusinessWithRulesResult(pydantic.BaseModel):
tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(
description="Additional information that can be added via tags"
)
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
+ description="User's attachments uploaded by business user"
+ )
executed_rules: typing.Optional[typing.List[ExecutedRulesResult]] = pydantic.Field(alias="executedRules")
hit_rules: typing.Optional[typing.List[HitRulesDetails]] = pydantic.Field(alias="hitRules")
risk_score_details: typing.Optional[UserRiskScoreDetails] = pydantic.Field(alias="riskScoreDetails")
diff --git a/src/flagright/types/person_attachment.py b/src/flagright/types/person_attachment.py
index c430bdb..d60c6a7 100644
--- a/src/flagright/types/person_attachment.py
+++ b/src/flagright/types/person_attachment.py
@@ -22,6 +22,7 @@ class PersonAttachment(pydantic.BaseModel):
files: typing.List[FileInfo]
user_id: str = pydantic.Field(alias="userId")
created_at: typing.Optional[float] = pydantic.Field(alias="createdAt")
+ deleted_at: typing.Optional[float] = pydantic.Field(alias="deletedAt")
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
diff --git a/src/flagright/types/user.py b/src/flagright/types/user.py
index a5a9647..b17d16c 100644
--- a/src/flagright/types/user.py
+++ b/src/flagright/types/user.py
@@ -13,6 +13,7 @@
from .kyc_status_details import KycStatusDetails
from .legal_document import LegalDocument
from .pep_status import PepStatus
+from .person_attachment import PersonAttachment
from .risk_level import RiskLevel
from .source_of_funds import SourceOfFunds
from .transaction_limits import TransactionLimits
@@ -47,6 +48,7 @@ class User(pydantic.BaseModel):
transaction_limits: typing.Optional[TransactionLimits] = pydantic.Field(alias="transactionLimits")
expected_income: typing.Optional[ExpectedIncome] = pydantic.Field(alias="expectedIncome")
risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="riskLevel")
+ kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
acquisition_channel: typing.Optional[AcquisitionChannel] = pydantic.Field(alias="acquisitionChannel")
reason_for_account_opening: typing.Optional[typing.List[str]] = pydantic.Field(alias="reasonForAccountOpening")
source_of_funds: typing.Optional[typing.List[SourceOfFunds]] = pydantic.Field(alias="sourceOfFunds")
@@ -62,6 +64,9 @@ class User(pydantic.BaseModel):
tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(
description="Additional information that can be added via tags"
)
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
+ description="Uploaded user's attachment"
+ )
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
diff --git a/src/flagright/types/user_optional.py b/src/flagright/types/user_optional.py
index 1d80e8d..04cdbd0 100644
--- a/src/flagright/types/user_optional.py
+++ b/src/flagright/types/user_optional.py
@@ -13,6 +13,7 @@
from .kyc_status_details import KycStatusDetails
from .legal_document import LegalDocument
from .pep_status import PepStatus
+from .person_attachment import PersonAttachment
from .risk_level import RiskLevel
from .source_of_funds import SourceOfFunds
from .transaction_limits import TransactionLimits
@@ -49,6 +50,7 @@ class UserOptional(pydantic.BaseModel):
transaction_limits: typing.Optional[TransactionLimits] = pydantic.Field(alias="transactionLimits")
expected_income: typing.Optional[ExpectedIncome] = pydantic.Field(alias="expectedIncome")
risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="riskLevel")
+ kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
acquisition_channel: typing.Optional[AcquisitionChannel] = pydantic.Field(alias="acquisitionChannel")
reason_for_account_opening: typing.Optional[typing.List[str]] = pydantic.Field(alias="reasonForAccountOpening")
source_of_funds: typing.Optional[typing.List[SourceOfFunds]] = pydantic.Field(alias="sourceOfFunds")
@@ -64,6 +66,9 @@ class UserOptional(pydantic.BaseModel):
tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(
description="Additional information that can be added via tags"
)
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
+ description="Uploaded user's attachment"
+ )
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
diff --git a/src/flagright/types/user_with_rules_result.py b/src/flagright/types/user_with_rules_result.py
index 2599d3f..2b887db 100644
--- a/src/flagright/types/user_with_rules_result.py
+++ b/src/flagright/types/user_with_rules_result.py
@@ -15,6 +15,7 @@
from .kyc_status_details import KycStatusDetails
from .legal_document import LegalDocument
from .pep_status import PepStatus
+from .person_attachment import PersonAttachment
from .risk_level import RiskLevel
from .source_of_funds import SourceOfFunds
from .transaction_limits import TransactionLimits
@@ -50,6 +51,7 @@ class UserWithRulesResult(pydantic.BaseModel):
transaction_limits: typing.Optional[TransactionLimits] = pydantic.Field(alias="transactionLimits")
expected_income: typing.Optional[ExpectedIncome] = pydantic.Field(alias="expectedIncome")
risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="riskLevel")
+ kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
acquisition_channel: typing.Optional[AcquisitionChannel] = pydantic.Field(alias="acquisitionChannel")
reason_for_account_opening: typing.Optional[typing.List[str]] = pydantic.Field(alias="reasonForAccountOpening")
source_of_funds: typing.Optional[typing.List[SourceOfFunds]] = pydantic.Field(alias="sourceOfFunds")
@@ -65,6 +67,9 @@ class UserWithRulesResult(pydantic.BaseModel):
tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(
description="Additional information that can be added via tags"
)
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
+ description="Uploaded user's attachment"
+ )
executed_rules: typing.Optional[typing.List[ExecutedRulesResult]] = pydantic.Field(alias="executedRules")
hit_rules: typing.Optional[typing.List[HitRulesDetails]] = pydantic.Field(alias="hitRules")
risk_score_details: typing.Optional[UserRiskScoreDetails] = pydantic.Field(alias="riskScoreDetails")
From 4c76dd64029e4ac2898f2d858b404f602923e7fe Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Fri, 3 Jan 2025 09:09:37 +0000
Subject: [PATCH 06/81] Release 1.6.41
---
pyproject.toml | 2 +-
src/flagright/__init__.py | 8 +++++
src/flagright/core/client_wrapper.py | 2 +-
src/flagright/types/__init__.py | 8 +++++
src/flagright/types/list_updated_details.py | 33 +++++++++++++++++++
.../types/list_updated_details_action.py | 25 ++++++++++++++
.../types/list_updated_details_items_item.py | 30 +++++++++++++++++
...ist_updated_details_items_item_metadata.py | 30 +++++++++++++++++
src/flagright/types/webhook_event_type.py | 4 +++
9 files changed, 140 insertions(+), 2 deletions(-)
create mode 100644 src/flagright/types/list_updated_details.py
create mode 100644 src/flagright/types/list_updated_details_action.py
create mode 100644 src/flagright/types/list_updated_details_items_item.py
create mode 100644 src/flagright/types/list_updated_details_items_item_metadata.py
diff --git a/pyproject.toml b/pyproject.toml
index 22237ea..565593c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.40"
+version = "1.6.41"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index bf16f4c..ee2ac04 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -113,6 +113,10 @@
ListMetadata,
ListSubtype,
ListType,
+ ListUpdatedDetails,
+ ListUpdatedDetailsAction,
+ ListUpdatedDetailsItemsItem,
+ ListUpdatedDetailsItemsItemMetadata,
MaritalStatus,
MccDetails,
MpesaDetails,
@@ -418,6 +422,10 @@
"ListMetadata",
"ListSubtype",
"ListType",
+ "ListUpdatedDetails",
+ "ListUpdatedDetailsAction",
+ "ListUpdatedDetailsItemsItem",
+ "ListUpdatedDetailsItemsItemMetadata",
"MaritalStatus",
"MccDetails",
"MpesaDetails",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 708a984..2c4f8b3 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.40",
+ "X-Fern-SDK-Version": "1.6.41",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index f235a29..bf5b4e8 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -118,6 +118,10 @@
from .list_metadata import ListMetadata
from .list_subtype import ListSubtype
from .list_type import ListType
+from .list_updated_details import ListUpdatedDetails
+from .list_updated_details_action import ListUpdatedDetailsAction
+from .list_updated_details_items_item import ListUpdatedDetailsItemsItem
+from .list_updated_details_items_item_metadata import ListUpdatedDetailsItemsItemMetadata
from .marital_status import MaritalStatus
from .mcc_details import MccDetails
from .mpesa_details import MpesaDetails
@@ -421,6 +425,10 @@
"ListMetadata",
"ListSubtype",
"ListType",
+ "ListUpdatedDetails",
+ "ListUpdatedDetailsAction",
+ "ListUpdatedDetailsItemsItem",
+ "ListUpdatedDetailsItemsItemMetadata",
"MaritalStatus",
"MccDetails",
"MpesaDetails",
diff --git a/src/flagright/types/list_updated_details.py b/src/flagright/types/list_updated_details.py
new file mode 100644
index 0000000..4e4dace
--- /dev/null
+++ b/src/flagright/types/list_updated_details.py
@@ -0,0 +1,33 @@
+# 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 .list_updated_details_action import ListUpdatedDetailsAction
+from .list_updated_details_items_item import ListUpdatedDetailsItemsItem
+
+try:
+ import pydantic.v1 as pydantic # type: ignore
+except ImportError:
+ import pydantic # type: ignore
+
+
+class ListUpdatedDetails(pydantic.BaseModel):
+ list_id: str = pydantic.Field(alias="listId")
+ action: ListUpdatedDetailsAction
+ items: typing.List[ListUpdatedDetailsItemsItem]
+
+ 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
+ json_encoders = {dt.datetime: serialize_datetime}
diff --git a/src/flagright/types/list_updated_details_action.py b/src/flagright/types/list_updated_details_action.py
new file mode 100644
index 0000000..ed41aeb
--- /dev/null
+++ b/src/flagright/types/list_updated_details_action.py
@@ -0,0 +1,25 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import enum
+import typing
+
+T_Result = typing.TypeVar("T_Result")
+
+
+class ListUpdatedDetailsAction(str, enum.Enum):
+ SET = "SET"
+ UNSET = "UNSET"
+ CLEAR = "CLEAR"
+
+ def visit(
+ self,
+ set_: typing.Callable[[], T_Result],
+ unset: typing.Callable[[], T_Result],
+ clear: typing.Callable[[], T_Result],
+ ) -> T_Result:
+ if self is ListUpdatedDetailsAction.SET:
+ return set_()
+ if self is ListUpdatedDetailsAction.UNSET:
+ return unset()
+ if self is ListUpdatedDetailsAction.CLEAR:
+ return clear()
diff --git a/src/flagright/types/list_updated_details_items_item.py b/src/flagright/types/list_updated_details_items_item.py
new file mode 100644
index 0000000..f012662
--- /dev/null
+++ b/src/flagright/types/list_updated_details_items_item.py
@@ -0,0 +1,30 @@
+# 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 .list_updated_details_items_item_metadata import ListUpdatedDetailsItemsItemMetadata
+
+try:
+ import pydantic.v1 as pydantic # type: ignore
+except ImportError:
+ import pydantic # type: ignore
+
+
+class ListUpdatedDetailsItemsItem(pydantic.BaseModel):
+ key: str
+ metadata: ListUpdatedDetailsItemsItemMetadata
+
+ 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/list_updated_details_items_item_metadata.py b/src/flagright/types/list_updated_details_items_item_metadata.py
new file mode 100644
index 0000000..8067471
--- /dev/null
+++ b/src/flagright/types/list_updated_details_items_item_metadata.py
@@ -0,0 +1,30 @@
+# 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 ListUpdatedDetailsItemsItemMetadata(pydantic.BaseModel):
+ user_full_name: str = pydantic.Field(alias="userFullName")
+ reason: str
+
+ 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
+ json_encoders = {dt.datetime: serialize_datetime}
diff --git a/src/flagright/types/webhook_event_type.py b/src/flagright/types/webhook_event_type.py
index 9a4e1cf..5b6a01c 100644
--- a/src/flagright/types/webhook_event_type.py
+++ b/src/flagright/types/webhook_event_type.py
@@ -17,6 +17,7 @@ class WebhookEventType(str, enum.Enum):
PEP_STATUS_UPDATED = "PEP_STATUS_UPDATED"
USER_TAGS_UPDATED = "USER_TAGS_UPDATED"
CRA_RISK_LEVEL_UPDATED = "CRA_RISK_LEVEL_UPDATED"
+ LIST_UPDATED = "LIST_UPDATED"
def visit(
self,
@@ -30,6 +31,7 @@ def visit(
pep_status_updated: typing.Callable[[], T_Result],
user_tags_updated: typing.Callable[[], T_Result],
cra_risk_level_updated: typing.Callable[[], T_Result],
+ list_updated: typing.Callable[[], T_Result],
) -> T_Result:
if self is WebhookEventType.CASE_CLOSED:
return case_closed()
@@ -51,3 +53,5 @@ def visit(
return user_tags_updated()
if self is WebhookEventType.CRA_RISK_LEVEL_UPDATED:
return cra_risk_level_updated()
+ if self is WebhookEventType.LIST_UPDATED:
+ return list_updated()
From 9158f0f1a2e99af3757184fb258989479585bd57 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 8 Jan 2025 11:30:29 +0000
Subject: [PATCH 07/81] Release 1.6.42
---
pyproject.toml | 2 +-
src/flagright/__init__.py | 4 ---
src/flagright/core/client_wrapper.py | 2 +-
src/flagright/types/__init__.py | 4 ---
src/flagright/types/list_updated_details.py | 4 +--
.../types/list_updated_details_items_item.py | 30 -------------------
...ist_updated_details_items_item_metadata.py | 30 -------------------
7 files changed, 4 insertions(+), 72 deletions(-)
delete mode 100644 src/flagright/types/list_updated_details_items_item.py
delete mode 100644 src/flagright/types/list_updated_details_items_item_metadata.py
diff --git a/pyproject.toml b/pyproject.toml
index 565593c..06769bc 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.41"
+version = "1.6.42"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index ee2ac04..2863b86 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -115,8 +115,6 @@
ListType,
ListUpdatedDetails,
ListUpdatedDetailsAction,
- ListUpdatedDetailsItemsItem,
- ListUpdatedDetailsItemsItemMetadata,
MaritalStatus,
MccDetails,
MpesaDetails,
@@ -424,8 +422,6 @@
"ListType",
"ListUpdatedDetails",
"ListUpdatedDetailsAction",
- "ListUpdatedDetailsItemsItem",
- "ListUpdatedDetailsItemsItemMetadata",
"MaritalStatus",
"MccDetails",
"MpesaDetails",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 2c4f8b3..996b970 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.41",
+ "X-Fern-SDK-Version": "1.6.42",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index bf5b4e8..0fd4a94 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -120,8 +120,6 @@
from .list_type import ListType
from .list_updated_details import ListUpdatedDetails
from .list_updated_details_action import ListUpdatedDetailsAction
-from .list_updated_details_items_item import ListUpdatedDetailsItemsItem
-from .list_updated_details_items_item_metadata import ListUpdatedDetailsItemsItemMetadata
from .marital_status import MaritalStatus
from .mcc_details import MccDetails
from .mpesa_details import MpesaDetails
@@ -427,8 +425,6 @@
"ListType",
"ListUpdatedDetails",
"ListUpdatedDetailsAction",
- "ListUpdatedDetailsItemsItem",
- "ListUpdatedDetailsItemsItemMetadata",
"MaritalStatus",
"MccDetails",
"MpesaDetails",
diff --git a/src/flagright/types/list_updated_details.py b/src/flagright/types/list_updated_details.py
index 4e4dace..8496bef 100644
--- a/src/flagright/types/list_updated_details.py
+++ b/src/flagright/types/list_updated_details.py
@@ -4,8 +4,8 @@
import typing
from ..core.datetime_utils import serialize_datetime
+from .list_item import ListItem
from .list_updated_details_action import ListUpdatedDetailsAction
-from .list_updated_details_items_item import ListUpdatedDetailsItemsItem
try:
import pydantic.v1 as pydantic # type: ignore
@@ -16,7 +16,7 @@
class ListUpdatedDetails(pydantic.BaseModel):
list_id: str = pydantic.Field(alias="listId")
action: ListUpdatedDetailsAction
- items: typing.List[ListUpdatedDetailsItemsItem]
+ items: typing.List[ListItem]
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
diff --git a/src/flagright/types/list_updated_details_items_item.py b/src/flagright/types/list_updated_details_items_item.py
deleted file mode 100644
index f012662..0000000
--- a/src/flagright/types/list_updated_details_items_item.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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 .list_updated_details_items_item_metadata import ListUpdatedDetailsItemsItemMetadata
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class ListUpdatedDetailsItemsItem(pydantic.BaseModel):
- key: str
- metadata: ListUpdatedDetailsItemsItemMetadata
-
- 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/list_updated_details_items_item_metadata.py b/src/flagright/types/list_updated_details_items_item_metadata.py
deleted file mode 100644
index 8067471..0000000
--- a/src/flagright/types/list_updated_details_items_item_metadata.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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 ListUpdatedDetailsItemsItemMetadata(pydantic.BaseModel):
- user_full_name: str = pydantic.Field(alias="userFullName")
- reason: str
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
From e9de1c57825608dfa9b6b1ab30cf83ca76072136 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 21 Jan 2025 08:52:09 +0000
Subject: [PATCH 08/81] Release 1.6.43
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 06769bc..caaa4e8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.42"
+version = "1.6.43"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 996b970..2c6e750 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.42",
+ "X-Fern-SDK-Version": "1.6.43",
}
headers["x-api-key"] = self.api_key
return headers
From 64c37a922497a54b79c465843062a54782e83ac8 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 27 Jan 2025 15:04:25 +0000
Subject: [PATCH 09/81] Release 1.6.44
---
pyproject.toml | 2 +-
src/flagright/__init__.py | 4 ++
src/flagright/core/client_wrapper.py | 2 +-
.../resources/business_user_events/client.py | 18 +++---
.../resources/business_users/client.py | 14 +++--
.../resources/consumer_user_events/client.py | 18 +++---
.../resources/consumer_users/client.py | 8 +--
.../resources/transaction_events/client.py | 20 +++----
.../resources/transactions/client.py | 58 ++++++++++++-------
src/flagright/types/__init__.py | 4 ++
src/flagright/types/list_item.py | 1 +
src/flagright/types/list_metadata.py | 2 +
src/flagright/types/list_metadata_ttl.py | 30 ++++++++++
src/flagright/types/list_metadata_ttl_unit.py | 17 ++++++
14 files changed, 136 insertions(+), 62 deletions(-)
create mode 100644 src/flagright/types/list_metadata_ttl.py
create mode 100644 src/flagright/types/list_metadata_ttl_unit.py
diff --git a/pyproject.toml b/pyproject.toml
index caaa4e8..3cf8632 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.43"
+version = "1.6.44"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 2863b86..5cbf059 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -111,6 +111,8 @@
ListItem,
ListKeyMetadata,
ListMetadata,
+ ListMetadataTtl,
+ ListMetadataTtlUnit,
ListSubtype,
ListType,
ListUpdatedDetails,
@@ -418,6 +420,8 @@
"ListItem",
"ListKeyMetadata",
"ListMetadata",
+ "ListMetadataTtl",
+ "ListMetadataTtlUnit",
"ListSubtype",
"ListType",
"ListUpdatedDetails",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 2c6e750..065b818 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.43",
+ "X-Fern-SDK-Version": "1.6.44",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/resources/business_user_events/client.py b/src/flagright/resources/business_user_events/client.py
index c79edc6..6137922 100644
--- a/src/flagright/resources/business_user_events/client.py
+++ b/src/flagright/resources/business_user_events/client.py
@@ -46,8 +46,8 @@ def create(
User events are created after the initial `POST /business/users` call (which creates a user) and are used to:
- - Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
- - Update the user details, using the `updatedBusinessUserAttributes` field.
+ * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+ * Update the user details, using the `updatedBusinessUserAttributes` field.
> If you have neither of the above two use cases, you do not need to use user events.
@@ -55,8 +55,8 @@ def create(
Each user event needs three mandatory fields:
- - `timestamp`- the timestamp of when the event was created or occured in your system
- - `userId` - The ID of the transaction for which this event is generated.
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `userId` - The ID of the transaction for which this event is generated.
In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
@@ -115,7 +115,6 @@ def create(
def get(self, event_id: str) -> BusinessUserEventWithRulesResult:
"""
### GET a Business User Event
-
You can retrieve any business user event you created using the [POST Business User Events](/api-reference/api-reference/business-user-events/create) call.
Parameters:
@@ -170,8 +169,8 @@ async def create(
User events are created after the initial `POST /business/users` call (which creates a user) and are used to:
- - Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
- - Update the user details, using the `updatedBusinessUserAttributes` field.
+ * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+ * Update the user details, using the `updatedBusinessUserAttributes` field.
> If you have neither of the above two use cases, you do not need to use user events.
@@ -179,8 +178,8 @@ async def create(
Each user event needs three mandatory fields:
- - `timestamp`- the timestamp of when the event was created or occured in your system
- - `userId` - The ID of the transaction for which this event is generated.
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `userId` - The ID of the transaction for which this event is generated.
In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
@@ -239,7 +238,6 @@ async def create(
async def get(self, event_id: str) -> BusinessUserEventWithRulesResult:
"""
### GET a Business User Event
-
You can retrieve any business user event you created using the [POST Business User Events](/api-reference/api-reference/business-user-events/create) call.
Parameters:
diff --git a/src/flagright/resources/business_users/client.py b/src/flagright/resources/business_users/client.py
index 17bea5b..7c3efdb 100644
--- a/src/flagright/resources/business_users/client.py
+++ b/src/flagright/resources/business_users/client.py
@@ -48,11 +48,12 @@ def create(
### Payload
+
Each business user needs three mandatory fields:
- - `userId` - Unique identifier for the user
- - `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
- - `createdTimestamp` - UNIX timestamp in _milliseconds_ for when the User is created in your system
+ * `userId` - Unique identifier for the user
+ * `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
+ * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
Parameters:
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
@@ -177,11 +178,12 @@ async def create(
### Payload
+
Each business user needs three mandatory fields:
- - `userId` - Unique identifier for the user
- - `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
- - `createdTimestamp` - UNIX timestamp in _milliseconds_ for when the User is created in your system
+ * `userId` - Unique identifier for the user
+ * `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
+ * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
Parameters:
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
diff --git a/src/flagright/resources/consumer_user_events/client.py b/src/flagright/resources/consumer_user_events/client.py
index fc7738b..920a47e 100644
--- a/src/flagright/resources/consumer_user_events/client.py
+++ b/src/flagright/resources/consumer_user_events/client.py
@@ -46,8 +46,8 @@ def create(
User events are created after the initial `POST /consumer/users` call (which creates a user) and are used to:
- - Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
- - Update the user details, using the `updatedConsumerUserAttributes` field.
+ * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+ * Update the user details, using the `updatedConsumerUserAttributes` field.
> If you have neither of the above two use cases, you do not need to use user events.
@@ -55,8 +55,8 @@ def create(
Each user event needs three mandatory fields:
- - `timestamp`- the timestamp of when the event was created or occured in your system
- - `userId` - The ID of the transaction for which this event is generated.
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `userId` - The ID of the transaction for which this event is generated.
In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
@@ -115,7 +115,6 @@ def create(
def get(self, event_id: str) -> ConsumerUserEventWithRulesResult:
"""
### GET a Consumer User Event
-
You can retrieve any consumer user event you created using the [POST Consumer User Events](/api-reference/api-reference/consumer-user-events/create) call.
Parameters:
@@ -170,8 +169,8 @@ async def create(
User events are created after the initial `POST /consumer/users` call (which creates a user) and are used to:
- - Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
- - Update the user details, using the `updatedConsumerUserAttributes` field.
+ * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+ * Update the user details, using the `updatedConsumerUserAttributes` field.
> If you have neither of the above two use cases, you do not need to use user events.
@@ -179,8 +178,8 @@ async def create(
Each user event needs three mandatory fields:
- - `timestamp`- the timestamp of when the event was created or occured in your system
- - `userId` - The ID of the transaction for which this event is generated.
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `userId` - The ID of the transaction for which this event is generated.
In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
@@ -239,7 +238,6 @@ async def create(
async def get(self, event_id: str) -> ConsumerUserEventWithRulesResult:
"""
### GET a Consumer User Event
-
You can retrieve any consumer user event you created using the [POST Consumer User Events](/api-reference/api-reference/consumer-user-events/create) call.
Parameters:
diff --git a/src/flagright/resources/consumer_users/client.py b/src/flagright/resources/consumer_users/client.py
index e34324f..fdb6bdd 100644
--- a/src/flagright/resources/consumer_users/client.py
+++ b/src/flagright/resources/consumer_users/client.py
@@ -50,8 +50,8 @@ def create(
Each consumer user needs two mandatory fields:
- - `userId` - Unique identifier for the user
- - `createdTimestamp` - UNIX timestamp in _milliseconds_ for when the User is created in your system
+ * `userId` - Unique identifier for the user
+ * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
Parameters:
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
@@ -232,8 +232,8 @@ async def create(
Each consumer user needs two mandatory fields:
- - `userId` - Unique identifier for the user
- - `createdTimestamp` - UNIX timestamp in _milliseconds_ for when the User is created in your system
+ * `userId` - Unique identifier for the user
+ * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
Parameters:
- lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
diff --git a/src/flagright/resources/transaction_events/client.py b/src/flagright/resources/transaction_events/client.py
index 79375a0..9c775f1 100644
--- a/src/flagright/resources/transaction_events/client.py
+++ b/src/flagright/resources/transaction_events/client.py
@@ -36,8 +36,8 @@ def create(self, *, request: TransactionEvent) -> TransactionEventMonitoringResu
Transaction events are created after the initial `POST /transactions` call (which creates a transaction) and are used to:
- - Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- - Update the transaction details, using the `updatedTransactionAttributes` field.
+ * Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+ * Update the transaction details, using the `updatedTransactionAttributes` field.
> If you have neither of the above two use cases, you do not need to use transaction events.
@@ -45,9 +45,9 @@ def create(self, *, request: TransactionEvent) -> TransactionEventMonitoringResu
Each transaction event needs three mandatory fields:
- - `transactionState` - STATE of the transaction -> value is set to `CREATED` after `POST /transactions` call
- - `timestamp`- the timestamp of when the event was created or occured in your system
- - `transactionId` - The ID of the transaction for which this event is generated.
+ * `transactionState` - STATE of the transaction -> value is set to `CREATED` after `POST /transactions` call
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `transactionId` - The ID of the transaction for which this event is generated.
In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
@@ -151,8 +151,8 @@ async def create(self, *, request: TransactionEvent) -> TransactionEventMonitori
Transaction events are created after the initial `POST /transactions` call (which creates a transaction) and are used to:
- - Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- - Update the transaction details, using the `updatedTransactionAttributes` field.
+ * Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+ * Update the transaction details, using the `updatedTransactionAttributes` field.
> If you have neither of the above two use cases, you do not need to use transaction events.
@@ -160,9 +160,9 @@ async def create(self, *, request: TransactionEvent) -> TransactionEventMonitori
Each transaction event needs three mandatory fields:
- - `transactionState` - STATE of the transaction -> value is set to `CREATED` after `POST /transactions` call
- - `timestamp`- the timestamp of when the event was created or occured in your system
- - `transactionId` - The ID of the transaction for which this event is generated.
+ * `transactionState` - STATE of the transaction -> value is set to `CREATED` after `POST /transactions` call
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `transactionId` - The ID of the transaction for which this event is generated.
In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
diff --git a/src/flagright/resources/transactions/client.py b/src/flagright/resources/transactions/client.py
index e0e1dd2..c44ef66 100644
--- a/src/flagright/resources/transactions/client.py
+++ b/src/flagright/resources/transactions/client.py
@@ -46,20 +46,21 @@ def verify(
In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
### Payload
Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
- - `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
- - `transactionId` - Unique Identifier for the transaction. Flagright API will generate a `transactionId` if this field is left empty
- - `timestamp` - UNIX timestamp in _milliseconds_ of when the transaction took place
- - `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- - `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
- - `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
- - `originAmountDetails` - Details of the amount being sent from the origin
- - `destinationAmountDetails` - Details of the amount being received at the destination
- - `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
- - `destinationPaymentDetails` - Payment details (if any) used at the destination (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+ * `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
+ * `transactionId` - Unique Identifier for the transaction. Flagright API will generate a `transactionId` if this field is left empty
+ * `timestamp` - UNIX timestamp in *milliseconds* of when the transaction took place
+ * `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+ * `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+ * `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+ * `originAmountDetails` - Details of the amount being sent from the origin
+ * `destinationAmountDetails` - Details of the amount being received at the destination
+ * `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+ * `destinationPaymentDetails` - Payment details (if any) used at the destination (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
Parameters:
- validate_origin_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided originUserId exist. True by default
@@ -79,6 +80,8 @@ def verify(
Tag,
Transaction,
TransactionAmountDetails,
+ TransactionDestinationPaymentDetails_Cash,
+ TransactionOriginPaymentDetails_Cash,
TransactionType,
)
from flagright.client import Flagright
@@ -103,6 +106,12 @@ def verify(
transaction_currency=CurrencyCode.INR,
country=CountryCode.IN,
),
+ origin_payment_details=TransactionOriginPaymentDetails_Cash(
+ method="CASH",
+ ),
+ destination_payment_details=TransactionDestinationPaymentDetails_Cash(
+ method="CASH",
+ ),
promotion_code_used=True,
reference="loan repayment",
origin_device_data=DeviceData(
@@ -230,20 +239,21 @@ async def verify(
In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
### Payload
Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
- - `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
- - `transactionId` - Unique Identifier for the transaction. Flagright API will generate a `transactionId` if this field is left empty
- - `timestamp` - UNIX timestamp in _milliseconds_ of when the transaction took place
- - `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- - `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
- - `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
- - `originAmountDetails` - Details of the amount being sent from the origin
- - `destinationAmountDetails` - Details of the amount being received at the destination
- - `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
- - `destinationPaymentDetails` - Payment details (if any) used at the destination (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+ * `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
+ * `transactionId` - Unique Identifier for the transaction. Flagright API will generate a `transactionId` if this field is left empty
+ * `timestamp` - UNIX timestamp in *milliseconds* of when the transaction took place
+ * `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+ * `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+ * `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+ * `originAmountDetails` - Details of the amount being sent from the origin
+ * `destinationAmountDetails` - Details of the amount being received at the destination
+ * `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+ * `destinationPaymentDetails` - Payment details (if any) used at the destination (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
Parameters:
- validate_origin_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided originUserId exist. True by default
@@ -263,6 +273,8 @@ async def verify(
Tag,
Transaction,
TransactionAmountDetails,
+ TransactionDestinationPaymentDetails_Cash,
+ TransactionOriginPaymentDetails_Cash,
TransactionType,
)
from flagright.client import AsyncFlagright
@@ -287,6 +299,12 @@ async def verify(
transaction_currency=CurrencyCode.INR,
country=CountryCode.IN,
),
+ origin_payment_details=TransactionOriginPaymentDetails_Cash(
+ method="CASH",
+ ),
+ destination_payment_details=TransactionDestinationPaymentDetails_Cash(
+ method="CASH",
+ ),
promotion_code_used=True,
reference="loan repayment",
origin_device_data=DeviceData(
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 0fd4a94..f58eb15 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -116,6 +116,8 @@
from .list_item import ListItem
from .list_key_metadata import ListKeyMetadata
from .list_metadata import ListMetadata
+from .list_metadata_ttl import ListMetadataTtl
+from .list_metadata_ttl_unit import ListMetadataTtlUnit
from .list_subtype import ListSubtype
from .list_type import ListType
from .list_updated_details import ListUpdatedDetails
@@ -421,6 +423,8 @@
"ListItem",
"ListKeyMetadata",
"ListMetadata",
+ "ListMetadataTtl",
+ "ListMetadataTtlUnit",
"ListSubtype",
"ListType",
"ListUpdatedDetails",
diff --git a/src/flagright/types/list_item.py b/src/flagright/types/list_item.py
index 2075719..1520c14 100644
--- a/src/flagright/types/list_item.py
+++ b/src/flagright/types/list_item.py
@@ -15,6 +15,7 @@
class ListItem(pydantic.BaseModel):
key: str
metadata: typing.Optional[ListKeyMetadata]
+ ttl: typing.Optional[float]
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
diff --git a/src/flagright/types/list_metadata.py b/src/flagright/types/list_metadata.py
index 8f1edf1..d6f99ac 100644
--- a/src/flagright/types/list_metadata.py
+++ b/src/flagright/types/list_metadata.py
@@ -4,6 +4,7 @@
import typing
from ..core.datetime_utils import serialize_datetime
+from .list_metadata_ttl import ListMetadataTtl
try:
import pydantic.v1 as pydantic # type: ignore
@@ -16,6 +17,7 @@ class ListMetadata(pydantic.BaseModel):
description: typing.Optional[str] = pydantic.Field(description="List description")
status: typing.Optional[bool]
checksum: typing.Optional[str]
+ ttl: typing.Optional[ListMetadataTtl]
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
diff --git a/src/flagright/types/list_metadata_ttl.py b/src/flagright/types/list_metadata_ttl.py
new file mode 100644
index 0000000..c819129
--- /dev/null
+++ b/src/flagright/types/list_metadata_ttl.py
@@ -0,0 +1,30 @@
+# 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 .list_metadata_ttl_unit import ListMetadataTtlUnit
+
+try:
+ import pydantic.v1 as pydantic # type: ignore
+except ImportError:
+ import pydantic # type: ignore
+
+
+class ListMetadataTtl(pydantic.BaseModel):
+ unit: ListMetadataTtlUnit
+ value: float
+
+ 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/list_metadata_ttl_unit.py b/src/flagright/types/list_metadata_ttl_unit.py
new file mode 100644
index 0000000..7fd474b
--- /dev/null
+++ b/src/flagright/types/list_metadata_ttl_unit.py
@@ -0,0 +1,17 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import enum
+import typing
+
+T_Result = typing.TypeVar("T_Result")
+
+
+class ListMetadataTtlUnit(str, enum.Enum):
+ HOUR = "HOUR"
+ DAY = "DAY"
+
+ def visit(self, hour: typing.Callable[[], T_Result], day: typing.Callable[[], T_Result]) -> T_Result:
+ if self is ListMetadataTtlUnit.HOUR:
+ return hour()
+ if self is ListMetadataTtlUnit.DAY:
+ return day()
From a57e6782260c6a82b7a1c8fb9f3b936f8f2107f8 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 30 Jan 2025 08:12:57 +0000
Subject: [PATCH 10/81] Release 1.6.45
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 3cf8632..cc7545f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.44"
+version = "1.6.45"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 065b818..d49d46a 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.44",
+ "X-Fern-SDK-Version": "1.6.45",
}
headers["x-api-key"] = self.api_key
return headers
From cae1c6ac7b18925ac5d9fdcb9357f6ec40a44aad Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 30 Jan 2025 08:35:04 +0000
Subject: [PATCH 11/81] Release 1.6.46
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index cc7545f..8999563 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.45"
+version = "1.6.46"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index d49d46a..a53a038 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.45",
+ "X-Fern-SDK-Version": "1.6.46",
}
headers["x-api-key"] = self.api_key
return headers
From c8b8f9a5c000fc19073c29161f4044bd5f3671dd Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 18 Feb 2025 07:19:43 +0000
Subject: [PATCH 12/81] Release 1.6.47
---
poetry.lock | 6 +++---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
src/flagright/types/company_general_details.py | 4 ++++
src/flagright/types/generic_bank_account_details.py | 3 +++
src/flagright/types/list_header.py | 2 +-
src/flagright/types/sanctions_details_entity_type.py | 4 ++++
7 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/poetry.lock b/poetry.lock
index 0b76b28..6cecfd0 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -38,13 +38,13 @@ trio = ["trio (<0.22)"]
[[package]]
name = "certifi"
-version = "2024.12.14"
+version = "2025.1.31"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.6"
files = [
- {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"},
- {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"},
+ {file = "certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe"},
+ {file = "certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 8999563..114d03b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.46"
+version = "1.6.47"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index a53a038..22afdc3 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.46",
+ "X-Fern-SDK-Version": "1.6.47",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/company_general_details.py b/src/flagright/types/company_general_details.py
index d9a4710..19cd5a4 100644
--- a/src/flagright/types/company_general_details.py
+++ b/src/flagright/types/company_general_details.py
@@ -5,6 +5,7 @@
from ..core.datetime_utils import serialize_datetime
from .business_user_segment import BusinessUserSegment
+from .country_code import CountryCode
from .tag import Tag
from .user_registration_status import UserRegistrationStatus
@@ -30,6 +31,9 @@ class CompanyGeneralDetails(pydantic.BaseModel):
alias="userSegment", description="Segmentation of the business user"
)
user_registration_status: typing.Optional[UserRegistrationStatus] = pydantic.Field(alias="userRegistrationStatus")
+ operating_countries: typing.Optional[typing.List[CountryCode]] = pydantic.Field(
+ alias="operatingCountries", description="Countries where the business operates"
+ )
alias: typing.Optional[typing.List[str]] = pydantic.Field(description="Alias names of the business entity")
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
description="Additional information that can be added via tags"
diff --git a/src/flagright/types/generic_bank_account_details.py b/src/flagright/types/generic_bank_account_details.py
index daa8c9c..8bbcb22 100644
--- a/src/flagright/types/generic_bank_account_details.py
+++ b/src/flagright/types/generic_bank_account_details.py
@@ -42,6 +42,9 @@ class GenericBankAccountDetails(pydantic.BaseModel):
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
description="Additional information that can be added via tags"
)
+ transit_number: typing.Optional[str] = pydantic.Field(
+ alias="transitNumber", description="Transit number of the bank account"
+ )
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
diff --git a/src/flagright/types/list_header.py b/src/flagright/types/list_header.py
index ef8ec3b..98bcff1 100644
--- a/src/flagright/types/list_header.py
+++ b/src/flagright/types/list_header.py
@@ -20,7 +20,7 @@ class ListHeader(pydantic.BaseModel):
subtype: ListSubtype
metadata: typing.Optional[ListMetadata]
created_timestamp: float = pydantic.Field(alias="createdTimestamp")
- size: float
+ size: typing.Optional[float]
version: typing.Optional[float]
def json(self, **kwargs: typing.Any) -> str:
diff --git a/src/flagright/types/sanctions_details_entity_type.py b/src/flagright/types/sanctions_details_entity_type.py
index ad2f99c..749dccf 100644
--- a/src/flagright/types/sanctions_details_entity_type.py
+++ b/src/flagright/types/sanctions_details_entity_type.py
@@ -15,6 +15,7 @@ class SanctionsDetailsEntityType(str, enum.Enum):
PAYMENT_NAME = "PAYMENT_NAME"
PAYMENT_BENEFICIARY_NAME = "PAYMENT_BENEFICIARY_NAME"
BANK_NAME = "BANK_NAME"
+ BANK_ACCOUNT_HOLDER_NAME = "BANK_ACCOUNT_HOLDER_NAME"
def visit(
self,
@@ -26,6 +27,7 @@ def visit(
payment_name: typing.Callable[[], T_Result],
payment_beneficiary_name: typing.Callable[[], T_Result],
bank_name: typing.Callable[[], T_Result],
+ bank_account_holder_name: typing.Callable[[], T_Result],
) -> T_Result:
if self is SanctionsDetailsEntityType.CONSUMER_NAME:
return consumer_name()
@@ -43,3 +45,5 @@ def visit(
return payment_beneficiary_name()
if self is SanctionsDetailsEntityType.BANK_NAME:
return bank_name()
+ if self is SanctionsDetailsEntityType.BANK_ACCOUNT_HOLDER_NAME:
+ return bank_account_holder_name()
From 50039a524122c212226b102659a5759e2bbe8988 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 5 Mar 2025 07:27:52 +0000
Subject: [PATCH 13/81] Release 1.6.48
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
src/flagright/resources/transactions/client.py | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 114d03b..4d8d031 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.47"
+version = "1.6.48"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 22afdc3..c0ab246 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.47",
+ "X-Fern-SDK-Version": "1.6.48",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/resources/transactions/client.py b/src/flagright/resources/transactions/client.py
index c44ef66..a437993 100644
--- a/src/flagright/resources/transactions/client.py
+++ b/src/flagright/resources/transactions/client.py
@@ -52,7 +52,7 @@ def verify(
Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
* `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
- * `transactionId` - Unique Identifier for the transaction. Flagright API will generate a `transactionId` if this field is left empty
+ * `transactionId` - Unique Identifier for the transaction.
* `timestamp` - UNIX timestamp in *milliseconds* of when the transaction took place
* `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
* `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
@@ -245,7 +245,7 @@ async def verify(
Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
* `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
- * `transactionId` - Unique Identifier for the transaction. Flagright API will generate a `transactionId` if this field is left empty
+ * `transactionId` - Unique Identifier for the transaction.
* `timestamp` - UNIX timestamp in *milliseconds* of when the transaction took place
* `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
* `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
From ab1ee5d7125faa11604058d5810e7d7d3238ea69 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 26 Mar 2025 21:09:20 +0000
Subject: [PATCH 14/81] Release 1.6.49
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
src/flagright/types/rule_labels.py | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 4d8d031..82ea1d4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.48"
+version = "1.6.49"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index c0ab246..a4189ed 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.48",
+ "X-Fern-SDK-Version": "1.6.49",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/rule_labels.py b/src/flagright/types/rule_labels.py
index eca14cf..3fb6ebb 100644
--- a/src/flagright/types/rule_labels.py
+++ b/src/flagright/types/rule_labels.py
@@ -19,6 +19,7 @@ class RuleLabels(str, enum.Enum):
SANCTIONS = "SANCTIONS"
SANCTIONS_PEP = "SANCTIONS_PEP"
SANCTIONS_PEP_ADVERSE_MEDIA = "SANCTIONS_PEP_ADVERSE_MEDIA"
+ SANCTIONS_MANUAL_REVIEW = "SANCTIONS_MANUAL_REVIEW"
def visit(
self,
@@ -34,6 +35,7 @@ def visit(
sanctions: typing.Callable[[], T_Result],
sanctions_pep: typing.Callable[[], T_Result],
sanctions_pep_adverse_media: typing.Callable[[], T_Result],
+ sanctions_manual_review: typing.Callable[[], T_Result],
) -> T_Result:
if self is RuleLabels.UNEXPECTED_BEHAVIOR:
return unexpected_behavior()
@@ -59,3 +61,5 @@ def visit(
return sanctions_pep()
if self is RuleLabels.SANCTIONS_PEP_ADVERSE_MEDIA:
return sanctions_pep_adverse_media()
+ if self is RuleLabels.SANCTIONS_MANUAL_REVIEW:
+ return sanctions_manual_review()
From 86b609aea235b6226b04a84ea28d3c876b28a7a8 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 8 Apr 2025 05:01:24 +0000
Subject: [PATCH 15/81] Release 1.6.50
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
src/flagright/types/employment_status.py | 4 ++++
src/flagright/types/source_of_funds.py | 16 ++++++++++++++++
src/flagright/types/webhook_event_type.py | 4 ++++
5 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 82ea1d4..2653307 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.49"
+version = "1.6.50"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index a4189ed..d705ed1 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.49",
+ "X-Fern-SDK-Version": "1.6.50",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/employment_status.py b/src/flagright/types/employment_status.py
index 2db2036..957e2a5 100644
--- a/src/flagright/types/employment_status.py
+++ b/src/flagright/types/employment_status.py
@@ -10,6 +10,7 @@ class EmploymentStatus(str, enum.Enum):
UNEMPLOYED = "UNEMPLOYED"
EMPLOYED = "EMPLOYED"
SELF_EMPLOYED = "SELF_EMPLOYED"
+ FREELANCER = "FREELANCER"
STUDENT = "STUDENT"
FULL_TIME = "FULL_TIME"
PART_TIME = "PART_TIME"
@@ -24,6 +25,7 @@ def visit(
unemployed: typing.Callable[[], T_Result],
employed: typing.Callable[[], T_Result],
self_employed: typing.Callable[[], T_Result],
+ freelancer: typing.Callable[[], T_Result],
student: typing.Callable[[], T_Result],
full_time: typing.Callable[[], T_Result],
part_time: typing.Callable[[], T_Result],
@@ -39,6 +41,8 @@ def visit(
return employed()
if self is EmploymentStatus.SELF_EMPLOYED:
return self_employed()
+ if self is EmploymentStatus.FREELANCER:
+ return freelancer()
if self is EmploymentStatus.STUDENT:
return student()
if self is EmploymentStatus.FULL_TIME:
diff --git a/src/flagright/types/source_of_funds.py b/src/flagright/types/source_of_funds.py
index 593242d..0551bea 100644
--- a/src/flagright/types/source_of_funds.py
+++ b/src/flagright/types/source_of_funds.py
@@ -26,6 +26,10 @@ class SourceOfFunds(str, enum.Enum):
CRYPTO = "Crypto"
BUSINESS = "Business"
EMPLOYMENT = "Employment"
+ SALARY = "Salary"
+ REAL_ESTATE_SALE = "Real Estate Sale"
+ REAL_ESTATE_RENTAL = "Real Estate Rental"
+ COMPANY_EXIT = "Company Exit"
def visit(
self,
@@ -48,6 +52,10 @@ def visit(
crypto: typing.Callable[[], T_Result],
business: typing.Callable[[], T_Result],
employment: typing.Callable[[], T_Result],
+ salary: typing.Callable[[], T_Result],
+ real_estate_sale: typing.Callable[[], T_Result],
+ real_estate_rental: typing.Callable[[], T_Result],
+ company_exit: typing.Callable[[], T_Result],
) -> T_Result:
if self is SourceOfFunds.EARNINGS:
return earnings()
@@ -87,3 +95,11 @@ def visit(
return business()
if self is SourceOfFunds.EMPLOYMENT:
return employment()
+ if self is SourceOfFunds.SALARY:
+ return salary()
+ if self is SourceOfFunds.REAL_ESTATE_SALE:
+ return real_estate_sale()
+ if self is SourceOfFunds.REAL_ESTATE_RENTAL:
+ return real_estate_rental()
+ if self is SourceOfFunds.COMPANY_EXIT:
+ return company_exit()
diff --git a/src/flagright/types/webhook_event_type.py b/src/flagright/types/webhook_event_type.py
index 5b6a01c..70e4ba9 100644
--- a/src/flagright/types/webhook_event_type.py
+++ b/src/flagright/types/webhook_event_type.py
@@ -16,6 +16,7 @@ class WebhookEventType(str, enum.Enum):
ALERT_OPENED = "ALERT_OPENED"
PEP_STATUS_UPDATED = "PEP_STATUS_UPDATED"
USER_TAGS_UPDATED = "USER_TAGS_UPDATED"
+ USER_TAGS_DELETED = "USER_TAGS_DELETED"
CRA_RISK_LEVEL_UPDATED = "CRA_RISK_LEVEL_UPDATED"
LIST_UPDATED = "LIST_UPDATED"
@@ -30,6 +31,7 @@ def visit(
alert_opened: typing.Callable[[], T_Result],
pep_status_updated: typing.Callable[[], T_Result],
user_tags_updated: typing.Callable[[], T_Result],
+ user_tags_deleted: typing.Callable[[], T_Result],
cra_risk_level_updated: typing.Callable[[], T_Result],
list_updated: typing.Callable[[], T_Result],
) -> T_Result:
@@ -51,6 +53,8 @@ def visit(
return pep_status_updated()
if self is WebhookEventType.USER_TAGS_UPDATED:
return user_tags_updated()
+ if self is WebhookEventType.USER_TAGS_DELETED:
+ return user_tags_deleted()
if self is WebhookEventType.CRA_RISK_LEVEL_UPDATED:
return cra_risk_level_updated()
if self is WebhookEventType.LIST_UPDATED:
From 3b7fb56d918a87837ee4fce936f40434c94ade02 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 14 Apr 2025 07:13:18 +0000
Subject: [PATCH 16/81] Release 1.6.51
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
src/flagright/types/sanctions_hit_context.py | 2 ++
src/flagright/types/user.py | 1 +
src/flagright/types/user_optional.py | 1 +
src/flagright/types/user_with_rules_result.py | 1 +
6 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 2653307..8ec33f7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.50"
+version = "1.6.51"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index d705ed1..d7dfdfb 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.50",
+ "X-Fern-SDK-Version": "1.6.51",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/sanctions_hit_context.py b/src/flagright/types/sanctions_hit_context.py
index e129e56..28c5eaf 100644
--- a/src/flagright/types/sanctions_hit_context.py
+++ b/src/flagright/types/sanctions_hit_context.py
@@ -19,9 +19,11 @@ class SanctionsHitContext(pydantic.BaseModel):
user_id: typing.Optional[str] = pydantic.Field(alias="userId")
transaction_id: typing.Optional[str] = pydantic.Field(alias="transactionId")
rule_instance_id: typing.Optional[str] = pydantic.Field(alias="ruleInstanceId")
+ rule_id: typing.Optional[str] = pydantic.Field(alias="ruleId")
iban: typing.Optional[str]
year_of_birth: typing.Optional[float] = pydantic.Field(alias="yearOfBirth")
search_term: typing.Optional[str] = pydantic.Field(alias="searchTerm")
+ payment_method_id: typing.Optional[str] = pydantic.Field(alias="paymentMethodId")
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
diff --git a/src/flagright/types/user.py b/src/flagright/types/user.py
index b17d16c..47c41e6 100644
--- a/src/flagright/types/user.py
+++ b/src/flagright/types/user.py
@@ -38,6 +38,7 @@ class User(pydantic.BaseModel):
user_details: typing.Optional[UserDetails] = pydantic.Field(alias="userDetails")
user_state_details: typing.Optional[UserStateDetails] = pydantic.Field(alias="userStateDetails")
kyc_status_details: typing.Optional[KycStatusDetails] = pydantic.Field(alias="kycStatusDetails")
+ eodd_date: typing.Optional[float] = pydantic.Field(alias="eoddDate")
employment_status: typing.Optional[EmploymentStatus] = pydantic.Field(alias="employmentStatus")
occupation: typing.Optional[str]
legal_documents: typing.Optional[typing.List[LegalDocument]] = pydantic.Field(
diff --git a/src/flagright/types/user_optional.py b/src/flagright/types/user_optional.py
index 04cdbd0..40f1eb7 100644
--- a/src/flagright/types/user_optional.py
+++ b/src/flagright/types/user_optional.py
@@ -40,6 +40,7 @@ class UserOptional(pydantic.BaseModel):
user_details: typing.Optional[UserDetails] = pydantic.Field(alias="userDetails")
user_state_details: typing.Optional[UserStateDetails] = pydantic.Field(alias="userStateDetails")
kyc_status_details: typing.Optional[KycStatusDetails] = pydantic.Field(alias="kycStatusDetails")
+ eodd_date: typing.Optional[float] = pydantic.Field(alias="eoddDate")
employment_status: typing.Optional[EmploymentStatus] = pydantic.Field(alias="employmentStatus")
occupation: typing.Optional[str]
legal_documents: typing.Optional[typing.List[LegalDocument]] = pydantic.Field(
diff --git a/src/flagright/types/user_with_rules_result.py b/src/flagright/types/user_with_rules_result.py
index 2b887db..d73ab21 100644
--- a/src/flagright/types/user_with_rules_result.py
+++ b/src/flagright/types/user_with_rules_result.py
@@ -41,6 +41,7 @@ class UserWithRulesResult(pydantic.BaseModel):
user_details: typing.Optional[UserDetails] = pydantic.Field(alias="userDetails")
user_state_details: typing.Optional[UserStateDetails] = pydantic.Field(alias="userStateDetails")
kyc_status_details: typing.Optional[KycStatusDetails] = pydantic.Field(alias="kycStatusDetails")
+ eodd_date: typing.Optional[float] = pydantic.Field(alias="eoddDate")
employment_status: typing.Optional[EmploymentStatus] = pydantic.Field(alias="employmentStatus")
occupation: typing.Optional[str]
legal_documents: typing.Optional[typing.List[LegalDocument]] = pydantic.Field(
From 4d2b6f3feb7e4b224aa00ce853209a834f39f405 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 14 Apr 2025 07:26:25 +0000
Subject: [PATCH 17/81] Release 1.6.52
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
src/flagright/types/sanctions_hit_context.py | 2 --
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 8ec33f7..12d35e6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.51"
+version = "1.6.52"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index d7dfdfb..69831bb 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.51",
+ "X-Fern-SDK-Version": "1.6.52",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/sanctions_hit_context.py b/src/flagright/types/sanctions_hit_context.py
index 28c5eaf..e129e56 100644
--- a/src/flagright/types/sanctions_hit_context.py
+++ b/src/flagright/types/sanctions_hit_context.py
@@ -19,11 +19,9 @@ class SanctionsHitContext(pydantic.BaseModel):
user_id: typing.Optional[str] = pydantic.Field(alias="userId")
transaction_id: typing.Optional[str] = pydantic.Field(alias="transactionId")
rule_instance_id: typing.Optional[str] = pydantic.Field(alias="ruleInstanceId")
- rule_id: typing.Optional[str] = pydantic.Field(alias="ruleId")
iban: typing.Optional[str]
year_of_birth: typing.Optional[float] = pydantic.Field(alias="yearOfBirth")
search_term: typing.Optional[str] = pydantic.Field(alias="searchTerm")
- payment_method_id: typing.Optional[str] = pydantic.Field(alias="paymentMethodId")
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
From 58a08fbcc2c8d6a7f2490256807b992aea2354a9 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 14 Apr 2025 10:16:20 +0000
Subject: [PATCH 18/81] Release v1.7.0
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 12d35e6..dea3687 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "1.6.52"
+version = "v1.7.0"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 69831bb..5bffcab 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.52",
+ "X-Fern-SDK-Version": "v1.7.0",
}
headers["x-api-key"] = self.api_key
return headers
From 690219e93668927e5b2d679cda1a7e34e92e48d1 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 22 Apr 2025 09:21:30 +0000
Subject: [PATCH 19/81] Release 1.6.53
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 2 +-
src/flagright/types/currency_code.py | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index dea3687..cadb28f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
-version = "v1.7.0"
+version = "1.6.53"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 5bffcab..a58adeb 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": "v1.7.0",
+ "X-Fern-SDK-Version": "1.6.53",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/currency_code.py b/src/flagright/types/currency_code.py
index f4fca9c..91b0f79 100644
--- a/src/flagright/types/currency_code.py
+++ b/src/flagright/types/currency_code.py
@@ -481,6 +481,7 @@ class CurrencyCode(str, enum.Enum):
TYUGA = "TYUGA"
VIC = "VIC"
XAI = "XAI"
+ SLE = "SLE"
def visit(
self,
@@ -958,6 +959,7 @@ def visit(
tyuga: typing.Callable[[], T_Result],
vic: typing.Callable[[], T_Result],
xai: typing.Callable[[], T_Result],
+ sle: typing.Callable[[], T_Result],
) -> T_Result:
if self is CurrencyCode.ONE_INCH:
return one_inch()
@@ -1907,3 +1909,5 @@ def visit(
return vic()
if self is CurrencyCode.XAI:
return xai()
+ if self is CurrencyCode.SLE:
+ return sle()
From e1c3c9636072a8655ef4091d02a6b620b1bea5f2 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 22 Apr 2025 11:20:21 +0000
Subject: [PATCH 20/81] Release v1.7.1
---
.github/workflows/ci.yml | 15 +-
.gitignore | 1 +
poetry.lock | 574 ++--
pyproject.toml | 50 +-
reference.md | 2313 ++++++++++++++++
requirements.txt | 4 +
src/flagright/__init__.py | 13 +-
.../{resources => }/batch/__init__.py | 0
src/flagright/batch/client.py | 658 +++++
src/flagright/batch/raw_client.py | 1066 ++++++++
.../business_user_events/__init__.py | 0
src/flagright/business_user_events/client.py | 325 +++
.../business_user_events/raw_client.py | 469 ++++
.../business_users/__init__.py | 0
src/flagright/business_users/client.py | 463 ++++
src/flagright/business_users/raw_client.py | 618 +++++
.../business_users/types/__init__.py | 0
.../types/business_users_create_response.py | 19 +
src/flagright/client.py | 130 +-
.../consumer_user_events/__init__.py | 0
src/flagright/consumer_user_events/client.py | 325 +++
.../consumer_user_events/raw_client.py | 469 ++++
.../consumer_users/__init__.py | 0
src/flagright/consumer_users/client.py | 624 +++++
src/flagright/consumer_users/raw_client.py | 681 +++++
.../consumer_users/types/__init__.py | 0
.../types/consumer_users_create_response.py | 19 +
src/flagright/core/__init__.py | 33 +
src/flagright/core/client_wrapper.py | 38 +-
src/flagright/core/file.py | 67 +
src/flagright/core/http_client.py | 497 ++++
src/flagright/core/http_response.py | 47 +
src/flagright/core/jsonable_encoder.py | 69 +-
src/flagright/core/pydantic_utilities.py | 294 ++
src/flagright/core/query_encoder.py | 58 +
src/flagright/core/remove_none_from_dict.py | 4 +-
src/flagright/core/request_options.py | 35 +
src/flagright/core/serialization.py | 276 ++
src/flagright/resources/__init__.py | 27 -
src/flagright/resources/batch/client.py | 667 -----
.../resources/business_user_events/client.py | 273 --
.../resources/business_users/client.py | 286 --
.../types/business_users_create_response.py | 25 -
.../resources/consumer_user_events/client.py | 273 --
.../resources/consumer_users/client.py | 390 ---
.../types/consumer_users_create_response.py | 25 -
.../resources/transaction_events/client.py | 254 --
.../resources/transactions/client.py | 412 ---
.../types/transactions_verify_response.py | 25 -
.../transaction_events/__init__.py | 0
src/flagright/transaction_events/client.py | 340 +++
.../transaction_events/raw_client.py | 443 +++
.../{resources => }/transactions/__init__.py | 0
src/flagright/transactions/client.py | 588 ++++
src/flagright/transactions/raw_client.py | 611 +++++
.../transactions/types/__init__.py | 0
.../types/transactions_verify_response.py | 19 +
src/flagright/types/ach_details.py | 83 +-
src/flagright/types/ach_payment_method.py | 4 +-
src/flagright/types/acquisition_channel.py | 40 +-
src/flagright/types/address.py | 79 +-
src/flagright/types/alert_closed_details.py | 68 +-
src/flagright/types/alert_opened_details.py | 62 +-
src/flagright/types/amount.py | 42 +-
src/flagright/types/api_error_response.py | 36 +-
src/flagright/types/batch_response.py | 48 +-
.../types/batch_response_failed_record.py | 38 +-
src/flagright/types/batch_response_status.py | 26 +-
src/flagright/types/boolean_string.py | 14 +-
src/flagright/types/business.py | 152 +-
src/flagright/types/business_base.py | 54 +-
src/flagright/types/business_optional.py | 139 +-
...ess_optional_saved_payment_details_item.py | 367 ++-
.../business_saved_payment_details_item.py | 367 ++-
src/flagright/types/business_user_event.py | 70 +-
.../business_user_event_with_rules_result.py | 86 +-
.../types/business_user_monitoring_result.py | 58 +-
src/flagright/types/business_user_segment.py | 40 +-
.../types/business_with_rules_result.py | 172 +-
...rules_result_saved_payment_details_item.py | 367 ++-
src/flagright/types/card_brand.py | 44 +-
src/flagright/types/card_details.py | 148 +-
src/flagright/types/card_expiry.py | 35 +-
src/flagright/types/card_funding.py | 26 +-
src/flagright/types/card_merchant_details.py | 58 +-
src/flagright/types/card_payment_method.py | 4 +-
src/flagright/types/card_status.py | 48 +-
src/flagright/types/card_type.py | 18 +-
src/flagright/types/case_closed_details.py | 60 +-
src/flagright/types/case_management_event.py | 88 +-
.../case_management_event_case_status.py | 18 +-
...ase_management_event_case_status_reason.py | 32 +-
src/flagright/types/case_opened_details.py | 52 +-
src/flagright/types/cash_details.py | 36 +-
src/flagright/types/cash_payment_method.py | 4 +-
src/flagright/types/check_delivery_status.py | 36 +-
src/flagright/types/check_details.py | 65 +-
src/flagright/types/check_payment_method.py | 4 +-
.../types/company_financial_details.py | 51 +-
.../types/company_general_details.py | 97 +-
.../types/company_registration_details.py | 76 +-
src/flagright/types/consumer_name.py | 53 +-
src/flagright/types/consumer_user_event.py | 70 +-
.../consumer_user_event_with_rules_result.py | 88 +-
.../types/consumer_user_monitoring_result.py | 58 +-
src/flagright/types/consumer_user_segment.py | 14 +-
src/flagright/types/contact_details.py | 75 +-
src/flagright/types/country_code.py | 1389 ++--------
.../types/cra_risk_level_updated_details.py | 38 +-
src/flagright/types/currency_code.py | 2389 ++++-------------
src/flagright/types/date.py | 46 +-
src/flagright/types/device_data.py | 127 +-
src/flagright/types/employment_details.py | 55 +-
src/flagright/types/employment_status.py | 74 +-
src/flagright/types/executed_logic_vars.py | 35 +-
src/flagright/types/executed_rules_result.py | 84 +-
src/flagright/types/expected_income.py | 58 +-
src/flagright/types/failed_rules_result.py | 52 +-
src/flagright/types/false_positive_details.py | 38 +-
src/flagright/types/file_info.py | 42 +-
src/flagright/types/gender.py | 23 +-
.../general_bank_account_payment_method.py | 4 +-
.../types/generic_bank_account_details.py | 106 +-
src/flagright/types/hit_rules_details.py | 78 +-
src/flagright/types/iban_details.py | 89 +-
src/flagright/types/iban_payment_method.py | 4 +-
src/flagright/types/kyc_status.py | 59 +-
src/flagright/types/kyc_status_details.py | 35 +-
src/flagright/types/legal_document.py | 92 +-
src/flagright/types/legal_entity.py | 70 +-
src/flagright/types/list_data.py | 40 +-
src/flagright/types/list_existed.py | 43 +-
src/flagright/types/list_header.py | 54 +-
src/flagright/types/list_item.py | 35 +-
src/flagright/types/list_key_metadata.py | 2 +-
src/flagright/types/list_metadata.py | 45 +-
src/flagright/types/list_metadata_ttl.py | 33 +-
src/flagright/types/list_metadata_ttl_unit.py | 14 +-
src/flagright/types/list_subtype.py | 79 +-
src/flagright/types/list_type.py | 22 +-
src/flagright/types/list_updated_details.py | 38 +-
.../types/list_updated_details_action.py | 22 +-
src/flagright/types/marital_status.py | 34 +-
src/flagright/types/mcc_details.py | 40 +-
src/flagright/types/mpesa_details.py | 57 +-
src/flagright/types/mpesa_payment_method.py | 4 +-
src/flagright/types/mpesa_transaction_type.py | 39 +-
src/flagright/types/origin_funds_info.py | 47 +-
src/flagright/types/payment_method.py | 53 +-
src/flagright/types/pep_rank.py | 26 +-
src/flagright/types/pep_status.py | 40 +-
src/flagright/types/person.py | 79 +-
src/flagright/types/person_attachment.py | 52 +-
src/flagright/types/place_of_birth.py | 35 +-
src/flagright/types/pos_details.py | 36 +-
src/flagright/types/pos_entry_mode.py | 95 +-
src/flagright/types/risk_level.py | 30 +-
src/flagright/types/rule_action.py | 30 +-
src/flagright/types/rule_failure_exception.py | 45 +-
src/flagright/types/rule_hit_direction.py | 14 +-
src/flagright/types/rule_hit_meta.py | 56 +-
src/flagright/types/rule_labels.py | 79 +-
src/flagright/types/rule_nature.py | 26 +-
src/flagright/types/rules_results.py | 53 +-
src/flagright/types/sanctions_details.py | 54 +-
.../types/sanctions_details_entity_type.py | 59 +-
src/flagright/types/sanctions_hit_context.py | 56 +-
.../types/sanctions_screening_entity.py | 26 +-
src/flagright/types/source_of_funds.py | 129 +-
src/flagright/types/swift_details.py | 91 +-
src/flagright/types/swift_payment_method.py | 4 +-
src/flagright/types/tag.py | 40 +-
src/flagright/types/transaction.py | 160 +-
.../types/transaction_amount_details.py | 44 +-
.../types/transaction_amount_limit.py | 39 +-
src/flagright/types/transaction_base.py | 64 +-
.../types/transaction_count_limit.py | 39 +-
...transaction_destination_payment_details.py | 367 ++-
src/flagright/types/transaction_event.py | 78 +-
.../transaction_event_monitoring_result.py | 65 +-
.../transaction_event_with_rules_result.py | 100 +-
src/flagright/types/transaction_limit.py | 58 +-
src/flagright/types/transaction_limits.py | 70 +-
...ransaction_limits_payment_method_limits.py | 62 +-
.../types/transaction_monitoring_result.py | 69 +-
.../transaction_origin_payment_details.py | 407 ++-
.../types/transaction_risk_scoring_result.py | 80 +-
src/flagright/types/transaction_state.py | 55 +-
.../types/transaction_status_details.py | 38 +-
src/flagright/types/transaction_type.py | 36 +-
src/flagright/types/transaction_updatable.py | 129 +-
...n_updatable_destination_payment_details.py | 367 ++-
...action_updatable_origin_payment_details.py | 407 ++-
.../types/transaction_with_rules_result.py | 178 +-
...ules_result_destination_payment_details.py | 367 ++-
...ith_rules_result_origin_payment_details.py | 407 ++-
src/flagright/types/upi_details.py | 67 +-
src/flagright/types/upi_payment_method.py | 4 +-
src/flagright/types/user.py | 175 +-
src/flagright/types/user_base.py | 43 +-
src/flagright/types/user_details.py | 83 +-
src/flagright/types/user_entity_link.py | 36 +-
src/flagright/types/user_optional.py | 165 +-
...ser_optional_saved_payment_details_item.py | 367 ++-
.../types/user_registration_status.py | 14 +-
.../types/user_risk_score_details.py | 42 +-
src/flagright/types/user_rules_result.py | 54 +-
.../types/user_saved_payment_details_item.py | 367 ++-
src/flagright/types/user_state.py | 40 +-
src/flagright/types/user_state_details.py | 33 +-
src/flagright/types/user_tag.py | 53 +-
src/flagright/types/user_tags_update.py | 38 +-
src/flagright/types/user_with_rules_result.py | 197 +-
...rules_result_saved_payment_details_item.py | 367 ++-
src/flagright/types/wallet_details.py | 91 +-
src/flagright/types/wallet_network.py | 148 +-
src/flagright/types/wallet_payment_method.py | 4 +-
src/flagright/types/webhook_event.py | 59 +-
src/flagright/types/webhook_event_base.py | 60 +-
.../types/webhook_event_base_triggered_by.py | 18 +-
src/flagright/types/webhook_event_data.py | 11 +-
.../types/webhook_event_triggered_by.py | 18 +-
src/flagright/types/webhook_event_type.py | 74 +-
src/flagright/version.py | 3 +
tests/__init__.py | 0
tests/{ => custom}/test_client.py | 1 +
tests/utils/__init__.py | 2 +
tests/utils/assets/models/__init__.py | 21 +
tests/utils/assets/models/circle.py | 11 +
tests/utils/assets/models/color.py | 7 +
.../assets/models/object_with_defaults.py | 16 +
.../models/object_with_optional_field.py | 34 +
tests/utils/assets/models/shape.py | 26 +
tests/utils/assets/models/square.py | 11 +
.../assets/models/undiscriminated_shape.py | 9 +
tests/utils/test_http_client.py | 61 +
tests/utils/test_query_encoding.py | 37 +
tests/utils/test_serialization.py | 72 +
238 files changed, 20175 insertions(+), 11975 deletions(-)
create mode 100644 reference.md
create mode 100644 requirements.txt
rename src/flagright/{resources => }/batch/__init__.py (100%)
create mode 100644 src/flagright/batch/client.py
create mode 100644 src/flagright/batch/raw_client.py
rename src/flagright/{resources => }/business_user_events/__init__.py (100%)
create mode 100644 src/flagright/business_user_events/client.py
create mode 100644 src/flagright/business_user_events/raw_client.py
rename src/flagright/{resources => }/business_users/__init__.py (100%)
create mode 100644 src/flagright/business_users/client.py
create mode 100644 src/flagright/business_users/raw_client.py
rename src/flagright/{resources => }/business_users/types/__init__.py (100%)
create mode 100644 src/flagright/business_users/types/business_users_create_response.py
rename src/flagright/{resources => }/consumer_user_events/__init__.py (100%)
create mode 100644 src/flagright/consumer_user_events/client.py
create mode 100644 src/flagright/consumer_user_events/raw_client.py
rename src/flagright/{resources => }/consumer_users/__init__.py (100%)
create mode 100644 src/flagright/consumer_users/client.py
create mode 100644 src/flagright/consumer_users/raw_client.py
rename src/flagright/{resources => }/consumer_users/types/__init__.py (100%)
create mode 100644 src/flagright/consumer_users/types/consumer_users_create_response.py
create mode 100644 src/flagright/core/file.py
create mode 100644 src/flagright/core/http_client.py
create mode 100644 src/flagright/core/http_response.py
create mode 100644 src/flagright/core/pydantic_utilities.py
create mode 100644 src/flagright/core/query_encoder.py
create mode 100644 src/flagright/core/request_options.py
create mode 100644 src/flagright/core/serialization.py
delete mode 100644 src/flagright/resources/__init__.py
delete mode 100644 src/flagright/resources/batch/client.py
delete mode 100644 src/flagright/resources/business_user_events/client.py
delete mode 100644 src/flagright/resources/business_users/client.py
delete mode 100644 src/flagright/resources/business_users/types/business_users_create_response.py
delete mode 100644 src/flagright/resources/consumer_user_events/client.py
delete mode 100644 src/flagright/resources/consumer_users/client.py
delete mode 100644 src/flagright/resources/consumer_users/types/consumer_users_create_response.py
delete mode 100644 src/flagright/resources/transaction_events/client.py
delete mode 100644 src/flagright/resources/transactions/client.py
delete mode 100644 src/flagright/resources/transactions/types/transactions_verify_response.py
rename src/flagright/{resources => }/transaction_events/__init__.py (100%)
create mode 100644 src/flagright/transaction_events/client.py
create mode 100644 src/flagright/transaction_events/raw_client.py
rename src/flagright/{resources => }/transactions/__init__.py (100%)
create mode 100644 src/flagright/transactions/client.py
create mode 100644 src/flagright/transactions/raw_client.py
rename src/flagright/{resources => }/transactions/types/__init__.py (100%)
create mode 100644 src/flagright/transactions/types/transactions_verify_response.py
create mode 100644 src/flagright/version.py
delete mode 100644 tests/__init__.py
rename tests/{ => custom}/test_client.py (99%)
create mode 100644 tests/utils/__init__.py
create mode 100644 tests/utils/assets/models/__init__.py
create mode 100644 tests/utils/assets/models/circle.py
create mode 100644 tests/utils/assets/models/color.py
create mode 100644 tests/utils/assets/models/object_with_defaults.py
create mode 100644 tests/utils/assets/models/object_with_optional_field.py
create mode 100644 tests/utils/assets/models/shape.py
create mode 100644 tests/utils/assets/models/square.py
create mode 100644 tests/utils/assets/models/undiscriminated_shape.py
create mode 100644 tests/utils/test_http_client.py
create mode 100644 tests/utils/test_query_encoding.py
create mode 100644 tests/utils/test_serialization.py
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0a5b56e..5c708fe 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,14 +3,14 @@ name: ci
on: [push]
jobs:
compile:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
- python-version: 3.7
+ python-version: 3.8
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
@@ -19,33 +19,34 @@ jobs:
- name: Compile
run: poetry run mypy .
test:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
- python-version: 3.7
+ python-version: 3.8
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: poetry install
+
- name: Test
- run: poetry run pytest .
+ run: poetry run pytest -rP .
publish:
needs: [compile, test]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
- python-version: 3.7
+ python-version: 3.8
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
diff --git a/.gitignore b/.gitignore
index 42cb863..0da665f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ dist/
.mypy_cache/
__pycache__/
poetry.toml
+.ruff_cache/
diff --git a/poetry.lock b/poetry.lock
index 6cecfd0..f76189d 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,14 +1,14 @@
-# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand.
[[package]]
name = "annotated-types"
-version = "0.5.0"
+version = "0.7.0"
description = "Reusable constraint types to use with typing.Annotated"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "annotated_types-0.5.0-py3-none-any.whl", hash = "sha256:58da39888f92c276ad970249761ebea80ba544b77acddaa1a4d6cf78287d45fd"},
- {file = "annotated_types-0.5.0.tar.gz", hash = "sha256:47cdc3490d9ac1506ce92c7aaa76c579dc3509ff11e098fc867e5130ab7be802"},
+ {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"},
+ {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"},
]
[package.dependencies]
@@ -16,25 +16,25 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""}
[[package]]
name = "anyio"
-version = "3.7.1"
+version = "4.5.2"
description = "High level compatibility layer for multiple asynchronous event loop implementations"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "anyio-3.7.1-py3-none-any.whl", hash = "sha256:91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5"},
- {file = "anyio-3.7.1.tar.gz", hash = "sha256:44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780"},
+ {file = "anyio-4.5.2-py3-none-any.whl", hash = "sha256:c011ee36bc1e8ba40e5a81cb9df91925c218fe9b778554e0b56a21e1b5d4716f"},
+ {file = "anyio-4.5.2.tar.gz", hash = "sha256:23009af4ed04ce05991845451e11ef02fc7c5ed29179ac9a420e5ad0ac7ddc5b"},
]
[package.dependencies]
-exceptiongroup = {version = "*", markers = "python_version < \"3.11\""}
+exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""}
idna = ">=2.8"
sniffio = ">=1.1"
-typing-extensions = {version = "*", markers = "python_version < \"3.8\""}
+typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""}
[package.extras]
-doc = ["Sphinx", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme (>=1.2.2)", "sphinxcontrib-jquery"]
-test = ["anyio[trio]", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"]
-trio = ["trio (<0.22)"]
+doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"]
+test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"]
+trio = ["trio (>=0.26.1)"]
[[package]]
name = "certifi"
@@ -83,52 +83,50 @@ files = [
{file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"},
]
-[package.dependencies]
-typing-extensions = {version = "*", markers = "python_version < \"3.8\""}
-
[[package]]
name = "httpcore"
-version = "0.17.3"
+version = "1.0.8"
description = "A minimal low-level HTTP client."
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "httpcore-0.17.3-py3-none-any.whl", hash = "sha256:c2789b767ddddfa2a5782e3199b2b7f6894540b17b16ec26b2c4d8e103510b87"},
- {file = "httpcore-0.17.3.tar.gz", hash = "sha256:a6f30213335e34c1ade7be6ec7c47f19f50c56db36abef1a9dfa3815b1cb3888"},
+ {file = "httpcore-1.0.8-py3-none-any.whl", hash = "sha256:5254cf149bcb5f75e9d1b2b9f729ea4a4b883d1ad7379fc632b727cec23674be"},
+ {file = "httpcore-1.0.8.tar.gz", hash = "sha256:86e94505ed24ea06514883fd44d2bc02d90e77e7979c8eb71b90f41d364a1bad"},
]
[package.dependencies]
-anyio = ">=3.0,<5.0"
certifi = "*"
h11 = ">=0.13,<0.15"
-sniffio = "==1.*"
[package.extras]
+asyncio = ["anyio (>=4.0,<5.0)"]
http2 = ["h2 (>=3,<5)"]
socks = ["socksio (==1.*)"]
+trio = ["trio (>=0.22.0,<1.0)"]
[[package]]
name = "httpx"
-version = "0.24.1"
+version = "0.28.1"
description = "The next generation HTTP client."
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "httpx-0.24.1-py3-none-any.whl", hash = "sha256:06781eb9ac53cde990577af654bd990a4949de37a28bdb4a230d434f3a30b9bd"},
- {file = "httpx-0.24.1.tar.gz", hash = "sha256:5853a43053df830c20f8110c5e69fe44d035d850b2dfe795e196f00fdb774bdd"},
+ {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"},
+ {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"},
]
[package.dependencies]
+anyio = "*"
certifi = "*"
-httpcore = ">=0.15.0,<0.18.0"
+httpcore = "==1.*"
idna = "*"
-sniffio = "*"
[package.extras]
brotli = ["brotli", "brotlicffi"]
cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"]
http2 = ["h2 (>=3,<5)"]
socks = ["socksio (==1.*)"]
+zstd = ["zstandard (>=0.18.0)"]
[[package]]
name = "idna"
@@ -144,77 +142,60 @@ files = [
[package.extras]
all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"]
-[[package]]
-name = "importlib-metadata"
-version = "6.7.0"
-description = "Read metadata from Python packages"
-optional = false
-python-versions = ">=3.7"
-files = [
- {file = "importlib_metadata-6.7.0-py3-none-any.whl", hash = "sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5"},
- {file = "importlib_metadata-6.7.0.tar.gz", hash = "sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4"},
-]
-
-[package.dependencies]
-typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""}
-zipp = ">=0.5"
-
-[package.extras]
-docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"]
-perf = ["ipython"]
-testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"]
-
[[package]]
name = "iniconfig"
-version = "2.0.0"
+version = "2.1.0"
description = "brain-dead simple config-ini parsing"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"},
- {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"},
+ {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"},
+ {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"},
]
[[package]]
name = "mypy"
-version = "0.971"
+version = "1.0.1"
description = "Optional static typing for Python"
optional = false
-python-versions = ">=3.6"
+python-versions = ">=3.7"
files = [
- {file = "mypy-0.971-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f2899a3cbd394da157194f913a931edfd4be5f274a88041c9dc2d9cdcb1c315c"},
- {file = "mypy-0.971-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:98e02d56ebe93981c41211c05adb630d1d26c14195d04d95e49cd97dbc046dc5"},
- {file = "mypy-0.971-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:19830b7dba7d5356d3e26e2427a2ec91c994cd92d983142cbd025ebe81d69cf3"},
- {file = "mypy-0.971-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:02ef476f6dcb86e6f502ae39a16b93285fef97e7f1ff22932b657d1ef1f28655"},
- {file = "mypy-0.971-cp310-cp310-win_amd64.whl", hash = "sha256:25c5750ba5609a0c7550b73a33deb314ecfb559c350bb050b655505e8aed4103"},
- {file = "mypy-0.971-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d3348e7eb2eea2472db611486846742d5d52d1290576de99d59edeb7cd4a42ca"},
- {file = "mypy-0.971-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3fa7a477b9900be9b7dd4bab30a12759e5abe9586574ceb944bc29cddf8f0417"},
- {file = "mypy-0.971-cp36-cp36m-win_amd64.whl", hash = "sha256:2ad53cf9c3adc43cf3bea0a7d01a2f2e86db9fe7596dfecb4496a5dda63cbb09"},
- {file = "mypy-0.971-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:855048b6feb6dfe09d3353466004490b1872887150c5bb5caad7838b57328cc8"},
- {file = "mypy-0.971-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:23488a14a83bca6e54402c2e6435467a4138785df93ec85aeff64c6170077fb0"},
- {file = "mypy-0.971-cp37-cp37m-win_amd64.whl", hash = "sha256:4b21e5b1a70dfb972490035128f305c39bc4bc253f34e96a4adf9127cf943eb2"},
- {file = "mypy-0.971-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9796a2ba7b4b538649caa5cecd398d873f4022ed2333ffde58eaf604c4d2cb27"},
- {file = "mypy-0.971-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5a361d92635ad4ada1b1b2d3630fc2f53f2127d51cf2def9db83cba32e47c856"},
- {file = "mypy-0.971-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b793b899f7cf563b1e7044a5c97361196b938e92f0a4343a5d27966a53d2ec71"},
- {file = "mypy-0.971-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d1ea5d12c8e2d266b5fb8c7a5d2e9c0219fedfeb493b7ed60cd350322384ac27"},
- {file = "mypy-0.971-cp38-cp38-win_amd64.whl", hash = "sha256:23c7ff43fff4b0df93a186581885c8512bc50fc4d4910e0f838e35d6bb6b5e58"},
- {file = "mypy-0.971-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1f7656b69974a6933e987ee8ffb951d836272d6c0f81d727f1d0e2696074d9e6"},
- {file = "mypy-0.971-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d2022bfadb7a5c2ef410d6a7c9763188afdb7f3533f22a0a32be10d571ee4bbe"},
- {file = "mypy-0.971-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef943c72a786b0f8d90fd76e9b39ce81fb7171172daf84bf43eaf937e9f220a9"},
- {file = "mypy-0.971-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d744f72eb39f69312bc6c2abf8ff6656973120e2eb3f3ec4f758ed47e414a4bf"},
- {file = "mypy-0.971-cp39-cp39-win_amd64.whl", hash = "sha256:77a514ea15d3007d33a9e2157b0ba9c267496acf12a7f2b9b9f8446337aac5b0"},
- {file = "mypy-0.971-py3-none-any.whl", hash = "sha256:0d054ef16b071149917085f51f89555a576e2618d5d9dd70bd6eea6410af3ac9"},
- {file = "mypy-0.971.tar.gz", hash = "sha256:40b0f21484238269ae6a57200c807d80debc6459d444c0489a102d7c6a75fa56"},
+ {file = "mypy-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:71a808334d3f41ef011faa5a5cd8153606df5fc0b56de5b2e89566c8093a0c9a"},
+ {file = "mypy-1.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:920169f0184215eef19294fa86ea49ffd4635dedfdea2b57e45cb4ee85d5ccaf"},
+ {file = "mypy-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:27a0f74a298769d9fdc8498fcb4f2beb86f0564bcdb1a37b58cbbe78e55cf8c0"},
+ {file = "mypy-1.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:65b122a993d9c81ea0bfde7689b3365318a88bde952e4dfa1b3a8b4ac05d168b"},
+ {file = "mypy-1.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:5deb252fd42a77add936b463033a59b8e48eb2eaec2976d76b6878d031933fe4"},
+ {file = "mypy-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2013226d17f20468f34feddd6aae4635a55f79626549099354ce641bc7d40262"},
+ {file = "mypy-1.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:48525aec92b47baed9b3380371ab8ab6e63a5aab317347dfe9e55e02aaad22e8"},
+ {file = "mypy-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c96b8a0c019fe29040d520d9257d8c8f122a7343a8307bf8d6d4a43f5c5bfcc8"},
+ {file = "mypy-1.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:448de661536d270ce04f2d7dddaa49b2fdba6e3bd8a83212164d4174ff43aa65"},
+ {file = "mypy-1.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:d42a98e76070a365a1d1c220fcac8aa4ada12ae0db679cb4d910fabefc88b994"},
+ {file = "mypy-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e64f48c6176e243ad015e995de05af7f22bbe370dbb5b32bd6988438ec873919"},
+ {file = "mypy-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fdd63e4f50e3538617887e9aee91855368d9fc1dea30da743837b0df7373bc4"},
+ {file = "mypy-1.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:dbeb24514c4acbc78d205f85dd0e800f34062efcc1f4a4857c57e4b4b8712bff"},
+ {file = "mypy-1.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a2948c40a7dd46c1c33765718936669dc1f628f134013b02ff5ac6c7ef6942bf"},
+ {file = "mypy-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5bc8d6bd3b274dd3846597855d96d38d947aedba18776aa998a8d46fabdaed76"},
+ {file = "mypy-1.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:17455cda53eeee0a4adb6371a21dd3dbf465897de82843751cf822605d152c8c"},
+ {file = "mypy-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e831662208055b006eef68392a768ff83596035ffd6d846786578ba1714ba8f6"},
+ {file = "mypy-1.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e60d0b09f62ae97a94605c3f73fd952395286cf3e3b9e7b97f60b01ddfbbda88"},
+ {file = "mypy-1.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:0af4f0e20706aadf4e6f8f8dc5ab739089146b83fd53cb4a7e0e850ef3de0bb6"},
+ {file = "mypy-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:24189f23dc66f83b839bd1cce2dfc356020dfc9a8bae03978477b15be61b062e"},
+ {file = "mypy-1.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:93a85495fb13dc484251b4c1fd7a5ac370cd0d812bbfc3b39c1bafefe95275d5"},
+ {file = "mypy-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f546ac34093c6ce33f6278f7c88f0f147a4849386d3bf3ae193702f4fe31407"},
+ {file = "mypy-1.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c6c2ccb7af7154673c591189c3687b013122c5a891bb5651eca3db8e6c6c55bd"},
+ {file = "mypy-1.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:15b5a824b58c7c822c51bc66308e759243c32631896743f030daf449fe3677f3"},
+ {file = "mypy-1.0.1-py3-none-any.whl", hash = "sha256:eda5c8b9949ed411ff752b9a01adda31afe7eae1e53e946dbdf9db23865e66c4"},
+ {file = "mypy-1.0.1.tar.gz", hash = "sha256:28cea5a6392bb43d266782983b5a4216c25544cd7d80be681a155ddcdafd152d"},
]
[package.dependencies]
mypy-extensions = ">=0.4.3"
tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
-typed-ast = {version = ">=1.4.0,<2", markers = "python_version < \"3.8\""}
typing-extensions = ">=3.10"
[package.extras]
dmypy = ["psutil (>=4.0)"]
+install-types = ["pip"]
python2 = ["typed-ast (>=1.4.0,<2)"]
reports = ["lxml"]
@@ -231,165 +212,157 @@ files = [
[[package]]
name = "packaging"
-version = "24.0"
+version = "25.0"
description = "Core utilities for Python packages"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"},
- {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"},
+ {file = "packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484"},
+ {file = "packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"},
]
[[package]]
name = "pluggy"
-version = "1.2.0"
+version = "1.5.0"
description = "plugin and hook calling mechanisms for python"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"},
- {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"},
+ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"},
+ {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"},
]
-[package.dependencies]
-importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
-
[package.extras]
dev = ["pre-commit", "tox"]
testing = ["pytest", "pytest-benchmark"]
[[package]]
name = "pydantic"
-version = "2.4.2"
+version = "2.10.6"
description = "Data validation using Python type hints"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "pydantic-2.4.2-py3-none-any.whl", hash = "sha256:bc3ddf669d234f4220e6e1c4d96b061abe0998185a8d7855c0126782b7abc8c1"},
- {file = "pydantic-2.4.2.tar.gz", hash = "sha256:94f336138093a5d7f426aac732dcfe7ab4eb4da243c88f891d65deb4a2556ee7"},
+ {file = "pydantic-2.10.6-py3-none-any.whl", hash = "sha256:427d664bf0b8a2b34ff5dd0f5a18df00591adcee7198fbd71981054cef37b584"},
+ {file = "pydantic-2.10.6.tar.gz", hash = "sha256:ca5daa827cce33de7a42be142548b0096bf05a7e7b365aebfa5f8eeec7128236"},
]
[package.dependencies]
-annotated-types = ">=0.4.0"
-pydantic-core = "2.10.1"
-typing-extensions = ">=4.6.1"
+annotated-types = ">=0.6.0"
+pydantic-core = "2.27.2"
+typing-extensions = ">=4.12.2"
[package.extras]
email = ["email-validator (>=2.0.0)"]
+timezone = ["tzdata"]
[[package]]
name = "pydantic-core"
-version = "2.10.1"
-description = ""
+version = "2.27.2"
+description = "Core functionality for Pydantic validation and serialization"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "pydantic_core-2.10.1-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:d64728ee14e667ba27c66314b7d880b8eeb050e58ffc5fec3b7a109f8cddbd63"},
- {file = "pydantic_core-2.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:48525933fea744a3e7464c19bfede85df4aba79ce90c60b94d8b6e1eddd67096"},
- {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef337945bbd76cce390d1b2496ccf9f90b1c1242a3a7bc242ca4a9fc5993427a"},
- {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1392e0638af203cee360495fd2cfdd6054711f2db5175b6e9c3c461b76f5175"},
- {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0675ba5d22de54d07bccde38997e780044dcfa9a71aac9fd7d4d7a1d2e3e65f7"},
- {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:128552af70a64660f21cb0eb4876cbdadf1a1f9d5de820fed6421fa8de07c893"},
- {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f6e6aed5818c264412ac0598b581a002a9f050cb2637a84979859e70197aa9e"},
- {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ecaac27da855b8d73f92123e5f03612b04c5632fd0a476e469dfc47cd37d6b2e"},
- {file = "pydantic_core-2.10.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b3c01c2fb081fced3bbb3da78510693dc7121bb893a1f0f5f4b48013201f362e"},
- {file = "pydantic_core-2.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:92f675fefa977625105708492850bcbc1182bfc3e997f8eecb866d1927c98ae6"},
- {file = "pydantic_core-2.10.1-cp310-none-win32.whl", hash = "sha256:420a692b547736a8d8703c39ea935ab5d8f0d2573f8f123b0a294e49a73f214b"},
- {file = "pydantic_core-2.10.1-cp310-none-win_amd64.whl", hash = "sha256:0880e239827b4b5b3e2ce05e6b766a7414e5f5aedc4523be6b68cfbc7f61c5d0"},
- {file = "pydantic_core-2.10.1-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:073d4a470b195d2b2245d0343569aac7e979d3a0dcce6c7d2af6d8a920ad0bea"},
- {file = "pydantic_core-2.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:600d04a7b342363058b9190d4e929a8e2e715c5682a70cc37d5ded1e0dd370b4"},
- {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39215d809470f4c8d1881758575b2abfb80174a9e8daf8f33b1d4379357e417c"},
- {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eeb3d3d6b399ffe55f9a04e09e635554012f1980696d6b0aca3e6cf42a17a03b"},
- {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7a7902bf75779bc12ccfc508bfb7a4c47063f748ea3de87135d433a4cca7a2f"},
- {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3625578b6010c65964d177626fde80cf60d7f2e297d56b925cb5cdeda6e9925a"},
- {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:caa48fc31fc7243e50188197b5f0c4228956f97b954f76da157aae7f67269ae8"},
- {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:07ec6d7d929ae9c68f716195ce15e745b3e8fa122fc67698ac6498d802ed0fa4"},
- {file = "pydantic_core-2.10.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e6f31a17acede6a8cd1ae2d123ce04d8cca74056c9d456075f4f6f85de055607"},
- {file = "pydantic_core-2.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d8f1ebca515a03e5654f88411420fea6380fc841d1bea08effb28184e3d4899f"},
- {file = "pydantic_core-2.10.1-cp311-none-win32.whl", hash = "sha256:6db2eb9654a85ada248afa5a6db5ff1cf0f7b16043a6b070adc4a5be68c716d6"},
- {file = "pydantic_core-2.10.1-cp311-none-win_amd64.whl", hash = "sha256:4a5be350f922430997f240d25f8219f93b0c81e15f7b30b868b2fddfc2d05f27"},
- {file = "pydantic_core-2.10.1-cp311-none-win_arm64.whl", hash = "sha256:5fdb39f67c779b183b0c853cd6b45f7db84b84e0571b3ef1c89cdb1dfc367325"},
- {file = "pydantic_core-2.10.1-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:b1f22a9ab44de5f082216270552aa54259db20189e68fc12484873d926426921"},
- {file = "pydantic_core-2.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8572cadbf4cfa95fb4187775b5ade2eaa93511f07947b38f4cd67cf10783b118"},
- {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:db9a28c063c7c00844ae42a80203eb6d2d6bbb97070cfa00194dff40e6f545ab"},
- {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e2a35baa428181cb2270a15864ec6286822d3576f2ed0f4cd7f0c1708472aff"},
- {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05560ab976012bf40f25d5225a58bfa649bb897b87192a36c6fef1ab132540d7"},
- {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d6495008733c7521a89422d7a68efa0a0122c99a5861f06020ef5b1f51f9ba7c"},
- {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ac492c686defc8e6133e3a2d9eaf5261b3df26b8ae97450c1647286750b901"},
- {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8282bab177a9a3081fd3d0a0175a07a1e2bfb7fcbbd949519ea0980f8a07144d"},
- {file = "pydantic_core-2.10.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:aafdb89fdeb5fe165043896817eccd6434aee124d5ee9b354f92cd574ba5e78f"},
- {file = "pydantic_core-2.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f6defd966ca3b187ec6c366604e9296f585021d922e666b99c47e78738b5666c"},
- {file = "pydantic_core-2.10.1-cp312-none-win32.whl", hash = "sha256:7c4d1894fe112b0864c1fa75dffa045720a194b227bed12f4be7f6045b25209f"},
- {file = "pydantic_core-2.10.1-cp312-none-win_amd64.whl", hash = "sha256:5994985da903d0b8a08e4935c46ed8daf5be1cf217489e673910951dc533d430"},
- {file = "pydantic_core-2.10.1-cp312-none-win_arm64.whl", hash = "sha256:0d8a8adef23d86d8eceed3e32e9cca8879c7481c183f84ed1a8edc7df073af94"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:9badf8d45171d92387410b04639d73811b785b5161ecadabf056ea14d62d4ede"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:ebedb45b9feb7258fac0a268a3f6bec0a2ea4d9558f3d6f813f02ff3a6dc6698"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cfe1090245c078720d250d19cb05d67e21a9cd7c257698ef139bc41cf6c27b4f"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e357571bb0efd65fd55f18db0a2fb0ed89d0bb1d41d906b138f088933ae618bb"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b3dcd587b69bbf54fc04ca157c2323b8911033e827fffaecf0cafa5a892a0904"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c120c9ce3b163b985a3b966bb701114beb1da4b0468b9b236fc754783d85aa3"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15d6bca84ffc966cc9976b09a18cf9543ed4d4ecbd97e7086f9ce9327ea48891"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5cabb9710f09d5d2e9e2748c3e3e20d991a4c5f96ed8f1132518f54ab2967221"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:82f55187a5bebae7d81d35b1e9aaea5e169d44819789837cdd4720d768c55d15"},
- {file = "pydantic_core-2.10.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1d40f55222b233e98e3921df7811c27567f0e1a4411b93d4c5c0f4ce131bc42f"},
- {file = "pydantic_core-2.10.1-cp37-none-win32.whl", hash = "sha256:14e09ff0b8fe6e46b93d36a878f6e4a3a98ba5303c76bb8e716f4878a3bee92c"},
- {file = "pydantic_core-2.10.1-cp37-none-win_amd64.whl", hash = "sha256:1396e81b83516b9d5c9e26a924fa69164156c148c717131f54f586485ac3c15e"},
- {file = "pydantic_core-2.10.1-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:6835451b57c1b467b95ffb03a38bb75b52fb4dc2762bb1d9dbed8de31ea7d0fc"},
- {file = "pydantic_core-2.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b00bc4619f60c853556b35f83731bd817f989cba3e97dc792bb8c97941b8053a"},
- {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fa467fd300a6f046bdb248d40cd015b21b7576c168a6bb20aa22e595c8ffcdd"},
- {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d99277877daf2efe074eae6338453a4ed54a2d93fb4678ddfe1209a0c93a2468"},
- {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fa7db7558607afeccb33c0e4bf1c9a9a835e26599e76af6fe2fcea45904083a6"},
- {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aad7bd686363d1ce4ee930ad39f14e1673248373f4a9d74d2b9554f06199fb58"},
- {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:443fed67d33aa85357464f297e3d26e570267d1af6fef1c21ca50921d2976302"},
- {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:042462d8d6ba707fd3ce9649e7bf268633a41018d6a998fb5fbacb7e928a183e"},
- {file = "pydantic_core-2.10.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ecdbde46235f3d560b18be0cb706c8e8ad1b965e5c13bbba7450c86064e96561"},
- {file = "pydantic_core-2.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ed550ed05540c03f0e69e6d74ad58d026de61b9eaebebbaaf8873e585cbb18de"},
- {file = "pydantic_core-2.10.1-cp38-none-win32.whl", hash = "sha256:8cdbbd92154db2fec4ec973d45c565e767ddc20aa6dbaf50142676484cbff8ee"},
- {file = "pydantic_core-2.10.1-cp38-none-win_amd64.whl", hash = "sha256:9f6f3e2598604956480f6c8aa24a3384dbf6509fe995d97f6ca6103bb8c2534e"},
- {file = "pydantic_core-2.10.1-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:655f8f4c8d6a5963c9a0687793da37b9b681d9ad06f29438a3b2326d4e6b7970"},
- {file = "pydantic_core-2.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e570ffeb2170e116a5b17e83f19911020ac79d19c96f320cbfa1fa96b470185b"},
- {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64322bfa13e44c6c30c518729ef08fda6026b96d5c0be724b3c4ae4da939f875"},
- {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:485a91abe3a07c3a8d1e082ba29254eea3e2bb13cbbd4351ea4e5a21912cc9b0"},
- {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7c2b8eb9fc872e68b46eeaf835e86bccc3a58ba57d0eedc109cbb14177be531"},
- {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a5cb87bdc2e5f620693148b5f8f842d293cae46c5f15a1b1bf7ceeed324a740c"},
- {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25bd966103890ccfa028841a8f30cebcf5875eeac8c4bde4fe221364c92f0c9a"},
- {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f323306d0556351735b54acbf82904fe30a27b6a7147153cbe6e19aaaa2aa429"},
- {file = "pydantic_core-2.10.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0c27f38dc4fbf07b358b2bc90edf35e82d1703e22ff2efa4af4ad5de1b3833e7"},
- {file = "pydantic_core-2.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f1365e032a477c1430cfe0cf2856679529a2331426f8081172c4a74186f1d595"},
- {file = "pydantic_core-2.10.1-cp39-none-win32.whl", hash = "sha256:a1c311fd06ab3b10805abb72109f01a134019739bd3286b8ae1bc2fc4e50c07a"},
- {file = "pydantic_core-2.10.1-cp39-none-win_amd64.whl", hash = "sha256:ae8a8843b11dc0b03b57b52793e391f0122e740de3df1474814c700d2622950a"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:d43002441932f9a9ea5d6f9efaa2e21458221a3a4b417a14027a1d530201ef1b"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:fcb83175cc4936a5425dde3356f079ae03c0802bbdf8ff82c035f8a54b333521"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:962ed72424bf1f72334e2f1e61b68f16c0e596f024ca7ac5daf229f7c26e4208"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2cf5bb4dd67f20f3bbc1209ef572a259027c49e5ff694fa56bed62959b41e1f9"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e544246b859f17373bed915182ab841b80849ed9cf23f1f07b73b7c58baee5fb"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:c0877239307b7e69d025b73774e88e86ce82f6ba6adf98f41069d5b0b78bd1bf"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:53df009d1e1ba40f696f8995683e067e3967101d4bb4ea6f667931b7d4a01357"},
- {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a1254357f7e4c82e77c348dabf2d55f1d14d19d91ff025004775e70a6ef40ada"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:524ff0ca3baea164d6d93a32c58ac79eca9f6cf713586fdc0adb66a8cdeab96a"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f0ac9fb8608dbc6eaf17956bf623c9119b4db7dbb511650910a82e261e6600f"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:320f14bd4542a04ab23747ff2c8a778bde727158b606e2661349557f0770711e"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:63974d168b6233b4ed6a0046296803cb13c56637a7b8106564ab575926572a55"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:417243bf599ba1f1fef2bb8c543ceb918676954734e2dcb82bf162ae9d7bd514"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:dda81e5ec82485155a19d9624cfcca9be88a405e2857354e5b089c2a982144b2"},
- {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:14cfbb00959259e15d684505263d5a21732b31248a5dd4941f73a3be233865b9"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:631cb7415225954fdcc2a024119101946793e5923f6c4d73a5914d27eb3d3a05"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:bec7dd208a4182e99c5b6c501ce0b1f49de2802448d4056091f8e630b28e9a52"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:149b8a07712f45b332faee1a2258d8ef1fb4a36f88c0c17cb687f205c5dc6e7d"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d966c47f9dd73c2d32a809d2be529112d509321c5310ebf54076812e6ecd884"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7eb037106f5c6b3b0b864ad226b0b7ab58157124161d48e4b30c4a43fef8bc4b"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:154ea7c52e32dce13065dbb20a4a6f0cc012b4f667ac90d648d36b12007fa9f7"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e562617a45b5a9da5be4abe72b971d4f00bf8555eb29bb91ec2ef2be348cd132"},
- {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:f23b55eb5464468f9e0e9a9935ce3ed2a870608d5f534025cd5536bca25b1402"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:e9121b4009339b0f751955baf4543a0bfd6bc3f8188f8056b1a25a2d45099934"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:0523aeb76e03f753b58be33b26540880bac5aa54422e4462404c432230543f33"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e0e2959ef5d5b8dc9ef21e1a305a21a36e254e6a34432d00c72a92fdc5ecda5"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da01bec0a26befab4898ed83b362993c844b9a607a86add78604186297eb047e"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f2e9072d71c1f6cfc79a36d4484c82823c560e6f5599c43c1ca6b5cdbd54f881"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f36a3489d9e28fe4b67be9992a23029c3cec0babc3bd9afb39f49844a8c721c5"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f64f82cc3443149292b32387086d02a6c7fb39b8781563e0ca7b8d7d9cf72bd7"},
- {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b4a6db486ac8e99ae696e09efc8b2b9fea67b63c8f88ba7a1a16c24a057a0776"},
- {file = "pydantic_core-2.10.1.tar.gz", hash = "sha256:0f8682dbdd2f67f8e1edddcbffcc29f60a6182b4901c367fc8c1c40d30bb0a82"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7969e133a6f183be60e9f6f56bfae753585680f3b7307a8e555a948d443cc05a"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3de9961f2a346257caf0aa508a4da705467f53778e9ef6fe744c038119737ef5"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2bb4d3e5873c37bb3dd58714d4cd0b0e6238cebc4177ac8fe878f8b3aa8e74c"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:280d219beebb0752699480fe8f1dc61ab6615c2046d76b7ab7ee38858de0a4e7"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47956ae78b6422cbd46f772f1746799cbb862de838fd8d1fbd34a82e05b0983a"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14d4a5c49d2f009d62a2a7140d3064f686d17a5d1a268bc641954ba181880236"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:337b443af21d488716f8d0b6164de833e788aa6bd7e3a39c005febc1284f4962"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:03d0f86ea3184a12f41a2d23f7ccb79cdb5a18e06993f8a45baa8dfec746f0e9"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7041c36f5680c6e0f08d922aed302e98b3745d97fe1589db0a3eebf6624523af"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-win32.whl", hash = "sha256:50a68f3e3819077be2c98110c1f9dcb3817e93f267ba80a2c05bb4f8799e2ff4"},
+ {file = "pydantic_core-2.27.2-cp310-cp310-win_amd64.whl", hash = "sha256:e0fd26b16394ead34a424eecf8a31a1f5137094cabe84a1bcb10fa6ba39d3d31"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8e10c99ef58cfdf2a66fc15d66b16c4a04f62bca39db589ae8cba08bc55331bc"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26f32e0adf166a84d0cb63be85c562ca8a6fa8de28e5f0d92250c6b7e9e2aff7"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c19d1ea0673cd13cc2f872f6c9ab42acc4e4f492a7ca9d3795ce2b112dd7e15"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e68c4446fe0810e959cdff46ab0a41ce2f2c86d227d96dc3847af0ba7def306"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9640b0059ff4f14d1f37321b94061c6db164fbe49b334b31643e0528d100d99"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40d02e7d45c9f8af700f3452f329ead92da4c5f4317ca9b896de7ce7199ea459"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c1fd185014191700554795c99b347d64f2bb637966c4cfc16998a0ca700d048"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d81d2068e1c1228a565af076598f9e7451712700b673de8f502f0334f281387d"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a4207639fb02ec2dbb76227d7c751a20b1a6b4bc52850568e52260cae64ca3b"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3de3ce3c9ddc8bbd88f6e0e304dea0e66d843ec9de1b0042b0911c1663ffd474"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:30c5f68ded0c36466acede341551106821043e9afaad516adfb6e8fa80a4e6a6"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-win32.whl", hash = "sha256:c70c26d2c99f78b125a3459f8afe1aed4d9687c24fd677c6a4436bc042e50d6c"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-win_amd64.whl", hash = "sha256:08e125dbdc505fa69ca7d9c499639ab6407cfa909214d500897d02afb816e7cc"},
+ {file = "pydantic_core-2.27.2-cp311-cp311-win_arm64.whl", hash = "sha256:26f0d68d4b235a2bae0c3fc585c585b4ecc51382db0e3ba402a22cbc440915e4"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9e0c8cfefa0ef83b4da9588448b6d8d2a2bf1a53c3f1ae5fca39eb3061e2f0b0"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83097677b8e3bd7eaa6775720ec8e0405f1575015a463285a92bfdfe254529ef"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172fce187655fece0c90d90a678424b013f8fbb0ca8b036ac266749c09438cb7"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:519f29f5213271eeeeb3093f662ba2fd512b91c5f188f3bb7b27bc5973816934"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05e3a55d124407fffba0dd6b0c0cd056d10e983ceb4e5dbd10dda135c31071d6"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c3ed807c7b91de05e63930188f19e921d1fe90de6b4f5cd43ee7fcc3525cb8c"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fb4aadc0b9a0c063206846d603b92030eb6f03069151a625667f982887153e2"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28ccb213807e037460326424ceb8b5245acb88f32f3d2777427476e1b32c48c4"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:de3cd1899e2c279b140adde9357c4495ed9d47131b4a4eaff9052f23398076b3"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:220f892729375e2d736b97d0e51466252ad84c51857d4d15f5e9692f9ef12be4"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0fcd29cd6b4e74fe8ddd2c90330fd8edf2e30cb52acda47f06dd615ae72da57"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-win32.whl", hash = "sha256:1e2cb691ed9834cd6a8be61228471d0a503731abfb42f82458ff27be7b2186fc"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-win_amd64.whl", hash = "sha256:cc3f1a99a4f4f9dd1de4fe0312c114e740b5ddead65bb4102884b384c15d8bc9"},
+ {file = "pydantic_core-2.27.2-cp312-cp312-win_arm64.whl", hash = "sha256:3911ac9284cd8a1792d3cb26a2da18f3ca26c6908cc434a18f730dc0db7bfa3b"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7d14bd329640e63852364c306f4d23eb744e0f8193148d4044dd3dacdaacbd8b"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82f91663004eb8ed30ff478d77c4d1179b3563df6cdb15c0817cd1cdaf34d154"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71b24c7d61131bb83df10cc7e687433609963a944ccf45190cfc21e0887b08c9"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa8e459d4954f608fa26116118bb67f56b93b209c39b008277ace29937453dc9"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8918cbebc8da707ba805b7fd0b382816858728ae7fe19a942080c24e5b7cd1"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eda3f5c2a021bbc5d976107bb302e0131351c2ba54343f8a496dc8783d3d3a6a"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd8086fa684c4775c27f03f062cbb9eaa6e17f064307e86b21b9e0abc9c0f02e"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8d9b3388db186ba0c099a6d20f0604a44eabdeef1777ddd94786cdae158729e4"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7a66efda2387de898c8f38c0cf7f14fca0b51a8ef0b24bfea5849f1b3c95af27"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:18a101c168e4e092ab40dbc2503bdc0f62010e95d292b27827871dc85450d7ee"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ba5dd002f88b78a4215ed2f8ddbdf85e8513382820ba15ad5ad8955ce0ca19a1"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee"},
+ {file = "pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d3e8d504bdd3f10835468f29008d72fc8359d95c9c415ce6e767203db6127506"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521eb9b7f036c9b6187f0b47318ab0d7ca14bd87f776240b90b21c1f4f149320"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85210c4d99a0114f5a9481b44560d7d1e35e32cc5634c656bc48e590b669b145"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d716e2e30c6f140d7560ef1538953a5cd1a87264c737643d481f2779fc247fe1"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f66d89ba397d92f840f8654756196d93804278457b5fbede59598a1f9f90b228"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:669e193c1c576a58f132e3158f9dfa9662969edb1a250c54d8fa52590045f046"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdbe7629b996647b99c01b37f11170a57ae675375b14b8c13b8518b8320ced5"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d262606bf386a5ba0b0af3b97f37c83d7011439e3dc1a9298f21efb292e42f1a"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cabb9bcb7e0d97f74df8646f34fc76fbf793b7f6dc2438517d7a9e50eee4f14d"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:d2d63f1215638d28221f664596b1ccb3944f6e25dd18cd3b86b0a4c408d5ebb9"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bca101c00bff0adb45a833f8451b9105d9df18accb8743b08107d7ada14bd7da"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-win32.whl", hash = "sha256:f6f8e111843bbb0dee4cb6594cdc73e79b3329b526037ec242a3e49012495b3b"},
+ {file = "pydantic_core-2.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:fd1aea04935a508f62e0d0ef1f5ae968774a32afc306fb8545e06f5ff5cdf3ad"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c10eb4f1659290b523af58fa7cffb452a61ad6ae5613404519aee4bfbf1df993"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef592d4bad47296fb11f96cd7dc898b92e795032b4894dfb4076cfccd43a9308"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c61709a844acc6bf0b7dce7daae75195a10aac96a596ea1b776996414791ede4"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c5f762659e47fdb7b16956c71598292f60a03aa92f8b6351504359dbdba6cf"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c9775e339e42e79ec99c441d9730fccf07414af63eac2f0e48e08fd38a64d76"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57762139821c31847cfb2df63c12f725788bd9f04bc2fb392790959b8f70f118"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d1e85068e818c73e048fe28cfc769040bb1f475524f4745a5dc621f75ac7630"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:097830ed52fd9e427942ff3b9bc17fab52913b2f50f2880dc4a5611446606a54"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044a50963a614ecfae59bb1eaf7ea7efc4bc62f49ed594e18fa1e5d953c40e9f"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:4e0b4220ba5b40d727c7f879eac379b822eee5d8fff418e9d3381ee45b3b0362"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e4f4bb20d75e9325cc9696c6802657b58bc1dbbe3022f32cc2b2b632c3fbb96"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-win32.whl", hash = "sha256:cca63613e90d001b9f2f9a9ceb276c308bfa2a43fafb75c8031c4f66039e8c6e"},
+ {file = "pydantic_core-2.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:77d1bca19b0f7021b3a982e6f903dcd5b2b06076def36a652e3907f596e29f67"},
+ {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e"},
+ {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8"},
+ {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3"},
+ {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f"},
+ {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133"},
+ {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc"},
+ {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50"},
+ {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9"},
+ {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151"},
+ {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656"},
+ {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278"},
+ {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb"},
+ {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd"},
+ {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc"},
+ {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b"},
+ {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b"},
+ {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2"},
+ {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35"},
+ {file = "pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39"},
]
[package.dependencies]
@@ -409,7 +382,6 @@ files = [
[package.dependencies]
colorama = {version = "*", markers = "sys_platform == \"win32\""}
exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
-importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
iniconfig = "*"
packaging = "*"
pluggy = ">=0.12,<2.0"
@@ -418,6 +390,76 @@ tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
[package.extras]
testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
+[[package]]
+name = "pytest-asyncio"
+version = "0.23.8"
+description = "Pytest support for asyncio"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"},
+ {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"},
+]
+
+[package.dependencies]
+pytest = ">=7.0.0,<9"
+
+[package.extras]
+docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"]
+testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"]
+
+[[package]]
+name = "python-dateutil"
+version = "2.9.0.post0"
+description = "Extensions to the standard Python datetime module"
+optional = false
+python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
+files = [
+ {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"},
+ {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"},
+]
+
+[package.dependencies]
+six = ">=1.5"
+
+[[package]]
+name = "ruff"
+version = "0.5.7"
+description = "An extremely fast Python linter and code formatter, written in Rust."
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "ruff-0.5.7-py3-none-linux_armv6l.whl", hash = "sha256:548992d342fc404ee2e15a242cdbea4f8e39a52f2e7752d0e4cbe88d2d2f416a"},
+ {file = "ruff-0.5.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:00cc8872331055ee017c4f1071a8a31ca0809ccc0657da1d154a1d2abac5c0be"},
+ {file = "ruff-0.5.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:eaf3d86a1fdac1aec8a3417a63587d93f906c678bb9ed0b796da7b59c1114a1e"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a01c34400097b06cf8a6e61b35d6d456d5bd1ae6961542de18ec81eaf33b4cb8"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fcc8054f1a717e2213500edaddcf1dbb0abad40d98e1bd9d0ad364f75c763eea"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f70284e73f36558ef51602254451e50dd6cc479f8b6f8413a95fcb5db4a55fc"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:a78ad870ae3c460394fc95437d43deb5c04b5c29297815a2a1de028903f19692"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9ccd078c66a8e419475174bfe60a69adb36ce04f8d4e91b006f1329d5cd44bcf"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7e31c9bad4ebf8fdb77b59cae75814440731060a09a0e0077d559a556453acbb"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d796327eed8e168164346b769dd9a27a70e0298d667b4ecee6877ce8095ec8e"},
+ {file = "ruff-0.5.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4a09ea2c3f7778cc635e7f6edf57d566a8ee8f485f3c4454db7771efb692c499"},
+ {file = "ruff-0.5.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a36d8dcf55b3a3bc353270d544fb170d75d2dff41eba5df57b4e0b67a95bb64e"},
+ {file = "ruff-0.5.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9369c218f789eefbd1b8d82a8cf25017b523ac47d96b2f531eba73770971c9e5"},
+ {file = "ruff-0.5.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b88ca3db7eb377eb24fb7c82840546fb7acef75af4a74bd36e9ceb37a890257e"},
+ {file = "ruff-0.5.7-py3-none-win32.whl", hash = "sha256:33d61fc0e902198a3e55719f4be6b375b28f860b09c281e4bdbf783c0566576a"},
+ {file = "ruff-0.5.7-py3-none-win_amd64.whl", hash = "sha256:083bbcbe6fadb93cd86709037acc510f86eed5a314203079df174c40bbbca6b3"},
+ {file = "ruff-0.5.7-py3-none-win_arm64.whl", hash = "sha256:2dca26154ff9571995107221d0aeaad0e75a77b5a682d6236cf89a58c70b76f4"},
+ {file = "ruff-0.5.7.tar.gz", hash = "sha256:8dfc0a458797f5d9fb622dd0efc52d796f23f0a1493a9527f4e49a550ae9a7e5"},
+]
+
+[[package]]
+name = "six"
+version = "1.17.0"
+description = "Python 2 and 3 compatibility utilities"
+optional = false
+python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
+files = [
+ {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"},
+ {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"},
+]
+
[[package]]
name = "sniffio"
version = "1.3.1"
@@ -431,92 +473,68 @@ files = [
[[package]]
name = "tomli"
-version = "2.0.1"
+version = "2.2.1"
description = "A lil' TOML parser"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
- {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
+ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"},
+ {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"},
+ {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"},
+ {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"},
+ {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"},
+ {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"},
+ {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"},
+ {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"},
+ {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"},
+ {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"},
+ {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"},
+ {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"},
+ {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"},
+ {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"},
+ {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"},
+ {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"},
+ {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"},
+ {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"},
+ {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"},
+ {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"},
+ {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"},
+ {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"},
+ {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"},
+ {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"},
+ {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"},
+ {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"},
+ {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"},
+ {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"},
+ {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"},
+ {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"},
+ {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"},
+ {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"},
]
[[package]]
-name = "typed-ast"
-version = "1.5.5"
-description = "a fork of Python 2 and 3 ast modules with type comment support"
+name = "types-python-dateutil"
+version = "2.9.0.20241206"
+description = "Typing stubs for python-dateutil"
optional = false
-python-versions = ">=3.6"
+python-versions = ">=3.8"
files = [
- {file = "typed_ast-1.5.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4bc1efe0ce3ffb74784e06460f01a223ac1f6ab31c6bc0376a21184bf5aabe3b"},
- {file = "typed_ast-1.5.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5f7a8c46a8b333f71abd61d7ab9255440d4a588f34a21f126bbfc95f6049e686"},
- {file = "typed_ast-1.5.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:597fc66b4162f959ee6a96b978c0435bd63791e31e4f410622d19f1686d5e769"},
- {file = "typed_ast-1.5.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d41b7a686ce653e06c2609075d397ebd5b969d821b9797d029fccd71fdec8e04"},
- {file = "typed_ast-1.5.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:5fe83a9a44c4ce67c796a1b466c270c1272e176603d5e06f6afbc101a572859d"},
- {file = "typed_ast-1.5.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d5c0c112a74c0e5db2c75882a0adf3133adedcdbfd8cf7c9d6ed77365ab90a1d"},
- {file = "typed_ast-1.5.5-cp310-cp310-win_amd64.whl", hash = "sha256:e1a976ed4cc2d71bb073e1b2a250892a6e968ff02aa14c1f40eba4f365ffec02"},
- {file = "typed_ast-1.5.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c631da9710271cb67b08bd3f3813b7af7f4c69c319b75475436fcab8c3d21bee"},
- {file = "typed_ast-1.5.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b445c2abfecab89a932b20bd8261488d574591173d07827c1eda32c457358b18"},
- {file = "typed_ast-1.5.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc95ffaaab2be3b25eb938779e43f513e0e538a84dd14a5d844b8f2932593d88"},
- {file = "typed_ast-1.5.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61443214d9b4c660dcf4b5307f15c12cb30bdfe9588ce6158f4a005baeb167b2"},
- {file = "typed_ast-1.5.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6eb936d107e4d474940469e8ec5b380c9b329b5f08b78282d46baeebd3692dc9"},
- {file = "typed_ast-1.5.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e48bf27022897577d8479eaed64701ecaf0467182448bd95759883300ca818c8"},
- {file = "typed_ast-1.5.5-cp311-cp311-win_amd64.whl", hash = "sha256:83509f9324011c9a39faaef0922c6f720f9623afe3fe220b6d0b15638247206b"},
- {file = "typed_ast-1.5.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:44f214394fc1af23ca6d4e9e744804d890045d1643dd7e8229951e0ef39429b5"},
- {file = "typed_ast-1.5.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:118c1ce46ce58fda78503eae14b7664163aa735b620b64b5b725453696f2a35c"},
- {file = "typed_ast-1.5.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be4919b808efa61101456e87f2d4c75b228f4e52618621c77f1ddcaae15904fa"},
- {file = "typed_ast-1.5.5-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fc2b8c4e1bc5cd96c1a823a885e6b158f8451cf6f5530e1829390b4d27d0807f"},
- {file = "typed_ast-1.5.5-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:16f7313e0a08c7de57f2998c85e2a69a642e97cb32f87eb65fbfe88381a5e44d"},
- {file = "typed_ast-1.5.5-cp36-cp36m-win_amd64.whl", hash = "sha256:2b946ef8c04f77230489f75b4b5a4a6f24c078be4aed241cfabe9cbf4156e7e5"},
- {file = "typed_ast-1.5.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2188bc33d85951ea4ddad55d2b35598b2709d122c11c75cffd529fbc9965508e"},
- {file = "typed_ast-1.5.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0635900d16ae133cab3b26c607586131269f88266954eb04ec31535c9a12ef1e"},
- {file = "typed_ast-1.5.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:57bfc3cf35a0f2fdf0a88a3044aafaec1d2f24d8ae8cd87c4f58d615fb5b6311"},
- {file = "typed_ast-1.5.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:fe58ef6a764de7b4b36edfc8592641f56e69b7163bba9f9c8089838ee596bfb2"},
- {file = "typed_ast-1.5.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d09d930c2d1d621f717bb217bf1fe2584616febb5138d9b3e8cdd26506c3f6d4"},
- {file = "typed_ast-1.5.5-cp37-cp37m-win_amd64.whl", hash = "sha256:d40c10326893ecab8a80a53039164a224984339b2c32a6baf55ecbd5b1df6431"},
- {file = "typed_ast-1.5.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:fd946abf3c31fb50eee07451a6aedbfff912fcd13cf357363f5b4e834cc5e71a"},
- {file = "typed_ast-1.5.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ed4a1a42df8a3dfb6b40c3d2de109e935949f2f66b19703eafade03173f8f437"},
- {file = "typed_ast-1.5.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:045f9930a1550d9352464e5149710d56a2aed23a2ffe78946478f7b5416f1ede"},
- {file = "typed_ast-1.5.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:381eed9c95484ceef5ced626355fdc0765ab51d8553fec08661dce654a935db4"},
- {file = "typed_ast-1.5.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:bfd39a41c0ef6f31684daff53befddae608f9daf6957140228a08e51f312d7e6"},
- {file = "typed_ast-1.5.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8c524eb3024edcc04e288db9541fe1f438f82d281e591c548903d5b77ad1ddd4"},
- {file = "typed_ast-1.5.5-cp38-cp38-win_amd64.whl", hash = "sha256:7f58fabdde8dcbe764cef5e1a7fcb440f2463c1bbbec1cf2a86ca7bc1f95184b"},
- {file = "typed_ast-1.5.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:042eb665ff6bf020dd2243307d11ed626306b82812aba21836096d229fdc6a10"},
- {file = "typed_ast-1.5.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:622e4a006472b05cf6ef7f9f2636edc51bda670b7bbffa18d26b255269d3d814"},
- {file = "typed_ast-1.5.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1efebbbf4604ad1283e963e8915daa240cb4bf5067053cf2f0baadc4d4fb51b8"},
- {file = "typed_ast-1.5.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0aefdd66f1784c58f65b502b6cf8b121544680456d1cebbd300c2c813899274"},
- {file = "typed_ast-1.5.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:48074261a842acf825af1968cd912f6f21357316080ebaca5f19abbb11690c8a"},
- {file = "typed_ast-1.5.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:429ae404f69dc94b9361bb62291885894b7c6fb4640d561179548c849f8492ba"},
- {file = "typed_ast-1.5.5-cp39-cp39-win_amd64.whl", hash = "sha256:335f22ccb244da2b5c296e6f96b06ee9bed46526db0de38d2f0e5a6597b81155"},
- {file = "typed_ast-1.5.5.tar.gz", hash = "sha256:94282f7a354f36ef5dbce0ef3467ebf6a258e370ab33d5b40c249fa996e590dd"},
+ {file = "types_python_dateutil-2.9.0.20241206-py3-none-any.whl", hash = "sha256:e248a4bc70a486d3e3ec84d0dc30eec3a5f979d6e7ee4123ae043eedbb987f53"},
+ {file = "types_python_dateutil-2.9.0.20241206.tar.gz", hash = "sha256:18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb"},
]
[[package]]
name = "typing-extensions"
-version = "4.7.1"
-description = "Backported and Experimental Type Hints for Python 3.7+"
+version = "4.13.2"
+description = "Backported and Experimental Type Hints for Python 3.8+"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"},
- {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"},
+ {file = "typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c"},
+ {file = "typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef"},
]
-[[package]]
-name = "zipp"
-version = "3.15.0"
-description = "Backport of pathlib-compatible object wrapper for zip files"
-optional = false
-python-versions = ">=3.7"
-files = [
- {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"},
- {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"},
-]
-
-[package.extras]
-docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"]
-testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
-
[metadata]
lock-version = "2.0"
-python-versions = "^3.7"
-content-hash = "4ac84aae6b05a415337279868d39fe7ce44104dffcd6b159af9e12dcea350ba1"
+python-versions = "^3.8"
+content-hash = "6f6c191c1028d17a97fdfa84cedfd3cef94b5d63d98b8c1d333b3398eeea9055"
diff --git a/pyproject.toml b/pyproject.toml
index cadb28f..72abcc3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,21 +1,63 @@
+[project]
+name = "flagright"
+
[tool.poetry]
name = "flagright"
-version = "1.6.53"
+version = "v1.7.1"
description = ""
readme = "README.md"
authors = []
+keywords = []
+
+classifiers = [
+ "Intended Audience :: Developers",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Operating System :: OS Independent",
+ "Operating System :: POSIX",
+ "Operating System :: MacOS",
+ "Operating System :: POSIX :: Linux",
+ "Operating System :: Microsoft :: Windows",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ "Typing :: Typed"
+]
packages = [
{ include = "flagright", from = "src"}
]
+[project.urls]
+Repository = 'https://github.com/flagright/flagright-python'
+
[tool.poetry.dependencies]
-python = "^3.7"
+python = "^3.8"
httpx = ">=0.21.2"
-pydantic = ">= 1.9.2, < 2.5.0"
+pydantic = ">= 1.9.2"
+pydantic-core = "^2.18.2"
+typing_extensions = ">= 4.0.0"
[tool.poetry.dev-dependencies]
-mypy = "0.971"
+mypy = "1.0.1"
pytest = "^7.4.0"
+pytest-asyncio = "^0.23.5"
+python-dateutil = "^2.9.0"
+types-python-dateutil = "^2.9.0.20240316"
+ruff = "^0.5.6"
+
+[tool.pytest.ini_options]
+testpaths = [ "tests" ]
+asyncio_mode = "auto"
+
+[tool.mypy]
+plugins = ["pydantic.mypy"]
+
+[tool.ruff]
+line-length = 120
+
[build-system]
requires = ["poetry-core"]
diff --git a/reference.md b/reference.md
new file mode 100644
index 0000000..22220da
--- /dev/null
+++ b/reference.md
@@ -0,0 +1,2313 @@
+# Reference
+## Transactions
+client.transactions.verify(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+## POST Transactions
+
+`/transactions` endpoint allows you to operate on the [Transaction entity.](/guides/overview/entities#transaction)
+
+In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+
+### Payload
+
+Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
+
+* `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
+* `transactionId` - Unique Identifier for the transaction.
+* `timestamp` - UNIX timestamp in *milliseconds* of when the transaction took place
+* `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+* `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+* `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+* `originAmountDetails` - Details of the amount being sent from the origin
+* `destinationAmountDetails` - Details of the amount being received at the destination
+* `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+* `destinationPaymentDetails` - Payment details (if any) used at the destination (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import (
+ DeviceData,
+ Flagright,
+ Tag,
+ TransactionAmountDetails,
+ TransactionDestinationPaymentDetails_Card,
+ TransactionOriginPaymentDetails_Card,
+)
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.transactions.verify(
+ type="DEPOSIT",
+ transaction_id="7b80a539eea6e78acbd6d458e5971482",
+ timestamp=1641654664000.0,
+ origin_user_id="8650a2611d0771cba03310f74bf6",
+ destination_user_id="9350a2611e0771cba03310f74bf6",
+ origin_amount_details=TransactionAmountDetails(
+ transaction_amount=800.0,
+ transaction_currency="EUR",
+ country="DE",
+ ),
+ destination_amount_details=TransactionAmountDetails(
+ transaction_amount=68351.34,
+ transaction_currency="INR",
+ country="IN",
+ ),
+ origin_payment_details=TransactionOriginPaymentDetails_Card(
+ card_fingerprint="20ac00fed8ef913aefb17cfae1097cce",
+ card_issued_country="TR",
+ transaction_reference_field="Deposit",
+ f_3_ds_done=True,
+ ),
+ destination_payment_details=TransactionDestinationPaymentDetails_Card(
+ card_fingerprint="20ac00fed8ef913aefb17cfae1097cce",
+ card_issued_country="TR",
+ transaction_reference_field="Deposit",
+ f_3_ds_done=True,
+ ),
+ promotion_code_used=True,
+ reference="loan repayment",
+ origin_device_data=DeviceData(
+ battery_level=95.0,
+ device_latitude=13.0033,
+ device_longitude=76.1004,
+ ip_address="10.23.191.2",
+ device_identifier="3c49f915d04485e34caba",
+ vpn_used=False,
+ operating_system="Android 11.2",
+ device_maker="ASUS",
+ device_model="Zenphone M2 Pro Max",
+ device_year="2018",
+ app_version="1.1.0",
+ ),
+ destination_device_data=DeviceData(
+ battery_level=95.0,
+ device_latitude=13.0033,
+ device_longitude=76.1004,
+ ip_address="10.23.191.2",
+ device_identifier="3c49f915d04485e34caba",
+ vpn_used=False,
+ operating_system="Android 11.2",
+ device_maker="ASUS",
+ device_model="Zenphone M2 Pro Max",
+ device_year="2018",
+ app_version="1.1.0",
+ ),
+ tags=[
+ Tag(
+ key="customKey",
+ value="customValue",
+ )
+ ],
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**type:** `TransactionType`
+
+
+
+
+
+-
+
+**transaction_id:** `str` — Unique transaction identifier
+
+
+
+
+
+-
+
+**timestamp:** `float` — Timestamp of when transaction took place
+
+
+
+
+
+-
+
+**validate_origin_user_id:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should validate if provided originUserId exist. True by default
+
+
+
+
+
+-
+
+**validate_destination_user_id:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+
+
+
+
+
+-
+
+**validate_transaction_id:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should validate if provided transactionId exist. True by default
+
+
+
+
+
+-
+
+**trs_only:** `typing.Optional[BooleanString]`
+
+
+
+
+
+-
+
+**origin_user_id:** `typing.Optional[str]` — UserId for where the transaction originates from
+
+
+
+
+
+-
+
+**destination_user_id:** `typing.Optional[str]` — UserId for transaction's destination. In other words, where the value is being transferred to.
+
+
+
+
+
+-
+
+**transaction_state:** `typing.Optional[TransactionState]`
+
+
+
+
+
+-
+
+**origin_amount_details:** `typing.Optional[TransactionAmountDetails]`
+
+
+
+
+
+-
+
+**destination_amount_details:** `typing.Optional[TransactionAmountDetails]`
+
+
+
+
+
+-
+
+**origin_payment_details:** `typing.Optional[TransactionOriginPaymentDetails]` — Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+
+
+
+
+
+-
+
+**destination_payment_details:** `typing.Optional[TransactionDestinationPaymentDetails]`
+
+
+
+
+
+-
+
+**origin_funds_info:** `typing.Optional[OriginFundsInfo]`
+
+
+
+
+
+-
+
+**related_transaction_ids:** `typing.Optional[typing.Sequence[str]]` — IDs of transactions related to this transaction. Ex: refund, split bills
+
+
+
+
+
+-
+
+**product_type:** `typing.Optional[str]` — Type of produce being used by the consumer (ex wallets, payments etc)
+
+
+
+
+
+-
+
+**promotion_code_used:** `typing.Optional[bool]` — Whether a promotion code was used or not the transaction
+
+
+
+
+
+-
+
+**reference:** `typing.Optional[str]` — Reference field for the transaction indicating the purpose of the transaction etc.
+
+
+
+
+
+-
+
+**origin_device_data:** `typing.Optional[DeviceData]`
+
+
+
+
+
+-
+
+**destination_device_data:** `typing.Optional[DeviceData]`
+
+
+
+
+
+-
+
+**tags:** `typing.Optional[typing.Sequence[Tag]]` — Additional information that can be added via tags
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.transactions.get(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+### GET Transactions
+
+`/transactions` endpoint allows you to operate on the [Transaction entity](/guides/overview/entities#transaction).
+
+Calling `GET /transactions/{transactionId}` will return the entire transaction payload and rule execution results for the transaction with the corresponding `transactionId`
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.transactions.get(
+ transaction_id="transactionId",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**transaction_id:** `str` — Unique Transaction Identifier
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Batch
+client.batch.verify_transaction(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright, Transaction
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.batch.verify_transaction(
+ data=[
+ Transaction(
+ type="DEPOSIT",
+ transaction_id="transactionId",
+ timestamp=1.1,
+ )
+ ],
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**data:** `typing.Sequence[Transaction]`
+
+
+
+
+
+-
+
+**validate_origin_user_id:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should validate if provided originUserId exist. True by default
+
+
+
+
+
+-
+
+**validate_destination_user_id:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+
+
+
+
+
+-
+
+**batch_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.batch.create_transaction_events(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright, TransactionEvent
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.batch.create_transaction_events(
+ data=[
+ TransactionEvent(
+ transaction_state="CREATED",
+ timestamp=1.1,
+ transaction_id="transactionId",
+ )
+ ],
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**data:** `typing.Sequence[TransactionEvent]`
+
+
+
+
+
+-
+
+**batch_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.batch.create_consumer_users(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright, User
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.batch.create_consumer_users(
+ data=[
+ User(
+ user_id="userId",
+ created_timestamp=1.1,
+ )
+ ],
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**data:** `typing.Sequence[User]`
+
+
+
+
+
+-
+
+**batch_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.batch.create_business_users(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Business, CompanyGeneralDetails, Flagright, LegalEntity
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.batch.create_business_users(
+ data=[
+ Business(
+ user_id="userId",
+ created_timestamp=1.1,
+ legal_entity=LegalEntity(
+ company_general_details=CompanyGeneralDetails(
+ legal_name="Ozkan Hazelnut Export JSC",
+ business_industry=["Farming"],
+ main_products_services_sold=["Hazelnut"],
+ ),
+ ),
+ )
+ ],
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**data:** `typing.Sequence[Business]`
+
+
+
+
+
+-
+
+**batch_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.batch.create_consumer_user_events(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import ConsumerUserEvent, Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.batch.create_consumer_user_events(
+ data=[
+ ConsumerUserEvent(
+ timestamp=1.1,
+ user_id="userId",
+ )
+ ],
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**data:** `typing.Sequence[ConsumerUserEvent]`
+
+
+
+
+
+-
+
+**batch_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.batch.create_business_user_events(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import BusinessUserEvent, Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.batch.create_business_user_events(
+ data=[
+ BusinessUserEvent(
+ timestamp=1.1,
+ user_id="userId",
+ )
+ ],
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**data:** `typing.Sequence[BusinessUserEvent]`
+
+
+
+
+
+-
+
+**batch_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## TransactionEvents
+client.transaction_events.create(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+## POST Transaction Events
+
+`/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event)
+
+Transaction events are created after the initial `POST /transactions` call (which creates a transaction) and are used to:
+
+* Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+* Update the transaction details, using the `updatedTransactionAttributes` field.
+
+> If you have neither of the above two use cases, you do not need to use transaction events.
+
+### Payload
+
+Each transaction event needs three mandatory fields:
+
+* `transactionState` - STATE of the transaction -> value is set to `CREATED` after `POST /transactions` call
+* `timestamp`- the timestamp of when the event was created or occured in your system
+* `transactionId` - The ID of the transaction for which this event is generated.
+
+In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import DeviceData, Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.transaction_events.create(
+ transaction_state="SUCCESSFUL",
+ timestamp=1431231244001.0,
+ transaction_id="443dea26147a406b957d9ee3a1247b11",
+ event_id="aaeeb166147a406b957dd9147a406b957",
+ event_description="Transaction created",
+ meta_data=DeviceData(
+ battery_level=76.3,
+ device_latitude=13.009711,
+ device_longitude=76.102898,
+ ip_address="79.144.2.20",
+ vpn_used=True,
+ ),
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**transaction_state:** `TransactionState`
+
+
+
+
+
+-
+
+**timestamp:** `float` — Timestamp of the event
+
+
+
+
+
+-
+
+**transaction_id:** `str` — Transaction ID the event pertains to
+
+
+
+
+
+-
+
+**event_id:** `typing.Optional[str]` — Unique event ID
+
+
+
+
+
+-
+
+**reason:** `typing.Optional[str]` — Reason for the event or a state change
+
+
+
+
+
+-
+
+**event_description:** `typing.Optional[str]` — Event description
+
+
+
+
+
+-
+
+**updated_transaction_attributes:** `typing.Optional[TransactionUpdatable]`
+
+
+
+
+
+-
+
+**meta_data:** `typing.Optional[DeviceData]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.transaction_events.get(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+### GET Transaction Events
+
+`/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event).
+
+You can retrieve any transaction event you created using the [POST Transaction Events](/api-reference/api-reference/transaction-events/create) call.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.transaction_events.get(
+ event_id="eventId",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**event_id:** `str` — Unique Transaction Identifier
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## ConsumerUsers
+client.consumer_users.create(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+## POST Consumer User
+
+`/consumer/user` endpoint allows you to operate on the Consumer user entity.
+
+In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+### Payload
+
+Each consumer user needs two mandatory fields:
+
+* `userId` - Unique identifier for the user
+* `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import (
+ Address,
+ ConsumerName,
+ ContactDetails,
+ Flagright,
+ LegalDocument,
+ Tag,
+ UserDetails,
+ UserTag,
+)
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.consumer_users.create(
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ created_timestamp=1641654664000.0,
+ user_details=UserDetails(
+ name=ConsumerName(
+ first_name="Baran",
+ middle_name="Realblood",
+ last_name="Ozkan",
+ ),
+ date_of_birth="1991-01-01",
+ country_of_residence="US",
+ country_of_nationality="DE",
+ ),
+ legal_documents=[
+ LegalDocument(
+ document_type="passport",
+ document_number="Z9431P",
+ document_issued_date=1639939034000.0,
+ document_expiration_date=1839939034000.0,
+ document_issued_country="DE",
+ tags=[
+ Tag(
+ key="customerType",
+ value="wallet",
+ )
+ ],
+ )
+ ],
+ contact_details=ContactDetails(
+ email_ids=["baran@flagright.com"],
+ contact_numbers=["+37112345432"],
+ websites=["flagright.com"],
+ addresses=[
+ Address(
+ address_lines=["Klara-Franke Str 20"],
+ postcode="10557",
+ city="Berlin",
+ state="Berlin",
+ country="Germany",
+ tags=[
+ Tag(
+ key="customKey",
+ value="customValue",
+ )
+ ],
+ )
+ ],
+ ),
+ tags=[
+ UserTag(
+ key="customKey",
+ value="customValue",
+ )
+ ],
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**user_id:** `str` — Unique user ID
+
+
+
+
+
+-
+
+**created_timestamp:** `float` — Timestamp when userId is created
+
+
+
+
+
+-
+
+**lock_cra_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the CRA risk level for the user.
+
+
+
+
+
+-
+
+**lock_kyc_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the KYC risk level for the user.
+
+
+
+
+
+-
+
+**validate_user_id:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should validate the userId
+
+
+
+
+
+-
+
+**krs_only:** `typing.Optional[BooleanString]`
+
+
+
+
+
+-
+
+**activated_timestamp:** `typing.Optional[float]` — Timestamp when user was activated
+
+
+
+
+
+-
+
+**user_details:** `typing.Optional[UserDetails]`
+
+
+
+
+
+-
+
+**user_state_details:** `typing.Optional[UserStateDetails]`
+
+
+
+
+
+-
+
+**kyc_status_details:** `typing.Optional[KycStatusDetails]`
+
+
+
+
+
+-
+
+**eodd_date:** `typing.Optional[float]`
+
+
+
+
+
+-
+
+**employment_status:** `typing.Optional[EmploymentStatus]`
+
+
+
+
+
+-
+
+**occupation:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**legal_documents:** `typing.Optional[typing.Sequence[LegalDocument]]` — User's legal identity documents - See Document Model for details
+
+
+
+
+
+-
+
+**contact_details:** `typing.Optional[ContactDetails]`
+
+
+
+
+
+-
+
+**employment_details:** `typing.Optional[EmploymentDetails]`
+
+
+
+
+
+-
+
+**transaction_limits:** `typing.Optional[TransactionLimits]`
+
+
+
+
+
+-
+
+**expected_income:** `typing.Optional[ExpectedIncome]`
+
+
+
+
+
+-
+
+**risk_level:** `typing.Optional[RiskLevel]`
+
+
+
+
+
+-
+
+**kyc_risk_level:** `typing.Optional[RiskLevel]`
+
+
+
+
+
+-
+
+**acquisition_channel:** `typing.Optional[AcquisitionChannel]`
+
+
+
+
+
+-
+
+**reason_for_account_opening:** `typing.Optional[typing.Sequence[str]]`
+
+
+
+
+
+-
+
+**source_of_funds:** `typing.Optional[typing.Sequence[SourceOfFunds]]`
+
+
+
+
+
+-
+
+**user_segment:** `typing.Optional[ConsumerUserSegment]`
+
+
+
+
+
+-
+
+**pep_status:** `typing.Optional[typing.Sequence[PepStatus]]`
+
+
+
+
+
+-
+
+**last_transaction_timestamp:** `typing.Optional[float]` — Timestamp of the last successful transaction of the user
+
+
+
+
+
+-
+
+**linked_entities:** `typing.Optional[UserEntityLink]`
+
+
+
+
+
+-
+
+**saved_payment_details:** `typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]]`
+
+
+
+
+
+-
+
+**tags:** `typing.Optional[typing.Sequence[UserTag]]` — Additional information that can be added via tags
+
+
+
+
+
+-
+
+**attachments:** `typing.Optional[typing.Sequence[PersonAttachment]]` — Uploaded user's attachment
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.consumer_users.get(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+### GET Consumer User
+
+`/consumer/user` endpoint allows you to operate on the Consumer User entity.
+
+Calling `GET /consumer/user/{userId}` will return the entire user payload and rule execution results for the user with the corresponding `userId`
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.consumer_users.get(
+ user_id="userId",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**user_id:** `str` —
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## BusinessUsers
+client.business_users.create(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+## POST Business User
+
+`/business/user` endpoint allows you to operate on the Business user entity.
+
+In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+### Payload
+
+
+Each business user needs three mandatory fields:
+
+* `userId` - Unique identifier for the user
+* `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
+* `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import CompanyGeneralDetails, Flagright, LegalEntity
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.business_users.create(
+ user_id="userId",
+ created_timestamp=1.1,
+ legal_entity=LegalEntity(
+ company_general_details=CompanyGeneralDetails(
+ legal_name="Ozkan Hazelnut Export JSC",
+ business_industry=["Farming"],
+ main_products_services_sold=["Hazelnut"],
+ ),
+ ),
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**user_id:** `str` — Unique user ID for the user
+
+
+
+
+
+-
+
+**created_timestamp:** `float` — Timestamp when the user was created
+
+
+
+
+
+-
+
+**legal_entity:** `LegalEntity`
+
+
+
+
+
+-
+
+**lock_cra_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the CRA risk level for the user.
+
+
+
+
+
+-
+
+**lock_kyc_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the KYC risk level for the user.
+
+
+
+
+
+-
+
+**validate_user_id:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should validate the userId
+
+
+
+
+
+-
+
+**krs_only:** `typing.Optional[BooleanString]`
+
+
+
+
+
+-
+
+**activated_timestamp:** `typing.Optional[float]` — Timestamp when the user was activated
+
+
+
+
+
+-
+
+**user_state_details:** `typing.Optional[UserStateDetails]`
+
+
+
+
+
+-
+
+**kyc_status_details:** `typing.Optional[KycStatusDetails]`
+
+
+
+
+
+-
+
+**share_holders:** `typing.Optional[typing.Sequence[Person]]` — Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
+
+
+
+
+
+-
+
+**directors:** `typing.Optional[typing.Sequence[Person]]` — Director(s) of the company. Must be at least one
+
+
+
+
+
+-
+
+**transaction_limits:** `typing.Optional[TransactionLimits]`
+
+
+
+
+
+-
+
+**risk_level:** `typing.Optional[RiskLevel]`
+
+
+
+
+
+-
+
+**kyc_risk_level:** `typing.Optional[RiskLevel]`
+
+
+
+
+
+-
+
+**allowed_payment_methods:** `typing.Optional[typing.Sequence[PaymentMethod]]`
+
+
+
+
+
+-
+
+**last_transaction_timestamp:** `typing.Optional[float]` — Timestamp of the last successful transaction of the user
+
+
+
+
+
+-
+
+**linked_entities:** `typing.Optional[UserEntityLink]`
+
+
+
+
+
+-
+
+**acquisition_channel:** `typing.Optional[AcquisitionChannel]`
+
+
+
+
+
+-
+
+**saved_payment_details:** `typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]]`
+
+
+
+
+
+-
+
+**mcc_details:** `typing.Optional[MccDetails]`
+
+
+
+
+
+-
+
+**tags:** `typing.Optional[typing.Sequence[UserTag]]` — Additional information that can be added via tags
+
+
+
+
+
+-
+
+**attachments:** `typing.Optional[typing.Sequence[PersonAttachment]]` — User's attachments uploaded by business user
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.business_users.get(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+### GET Business User
+
+`/business/user` endpoint allows you to operate on the Business User entity.
+
+Calling `GET /business/user/{userId}` will return the entire User payload and rule execution results for the User with the corresponding `userId`
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.business_users.get(
+ user_id="userId",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**user_id:** `str` —
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## ConsumerUserEvents
+client.consumer_user_events.create(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+## POST Consumer User Events
+
+`/events/consumer/user` endpoint allows you to operate on the Consumer User Events entity.
+
+User events are created after the initial `POST /consumer/users` call (which creates a user) and are used to:
+
+* Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+* Update the user details, using the `updatedConsumerUserAttributes` field.
+
+> If you have neither of the above two use cases, you do not need to use user events.
+
+### Payload
+
+Each user event needs three mandatory fields:
+
+* `timestamp`- the timestamp of when the event was created or occured in your system
+* `userId` - The ID of the transaction for which this event is generated.
+
+In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.consumer_user_events.create(
+ timestamp=1.1,
+ user_id="userId",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**timestamp:** `float` — Timestamp of the event
+
+
+
+
+
+-
+
+**user_id:** `str` — Transaction ID the event pertains to
+
+
+
+
+
+-
+
+**allow_user_type_conversion:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should allow a Consumer user event to be applied to a Business user with the same user ID. This will converts a Business user to a Consumer user.
+
+
+
+
+
+-
+
+**lock_kyc_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the KYC risk level for the user.
+
+
+
+
+
+-
+
+**lock_cra_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the CRA risk level for the user.
+
+
+
+
+
+-
+
+**event_id:** `typing.Optional[str]` — Unique event ID
+
+
+
+
+
+-
+
+**reason:** `typing.Optional[str]` — Reason for the event or a state change
+
+
+
+
+
+-
+
+**event_description:** `typing.Optional[str]` — Event description
+
+
+
+
+
+-
+
+**updated_consumer_user_attributes:** `typing.Optional[UserOptional]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.consumer_user_events.get(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+### GET a Consumer User Event
+You can retrieve any consumer user event you created using the [POST Consumer User Events](/api-reference/api-reference/consumer-user-events/create) call.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.consumer_user_events.get(
+ event_id="eventId",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**event_id:** `str` — Unique Consumer User Event Identifier
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## BusinessUserEvents
+client.business_user_events.create(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+## POST Business User Events
+
+`/events/business/user` endpoint allows you to operate on the Business User Events entity.
+
+User events are created after the initial `POST /business/users` call (which creates a user) and are used to:
+
+* Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+* Update the user details, using the `updatedBusinessUserAttributes` field.
+
+> If you have neither of the above two use cases, you do not need to use user events.
+
+### Payload
+
+Each user event needs three mandatory fields:
+
+* `timestamp`- the timestamp of when the event was created or occured in your system
+* `userId` - The ID of the transaction for which this event is generated.
+
+In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.business_user_events.create(
+ timestamp=1.1,
+ user_id="userId",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**timestamp:** `float` — Timestamp of the event
+
+
+
+
+
+-
+
+**user_id:** `str` — Transaction ID the event pertains to
+
+
+
+
+
+-
+
+**allow_user_type_conversion:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should allow a Business user event to be applied to a Consumer user with the same user ID. This will converts a Consumer user to a Business user.
+
+
+
+
+
+-
+
+**lock_kyc_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the KYC risk level for the user.
+
+
+
+
+
+-
+
+**lock_cra_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the CRA risk level for the user.
+
+
+
+
+
+-
+
+**event_id:** `typing.Optional[str]` — Unique event ID
+
+
+
+
+
+-
+
+**reason:** `typing.Optional[str]` — Reason for the event or a state change
+
+
+
+
+
+-
+
+**event_description:** `typing.Optional[str]` — Event description
+
+
+
+
+
+-
+
+**updated_business_user_attributes:** `typing.Optional[BusinessOptional]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.business_user_events.get(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+### GET a Business User Event
+You can retrieve any business user event you created using the [POST Business User Events](/api-reference/api-reference/business-user-events/create) call.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.business_user_events.get(
+ event_id="eventId",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**event_id:** `str` — Unique Business User Event Identifier
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..f502f1b
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,4 @@
+httpx>=0.21.2
+pydantic>= 1.9.2
+pydantic-core==^2.18.2
+typing_extensions>= 4.0.0
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 5cbf059..3988541 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -290,10 +290,7 @@
WebhookEventType,
)
from .errors import BadRequestError, ConflictError, TooManyRequestsError, UnauthorizedError
-from .resources import (
- BusinessUsersCreateResponse,
- ConsumerUsersCreateResponse,
- TransactionsVerifyResponse,
+from . import (
batch,
business_user_events,
business_users,
@@ -302,7 +299,12 @@
transaction_events,
transactions,
)
+from .business_users import BusinessUsersCreateResponse
+from .client import AsyncFlagright, Flagright
+from .consumer_users import ConsumerUsersCreateResponse
from .environment import FlagrightEnvironment
+from .transactions import TransactionsVerifyResponse
+from .version import __version__
__all__ = [
"AchDetails",
@@ -313,6 +315,7 @@
"AlertOpenedDetails",
"Amount",
"ApiErrorResponse",
+ "AsyncFlagright",
"BadRequestError",
"BatchResponse",
"BatchResponseFailedRecord",
@@ -403,6 +406,7 @@
"FailedRulesResult",
"FalsePositiveDetails",
"FileInfo",
+ "Flagright",
"FlagrightEnvironment",
"Gender",
"GeneralBankAccountPaymentMethod",
@@ -600,6 +604,7 @@
"WebhookEventData",
"WebhookEventTriggeredBy",
"WebhookEventType",
+ "__version__",
"batch",
"business_user_events",
"business_users",
diff --git a/src/flagright/resources/batch/__init__.py b/src/flagright/batch/__init__.py
similarity index 100%
rename from src/flagright/resources/batch/__init__.py
rename to src/flagright/batch/__init__.py
diff --git a/src/flagright/batch/client.py b/src/flagright/batch/client.py
new file mode 100644
index 0000000..5d61df1
--- /dev/null
+++ b/src/flagright/batch/client.py
@@ -0,0 +1,658 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from .raw_client import RawBatchClient
+from ..types.transaction import Transaction
+from ..types.boolean_string import BooleanString
+from ..core.request_options import RequestOptions
+from ..types.batch_response import BatchResponse
+from ..types.transaction_event import TransactionEvent
+from ..types.user import User
+from ..types.business import Business
+from ..types.consumer_user_event import ConsumerUserEvent
+from ..types.business_user_event import BusinessUserEvent
+from ..core.client_wrapper import AsyncClientWrapper
+from .raw_client import AsyncRawBatchClient
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class BatchClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._raw_client = RawBatchClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> RawBatchClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ RawBatchClient
+ """
+ return self._raw_client
+
+ def verify_transaction(
+ self,
+ *,
+ data: typing.Sequence[Transaction],
+ validate_origin_user_id: typing.Optional[BooleanString] = None,
+ validate_destination_user_id: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[Transaction]
+
+ validate_origin_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided originUserId exist. True by default
+
+ validate_destination_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ from flagright import Flagright, Transaction
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.verify_transaction(
+ data=[
+ Transaction(
+ type="DEPOSIT",
+ transaction_id="transactionId",
+ timestamp=1.1,
+ )
+ ],
+ )
+ """
+ response = self._raw_client.verify_transaction(
+ data=data,
+ validate_origin_user_id=validate_origin_user_id,
+ validate_destination_user_id=validate_destination_user_id,
+ batch_id=batch_id,
+ request_options=request_options,
+ )
+ return response.data
+
+ def create_transaction_events(
+ self,
+ *,
+ data: typing.Sequence[TransactionEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[TransactionEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ from flagright import Flagright, TransactionEvent
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.create_transaction_events(
+ data=[
+ TransactionEvent(
+ transaction_state="CREATED",
+ timestamp=1.1,
+ transaction_id="transactionId",
+ )
+ ],
+ )
+ """
+ response = self._raw_client.create_transaction_events(
+ data=data, batch_id=batch_id, request_options=request_options
+ )
+ return response.data
+
+ def create_consumer_users(
+ self,
+ *,
+ data: typing.Sequence[User],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[User]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ from flagright import Flagright, User
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.create_consumer_users(
+ data=[
+ User(
+ user_id="userId",
+ created_timestamp=1.1,
+ )
+ ],
+ )
+ """
+ response = self._raw_client.create_consumer_users(data=data, batch_id=batch_id, request_options=request_options)
+ return response.data
+
+ def create_business_users(
+ self,
+ *,
+ data: typing.Sequence[Business],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[Business]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ from flagright import Business, CompanyGeneralDetails, Flagright, LegalEntity
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.create_business_users(
+ data=[
+ Business(
+ user_id="userId",
+ created_timestamp=1.1,
+ legal_entity=LegalEntity(
+ company_general_details=CompanyGeneralDetails(
+ legal_name="Ozkan Hazelnut Export JSC",
+ business_industry=["Farming"],
+ main_products_services_sold=["Hazelnut"],
+ ),
+ ),
+ )
+ ],
+ )
+ """
+ response = self._raw_client.create_business_users(data=data, batch_id=batch_id, request_options=request_options)
+ return response.data
+
+ def create_consumer_user_events(
+ self,
+ *,
+ data: typing.Sequence[ConsumerUserEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[ConsumerUserEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ from flagright import ConsumerUserEvent, Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.create_consumer_user_events(
+ data=[
+ ConsumerUserEvent(
+ timestamp=1.1,
+ user_id="userId",
+ )
+ ],
+ )
+ """
+ response = self._raw_client.create_consumer_user_events(
+ data=data, batch_id=batch_id, request_options=request_options
+ )
+ return response.data
+
+ def create_business_user_events(
+ self,
+ *,
+ data: typing.Sequence[BusinessUserEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[BusinessUserEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ from flagright import BusinessUserEvent, Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.create_business_user_events(
+ data=[
+ BusinessUserEvent(
+ timestamp=1.1,
+ user_id="userId",
+ )
+ ],
+ )
+ """
+ response = self._raw_client.create_business_user_events(
+ data=data, batch_id=batch_id, request_options=request_options
+ )
+ return response.data
+
+
+class AsyncBatchClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._raw_client = AsyncRawBatchClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> AsyncRawBatchClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ AsyncRawBatchClient
+ """
+ return self._raw_client
+
+ async def verify_transaction(
+ self,
+ *,
+ data: typing.Sequence[Transaction],
+ validate_origin_user_id: typing.Optional[BooleanString] = None,
+ validate_destination_user_id: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[Transaction]
+
+ validate_origin_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided originUserId exist. True by default
+
+ validate_destination_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright, Transaction
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.verify_transaction(
+ data=[
+ Transaction(
+ type="DEPOSIT",
+ transaction_id="transactionId",
+ timestamp=1.1,
+ )
+ ],
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.verify_transaction(
+ data=data,
+ validate_origin_user_id=validate_origin_user_id,
+ validate_destination_user_id=validate_destination_user_id,
+ batch_id=batch_id,
+ request_options=request_options,
+ )
+ return response.data
+
+ async def create_transaction_events(
+ self,
+ *,
+ data: typing.Sequence[TransactionEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[TransactionEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright, TransactionEvent
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.create_transaction_events(
+ data=[
+ TransactionEvent(
+ transaction_state="CREATED",
+ timestamp=1.1,
+ transaction_id="transactionId",
+ )
+ ],
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.create_transaction_events(
+ data=data, batch_id=batch_id, request_options=request_options
+ )
+ return response.data
+
+ async def create_consumer_users(
+ self,
+ *,
+ data: typing.Sequence[User],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[User]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright, User
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.create_consumer_users(
+ data=[
+ User(
+ user_id="userId",
+ created_timestamp=1.1,
+ )
+ ],
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.create_consumer_users(
+ data=data, batch_id=batch_id, request_options=request_options
+ )
+ return response.data
+
+ async def create_business_users(
+ self,
+ *,
+ data: typing.Sequence[Business],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[Business]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import (
+ AsyncFlagright,
+ Business,
+ CompanyGeneralDetails,
+ LegalEntity,
+ )
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.create_business_users(
+ data=[
+ Business(
+ user_id="userId",
+ created_timestamp=1.1,
+ legal_entity=LegalEntity(
+ company_general_details=CompanyGeneralDetails(
+ legal_name="Ozkan Hazelnut Export JSC",
+ business_industry=["Farming"],
+ main_products_services_sold=["Hazelnut"],
+ ),
+ ),
+ )
+ ],
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.create_business_users(
+ data=data, batch_id=batch_id, request_options=request_options
+ )
+ return response.data
+
+ async def create_consumer_user_events(
+ self,
+ *,
+ data: typing.Sequence[ConsumerUserEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[ConsumerUserEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright, ConsumerUserEvent
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.create_consumer_user_events(
+ data=[
+ ConsumerUserEvent(
+ timestamp=1.1,
+ user_id="userId",
+ )
+ ],
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.create_consumer_user_events(
+ data=data, batch_id=batch_id, request_options=request_options
+ )
+ return response.data
+
+ async def create_business_user_events(
+ self,
+ *,
+ data: typing.Sequence[BusinessUserEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[BusinessUserEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright, BusinessUserEvent
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.create_business_user_events(
+ data=[
+ BusinessUserEvent(
+ timestamp=1.1,
+ user_id="userId",
+ )
+ ],
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.create_business_user_events(
+ data=data, batch_id=batch_id, request_options=request_options
+ )
+ return response.data
diff --git a/src/flagright/batch/raw_client.py b/src/flagright/batch/raw_client.py
new file mode 100644
index 0000000..638e1ee
--- /dev/null
+++ b/src/flagright/batch/raw_client.py
@@ -0,0 +1,1066 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from ..types.transaction import Transaction
+from ..types.boolean_string import BooleanString
+from ..core.request_options import RequestOptions
+from ..core.http_response import HttpResponse
+from ..types.batch_response import BatchResponse
+from ..core.serialization import convert_and_respect_annotation_metadata
+from ..core.pydantic_utilities import parse_obj_as
+from ..errors.bad_request_error import BadRequestError
+from ..types.api_error_response import ApiErrorResponse
+from ..errors.unauthorized_error import UnauthorizedError
+from ..errors.too_many_requests_error import TooManyRequestsError
+from json.decoder import JSONDecodeError
+from ..core.api_error import ApiError
+from ..types.transaction_event import TransactionEvent
+from ..errors.conflict_error import ConflictError
+from ..types.user import User
+from ..types.business import Business
+from ..types.consumer_user_event import ConsumerUserEvent
+from ..types.business_user_event import BusinessUserEvent
+from ..core.client_wrapper import AsyncClientWrapper
+from ..core.http_response import AsyncHttpResponse
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class RawBatchClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ def verify_transaction(
+ self,
+ *,
+ data: typing.Sequence[Transaction],
+ validate_origin_user_id: typing.Optional[BooleanString] = None,
+ validate_destination_user_id: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[Transaction]
+
+ validate_origin_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided originUserId exist. True by default
+
+ validate_destination_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[BatchResponse]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "batch/transactions",
+ method="POST",
+ params={
+ "validateOriginUserId": validate_origin_user_id,
+ "validateDestinationUserId": validate_destination_user_id,
+ },
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[Transaction], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def create_transaction_events(
+ self,
+ *,
+ data: typing.Sequence[TransactionEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[TransactionEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[BatchResponse]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "batch/events/transaction",
+ method="POST",
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[TransactionEvent], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 409:
+ raise ConflictError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def create_consumer_users(
+ self,
+ *,
+ data: typing.Sequence[User],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[User]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[BatchResponse]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "batch/consumer/users",
+ method="POST",
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[User], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def create_business_users(
+ self,
+ *,
+ data: typing.Sequence[Business],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[Business]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[BatchResponse]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "batch/business/users",
+ method="POST",
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[Business], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def create_consumer_user_events(
+ self,
+ *,
+ data: typing.Sequence[ConsumerUserEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[ConsumerUserEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[BatchResponse]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "batch/events/consumer/user",
+ method="POST",
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[ConsumerUserEvent], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def create_business_user_events(
+ self,
+ *,
+ data: typing.Sequence[BusinessUserEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[BusinessUserEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[BatchResponse]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "batch/events/business/user",
+ method="POST",
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[BusinessUserEvent], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+
+class AsyncRawBatchClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def verify_transaction(
+ self,
+ *,
+ data: typing.Sequence[Transaction],
+ validate_origin_user_id: typing.Optional[BooleanString] = None,
+ validate_destination_user_id: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[Transaction]
+
+ validate_origin_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided originUserId exist. True by default
+
+ validate_destination_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchResponse]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "batch/transactions",
+ method="POST",
+ params={
+ "validateOriginUserId": validate_origin_user_id,
+ "validateDestinationUserId": validate_destination_user_id,
+ },
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[Transaction], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def create_transaction_events(
+ self,
+ *,
+ data: typing.Sequence[TransactionEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[TransactionEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchResponse]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "batch/events/transaction",
+ method="POST",
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[TransactionEvent], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 409:
+ raise ConflictError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def create_consumer_users(
+ self,
+ *,
+ data: typing.Sequence[User],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[User]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchResponse]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "batch/consumer/users",
+ method="POST",
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[User], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def create_business_users(
+ self,
+ *,
+ data: typing.Sequence[Business],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[Business]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchResponse]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "batch/business/users",
+ method="POST",
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[Business], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def create_consumer_user_events(
+ self,
+ *,
+ data: typing.Sequence[ConsumerUserEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[ConsumerUserEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchResponse]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "batch/events/consumer/user",
+ method="POST",
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[ConsumerUserEvent], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def create_business_user_events(
+ self,
+ *,
+ data: typing.Sequence[BusinessUserEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[BusinessUserEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchResponse]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "batch/events/business/user",
+ method="POST",
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[BusinessUserEvent], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/business_user_events/__init__.py b/src/flagright/business_user_events/__init__.py
similarity index 100%
rename from src/flagright/resources/business_user_events/__init__.py
rename to src/flagright/business_user_events/__init__.py
diff --git a/src/flagright/business_user_events/client.py b/src/flagright/business_user_events/client.py
new file mode 100644
index 0000000..7c7f1a4
--- /dev/null
+++ b/src/flagright/business_user_events/client.py
@@ -0,0 +1,325 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from .raw_client import RawBusinessUserEventsClient
+from ..types.boolean_string import BooleanString
+from ..types.business_optional import BusinessOptional
+from ..core.request_options import RequestOptions
+from ..types.business_with_rules_result import BusinessWithRulesResult
+from ..types.business_user_event_with_rules_result import BusinessUserEventWithRulesResult
+from ..core.client_wrapper import AsyncClientWrapper
+from .raw_client import AsyncRawBusinessUserEventsClient
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class BusinessUserEventsClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._raw_client = RawBusinessUserEventsClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> RawBusinessUserEventsClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ RawBusinessUserEventsClient
+ """
+ return self._raw_client
+
+ def create(
+ self,
+ *,
+ timestamp: float,
+ user_id: str,
+ allow_user_type_conversion: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ event_id: typing.Optional[str] = OMIT,
+ reason: typing.Optional[str] = OMIT,
+ event_description: typing.Optional[str] = OMIT,
+ updated_business_user_attributes: typing.Optional[BusinessOptional] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BusinessWithRulesResult:
+ """
+ ## POST Business User Events
+
+ `/events/business/user` endpoint allows you to operate on the Business User Events entity.
+
+ User events are created after the initial `POST /business/users` call (which creates a user) and are used to:
+
+ * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+ * Update the user details, using the `updatedBusinessUserAttributes` field.
+
+ > If you have neither of the above two use cases, you do not need to use user events.
+
+ ### Payload
+
+ Each user event needs three mandatory fields:
+
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `userId` - The ID of the transaction for which this event is generated.
+
+ In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+ Parameters
+ ----------
+ timestamp : float
+ Timestamp of the event
+
+ user_id : str
+ Transaction ID the event pertains to
+
+ allow_user_type_conversion : typing.Optional[BooleanString]
+ Boolean string whether Flagright should allow a Business user event to be applied to a Consumer user with the same user ID. This will converts a Consumer user to a Business user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ event_id : typing.Optional[str]
+ Unique event ID
+
+ reason : typing.Optional[str]
+ Reason for the event or a state change
+
+ event_description : typing.Optional[str]
+ Event description
+
+ updated_business_user_attributes : typing.Optional[BusinessOptional]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BusinessWithRulesResult
+ Created
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.business_user_events.create(
+ timestamp=1.1,
+ user_id="userId",
+ )
+ """
+ response = self._raw_client.create(
+ timestamp=timestamp,
+ user_id=user_id,
+ allow_user_type_conversion=allow_user_type_conversion,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ lock_cra_risk_level=lock_cra_risk_level,
+ event_id=event_id,
+ reason=reason,
+ event_description=event_description,
+ updated_business_user_attributes=updated_business_user_attributes,
+ request_options=request_options,
+ )
+ return response.data
+
+ def get(
+ self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> BusinessUserEventWithRulesResult:
+ """
+ ### GET a Business User Event
+ You can retrieve any business user event you created using the [POST Business User Events](/api-reference/api-reference/business-user-events/create) call.
+
+ Parameters
+ ----------
+ event_id : str
+ Unique Business User Event Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BusinessUserEventWithRulesResult
+ OK
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.business_user_events.get(
+ event_id="eventId",
+ )
+ """
+ response = self._raw_client.get(event_id, request_options=request_options)
+ return response.data
+
+
+class AsyncBusinessUserEventsClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._raw_client = AsyncRawBusinessUserEventsClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> AsyncRawBusinessUserEventsClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ AsyncRawBusinessUserEventsClient
+ """
+ return self._raw_client
+
+ async def create(
+ self,
+ *,
+ timestamp: float,
+ user_id: str,
+ allow_user_type_conversion: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ event_id: typing.Optional[str] = OMIT,
+ reason: typing.Optional[str] = OMIT,
+ event_description: typing.Optional[str] = OMIT,
+ updated_business_user_attributes: typing.Optional[BusinessOptional] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BusinessWithRulesResult:
+ """
+ ## POST Business User Events
+
+ `/events/business/user` endpoint allows you to operate on the Business User Events entity.
+
+ User events are created after the initial `POST /business/users` call (which creates a user) and are used to:
+
+ * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+ * Update the user details, using the `updatedBusinessUserAttributes` field.
+
+ > If you have neither of the above two use cases, you do not need to use user events.
+
+ ### Payload
+
+ Each user event needs three mandatory fields:
+
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `userId` - The ID of the transaction for which this event is generated.
+
+ In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+ Parameters
+ ----------
+ timestamp : float
+ Timestamp of the event
+
+ user_id : str
+ Transaction ID the event pertains to
+
+ allow_user_type_conversion : typing.Optional[BooleanString]
+ Boolean string whether Flagright should allow a Business user event to be applied to a Consumer user with the same user ID. This will converts a Consumer user to a Business user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ event_id : typing.Optional[str]
+ Unique event ID
+
+ reason : typing.Optional[str]
+ Reason for the event or a state change
+
+ event_description : typing.Optional[str]
+ Event description
+
+ updated_business_user_attributes : typing.Optional[BusinessOptional]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BusinessWithRulesResult
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.business_user_events.create(
+ timestamp=1.1,
+ user_id="userId",
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.create(
+ timestamp=timestamp,
+ user_id=user_id,
+ allow_user_type_conversion=allow_user_type_conversion,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ lock_cra_risk_level=lock_cra_risk_level,
+ event_id=event_id,
+ reason=reason,
+ event_description=event_description,
+ updated_business_user_attributes=updated_business_user_attributes,
+ request_options=request_options,
+ )
+ return response.data
+
+ async def get(
+ self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> BusinessUserEventWithRulesResult:
+ """
+ ### GET a Business User Event
+ You can retrieve any business user event you created using the [POST Business User Events](/api-reference/api-reference/business-user-events/create) call.
+
+ Parameters
+ ----------
+ event_id : str
+ Unique Business User Event Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BusinessUserEventWithRulesResult
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.business_user_events.get(
+ event_id="eventId",
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.get(event_id, request_options=request_options)
+ return response.data
diff --git a/src/flagright/business_user_events/raw_client.py b/src/flagright/business_user_events/raw_client.py
new file mode 100644
index 0000000..9348a86
--- /dev/null
+++ b/src/flagright/business_user_events/raw_client.py
@@ -0,0 +1,469 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from ..types.boolean_string import BooleanString
+from ..types.business_optional import BusinessOptional
+from ..core.request_options import RequestOptions
+from ..core.http_response import HttpResponse
+from ..types.business_with_rules_result import BusinessWithRulesResult
+from ..core.serialization import convert_and_respect_annotation_metadata
+from ..core.pydantic_utilities import parse_obj_as
+from ..errors.bad_request_error import BadRequestError
+from ..types.api_error_response import ApiErrorResponse
+from ..errors.unauthorized_error import UnauthorizedError
+from ..errors.conflict_error import ConflictError
+from ..errors.too_many_requests_error import TooManyRequestsError
+from json.decoder import JSONDecodeError
+from ..core.api_error import ApiError
+from ..types.business_user_event_with_rules_result import BusinessUserEventWithRulesResult
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.client_wrapper import AsyncClientWrapper
+from ..core.http_response import AsyncHttpResponse
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class RawBusinessUserEventsClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ def create(
+ self,
+ *,
+ timestamp: float,
+ user_id: str,
+ allow_user_type_conversion: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ event_id: typing.Optional[str] = OMIT,
+ reason: typing.Optional[str] = OMIT,
+ event_description: typing.Optional[str] = OMIT,
+ updated_business_user_attributes: typing.Optional[BusinessOptional] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[BusinessWithRulesResult]:
+ """
+ ## POST Business User Events
+
+ `/events/business/user` endpoint allows you to operate on the Business User Events entity.
+
+ User events are created after the initial `POST /business/users` call (which creates a user) and are used to:
+
+ * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+ * Update the user details, using the `updatedBusinessUserAttributes` field.
+
+ > If you have neither of the above two use cases, you do not need to use user events.
+
+ ### Payload
+
+ Each user event needs three mandatory fields:
+
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `userId` - The ID of the transaction for which this event is generated.
+
+ In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+ Parameters
+ ----------
+ timestamp : float
+ Timestamp of the event
+
+ user_id : str
+ Transaction ID the event pertains to
+
+ allow_user_type_conversion : typing.Optional[BooleanString]
+ Boolean string whether Flagright should allow a Business user event to be applied to a Consumer user with the same user ID. This will converts a Consumer user to a Business user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ event_id : typing.Optional[str]
+ Unique event ID
+
+ reason : typing.Optional[str]
+ Reason for the event or a state change
+
+ event_description : typing.Optional[str]
+ Event description
+
+ updated_business_user_attributes : typing.Optional[BusinessOptional]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[BusinessWithRulesResult]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "events/business/user",
+ method="POST",
+ params={
+ "allowUserTypeConversion": allow_user_type_conversion,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ },
+ json={
+ "timestamp": timestamp,
+ "userId": user_id,
+ "eventId": event_id,
+ "reason": reason,
+ "eventDescription": event_description,
+ "updatedBusinessUserAttributes": convert_and_respect_annotation_metadata(
+ object_=updated_business_user_attributes, annotation=BusinessOptional, direction="write"
+ ),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BusinessWithRulesResult,
+ parse_obj_as(
+ type_=BusinessWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 409:
+ raise ConflictError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def get(
+ self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[BusinessUserEventWithRulesResult]:
+ """
+ ### GET a Business User Event
+ You can retrieve any business user event you created using the [POST Business User Events](/api-reference/api-reference/business-user-events/create) call.
+
+ Parameters
+ ----------
+ event_id : str
+ Unique Business User Event Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[BusinessUserEventWithRulesResult]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"events/business/user/{jsonable_encoder(event_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BusinessUserEventWithRulesResult,
+ parse_obj_as(
+ type_=BusinessUserEventWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+
+class AsyncRawBusinessUserEventsClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def create(
+ self,
+ *,
+ timestamp: float,
+ user_id: str,
+ allow_user_type_conversion: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ event_id: typing.Optional[str] = OMIT,
+ reason: typing.Optional[str] = OMIT,
+ event_description: typing.Optional[str] = OMIT,
+ updated_business_user_attributes: typing.Optional[BusinessOptional] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BusinessWithRulesResult]:
+ """
+ ## POST Business User Events
+
+ `/events/business/user` endpoint allows you to operate on the Business User Events entity.
+
+ User events are created after the initial `POST /business/users` call (which creates a user) and are used to:
+
+ * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+ * Update the user details, using the `updatedBusinessUserAttributes` field.
+
+ > If you have neither of the above two use cases, you do not need to use user events.
+
+ ### Payload
+
+ Each user event needs three mandatory fields:
+
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `userId` - The ID of the transaction for which this event is generated.
+
+ In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+ Parameters
+ ----------
+ timestamp : float
+ Timestamp of the event
+
+ user_id : str
+ Transaction ID the event pertains to
+
+ allow_user_type_conversion : typing.Optional[BooleanString]
+ Boolean string whether Flagright should allow a Business user event to be applied to a Consumer user with the same user ID. This will converts a Consumer user to a Business user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ event_id : typing.Optional[str]
+ Unique event ID
+
+ reason : typing.Optional[str]
+ Reason for the event or a state change
+
+ event_description : typing.Optional[str]
+ Event description
+
+ updated_business_user_attributes : typing.Optional[BusinessOptional]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BusinessWithRulesResult]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "events/business/user",
+ method="POST",
+ params={
+ "allowUserTypeConversion": allow_user_type_conversion,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ },
+ json={
+ "timestamp": timestamp,
+ "userId": user_id,
+ "eventId": event_id,
+ "reason": reason,
+ "eventDescription": event_description,
+ "updatedBusinessUserAttributes": convert_and_respect_annotation_metadata(
+ object_=updated_business_user_attributes, annotation=BusinessOptional, direction="write"
+ ),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BusinessWithRulesResult,
+ parse_obj_as(
+ type_=BusinessWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 409:
+ raise ConflictError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def get(
+ self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[BusinessUserEventWithRulesResult]:
+ """
+ ### GET a Business User Event
+ You can retrieve any business user event you created using the [POST Business User Events](/api-reference/api-reference/business-user-events/create) call.
+
+ Parameters
+ ----------
+ event_id : str
+ Unique Business User Event Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BusinessUserEventWithRulesResult]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"events/business/user/{jsonable_encoder(event_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BusinessUserEventWithRulesResult,
+ parse_obj_as(
+ type_=BusinessUserEventWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/business_users/__init__.py b/src/flagright/business_users/__init__.py
similarity index 100%
rename from src/flagright/resources/business_users/__init__.py
rename to src/flagright/business_users/__init__.py
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
new file mode 100644
index 0000000..45a7f08
--- /dev/null
+++ b/src/flagright/business_users/client.py
@@ -0,0 +1,463 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from .raw_client import RawBusinessUsersClient
+from ..types.legal_entity import LegalEntity
+from ..types.boolean_string import BooleanString
+from ..types.user_state_details import UserStateDetails
+from ..types.kyc_status_details import KycStatusDetails
+from ..types.person import Person
+from ..types.transaction_limits import TransactionLimits
+from ..types.risk_level import RiskLevel
+from ..types.payment_method import PaymentMethod
+from ..types.user_entity_link import UserEntityLink
+from ..types.acquisition_channel import AcquisitionChannel
+from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
+from ..types.mcc_details import MccDetails
+from ..types.user_tag import UserTag
+from ..types.person_attachment import PersonAttachment
+from ..core.request_options import RequestOptions
+from .types.business_users_create_response import BusinessUsersCreateResponse
+from ..types.business_with_rules_result import BusinessWithRulesResult
+from ..core.client_wrapper import AsyncClientWrapper
+from .raw_client import AsyncRawBusinessUsersClient
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class BusinessUsersClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._raw_client = RawBusinessUsersClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> RawBusinessUsersClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ RawBusinessUsersClient
+ """
+ return self._raw_client
+
+ def create(
+ self,
+ *,
+ user_id: str,
+ created_timestamp: float,
+ legal_entity: LegalEntity,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ validate_user_id: typing.Optional[BooleanString] = None,
+ krs_only: typing.Optional[BooleanString] = None,
+ activated_timestamp: typing.Optional[float] = OMIT,
+ user_state_details: typing.Optional[UserStateDetails] = OMIT,
+ kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ share_holders: typing.Optional[typing.Sequence[Person]] = OMIT,
+ directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ transaction_limits: typing.Optional[TransactionLimits] = OMIT,
+ risk_level: typing.Optional[RiskLevel] = OMIT,
+ kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
+ allowed_payment_methods: typing.Optional[typing.Sequence[PaymentMethod]] = OMIT,
+ last_transaction_timestamp: typing.Optional[float] = OMIT,
+ linked_entities: typing.Optional[UserEntityLink] = OMIT,
+ acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
+ saved_payment_details: typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]] = OMIT,
+ mcc_details: typing.Optional[MccDetails] = OMIT,
+ tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
+ attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BusinessUsersCreateResponse:
+ """
+ ## POST Business User
+
+ `/business/user` endpoint allows you to operate on the Business user entity.
+
+ In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+ ### Payload
+
+
+ Each business user needs three mandatory fields:
+
+ * `userId` - Unique identifier for the user
+ * `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
+ * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
+
+ Parameters
+ ----------
+ user_id : str
+ Unique user ID for the user
+
+ created_timestamp : float
+ Timestamp when the user was created
+
+ legal_entity : LegalEntity
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ validate_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate the userId
+
+ krs_only : typing.Optional[BooleanString]
+
+ activated_timestamp : typing.Optional[float]
+ Timestamp when the user was activated
+
+ user_state_details : typing.Optional[UserStateDetails]
+
+ kyc_status_details : typing.Optional[KycStatusDetails]
+
+ share_holders : typing.Optional[typing.Sequence[Person]]
+ Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
+
+ directors : typing.Optional[typing.Sequence[Person]]
+ Director(s) of the company. Must be at least one
+
+ transaction_limits : typing.Optional[TransactionLimits]
+
+ risk_level : typing.Optional[RiskLevel]
+
+ kyc_risk_level : typing.Optional[RiskLevel]
+
+ allowed_payment_methods : typing.Optional[typing.Sequence[PaymentMethod]]
+
+ last_transaction_timestamp : typing.Optional[float]
+ Timestamp of the last successful transaction of the user
+
+ linked_entities : typing.Optional[UserEntityLink]
+
+ acquisition_channel : typing.Optional[AcquisitionChannel]
+
+ saved_payment_details : typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]]
+
+ mcc_details : typing.Optional[MccDetails]
+
+ tags : typing.Optional[typing.Sequence[UserTag]]
+ Additional information that can be added via tags
+
+ attachments : typing.Optional[typing.Sequence[PersonAttachment]]
+ User's attachments uploaded by business user
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BusinessUsersCreateResponse
+ Created
+
+ Examples
+ --------
+ from flagright import CompanyGeneralDetails, Flagright, LegalEntity
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.business_users.create(
+ user_id="userId",
+ created_timestamp=1.1,
+ legal_entity=LegalEntity(
+ company_general_details=CompanyGeneralDetails(
+ legal_name="Ozkan Hazelnut Export JSC",
+ business_industry=["Farming"],
+ main_products_services_sold=["Hazelnut"],
+ ),
+ ),
+ )
+ """
+ response = self._raw_client.create(
+ user_id=user_id,
+ created_timestamp=created_timestamp,
+ legal_entity=legal_entity,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ validate_user_id=validate_user_id,
+ krs_only=krs_only,
+ activated_timestamp=activated_timestamp,
+ user_state_details=user_state_details,
+ kyc_status_details=kyc_status_details,
+ share_holders=share_holders,
+ directors=directors,
+ transaction_limits=transaction_limits,
+ risk_level=risk_level,
+ kyc_risk_level=kyc_risk_level,
+ allowed_payment_methods=allowed_payment_methods,
+ last_transaction_timestamp=last_transaction_timestamp,
+ linked_entities=linked_entities,
+ acquisition_channel=acquisition_channel,
+ saved_payment_details=saved_payment_details,
+ mcc_details=mcc_details,
+ tags=tags,
+ attachments=attachments,
+ request_options=request_options,
+ )
+ return response.data
+
+ def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> BusinessWithRulesResult:
+ """
+ ### GET Business User
+
+ `/business/user` endpoint allows you to operate on the Business User entity.
+
+ Calling `GET /business/user/{userId}` will return the entire User payload and rule execution results for the User with the corresponding `userId`
+
+ Parameters
+ ----------
+ user_id : str
+
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BusinessWithRulesResult
+ OK
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.business_users.get(
+ user_id="userId",
+ )
+ """
+ response = self._raw_client.get(user_id, request_options=request_options)
+ return response.data
+
+
+class AsyncBusinessUsersClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._raw_client = AsyncRawBusinessUsersClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> AsyncRawBusinessUsersClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ AsyncRawBusinessUsersClient
+ """
+ return self._raw_client
+
+ async def create(
+ self,
+ *,
+ user_id: str,
+ created_timestamp: float,
+ legal_entity: LegalEntity,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ validate_user_id: typing.Optional[BooleanString] = None,
+ krs_only: typing.Optional[BooleanString] = None,
+ activated_timestamp: typing.Optional[float] = OMIT,
+ user_state_details: typing.Optional[UserStateDetails] = OMIT,
+ kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ share_holders: typing.Optional[typing.Sequence[Person]] = OMIT,
+ directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ transaction_limits: typing.Optional[TransactionLimits] = OMIT,
+ risk_level: typing.Optional[RiskLevel] = OMIT,
+ kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
+ allowed_payment_methods: typing.Optional[typing.Sequence[PaymentMethod]] = OMIT,
+ last_transaction_timestamp: typing.Optional[float] = OMIT,
+ linked_entities: typing.Optional[UserEntityLink] = OMIT,
+ acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
+ saved_payment_details: typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]] = OMIT,
+ mcc_details: typing.Optional[MccDetails] = OMIT,
+ tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
+ attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BusinessUsersCreateResponse:
+ """
+ ## POST Business User
+
+ `/business/user` endpoint allows you to operate on the Business user entity.
+
+ In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+ ### Payload
+
+
+ Each business user needs three mandatory fields:
+
+ * `userId` - Unique identifier for the user
+ * `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
+ * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
+
+ Parameters
+ ----------
+ user_id : str
+ Unique user ID for the user
+
+ created_timestamp : float
+ Timestamp when the user was created
+
+ legal_entity : LegalEntity
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ validate_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate the userId
+
+ krs_only : typing.Optional[BooleanString]
+
+ activated_timestamp : typing.Optional[float]
+ Timestamp when the user was activated
+
+ user_state_details : typing.Optional[UserStateDetails]
+
+ kyc_status_details : typing.Optional[KycStatusDetails]
+
+ share_holders : typing.Optional[typing.Sequence[Person]]
+ Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
+
+ directors : typing.Optional[typing.Sequence[Person]]
+ Director(s) of the company. Must be at least one
+
+ transaction_limits : typing.Optional[TransactionLimits]
+
+ risk_level : typing.Optional[RiskLevel]
+
+ kyc_risk_level : typing.Optional[RiskLevel]
+
+ allowed_payment_methods : typing.Optional[typing.Sequence[PaymentMethod]]
+
+ last_transaction_timestamp : typing.Optional[float]
+ Timestamp of the last successful transaction of the user
+
+ linked_entities : typing.Optional[UserEntityLink]
+
+ acquisition_channel : typing.Optional[AcquisitionChannel]
+
+ saved_payment_details : typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]]
+
+ mcc_details : typing.Optional[MccDetails]
+
+ tags : typing.Optional[typing.Sequence[UserTag]]
+ Additional information that can be added via tags
+
+ attachments : typing.Optional[typing.Sequence[PersonAttachment]]
+ User's attachments uploaded by business user
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BusinessUsersCreateResponse
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright, CompanyGeneralDetails, LegalEntity
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.business_users.create(
+ user_id="userId",
+ created_timestamp=1.1,
+ legal_entity=LegalEntity(
+ company_general_details=CompanyGeneralDetails(
+ legal_name="Ozkan Hazelnut Export JSC",
+ business_industry=["Farming"],
+ main_products_services_sold=["Hazelnut"],
+ ),
+ ),
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.create(
+ user_id=user_id,
+ created_timestamp=created_timestamp,
+ legal_entity=legal_entity,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ validate_user_id=validate_user_id,
+ krs_only=krs_only,
+ activated_timestamp=activated_timestamp,
+ user_state_details=user_state_details,
+ kyc_status_details=kyc_status_details,
+ share_holders=share_holders,
+ directors=directors,
+ transaction_limits=transaction_limits,
+ risk_level=risk_level,
+ kyc_risk_level=kyc_risk_level,
+ allowed_payment_methods=allowed_payment_methods,
+ last_transaction_timestamp=last_transaction_timestamp,
+ linked_entities=linked_entities,
+ acquisition_channel=acquisition_channel,
+ saved_payment_details=saved_payment_details,
+ mcc_details=mcc_details,
+ tags=tags,
+ attachments=attachments,
+ request_options=request_options,
+ )
+ return response.data
+
+ async def get(
+ self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> BusinessWithRulesResult:
+ """
+ ### GET Business User
+
+ `/business/user` endpoint allows you to operate on the Business User entity.
+
+ Calling `GET /business/user/{userId}` will return the entire User payload and rule execution results for the User with the corresponding `userId`
+
+ Parameters
+ ----------
+ user_id : str
+
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BusinessWithRulesResult
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.business_users.get(
+ user_id="userId",
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.get(user_id, request_options=request_options)
+ return response.data
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
new file mode 100644
index 0000000..445456d
--- /dev/null
+++ b/src/flagright/business_users/raw_client.py
@@ -0,0 +1,618 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from ..types.legal_entity import LegalEntity
+from ..types.boolean_string import BooleanString
+from ..types.user_state_details import UserStateDetails
+from ..types.kyc_status_details import KycStatusDetails
+from ..types.person import Person
+from ..types.transaction_limits import TransactionLimits
+from ..types.risk_level import RiskLevel
+from ..types.payment_method import PaymentMethod
+from ..types.user_entity_link import UserEntityLink
+from ..types.acquisition_channel import AcquisitionChannel
+from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
+from ..types.mcc_details import MccDetails
+from ..types.user_tag import UserTag
+from ..types.person_attachment import PersonAttachment
+from ..core.request_options import RequestOptions
+from ..core.http_response import HttpResponse
+from .types.business_users_create_response import BusinessUsersCreateResponse
+from ..core.serialization import convert_and_respect_annotation_metadata
+from ..core.pydantic_utilities import parse_obj_as
+from ..errors.bad_request_error import BadRequestError
+from ..types.api_error_response import ApiErrorResponse
+from ..errors.unauthorized_error import UnauthorizedError
+from ..errors.too_many_requests_error import TooManyRequestsError
+from json.decoder import JSONDecodeError
+from ..core.api_error import ApiError
+from ..types.business_with_rules_result import BusinessWithRulesResult
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.client_wrapper import AsyncClientWrapper
+from ..core.http_response import AsyncHttpResponse
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class RawBusinessUsersClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ def create(
+ self,
+ *,
+ user_id: str,
+ created_timestamp: float,
+ legal_entity: LegalEntity,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ validate_user_id: typing.Optional[BooleanString] = None,
+ krs_only: typing.Optional[BooleanString] = None,
+ activated_timestamp: typing.Optional[float] = OMIT,
+ user_state_details: typing.Optional[UserStateDetails] = OMIT,
+ kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ share_holders: typing.Optional[typing.Sequence[Person]] = OMIT,
+ directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ transaction_limits: typing.Optional[TransactionLimits] = OMIT,
+ risk_level: typing.Optional[RiskLevel] = OMIT,
+ kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
+ allowed_payment_methods: typing.Optional[typing.Sequence[PaymentMethod]] = OMIT,
+ last_transaction_timestamp: typing.Optional[float] = OMIT,
+ linked_entities: typing.Optional[UserEntityLink] = OMIT,
+ acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
+ saved_payment_details: typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]] = OMIT,
+ mcc_details: typing.Optional[MccDetails] = OMIT,
+ tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
+ attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[BusinessUsersCreateResponse]:
+ """
+ ## POST Business User
+
+ `/business/user` endpoint allows you to operate on the Business user entity.
+
+ In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+ ### Payload
+
+
+ Each business user needs three mandatory fields:
+
+ * `userId` - Unique identifier for the user
+ * `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
+ * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
+
+ Parameters
+ ----------
+ user_id : str
+ Unique user ID for the user
+
+ created_timestamp : float
+ Timestamp when the user was created
+
+ legal_entity : LegalEntity
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ validate_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate the userId
+
+ krs_only : typing.Optional[BooleanString]
+
+ activated_timestamp : typing.Optional[float]
+ Timestamp when the user was activated
+
+ user_state_details : typing.Optional[UserStateDetails]
+
+ kyc_status_details : typing.Optional[KycStatusDetails]
+
+ share_holders : typing.Optional[typing.Sequence[Person]]
+ Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
+
+ directors : typing.Optional[typing.Sequence[Person]]
+ Director(s) of the company. Must be at least one
+
+ transaction_limits : typing.Optional[TransactionLimits]
+
+ risk_level : typing.Optional[RiskLevel]
+
+ kyc_risk_level : typing.Optional[RiskLevel]
+
+ allowed_payment_methods : typing.Optional[typing.Sequence[PaymentMethod]]
+
+ last_transaction_timestamp : typing.Optional[float]
+ Timestamp of the last successful transaction of the user
+
+ linked_entities : typing.Optional[UserEntityLink]
+
+ acquisition_channel : typing.Optional[AcquisitionChannel]
+
+ saved_payment_details : typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]]
+
+ mcc_details : typing.Optional[MccDetails]
+
+ tags : typing.Optional[typing.Sequence[UserTag]]
+ Additional information that can be added via tags
+
+ attachments : typing.Optional[typing.Sequence[PersonAttachment]]
+ User's attachments uploaded by business user
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[BusinessUsersCreateResponse]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "business/users",
+ method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "validateUserId": validate_user_id,
+ "_krsOnly": krs_only,
+ },
+ json={
+ "userId": user_id,
+ "createdTimestamp": created_timestamp,
+ "legalEntity": convert_and_respect_annotation_metadata(
+ object_=legal_entity, annotation=LegalEntity, direction="write"
+ ),
+ "activatedTimestamp": activated_timestamp,
+ "userStateDetails": convert_and_respect_annotation_metadata(
+ object_=user_state_details, annotation=UserStateDetails, direction="write"
+ ),
+ "kycStatusDetails": convert_and_respect_annotation_metadata(
+ object_=kyc_status_details, annotation=KycStatusDetails, direction="write"
+ ),
+ "shareHolders": convert_and_respect_annotation_metadata(
+ object_=share_holders, annotation=typing.Sequence[Person], direction="write"
+ ),
+ "directors": convert_and_respect_annotation_metadata(
+ object_=directors, annotation=typing.Sequence[Person], direction="write"
+ ),
+ "transactionLimits": convert_and_respect_annotation_metadata(
+ object_=transaction_limits, annotation=TransactionLimits, direction="write"
+ ),
+ "riskLevel": risk_level,
+ "kycRiskLevel": kyc_risk_level,
+ "allowedPaymentMethods": allowed_payment_methods,
+ "lastTransactionTimestamp": last_transaction_timestamp,
+ "linkedEntities": convert_and_respect_annotation_metadata(
+ object_=linked_entities, annotation=UserEntityLink, direction="write"
+ ),
+ "acquisitionChannel": acquisition_channel,
+ "savedPaymentDetails": convert_and_respect_annotation_metadata(
+ object_=saved_payment_details,
+ annotation=typing.Sequence[BusinessSavedPaymentDetailsItem],
+ direction="write",
+ ),
+ "mccDetails": convert_and_respect_annotation_metadata(
+ object_=mcc_details, annotation=MccDetails, direction="write"
+ ),
+ "tags": convert_and_respect_annotation_metadata(
+ object_=tags, annotation=typing.Sequence[UserTag], direction="write"
+ ),
+ "attachments": convert_and_respect_annotation_metadata(
+ object_=attachments, annotation=typing.Sequence[PersonAttachment], direction="write"
+ ),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BusinessUsersCreateResponse,
+ parse_obj_as(
+ type_=BusinessUsersCreateResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def get(
+ self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[BusinessWithRulesResult]:
+ """
+ ### GET Business User
+
+ `/business/user` endpoint allows you to operate on the Business User entity.
+
+ Calling `GET /business/user/{userId}` will return the entire User payload and rule execution results for the User with the corresponding `userId`
+
+ Parameters
+ ----------
+ user_id : str
+
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[BusinessWithRulesResult]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"business/users/{jsonable_encoder(user_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BusinessWithRulesResult,
+ parse_obj_as(
+ type_=BusinessWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+
+class AsyncRawBusinessUsersClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def create(
+ self,
+ *,
+ user_id: str,
+ created_timestamp: float,
+ legal_entity: LegalEntity,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ validate_user_id: typing.Optional[BooleanString] = None,
+ krs_only: typing.Optional[BooleanString] = None,
+ activated_timestamp: typing.Optional[float] = OMIT,
+ user_state_details: typing.Optional[UserStateDetails] = OMIT,
+ kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ share_holders: typing.Optional[typing.Sequence[Person]] = OMIT,
+ directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ transaction_limits: typing.Optional[TransactionLimits] = OMIT,
+ risk_level: typing.Optional[RiskLevel] = OMIT,
+ kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
+ allowed_payment_methods: typing.Optional[typing.Sequence[PaymentMethod]] = OMIT,
+ last_transaction_timestamp: typing.Optional[float] = OMIT,
+ linked_entities: typing.Optional[UserEntityLink] = OMIT,
+ acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
+ saved_payment_details: typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]] = OMIT,
+ mcc_details: typing.Optional[MccDetails] = OMIT,
+ tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
+ attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BusinessUsersCreateResponse]:
+ """
+ ## POST Business User
+
+ `/business/user` endpoint allows you to operate on the Business user entity.
+
+ In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+ ### Payload
+
+
+ Each business user needs three mandatory fields:
+
+ * `userId` - Unique identifier for the user
+ * `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
+ * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
+
+ Parameters
+ ----------
+ user_id : str
+ Unique user ID for the user
+
+ created_timestamp : float
+ Timestamp when the user was created
+
+ legal_entity : LegalEntity
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ validate_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate the userId
+
+ krs_only : typing.Optional[BooleanString]
+
+ activated_timestamp : typing.Optional[float]
+ Timestamp when the user was activated
+
+ user_state_details : typing.Optional[UserStateDetails]
+
+ kyc_status_details : typing.Optional[KycStatusDetails]
+
+ share_holders : typing.Optional[typing.Sequence[Person]]
+ Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
+
+ directors : typing.Optional[typing.Sequence[Person]]
+ Director(s) of the company. Must be at least one
+
+ transaction_limits : typing.Optional[TransactionLimits]
+
+ risk_level : typing.Optional[RiskLevel]
+
+ kyc_risk_level : typing.Optional[RiskLevel]
+
+ allowed_payment_methods : typing.Optional[typing.Sequence[PaymentMethod]]
+
+ last_transaction_timestamp : typing.Optional[float]
+ Timestamp of the last successful transaction of the user
+
+ linked_entities : typing.Optional[UserEntityLink]
+
+ acquisition_channel : typing.Optional[AcquisitionChannel]
+
+ saved_payment_details : typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]]
+
+ mcc_details : typing.Optional[MccDetails]
+
+ tags : typing.Optional[typing.Sequence[UserTag]]
+ Additional information that can be added via tags
+
+ attachments : typing.Optional[typing.Sequence[PersonAttachment]]
+ User's attachments uploaded by business user
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BusinessUsersCreateResponse]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "business/users",
+ method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "validateUserId": validate_user_id,
+ "_krsOnly": krs_only,
+ },
+ json={
+ "userId": user_id,
+ "createdTimestamp": created_timestamp,
+ "legalEntity": convert_and_respect_annotation_metadata(
+ object_=legal_entity, annotation=LegalEntity, direction="write"
+ ),
+ "activatedTimestamp": activated_timestamp,
+ "userStateDetails": convert_and_respect_annotation_metadata(
+ object_=user_state_details, annotation=UserStateDetails, direction="write"
+ ),
+ "kycStatusDetails": convert_and_respect_annotation_metadata(
+ object_=kyc_status_details, annotation=KycStatusDetails, direction="write"
+ ),
+ "shareHolders": convert_and_respect_annotation_metadata(
+ object_=share_holders, annotation=typing.Sequence[Person], direction="write"
+ ),
+ "directors": convert_and_respect_annotation_metadata(
+ object_=directors, annotation=typing.Sequence[Person], direction="write"
+ ),
+ "transactionLimits": convert_and_respect_annotation_metadata(
+ object_=transaction_limits, annotation=TransactionLimits, direction="write"
+ ),
+ "riskLevel": risk_level,
+ "kycRiskLevel": kyc_risk_level,
+ "allowedPaymentMethods": allowed_payment_methods,
+ "lastTransactionTimestamp": last_transaction_timestamp,
+ "linkedEntities": convert_and_respect_annotation_metadata(
+ object_=linked_entities, annotation=UserEntityLink, direction="write"
+ ),
+ "acquisitionChannel": acquisition_channel,
+ "savedPaymentDetails": convert_and_respect_annotation_metadata(
+ object_=saved_payment_details,
+ annotation=typing.Sequence[BusinessSavedPaymentDetailsItem],
+ direction="write",
+ ),
+ "mccDetails": convert_and_respect_annotation_metadata(
+ object_=mcc_details, annotation=MccDetails, direction="write"
+ ),
+ "tags": convert_and_respect_annotation_metadata(
+ object_=tags, annotation=typing.Sequence[UserTag], direction="write"
+ ),
+ "attachments": convert_and_respect_annotation_metadata(
+ object_=attachments, annotation=typing.Sequence[PersonAttachment], direction="write"
+ ),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BusinessUsersCreateResponse,
+ parse_obj_as(
+ type_=BusinessUsersCreateResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def get(
+ self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[BusinessWithRulesResult]:
+ """
+ ### GET Business User
+
+ `/business/user` endpoint allows you to operate on the Business User entity.
+
+ Calling `GET /business/user/{userId}` will return the entire User payload and rule execution results for the User with the corresponding `userId`
+
+ Parameters
+ ----------
+ user_id : str
+
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BusinessWithRulesResult]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"business/users/{jsonable_encoder(user_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BusinessWithRulesResult,
+ parse_obj_as(
+ type_=BusinessWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/business_users/types/__init__.py b/src/flagright/business_users/types/__init__.py
similarity index 100%
rename from src/flagright/resources/business_users/types/__init__.py
rename to src/flagright/business_users/types/__init__.py
diff --git a/src/flagright/business_users/types/business_users_create_response.py b/src/flagright/business_users/types/business_users_create_response.py
new file mode 100644
index 0000000..81a575c
--- /dev/null
+++ b/src/flagright/business_users/types/business_users_create_response.py
@@ -0,0 +1,19 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ...types.business_user_monitoring_result import BusinessUserMonitoringResult
+import typing
+from ...core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class BusinessUsersCreateResponse(BusinessUserMonitoringResult):
+ message: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/client.py b/src/flagright/client.py
index 022dc35..63ba93c 100644
--- a/src/flagright/client.py
+++ b/src/flagright/client.py
@@ -1,34 +1,85 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
-import httpx
-
-from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .environment import FlagrightEnvironment
-from .resources.batch.client import AsyncBatchClient, BatchClient
-from .resources.business_user_events.client import AsyncBusinessUserEventsClient, BusinessUserEventsClient
-from .resources.business_users.client import AsyncBusinessUsersClient, BusinessUsersClient
-from .resources.consumer_user_events.client import AsyncConsumerUserEventsClient, ConsumerUserEventsClient
-from .resources.consumer_users.client import AsyncConsumerUsersClient, ConsumerUsersClient
-from .resources.transaction_events.client import AsyncTransactionEventsClient, TransactionEventsClient
-from .resources.transactions.client import AsyncTransactionsClient, TransactionsClient
+import httpx
+from .core.client_wrapper import SyncClientWrapper
+from .transactions.client import TransactionsClient
+from .batch.client import BatchClient
+from .transaction_events.client import TransactionEventsClient
+from .consumer_users.client import ConsumerUsersClient
+from .business_users.client import BusinessUsersClient
+from .consumer_user_events.client import ConsumerUserEventsClient
+from .business_user_events.client import BusinessUserEventsClient
+from .core.client_wrapper import AsyncClientWrapper
+from .transactions.client import AsyncTransactionsClient
+from .batch.client import AsyncBatchClient
+from .transaction_events.client import AsyncTransactionEventsClient
+from .consumer_users.client import AsyncConsumerUsersClient
+from .business_users.client import AsyncBusinessUsersClient
+from .consumer_user_events.client import AsyncConsumerUserEventsClient
+from .business_user_events.client import AsyncBusinessUserEventsClient
class Flagright:
+ """
+ Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
+
+ Parameters
+ ----------
+ base_url : typing.Optional[str]
+ The base url to use for requests from the client.
+
+ environment : FlagrightEnvironment
+ The environment to use for requests from the client. from .environment import FlagrightEnvironment
+
+
+
+ Defaults to FlagrightEnvironment.SANDBOX_API_SERVER_EU_1
+
+
+
+ api_key : str
+ timeout : typing.Optional[float]
+ The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
+
+ follow_redirects : typing.Optional[bool]
+ Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
+
+ httpx_client : typing.Optional[httpx.Client]
+ The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ """
+
def __init__(
self,
*,
base_url: typing.Optional[str] = None,
environment: FlagrightEnvironment = FlagrightEnvironment.SANDBOX_API_SERVER_EU_1,
api_key: str,
- timeout: typing.Optional[float] = 60,
- httpx_client: typing.Optional[httpx.Client] = None
+ timeout: typing.Optional[float] = None,
+ follow_redirects: typing.Optional[bool] = True,
+ httpx_client: typing.Optional[httpx.Client] = None,
):
+ _defaulted_timeout = (
+ timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
+ )
self._client_wrapper = SyncClientWrapper(
base_url=_get_base_url(base_url=base_url, environment=environment),
api_key=api_key,
- httpx_client=httpx.Client(timeout=timeout) if httpx_client is None else httpx_client,
+ httpx_client=httpx_client
+ if httpx_client is not None
+ else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
+ if follow_redirects is not None
+ else httpx.Client(timeout=_defaulted_timeout),
+ timeout=_defaulted_timeout,
)
self.transactions = TransactionsClient(client_wrapper=self._client_wrapper)
self.batch = BatchClient(client_wrapper=self._client_wrapper)
@@ -40,19 +91,64 @@ def __init__(
class AsyncFlagright:
+ """
+ Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
+
+ Parameters
+ ----------
+ base_url : typing.Optional[str]
+ The base url to use for requests from the client.
+
+ environment : FlagrightEnvironment
+ The environment to use for requests from the client. from .environment import FlagrightEnvironment
+
+
+
+ Defaults to FlagrightEnvironment.SANDBOX_API_SERVER_EU_1
+
+
+
+ api_key : str
+ timeout : typing.Optional[float]
+ The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
+
+ follow_redirects : typing.Optional[bool]
+ Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
+
+ httpx_client : typing.Optional[httpx.AsyncClient]
+ The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
+
+ Examples
+ --------
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+ """
+
def __init__(
self,
*,
base_url: typing.Optional[str] = None,
environment: FlagrightEnvironment = FlagrightEnvironment.SANDBOX_API_SERVER_EU_1,
api_key: str,
- timeout: typing.Optional[float] = 60,
- httpx_client: typing.Optional[httpx.AsyncClient] = None
+ timeout: typing.Optional[float] = None,
+ follow_redirects: typing.Optional[bool] = True,
+ httpx_client: typing.Optional[httpx.AsyncClient] = None,
):
+ _defaulted_timeout = (
+ timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
+ )
self._client_wrapper = AsyncClientWrapper(
base_url=_get_base_url(base_url=base_url, environment=environment),
api_key=api_key,
- httpx_client=httpx.AsyncClient(timeout=timeout) if httpx_client is None else httpx_client,
+ httpx_client=httpx_client
+ if httpx_client is not None
+ else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
+ if follow_redirects is not None
+ else httpx.AsyncClient(timeout=_defaulted_timeout),
+ timeout=_defaulted_timeout,
)
self.transactions = AsyncTransactionsClient(client_wrapper=self._client_wrapper)
self.batch = AsyncBatchClient(client_wrapper=self._client_wrapper)
diff --git a/src/flagright/resources/consumer_user_events/__init__.py b/src/flagright/consumer_user_events/__init__.py
similarity index 100%
rename from src/flagright/resources/consumer_user_events/__init__.py
rename to src/flagright/consumer_user_events/__init__.py
diff --git a/src/flagright/consumer_user_events/client.py b/src/flagright/consumer_user_events/client.py
new file mode 100644
index 0000000..12a5320
--- /dev/null
+++ b/src/flagright/consumer_user_events/client.py
@@ -0,0 +1,325 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from .raw_client import RawConsumerUserEventsClient
+from ..types.boolean_string import BooleanString
+from ..types.user_optional import UserOptional
+from ..core.request_options import RequestOptions
+from ..types.user_with_rules_result import UserWithRulesResult
+from ..types.consumer_user_event_with_rules_result import ConsumerUserEventWithRulesResult
+from ..core.client_wrapper import AsyncClientWrapper
+from .raw_client import AsyncRawConsumerUserEventsClient
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class ConsumerUserEventsClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._raw_client = RawConsumerUserEventsClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> RawConsumerUserEventsClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ RawConsumerUserEventsClient
+ """
+ return self._raw_client
+
+ def create(
+ self,
+ *,
+ timestamp: float,
+ user_id: str,
+ allow_user_type_conversion: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ event_id: typing.Optional[str] = OMIT,
+ reason: typing.Optional[str] = OMIT,
+ event_description: typing.Optional[str] = OMIT,
+ updated_consumer_user_attributes: typing.Optional[UserOptional] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> UserWithRulesResult:
+ """
+ ## POST Consumer User Events
+
+ `/events/consumer/user` endpoint allows you to operate on the Consumer User Events entity.
+
+ User events are created after the initial `POST /consumer/users` call (which creates a user) and are used to:
+
+ * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+ * Update the user details, using the `updatedConsumerUserAttributes` field.
+
+ > If you have neither of the above two use cases, you do not need to use user events.
+
+ ### Payload
+
+ Each user event needs three mandatory fields:
+
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `userId` - The ID of the transaction for which this event is generated.
+
+ In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+ Parameters
+ ----------
+ timestamp : float
+ Timestamp of the event
+
+ user_id : str
+ Transaction ID the event pertains to
+
+ allow_user_type_conversion : typing.Optional[BooleanString]
+ Boolean string whether Flagright should allow a Consumer user event to be applied to a Business user with the same user ID. This will converts a Business user to a Consumer user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ event_id : typing.Optional[str]
+ Unique event ID
+
+ reason : typing.Optional[str]
+ Reason for the event or a state change
+
+ event_description : typing.Optional[str]
+ Event description
+
+ updated_consumer_user_attributes : typing.Optional[UserOptional]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ UserWithRulesResult
+ Created
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.consumer_user_events.create(
+ timestamp=1.1,
+ user_id="userId",
+ )
+ """
+ response = self._raw_client.create(
+ timestamp=timestamp,
+ user_id=user_id,
+ allow_user_type_conversion=allow_user_type_conversion,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ lock_cra_risk_level=lock_cra_risk_level,
+ event_id=event_id,
+ reason=reason,
+ event_description=event_description,
+ updated_consumer_user_attributes=updated_consumer_user_attributes,
+ request_options=request_options,
+ )
+ return response.data
+
+ def get(
+ self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> ConsumerUserEventWithRulesResult:
+ """
+ ### GET a Consumer User Event
+ You can retrieve any consumer user event you created using the [POST Consumer User Events](/api-reference/api-reference/consumer-user-events/create) call.
+
+ Parameters
+ ----------
+ event_id : str
+ Unique Consumer User Event Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ ConsumerUserEventWithRulesResult
+ OK
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.consumer_user_events.get(
+ event_id="eventId",
+ )
+ """
+ response = self._raw_client.get(event_id, request_options=request_options)
+ return response.data
+
+
+class AsyncConsumerUserEventsClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._raw_client = AsyncRawConsumerUserEventsClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> AsyncRawConsumerUserEventsClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ AsyncRawConsumerUserEventsClient
+ """
+ return self._raw_client
+
+ async def create(
+ self,
+ *,
+ timestamp: float,
+ user_id: str,
+ allow_user_type_conversion: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ event_id: typing.Optional[str] = OMIT,
+ reason: typing.Optional[str] = OMIT,
+ event_description: typing.Optional[str] = OMIT,
+ updated_consumer_user_attributes: typing.Optional[UserOptional] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> UserWithRulesResult:
+ """
+ ## POST Consumer User Events
+
+ `/events/consumer/user` endpoint allows you to operate on the Consumer User Events entity.
+
+ User events are created after the initial `POST /consumer/users` call (which creates a user) and are used to:
+
+ * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+ * Update the user details, using the `updatedConsumerUserAttributes` field.
+
+ > If you have neither of the above two use cases, you do not need to use user events.
+
+ ### Payload
+
+ Each user event needs three mandatory fields:
+
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `userId` - The ID of the transaction for which this event is generated.
+
+ In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+ Parameters
+ ----------
+ timestamp : float
+ Timestamp of the event
+
+ user_id : str
+ Transaction ID the event pertains to
+
+ allow_user_type_conversion : typing.Optional[BooleanString]
+ Boolean string whether Flagright should allow a Consumer user event to be applied to a Business user with the same user ID. This will converts a Business user to a Consumer user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ event_id : typing.Optional[str]
+ Unique event ID
+
+ reason : typing.Optional[str]
+ Reason for the event or a state change
+
+ event_description : typing.Optional[str]
+ Event description
+
+ updated_consumer_user_attributes : typing.Optional[UserOptional]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ UserWithRulesResult
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.consumer_user_events.create(
+ timestamp=1.1,
+ user_id="userId",
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.create(
+ timestamp=timestamp,
+ user_id=user_id,
+ allow_user_type_conversion=allow_user_type_conversion,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ lock_cra_risk_level=lock_cra_risk_level,
+ event_id=event_id,
+ reason=reason,
+ event_description=event_description,
+ updated_consumer_user_attributes=updated_consumer_user_attributes,
+ request_options=request_options,
+ )
+ return response.data
+
+ async def get(
+ self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> ConsumerUserEventWithRulesResult:
+ """
+ ### GET a Consumer User Event
+ You can retrieve any consumer user event you created using the [POST Consumer User Events](/api-reference/api-reference/consumer-user-events/create) call.
+
+ Parameters
+ ----------
+ event_id : str
+ Unique Consumer User Event Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ ConsumerUserEventWithRulesResult
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.consumer_user_events.get(
+ event_id="eventId",
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.get(event_id, request_options=request_options)
+ return response.data
diff --git a/src/flagright/consumer_user_events/raw_client.py b/src/flagright/consumer_user_events/raw_client.py
new file mode 100644
index 0000000..c0b4c80
--- /dev/null
+++ b/src/flagright/consumer_user_events/raw_client.py
@@ -0,0 +1,469 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from ..types.boolean_string import BooleanString
+from ..types.user_optional import UserOptional
+from ..core.request_options import RequestOptions
+from ..core.http_response import HttpResponse
+from ..types.user_with_rules_result import UserWithRulesResult
+from ..core.serialization import convert_and_respect_annotation_metadata
+from ..core.pydantic_utilities import parse_obj_as
+from ..errors.bad_request_error import BadRequestError
+from ..types.api_error_response import ApiErrorResponse
+from ..errors.unauthorized_error import UnauthorizedError
+from ..errors.conflict_error import ConflictError
+from ..errors.too_many_requests_error import TooManyRequestsError
+from json.decoder import JSONDecodeError
+from ..core.api_error import ApiError
+from ..types.consumer_user_event_with_rules_result import ConsumerUserEventWithRulesResult
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.client_wrapper import AsyncClientWrapper
+from ..core.http_response import AsyncHttpResponse
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class RawConsumerUserEventsClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ def create(
+ self,
+ *,
+ timestamp: float,
+ user_id: str,
+ allow_user_type_conversion: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ event_id: typing.Optional[str] = OMIT,
+ reason: typing.Optional[str] = OMIT,
+ event_description: typing.Optional[str] = OMIT,
+ updated_consumer_user_attributes: typing.Optional[UserOptional] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[UserWithRulesResult]:
+ """
+ ## POST Consumer User Events
+
+ `/events/consumer/user` endpoint allows you to operate on the Consumer User Events entity.
+
+ User events are created after the initial `POST /consumer/users` call (which creates a user) and are used to:
+
+ * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+ * Update the user details, using the `updatedConsumerUserAttributes` field.
+
+ > If you have neither of the above two use cases, you do not need to use user events.
+
+ ### Payload
+
+ Each user event needs three mandatory fields:
+
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `userId` - The ID of the transaction for which this event is generated.
+
+ In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+ Parameters
+ ----------
+ timestamp : float
+ Timestamp of the event
+
+ user_id : str
+ Transaction ID the event pertains to
+
+ allow_user_type_conversion : typing.Optional[BooleanString]
+ Boolean string whether Flagright should allow a Consumer user event to be applied to a Business user with the same user ID. This will converts a Business user to a Consumer user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ event_id : typing.Optional[str]
+ Unique event ID
+
+ reason : typing.Optional[str]
+ Reason for the event or a state change
+
+ event_description : typing.Optional[str]
+ Event description
+
+ updated_consumer_user_attributes : typing.Optional[UserOptional]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[UserWithRulesResult]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "events/consumer/user",
+ method="POST",
+ params={
+ "allowUserTypeConversion": allow_user_type_conversion,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ },
+ json={
+ "timestamp": timestamp,
+ "userId": user_id,
+ "eventId": event_id,
+ "reason": reason,
+ "eventDescription": event_description,
+ "updatedConsumerUserAttributes": convert_and_respect_annotation_metadata(
+ object_=updated_consumer_user_attributes, annotation=UserOptional, direction="write"
+ ),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ UserWithRulesResult,
+ parse_obj_as(
+ type_=UserWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 409:
+ raise ConflictError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def get(
+ self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[ConsumerUserEventWithRulesResult]:
+ """
+ ### GET a Consumer User Event
+ You can retrieve any consumer user event you created using the [POST Consumer User Events](/api-reference/api-reference/consumer-user-events/create) call.
+
+ Parameters
+ ----------
+ event_id : str
+ Unique Consumer User Event Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[ConsumerUserEventWithRulesResult]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"events/consumer/user/{jsonable_encoder(event_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ ConsumerUserEventWithRulesResult,
+ parse_obj_as(
+ type_=ConsumerUserEventWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+
+class AsyncRawConsumerUserEventsClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def create(
+ self,
+ *,
+ timestamp: float,
+ user_id: str,
+ allow_user_type_conversion: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ event_id: typing.Optional[str] = OMIT,
+ reason: typing.Optional[str] = OMIT,
+ event_description: typing.Optional[str] = OMIT,
+ updated_consumer_user_attributes: typing.Optional[UserOptional] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[UserWithRulesResult]:
+ """
+ ## POST Consumer User Events
+
+ `/events/consumer/user` endpoint allows you to operate on the Consumer User Events entity.
+
+ User events are created after the initial `POST /consumer/users` call (which creates a user) and are used to:
+
+ * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
+ * Update the user details, using the `updatedConsumerUserAttributes` field.
+
+ > If you have neither of the above two use cases, you do not need to use user events.
+
+ ### Payload
+
+ Each user event needs three mandatory fields:
+
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `userId` - The ID of the transaction for which this event is generated.
+
+ In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+ Parameters
+ ----------
+ timestamp : float
+ Timestamp of the event
+
+ user_id : str
+ Transaction ID the event pertains to
+
+ allow_user_type_conversion : typing.Optional[BooleanString]
+ Boolean string whether Flagright should allow a Consumer user event to be applied to a Business user with the same user ID. This will converts a Business user to a Consumer user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ event_id : typing.Optional[str]
+ Unique event ID
+
+ reason : typing.Optional[str]
+ Reason for the event or a state change
+
+ event_description : typing.Optional[str]
+ Event description
+
+ updated_consumer_user_attributes : typing.Optional[UserOptional]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[UserWithRulesResult]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "events/consumer/user",
+ method="POST",
+ params={
+ "allowUserTypeConversion": allow_user_type_conversion,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ },
+ json={
+ "timestamp": timestamp,
+ "userId": user_id,
+ "eventId": event_id,
+ "reason": reason,
+ "eventDescription": event_description,
+ "updatedConsumerUserAttributes": convert_and_respect_annotation_metadata(
+ object_=updated_consumer_user_attributes, annotation=UserOptional, direction="write"
+ ),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ UserWithRulesResult,
+ parse_obj_as(
+ type_=UserWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 409:
+ raise ConflictError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def get(
+ self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[ConsumerUserEventWithRulesResult]:
+ """
+ ### GET a Consumer User Event
+ You can retrieve any consumer user event you created using the [POST Consumer User Events](/api-reference/api-reference/consumer-user-events/create) call.
+
+ Parameters
+ ----------
+ event_id : str
+ Unique Consumer User Event Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[ConsumerUserEventWithRulesResult]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"events/consumer/user/{jsonable_encoder(event_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ ConsumerUserEventWithRulesResult,
+ parse_obj_as(
+ type_=ConsumerUserEventWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/consumer_users/__init__.py b/src/flagright/consumer_users/__init__.py
similarity index 100%
rename from src/flagright/resources/consumer_users/__init__.py
rename to src/flagright/consumer_users/__init__.py
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
new file mode 100644
index 0000000..a9b22e5
--- /dev/null
+++ b/src/flagright/consumer_users/client.py
@@ -0,0 +1,624 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from .raw_client import RawConsumerUsersClient
+from ..types.boolean_string import BooleanString
+from ..types.user_details import UserDetails
+from ..types.user_state_details import UserStateDetails
+from ..types.kyc_status_details import KycStatusDetails
+from ..types.employment_status import EmploymentStatus
+from ..types.legal_document import LegalDocument
+from ..types.contact_details import ContactDetails
+from ..types.employment_details import EmploymentDetails
+from ..types.transaction_limits import TransactionLimits
+from ..types.expected_income import ExpectedIncome
+from ..types.risk_level import RiskLevel
+from ..types.acquisition_channel import AcquisitionChannel
+from ..types.source_of_funds import SourceOfFunds
+from ..types.consumer_user_segment import ConsumerUserSegment
+from ..types.pep_status import PepStatus
+from ..types.user_entity_link import UserEntityLink
+from ..types.user_saved_payment_details_item import UserSavedPaymentDetailsItem
+from ..types.user_tag import UserTag
+from ..types.person_attachment import PersonAttachment
+from ..core.request_options import RequestOptions
+from .types.consumer_users_create_response import ConsumerUsersCreateResponse
+from ..types.user_with_rules_result import UserWithRulesResult
+from ..core.client_wrapper import AsyncClientWrapper
+from .raw_client import AsyncRawConsumerUsersClient
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class ConsumerUsersClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._raw_client = RawConsumerUsersClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> RawConsumerUsersClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ RawConsumerUsersClient
+ """
+ return self._raw_client
+
+ def create(
+ self,
+ *,
+ user_id: str,
+ created_timestamp: float,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ validate_user_id: typing.Optional[BooleanString] = None,
+ krs_only: typing.Optional[BooleanString] = None,
+ activated_timestamp: typing.Optional[float] = OMIT,
+ user_details: typing.Optional[UserDetails] = OMIT,
+ user_state_details: typing.Optional[UserStateDetails] = OMIT,
+ kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ eodd_date: typing.Optional[float] = OMIT,
+ employment_status: typing.Optional[EmploymentStatus] = OMIT,
+ occupation: typing.Optional[str] = OMIT,
+ legal_documents: typing.Optional[typing.Sequence[LegalDocument]] = OMIT,
+ contact_details: typing.Optional[ContactDetails] = OMIT,
+ employment_details: typing.Optional[EmploymentDetails] = OMIT,
+ transaction_limits: typing.Optional[TransactionLimits] = OMIT,
+ expected_income: typing.Optional[ExpectedIncome] = OMIT,
+ risk_level: typing.Optional[RiskLevel] = OMIT,
+ kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
+ acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
+ reason_for_account_opening: typing.Optional[typing.Sequence[str]] = OMIT,
+ source_of_funds: typing.Optional[typing.Sequence[SourceOfFunds]] = OMIT,
+ user_segment: typing.Optional[ConsumerUserSegment] = OMIT,
+ pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
+ last_transaction_timestamp: typing.Optional[float] = OMIT,
+ linked_entities: typing.Optional[UserEntityLink] = OMIT,
+ saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
+ tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
+ attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> ConsumerUsersCreateResponse:
+ """
+ ## POST Consumer User
+
+ `/consumer/user` endpoint allows you to operate on the Consumer user entity.
+
+ In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+ ### Payload
+
+ Each consumer user needs two mandatory fields:
+
+ * `userId` - Unique identifier for the user
+ * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
+
+ Parameters
+ ----------
+ user_id : str
+ Unique user ID
+
+ created_timestamp : float
+ Timestamp when userId is created
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ validate_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate the userId
+
+ krs_only : typing.Optional[BooleanString]
+
+ activated_timestamp : typing.Optional[float]
+ Timestamp when user was activated
+
+ user_details : typing.Optional[UserDetails]
+
+ user_state_details : typing.Optional[UserStateDetails]
+
+ kyc_status_details : typing.Optional[KycStatusDetails]
+
+ eodd_date : typing.Optional[float]
+
+ employment_status : typing.Optional[EmploymentStatus]
+
+ occupation : typing.Optional[str]
+
+ legal_documents : typing.Optional[typing.Sequence[LegalDocument]]
+ User's legal identity documents - See Document Model for details
+
+ contact_details : typing.Optional[ContactDetails]
+
+ employment_details : typing.Optional[EmploymentDetails]
+
+ transaction_limits : typing.Optional[TransactionLimits]
+
+ expected_income : typing.Optional[ExpectedIncome]
+
+ risk_level : typing.Optional[RiskLevel]
+
+ kyc_risk_level : typing.Optional[RiskLevel]
+
+ acquisition_channel : typing.Optional[AcquisitionChannel]
+
+ reason_for_account_opening : typing.Optional[typing.Sequence[str]]
+
+ source_of_funds : typing.Optional[typing.Sequence[SourceOfFunds]]
+
+ user_segment : typing.Optional[ConsumerUserSegment]
+
+ pep_status : typing.Optional[typing.Sequence[PepStatus]]
+
+ last_transaction_timestamp : typing.Optional[float]
+ Timestamp of the last successful transaction of the user
+
+ linked_entities : typing.Optional[UserEntityLink]
+
+ saved_payment_details : typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]]
+
+ tags : typing.Optional[typing.Sequence[UserTag]]
+ Additional information that can be added via tags
+
+ attachments : typing.Optional[typing.Sequence[PersonAttachment]]
+ Uploaded user's attachment
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ ConsumerUsersCreateResponse
+ Created
+
+ Examples
+ --------
+ from flagright import (
+ Address,
+ ConsumerName,
+ ContactDetails,
+ Flagright,
+ LegalDocument,
+ Tag,
+ UserDetails,
+ UserTag,
+ )
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.consumer_users.create(
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ created_timestamp=1641654664000.0,
+ user_details=UserDetails(
+ name=ConsumerName(
+ first_name="Baran",
+ middle_name="Realblood",
+ last_name="Ozkan",
+ ),
+ date_of_birth="1991-01-01",
+ country_of_residence="US",
+ country_of_nationality="DE",
+ ),
+ legal_documents=[
+ LegalDocument(
+ document_type="passport",
+ document_number="Z9431P",
+ document_issued_date=1639939034000.0,
+ document_expiration_date=1839939034000.0,
+ document_issued_country="DE",
+ tags=[
+ Tag(
+ key="customerType",
+ value="wallet",
+ )
+ ],
+ )
+ ],
+ contact_details=ContactDetails(
+ email_ids=["baran@flagright.com"],
+ contact_numbers=["+37112345432"],
+ websites=["flagright.com"],
+ addresses=[
+ Address(
+ address_lines=["Klara-Franke Str 20"],
+ postcode="10557",
+ city="Berlin",
+ state="Berlin",
+ country="Germany",
+ tags=[
+ Tag(
+ key="customKey",
+ value="customValue",
+ )
+ ],
+ )
+ ],
+ ),
+ tags=[
+ UserTag(
+ key="customKey",
+ value="customValue",
+ )
+ ],
+ )
+ """
+ response = self._raw_client.create(
+ user_id=user_id,
+ created_timestamp=created_timestamp,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ validate_user_id=validate_user_id,
+ krs_only=krs_only,
+ activated_timestamp=activated_timestamp,
+ user_details=user_details,
+ user_state_details=user_state_details,
+ kyc_status_details=kyc_status_details,
+ eodd_date=eodd_date,
+ employment_status=employment_status,
+ occupation=occupation,
+ legal_documents=legal_documents,
+ contact_details=contact_details,
+ employment_details=employment_details,
+ transaction_limits=transaction_limits,
+ expected_income=expected_income,
+ risk_level=risk_level,
+ kyc_risk_level=kyc_risk_level,
+ acquisition_channel=acquisition_channel,
+ reason_for_account_opening=reason_for_account_opening,
+ source_of_funds=source_of_funds,
+ user_segment=user_segment,
+ pep_status=pep_status,
+ last_transaction_timestamp=last_transaction_timestamp,
+ linked_entities=linked_entities,
+ saved_payment_details=saved_payment_details,
+ tags=tags,
+ attachments=attachments,
+ request_options=request_options,
+ )
+ return response.data
+
+ def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> UserWithRulesResult:
+ """
+ ### GET Consumer User
+
+ `/consumer/user` endpoint allows you to operate on the Consumer User entity.
+
+ Calling `GET /consumer/user/{userId}` will return the entire user payload and rule execution results for the user with the corresponding `userId`
+
+ Parameters
+ ----------
+ user_id : str
+
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ UserWithRulesResult
+ OK
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.consumer_users.get(
+ user_id="userId",
+ )
+ """
+ response = self._raw_client.get(user_id, request_options=request_options)
+ return response.data
+
+
+class AsyncConsumerUsersClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._raw_client = AsyncRawConsumerUsersClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> AsyncRawConsumerUsersClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ AsyncRawConsumerUsersClient
+ """
+ return self._raw_client
+
+ async def create(
+ self,
+ *,
+ user_id: str,
+ created_timestamp: float,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ validate_user_id: typing.Optional[BooleanString] = None,
+ krs_only: typing.Optional[BooleanString] = None,
+ activated_timestamp: typing.Optional[float] = OMIT,
+ user_details: typing.Optional[UserDetails] = OMIT,
+ user_state_details: typing.Optional[UserStateDetails] = OMIT,
+ kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ eodd_date: typing.Optional[float] = OMIT,
+ employment_status: typing.Optional[EmploymentStatus] = OMIT,
+ occupation: typing.Optional[str] = OMIT,
+ legal_documents: typing.Optional[typing.Sequence[LegalDocument]] = OMIT,
+ contact_details: typing.Optional[ContactDetails] = OMIT,
+ employment_details: typing.Optional[EmploymentDetails] = OMIT,
+ transaction_limits: typing.Optional[TransactionLimits] = OMIT,
+ expected_income: typing.Optional[ExpectedIncome] = OMIT,
+ risk_level: typing.Optional[RiskLevel] = OMIT,
+ kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
+ acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
+ reason_for_account_opening: typing.Optional[typing.Sequence[str]] = OMIT,
+ source_of_funds: typing.Optional[typing.Sequence[SourceOfFunds]] = OMIT,
+ user_segment: typing.Optional[ConsumerUserSegment] = OMIT,
+ pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
+ last_transaction_timestamp: typing.Optional[float] = OMIT,
+ linked_entities: typing.Optional[UserEntityLink] = OMIT,
+ saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
+ tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
+ attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> ConsumerUsersCreateResponse:
+ """
+ ## POST Consumer User
+
+ `/consumer/user` endpoint allows you to operate on the Consumer user entity.
+
+ In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+ ### Payload
+
+ Each consumer user needs two mandatory fields:
+
+ * `userId` - Unique identifier for the user
+ * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
+
+ Parameters
+ ----------
+ user_id : str
+ Unique user ID
+
+ created_timestamp : float
+ Timestamp when userId is created
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ validate_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate the userId
+
+ krs_only : typing.Optional[BooleanString]
+
+ activated_timestamp : typing.Optional[float]
+ Timestamp when user was activated
+
+ user_details : typing.Optional[UserDetails]
+
+ user_state_details : typing.Optional[UserStateDetails]
+
+ kyc_status_details : typing.Optional[KycStatusDetails]
+
+ eodd_date : typing.Optional[float]
+
+ employment_status : typing.Optional[EmploymentStatus]
+
+ occupation : typing.Optional[str]
+
+ legal_documents : typing.Optional[typing.Sequence[LegalDocument]]
+ User's legal identity documents - See Document Model for details
+
+ contact_details : typing.Optional[ContactDetails]
+
+ employment_details : typing.Optional[EmploymentDetails]
+
+ transaction_limits : typing.Optional[TransactionLimits]
+
+ expected_income : typing.Optional[ExpectedIncome]
+
+ risk_level : typing.Optional[RiskLevel]
+
+ kyc_risk_level : typing.Optional[RiskLevel]
+
+ acquisition_channel : typing.Optional[AcquisitionChannel]
+
+ reason_for_account_opening : typing.Optional[typing.Sequence[str]]
+
+ source_of_funds : typing.Optional[typing.Sequence[SourceOfFunds]]
+
+ user_segment : typing.Optional[ConsumerUserSegment]
+
+ pep_status : typing.Optional[typing.Sequence[PepStatus]]
+
+ last_transaction_timestamp : typing.Optional[float]
+ Timestamp of the last successful transaction of the user
+
+ linked_entities : typing.Optional[UserEntityLink]
+
+ saved_payment_details : typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]]
+
+ tags : typing.Optional[typing.Sequence[UserTag]]
+ Additional information that can be added via tags
+
+ attachments : typing.Optional[typing.Sequence[PersonAttachment]]
+ Uploaded user's attachment
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ ConsumerUsersCreateResponse
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import (
+ Address,
+ AsyncFlagright,
+ ConsumerName,
+ ContactDetails,
+ LegalDocument,
+ Tag,
+ UserDetails,
+ UserTag,
+ )
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.consumer_users.create(
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ created_timestamp=1641654664000.0,
+ user_details=UserDetails(
+ name=ConsumerName(
+ first_name="Baran",
+ middle_name="Realblood",
+ last_name="Ozkan",
+ ),
+ date_of_birth="1991-01-01",
+ country_of_residence="US",
+ country_of_nationality="DE",
+ ),
+ legal_documents=[
+ LegalDocument(
+ document_type="passport",
+ document_number="Z9431P",
+ document_issued_date=1639939034000.0,
+ document_expiration_date=1839939034000.0,
+ document_issued_country="DE",
+ tags=[
+ Tag(
+ key="customerType",
+ value="wallet",
+ )
+ ],
+ )
+ ],
+ contact_details=ContactDetails(
+ email_ids=["baran@flagright.com"],
+ contact_numbers=["+37112345432"],
+ websites=["flagright.com"],
+ addresses=[
+ Address(
+ address_lines=["Klara-Franke Str 20"],
+ postcode="10557",
+ city="Berlin",
+ state="Berlin",
+ country="Germany",
+ tags=[
+ Tag(
+ key="customKey",
+ value="customValue",
+ )
+ ],
+ )
+ ],
+ ),
+ tags=[
+ UserTag(
+ key="customKey",
+ value="customValue",
+ )
+ ],
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.create(
+ user_id=user_id,
+ created_timestamp=created_timestamp,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ validate_user_id=validate_user_id,
+ krs_only=krs_only,
+ activated_timestamp=activated_timestamp,
+ user_details=user_details,
+ user_state_details=user_state_details,
+ kyc_status_details=kyc_status_details,
+ eodd_date=eodd_date,
+ employment_status=employment_status,
+ occupation=occupation,
+ legal_documents=legal_documents,
+ contact_details=contact_details,
+ employment_details=employment_details,
+ transaction_limits=transaction_limits,
+ expected_income=expected_income,
+ risk_level=risk_level,
+ kyc_risk_level=kyc_risk_level,
+ acquisition_channel=acquisition_channel,
+ reason_for_account_opening=reason_for_account_opening,
+ source_of_funds=source_of_funds,
+ user_segment=user_segment,
+ pep_status=pep_status,
+ last_transaction_timestamp=last_transaction_timestamp,
+ linked_entities=linked_entities,
+ saved_payment_details=saved_payment_details,
+ tags=tags,
+ attachments=attachments,
+ request_options=request_options,
+ )
+ return response.data
+
+ async def get(
+ self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> UserWithRulesResult:
+ """
+ ### GET Consumer User
+
+ `/consumer/user` endpoint allows you to operate on the Consumer User entity.
+
+ Calling `GET /consumer/user/{userId}` will return the entire user payload and rule execution results for the user with the corresponding `userId`
+
+ Parameters
+ ----------
+ user_id : str
+
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ UserWithRulesResult
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.consumer_users.get(
+ user_id="userId",
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.get(user_id, request_options=request_options)
+ return response.data
diff --git a/src/flagright/consumer_users/raw_client.py b/src/flagright/consumer_users/raw_client.py
new file mode 100644
index 0000000..5f15617
--- /dev/null
+++ b/src/flagright/consumer_users/raw_client.py
@@ -0,0 +1,681 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from ..types.boolean_string import BooleanString
+from ..types.user_details import UserDetails
+from ..types.user_state_details import UserStateDetails
+from ..types.kyc_status_details import KycStatusDetails
+from ..types.employment_status import EmploymentStatus
+from ..types.legal_document import LegalDocument
+from ..types.contact_details import ContactDetails
+from ..types.employment_details import EmploymentDetails
+from ..types.transaction_limits import TransactionLimits
+from ..types.expected_income import ExpectedIncome
+from ..types.risk_level import RiskLevel
+from ..types.acquisition_channel import AcquisitionChannel
+from ..types.source_of_funds import SourceOfFunds
+from ..types.consumer_user_segment import ConsumerUserSegment
+from ..types.pep_status import PepStatus
+from ..types.user_entity_link import UserEntityLink
+from ..types.user_saved_payment_details_item import UserSavedPaymentDetailsItem
+from ..types.user_tag import UserTag
+from ..types.person_attachment import PersonAttachment
+from ..core.request_options import RequestOptions
+from ..core.http_response import HttpResponse
+from .types.consumer_users_create_response import ConsumerUsersCreateResponse
+from ..core.serialization import convert_and_respect_annotation_metadata
+from ..core.pydantic_utilities import parse_obj_as
+from ..errors.bad_request_error import BadRequestError
+from ..types.api_error_response import ApiErrorResponse
+from ..errors.unauthorized_error import UnauthorizedError
+from ..errors.too_many_requests_error import TooManyRequestsError
+from json.decoder import JSONDecodeError
+from ..core.api_error import ApiError
+from ..types.user_with_rules_result import UserWithRulesResult
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.client_wrapper import AsyncClientWrapper
+from ..core.http_response import AsyncHttpResponse
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class RawConsumerUsersClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ def create(
+ self,
+ *,
+ user_id: str,
+ created_timestamp: float,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ validate_user_id: typing.Optional[BooleanString] = None,
+ krs_only: typing.Optional[BooleanString] = None,
+ activated_timestamp: typing.Optional[float] = OMIT,
+ user_details: typing.Optional[UserDetails] = OMIT,
+ user_state_details: typing.Optional[UserStateDetails] = OMIT,
+ kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ eodd_date: typing.Optional[float] = OMIT,
+ employment_status: typing.Optional[EmploymentStatus] = OMIT,
+ occupation: typing.Optional[str] = OMIT,
+ legal_documents: typing.Optional[typing.Sequence[LegalDocument]] = OMIT,
+ contact_details: typing.Optional[ContactDetails] = OMIT,
+ employment_details: typing.Optional[EmploymentDetails] = OMIT,
+ transaction_limits: typing.Optional[TransactionLimits] = OMIT,
+ expected_income: typing.Optional[ExpectedIncome] = OMIT,
+ risk_level: typing.Optional[RiskLevel] = OMIT,
+ kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
+ acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
+ reason_for_account_opening: typing.Optional[typing.Sequence[str]] = OMIT,
+ source_of_funds: typing.Optional[typing.Sequence[SourceOfFunds]] = OMIT,
+ user_segment: typing.Optional[ConsumerUserSegment] = OMIT,
+ pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
+ last_transaction_timestamp: typing.Optional[float] = OMIT,
+ linked_entities: typing.Optional[UserEntityLink] = OMIT,
+ saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
+ tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
+ attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[ConsumerUsersCreateResponse]:
+ """
+ ## POST Consumer User
+
+ `/consumer/user` endpoint allows you to operate on the Consumer user entity.
+
+ In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+ ### Payload
+
+ Each consumer user needs two mandatory fields:
+
+ * `userId` - Unique identifier for the user
+ * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
+
+ Parameters
+ ----------
+ user_id : str
+ Unique user ID
+
+ created_timestamp : float
+ Timestamp when userId is created
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ validate_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate the userId
+
+ krs_only : typing.Optional[BooleanString]
+
+ activated_timestamp : typing.Optional[float]
+ Timestamp when user was activated
+
+ user_details : typing.Optional[UserDetails]
+
+ user_state_details : typing.Optional[UserStateDetails]
+
+ kyc_status_details : typing.Optional[KycStatusDetails]
+
+ eodd_date : typing.Optional[float]
+
+ employment_status : typing.Optional[EmploymentStatus]
+
+ occupation : typing.Optional[str]
+
+ legal_documents : typing.Optional[typing.Sequence[LegalDocument]]
+ User's legal identity documents - See Document Model for details
+
+ contact_details : typing.Optional[ContactDetails]
+
+ employment_details : typing.Optional[EmploymentDetails]
+
+ transaction_limits : typing.Optional[TransactionLimits]
+
+ expected_income : typing.Optional[ExpectedIncome]
+
+ risk_level : typing.Optional[RiskLevel]
+
+ kyc_risk_level : typing.Optional[RiskLevel]
+
+ acquisition_channel : typing.Optional[AcquisitionChannel]
+
+ reason_for_account_opening : typing.Optional[typing.Sequence[str]]
+
+ source_of_funds : typing.Optional[typing.Sequence[SourceOfFunds]]
+
+ user_segment : typing.Optional[ConsumerUserSegment]
+
+ pep_status : typing.Optional[typing.Sequence[PepStatus]]
+
+ last_transaction_timestamp : typing.Optional[float]
+ Timestamp of the last successful transaction of the user
+
+ linked_entities : typing.Optional[UserEntityLink]
+
+ saved_payment_details : typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]]
+
+ tags : typing.Optional[typing.Sequence[UserTag]]
+ Additional information that can be added via tags
+
+ attachments : typing.Optional[typing.Sequence[PersonAttachment]]
+ Uploaded user's attachment
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[ConsumerUsersCreateResponse]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "consumer/users",
+ method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "validateUserId": validate_user_id,
+ "_krsOnly": krs_only,
+ },
+ json={
+ "userId": user_id,
+ "createdTimestamp": created_timestamp,
+ "activatedTimestamp": activated_timestamp,
+ "userDetails": convert_and_respect_annotation_metadata(
+ object_=user_details, annotation=UserDetails, direction="write"
+ ),
+ "userStateDetails": convert_and_respect_annotation_metadata(
+ object_=user_state_details, annotation=UserStateDetails, direction="write"
+ ),
+ "kycStatusDetails": convert_and_respect_annotation_metadata(
+ object_=kyc_status_details, annotation=KycStatusDetails, direction="write"
+ ),
+ "eoddDate": eodd_date,
+ "employmentStatus": employment_status,
+ "occupation": occupation,
+ "legalDocuments": convert_and_respect_annotation_metadata(
+ object_=legal_documents, annotation=typing.Sequence[LegalDocument], direction="write"
+ ),
+ "contactDetails": convert_and_respect_annotation_metadata(
+ object_=contact_details, annotation=ContactDetails, direction="write"
+ ),
+ "employmentDetails": convert_and_respect_annotation_metadata(
+ object_=employment_details, annotation=EmploymentDetails, direction="write"
+ ),
+ "transactionLimits": convert_and_respect_annotation_metadata(
+ object_=transaction_limits, annotation=TransactionLimits, direction="write"
+ ),
+ "expectedIncome": convert_and_respect_annotation_metadata(
+ object_=expected_income, annotation=ExpectedIncome, direction="write"
+ ),
+ "riskLevel": risk_level,
+ "kycRiskLevel": kyc_risk_level,
+ "acquisitionChannel": acquisition_channel,
+ "reasonForAccountOpening": reason_for_account_opening,
+ "sourceOfFunds": source_of_funds,
+ "userSegment": user_segment,
+ "pepStatus": convert_and_respect_annotation_metadata(
+ object_=pep_status, annotation=typing.Sequence[PepStatus], direction="write"
+ ),
+ "lastTransactionTimestamp": last_transaction_timestamp,
+ "linkedEntities": convert_and_respect_annotation_metadata(
+ object_=linked_entities, annotation=UserEntityLink, direction="write"
+ ),
+ "savedPaymentDetails": convert_and_respect_annotation_metadata(
+ object_=saved_payment_details,
+ annotation=typing.Sequence[UserSavedPaymentDetailsItem],
+ direction="write",
+ ),
+ "tags": convert_and_respect_annotation_metadata(
+ object_=tags, annotation=typing.Sequence[UserTag], direction="write"
+ ),
+ "attachments": convert_and_respect_annotation_metadata(
+ object_=attachments, annotation=typing.Sequence[PersonAttachment], direction="write"
+ ),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ ConsumerUsersCreateResponse,
+ parse_obj_as(
+ type_=ConsumerUsersCreateResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def get(
+ self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[UserWithRulesResult]:
+ """
+ ### GET Consumer User
+
+ `/consumer/user` endpoint allows you to operate on the Consumer User entity.
+
+ Calling `GET /consumer/user/{userId}` will return the entire user payload and rule execution results for the user with the corresponding `userId`
+
+ Parameters
+ ----------
+ user_id : str
+
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[UserWithRulesResult]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"consumer/users/{jsonable_encoder(user_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ UserWithRulesResult,
+ parse_obj_as(
+ type_=UserWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+
+class AsyncRawConsumerUsersClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def create(
+ self,
+ *,
+ user_id: str,
+ created_timestamp: float,
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ validate_user_id: typing.Optional[BooleanString] = None,
+ krs_only: typing.Optional[BooleanString] = None,
+ activated_timestamp: typing.Optional[float] = OMIT,
+ user_details: typing.Optional[UserDetails] = OMIT,
+ user_state_details: typing.Optional[UserStateDetails] = OMIT,
+ kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ eodd_date: typing.Optional[float] = OMIT,
+ employment_status: typing.Optional[EmploymentStatus] = OMIT,
+ occupation: typing.Optional[str] = OMIT,
+ legal_documents: typing.Optional[typing.Sequence[LegalDocument]] = OMIT,
+ contact_details: typing.Optional[ContactDetails] = OMIT,
+ employment_details: typing.Optional[EmploymentDetails] = OMIT,
+ transaction_limits: typing.Optional[TransactionLimits] = OMIT,
+ expected_income: typing.Optional[ExpectedIncome] = OMIT,
+ risk_level: typing.Optional[RiskLevel] = OMIT,
+ kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
+ acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
+ reason_for_account_opening: typing.Optional[typing.Sequence[str]] = OMIT,
+ source_of_funds: typing.Optional[typing.Sequence[SourceOfFunds]] = OMIT,
+ user_segment: typing.Optional[ConsumerUserSegment] = OMIT,
+ pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
+ last_transaction_timestamp: typing.Optional[float] = OMIT,
+ linked_entities: typing.Optional[UserEntityLink] = OMIT,
+ saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
+ tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
+ attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[ConsumerUsersCreateResponse]:
+ """
+ ## POST Consumer User
+
+ `/consumer/user` endpoint allows you to operate on the Consumer user entity.
+
+ In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+ ### Payload
+
+ Each consumer user needs two mandatory fields:
+
+ * `userId` - Unique identifier for the user
+ * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
+
+ Parameters
+ ----------
+ user_id : str
+ Unique user ID
+
+ created_timestamp : float
+ Timestamp when userId is created
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ validate_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate the userId
+
+ krs_only : typing.Optional[BooleanString]
+
+ activated_timestamp : typing.Optional[float]
+ Timestamp when user was activated
+
+ user_details : typing.Optional[UserDetails]
+
+ user_state_details : typing.Optional[UserStateDetails]
+
+ kyc_status_details : typing.Optional[KycStatusDetails]
+
+ eodd_date : typing.Optional[float]
+
+ employment_status : typing.Optional[EmploymentStatus]
+
+ occupation : typing.Optional[str]
+
+ legal_documents : typing.Optional[typing.Sequence[LegalDocument]]
+ User's legal identity documents - See Document Model for details
+
+ contact_details : typing.Optional[ContactDetails]
+
+ employment_details : typing.Optional[EmploymentDetails]
+
+ transaction_limits : typing.Optional[TransactionLimits]
+
+ expected_income : typing.Optional[ExpectedIncome]
+
+ risk_level : typing.Optional[RiskLevel]
+
+ kyc_risk_level : typing.Optional[RiskLevel]
+
+ acquisition_channel : typing.Optional[AcquisitionChannel]
+
+ reason_for_account_opening : typing.Optional[typing.Sequence[str]]
+
+ source_of_funds : typing.Optional[typing.Sequence[SourceOfFunds]]
+
+ user_segment : typing.Optional[ConsumerUserSegment]
+
+ pep_status : typing.Optional[typing.Sequence[PepStatus]]
+
+ last_transaction_timestamp : typing.Optional[float]
+ Timestamp of the last successful transaction of the user
+
+ linked_entities : typing.Optional[UserEntityLink]
+
+ saved_payment_details : typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]]
+
+ tags : typing.Optional[typing.Sequence[UserTag]]
+ Additional information that can be added via tags
+
+ attachments : typing.Optional[typing.Sequence[PersonAttachment]]
+ Uploaded user's attachment
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[ConsumerUsersCreateResponse]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "consumer/users",
+ method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ "validateUserId": validate_user_id,
+ "_krsOnly": krs_only,
+ },
+ json={
+ "userId": user_id,
+ "createdTimestamp": created_timestamp,
+ "activatedTimestamp": activated_timestamp,
+ "userDetails": convert_and_respect_annotation_metadata(
+ object_=user_details, annotation=UserDetails, direction="write"
+ ),
+ "userStateDetails": convert_and_respect_annotation_metadata(
+ object_=user_state_details, annotation=UserStateDetails, direction="write"
+ ),
+ "kycStatusDetails": convert_and_respect_annotation_metadata(
+ object_=kyc_status_details, annotation=KycStatusDetails, direction="write"
+ ),
+ "eoddDate": eodd_date,
+ "employmentStatus": employment_status,
+ "occupation": occupation,
+ "legalDocuments": convert_and_respect_annotation_metadata(
+ object_=legal_documents, annotation=typing.Sequence[LegalDocument], direction="write"
+ ),
+ "contactDetails": convert_and_respect_annotation_metadata(
+ object_=contact_details, annotation=ContactDetails, direction="write"
+ ),
+ "employmentDetails": convert_and_respect_annotation_metadata(
+ object_=employment_details, annotation=EmploymentDetails, direction="write"
+ ),
+ "transactionLimits": convert_and_respect_annotation_metadata(
+ object_=transaction_limits, annotation=TransactionLimits, direction="write"
+ ),
+ "expectedIncome": convert_and_respect_annotation_metadata(
+ object_=expected_income, annotation=ExpectedIncome, direction="write"
+ ),
+ "riskLevel": risk_level,
+ "kycRiskLevel": kyc_risk_level,
+ "acquisitionChannel": acquisition_channel,
+ "reasonForAccountOpening": reason_for_account_opening,
+ "sourceOfFunds": source_of_funds,
+ "userSegment": user_segment,
+ "pepStatus": convert_and_respect_annotation_metadata(
+ object_=pep_status, annotation=typing.Sequence[PepStatus], direction="write"
+ ),
+ "lastTransactionTimestamp": last_transaction_timestamp,
+ "linkedEntities": convert_and_respect_annotation_metadata(
+ object_=linked_entities, annotation=UserEntityLink, direction="write"
+ ),
+ "savedPaymentDetails": convert_and_respect_annotation_metadata(
+ object_=saved_payment_details,
+ annotation=typing.Sequence[UserSavedPaymentDetailsItem],
+ direction="write",
+ ),
+ "tags": convert_and_respect_annotation_metadata(
+ object_=tags, annotation=typing.Sequence[UserTag], direction="write"
+ ),
+ "attachments": convert_and_respect_annotation_metadata(
+ object_=attachments, annotation=typing.Sequence[PersonAttachment], direction="write"
+ ),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ ConsumerUsersCreateResponse,
+ parse_obj_as(
+ type_=ConsumerUsersCreateResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def get(
+ self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[UserWithRulesResult]:
+ """
+ ### GET Consumer User
+
+ `/consumer/user` endpoint allows you to operate on the Consumer User entity.
+
+ Calling `GET /consumer/user/{userId}` will return the entire user payload and rule execution results for the user with the corresponding `userId`
+
+ Parameters
+ ----------
+ user_id : str
+
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[UserWithRulesResult]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"consumer/users/{jsonable_encoder(user_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ UserWithRulesResult,
+ parse_obj_as(
+ type_=UserWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/consumer_users/types/__init__.py b/src/flagright/consumer_users/types/__init__.py
similarity index 100%
rename from src/flagright/resources/consumer_users/types/__init__.py
rename to src/flagright/consumer_users/types/__init__.py
diff --git a/src/flagright/consumer_users/types/consumer_users_create_response.py b/src/flagright/consumer_users/types/consumer_users_create_response.py
new file mode 100644
index 0000000..55a9adf
--- /dev/null
+++ b/src/flagright/consumer_users/types/consumer_users_create_response.py
@@ -0,0 +1,19 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ...types.consumer_user_monitoring_result import ConsumerUserMonitoringResult
+import typing
+from ...core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class ConsumerUsersCreateResponse(ConsumerUserMonitoringResult):
+ message: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/core/__init__.py b/src/flagright/core/__init__.py
index 2414955..7a7ee41 100644
--- a/src/flagright/core/__init__.py
+++ b/src/flagright/core/__init__.py
@@ -3,15 +3,48 @@
from .api_error import ApiError
from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper
from .datetime_utils import serialize_datetime
+from .file import File, convert_file_dict_to_httpx_tuples, with_content_type
+from .http_client import AsyncHttpClient, HttpClient
+from .http_response import AsyncHttpResponse, HttpResponse
from .jsonable_encoder import jsonable_encoder
+from .pydantic_utilities import (
+ IS_PYDANTIC_V2,
+ UniversalBaseModel,
+ UniversalRootModel,
+ parse_obj_as,
+ universal_field_validator,
+ universal_root_validator,
+ update_forward_refs,
+)
+from .query_encoder import encode_query
from .remove_none_from_dict import remove_none_from_dict
+from .request_options import RequestOptions
+from .serialization import FieldMetadata, convert_and_respect_annotation_metadata
__all__ = [
"ApiError",
"AsyncClientWrapper",
+ "AsyncHttpClient",
+ "AsyncHttpResponse",
"BaseClientWrapper",
+ "FieldMetadata",
+ "File",
+ "HttpClient",
+ "HttpResponse",
+ "IS_PYDANTIC_V2",
+ "RequestOptions",
"SyncClientWrapper",
+ "UniversalBaseModel",
+ "UniversalRootModel",
+ "convert_and_respect_annotation_metadata",
+ "convert_file_dict_to_httpx_tuples",
+ "encode_query",
"jsonable_encoder",
+ "parse_obj_as",
"remove_none_from_dict",
"serialize_datetime",
+ "universal_field_validator",
+ "universal_root_validator",
+ "update_forward_refs",
+ "with_content_type",
]
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index a58adeb..c72d04f 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -1,20 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
import httpx
+from .http_client import HttpClient
+from .http_client import AsyncHttpClient
class BaseClientWrapper:
- def __init__(self, *, api_key: str, base_url: str):
+ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[float] = None):
self.api_key = api_key
self._base_url = base_url
+ self._timeout = timeout
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
+ "User-Agent": "flagright/v1.7.1",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.6.53",
+ "X-Fern-SDK-Version": "v1.7.1",
}
headers["x-api-key"] = self.api_key
return headers
@@ -22,14 +25,31 @@ def get_headers(self) -> typing.Dict[str, str]:
def get_base_url(self) -> str:
return self._base_url
+ def get_timeout(self) -> typing.Optional[float]:
+ return self._timeout
+
class SyncClientWrapper(BaseClientWrapper):
- def __init__(self, *, api_key: str, base_url: str, httpx_client: httpx.Client):
- super().__init__(api_key=api_key, base_url=base_url)
- self.httpx_client = httpx_client
+ def __init__(
+ self, *, api_key: str, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.Client
+ ):
+ super().__init__(api_key=api_key, base_url=base_url, timeout=timeout)
+ self.httpx_client = HttpClient(
+ httpx_client=httpx_client,
+ base_headers=self.get_headers,
+ base_timeout=self.get_timeout,
+ base_url=self.get_base_url,
+ )
class AsyncClientWrapper(BaseClientWrapper):
- def __init__(self, *, api_key: str, base_url: str, httpx_client: httpx.AsyncClient):
- super().__init__(api_key=api_key, base_url=base_url)
- self.httpx_client = httpx_client
+ def __init__(
+ self, *, api_key: str, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.AsyncClient
+ ):
+ super().__init__(api_key=api_key, base_url=base_url, timeout=timeout)
+ self.httpx_client = AsyncHttpClient(
+ httpx_client=httpx_client,
+ base_headers=self.get_headers,
+ base_timeout=self.get_timeout,
+ base_url=self.get_base_url,
+ )
diff --git a/src/flagright/core/file.py b/src/flagright/core/file.py
new file mode 100644
index 0000000..44b0d27
--- /dev/null
+++ b/src/flagright/core/file.py
@@ -0,0 +1,67 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from typing import IO, Dict, List, Mapping, Optional, Tuple, Union, cast
+
+# File typing inspired by the flexibility of types within the httpx library
+# https://github.com/encode/httpx/blob/master/httpx/_types.py
+FileContent = Union[IO[bytes], bytes, str]
+File = Union[
+ # file (or bytes)
+ FileContent,
+ # (filename, file (or bytes))
+ Tuple[Optional[str], FileContent],
+ # (filename, file (or bytes), content_type)
+ Tuple[Optional[str], FileContent, Optional[str]],
+ # (filename, file (or bytes), content_type, headers)
+ Tuple[
+ Optional[str],
+ FileContent,
+ Optional[str],
+ Mapping[str, str],
+ ],
+]
+
+
+def convert_file_dict_to_httpx_tuples(
+ d: Dict[str, Union[File, List[File]]],
+) -> List[Tuple[str, File]]:
+ """
+ The format we use is a list of tuples, where the first element is the
+ name of the file and the second is the file object. Typically HTTPX wants
+ a dict, but to be able to send lists of files, you have to use the list
+ approach (which also works for non-lists)
+ https://github.com/encode/httpx/pull/1032
+ """
+
+ httpx_tuples = []
+ for key, file_like in d.items():
+ if isinstance(file_like, list):
+ for file_like_item in file_like:
+ httpx_tuples.append((key, file_like_item))
+ else:
+ httpx_tuples.append((key, file_like))
+ return httpx_tuples
+
+
+def with_content_type(*, file: File, default_content_type: str) -> File:
+ """
+ This function resolves to the file's content type, if provided, and defaults
+ to the default_content_type value if not.
+ """
+ if isinstance(file, tuple):
+ if len(file) == 2:
+ filename, content = cast(Tuple[Optional[str], FileContent], file) # type: ignore
+ return (filename, content, default_content_type)
+ elif len(file) == 3:
+ filename, content, file_content_type = cast(Tuple[Optional[str], FileContent, Optional[str]], file) # type: ignore
+ out_content_type = file_content_type or default_content_type
+ return (filename, content, out_content_type)
+ elif len(file) == 4:
+ filename, content, file_content_type, headers = cast( # type: ignore
+ Tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]], file
+ )
+ out_content_type = file_content_type or default_content_type
+ return (filename, content, out_content_type, headers)
+ else:
+ raise ValueError(f"Unexpected tuple length: {len(file)}")
+ return (None, file, default_content_type)
diff --git a/src/flagright/core/http_client.py b/src/flagright/core/http_client.py
new file mode 100644
index 0000000..e7bd4f7
--- /dev/null
+++ b/src/flagright/core/http_client.py
@@ -0,0 +1,497 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import asyncio
+import email.utils
+import re
+import time
+import typing
+import urllib.parse
+from contextlib import asynccontextmanager, contextmanager
+from random import random
+
+import httpx
+from .file import File, convert_file_dict_to_httpx_tuples
+from .jsonable_encoder import jsonable_encoder
+from .query_encoder import encode_query
+from .remove_none_from_dict import remove_none_from_dict
+from .request_options import RequestOptions
+
+INITIAL_RETRY_DELAY_SECONDS = 0.5
+MAX_RETRY_DELAY_SECONDS = 10
+MAX_RETRY_DELAY_SECONDS_FROM_HEADER = 30
+
+
+def _parse_retry_after(response_headers: httpx.Headers) -> typing.Optional[float]:
+ """
+ This function parses the `Retry-After` header in a HTTP response and returns the number of seconds to wait.
+
+ Inspired by the urllib3 retry implementation.
+ """
+ retry_after_ms = response_headers.get("retry-after-ms")
+ if retry_after_ms is not None:
+ try:
+ return int(retry_after_ms) / 1000 if retry_after_ms > 0 else 0
+ except Exception:
+ pass
+
+ retry_after = response_headers.get("retry-after")
+ if retry_after is None:
+ return None
+
+ # Attempt to parse the header as an int.
+ if re.match(r"^\s*[0-9]+\s*$", retry_after):
+ seconds = float(retry_after)
+ # Fallback to parsing it as a date.
+ else:
+ retry_date_tuple = email.utils.parsedate_tz(retry_after)
+ if retry_date_tuple is None:
+ return None
+ if retry_date_tuple[9] is None: # Python 2
+ # Assume UTC if no timezone was specified
+ # On Python2.7, parsedate_tz returns None for a timezone offset
+ # instead of 0 if no timezone is given, where mktime_tz treats
+ # a None timezone offset as local time.
+ retry_date_tuple = retry_date_tuple[:9] + (0,) + retry_date_tuple[10:]
+
+ retry_date = email.utils.mktime_tz(retry_date_tuple)
+ seconds = retry_date - time.time()
+
+ if seconds < 0:
+ seconds = 0
+
+ return seconds
+
+
+def _retry_timeout(response: httpx.Response, retries: int) -> float:
+ """
+ Determine the amount of time to wait before retrying a request.
+ This function begins by trying to parse a retry-after header from the response, and then proceeds to use exponential backoff
+ with a jitter to determine the number of seconds to wait.
+ """
+
+ # If the API asks us to wait a certain amount of time (and it's a reasonable amount), just do what it says.
+ retry_after = _parse_retry_after(response.headers)
+ if retry_after is not None and retry_after <= MAX_RETRY_DELAY_SECONDS_FROM_HEADER:
+ return retry_after
+
+ # Apply exponential backoff, capped at MAX_RETRY_DELAY_SECONDS.
+ retry_delay = min(INITIAL_RETRY_DELAY_SECONDS * pow(2.0, retries), MAX_RETRY_DELAY_SECONDS)
+
+ # Add a randomness / jitter to the retry delay to avoid overwhelming the server with retries.
+ timeout = retry_delay * (1 - 0.25 * random())
+ return timeout if timeout >= 0 else 0
+
+
+def _should_retry(response: httpx.Response) -> bool:
+ retryable_400s = [429, 408, 409]
+ return response.status_code >= 500 or response.status_code in retryable_400s
+
+
+def remove_omit_from_dict(
+ original: typing.Dict[str, typing.Optional[typing.Any]],
+ omit: typing.Optional[typing.Any],
+) -> typing.Dict[str, typing.Any]:
+ if omit is None:
+ return original
+ new: typing.Dict[str, typing.Any] = {}
+ for key, value in original.items():
+ if value is not omit:
+ new[key] = value
+ return new
+
+
+def maybe_filter_request_body(
+ data: typing.Optional[typing.Any],
+ request_options: typing.Optional[RequestOptions],
+ omit: typing.Optional[typing.Any],
+) -> typing.Optional[typing.Any]:
+ if data is None:
+ return (
+ jsonable_encoder(request_options.get("additional_body_parameters", {})) or {}
+ if request_options is not None
+ else None
+ )
+ elif not isinstance(data, typing.Mapping):
+ data_content = jsonable_encoder(data)
+ else:
+ data_content = {
+ **(jsonable_encoder(remove_omit_from_dict(data, omit))), # type: ignore
+ **(
+ jsonable_encoder(request_options.get("additional_body_parameters", {})) or {}
+ if request_options is not None
+ else {}
+ ),
+ }
+ return data_content
+
+
+# Abstracted out for testing purposes
+def get_request_body(
+ *,
+ json: typing.Optional[typing.Any],
+ data: typing.Optional[typing.Any],
+ request_options: typing.Optional[RequestOptions],
+ omit: typing.Optional[typing.Any],
+) -> typing.Tuple[typing.Optional[typing.Any], typing.Optional[typing.Any]]:
+ json_body = None
+ data_body = None
+ if data is not None:
+ data_body = maybe_filter_request_body(data, request_options, omit)
+ else:
+ # If both data and json are None, we send json data in the event extra properties are specified
+ json_body = maybe_filter_request_body(json, request_options, omit)
+
+ # If you have an empty JSON body, you should just send None
+ return (json_body if json_body != {} else None), data_body if data_body != {} else None
+
+
+class HttpClient:
+ def __init__(
+ self,
+ *,
+ httpx_client: httpx.Client,
+ base_timeout: typing.Callable[[], typing.Optional[float]],
+ base_headers: typing.Callable[[], typing.Dict[str, str]],
+ base_url: typing.Optional[typing.Callable[[], str]] = None,
+ ):
+ self.base_url = base_url
+ self.base_timeout = base_timeout
+ self.base_headers = base_headers
+ self.httpx_client = httpx_client
+
+ def get_base_url(self, maybe_base_url: typing.Optional[str]) -> str:
+ base_url = maybe_base_url
+ if self.base_url is not None and base_url is None:
+ base_url = self.base_url()
+
+ if base_url is None:
+ raise ValueError("A base_url is required to make this request, please provide one and try again.")
+ return base_url
+
+ def request(
+ self,
+ path: typing.Optional[str] = None,
+ *,
+ method: str,
+ base_url: typing.Optional[str] = None,
+ params: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ json: typing.Optional[typing.Any] = None,
+ data: typing.Optional[typing.Any] = None,
+ content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None,
+ files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None,
+ headers: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ retries: int = 2,
+ omit: typing.Optional[typing.Any] = None,
+ ) -> httpx.Response:
+ base_url = self.get_base_url(base_url)
+ timeout = (
+ request_options.get("timeout_in_seconds")
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
+ else self.base_timeout()
+ )
+
+ json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
+
+ response = self.httpx_client.request(
+ method=method,
+ url=urllib.parse.urljoin(f"{base_url}/", path),
+ headers=jsonable_encoder(
+ remove_none_from_dict(
+ {
+ **self.base_headers(),
+ **(headers if headers is not None else {}),
+ **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}),
+ }
+ )
+ ),
+ params=encode_query(
+ jsonable_encoder(
+ remove_none_from_dict(
+ remove_omit_from_dict(
+ {
+ **(params if params is not None else {}),
+ **(
+ request_options.get("additional_query_parameters", {}) or {}
+ if request_options is not None
+ else {}
+ ),
+ },
+ omit,
+ )
+ )
+ )
+ ),
+ json=json_body,
+ data=data_body,
+ content=content,
+ files=(
+ convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
+ if (files is not None and files is not omit)
+ else None
+ ),
+ timeout=timeout,
+ )
+
+ max_retries: int = request_options.get("max_retries", 0) if request_options is not None else 0
+ if _should_retry(response=response):
+ if max_retries > retries:
+ time.sleep(_retry_timeout(response=response, retries=retries))
+ return self.request(
+ path=path,
+ method=method,
+ base_url=base_url,
+ params=params,
+ json=json,
+ content=content,
+ files=files,
+ headers=headers,
+ request_options=request_options,
+ retries=retries + 1,
+ omit=omit,
+ )
+
+ return response
+
+ @contextmanager
+ def stream(
+ self,
+ path: typing.Optional[str] = None,
+ *,
+ method: str,
+ base_url: typing.Optional[str] = None,
+ params: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ json: typing.Optional[typing.Any] = None,
+ data: typing.Optional[typing.Any] = None,
+ content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None,
+ files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None,
+ headers: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ retries: int = 2,
+ omit: typing.Optional[typing.Any] = None,
+ ) -> typing.Iterator[httpx.Response]:
+ base_url = self.get_base_url(base_url)
+ timeout = (
+ request_options.get("timeout_in_seconds")
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
+ else self.base_timeout()
+ )
+
+ json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
+
+ with self.httpx_client.stream(
+ method=method,
+ url=urllib.parse.urljoin(f"{base_url}/", path),
+ headers=jsonable_encoder(
+ remove_none_from_dict(
+ {
+ **self.base_headers(),
+ **(headers if headers is not None else {}),
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
+ }
+ )
+ ),
+ params=encode_query(
+ jsonable_encoder(
+ remove_none_from_dict(
+ remove_omit_from_dict(
+ {
+ **(params if params is not None else {}),
+ **(
+ request_options.get("additional_query_parameters", {})
+ if request_options is not None
+ else {}
+ ),
+ },
+ omit,
+ )
+ )
+ )
+ ),
+ json=json_body,
+ data=data_body,
+ content=content,
+ files=(
+ convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
+ if (files is not None and files is not omit)
+ else None
+ ),
+ timeout=timeout,
+ ) as stream:
+ yield stream
+
+
+class AsyncHttpClient:
+ def __init__(
+ self,
+ *,
+ httpx_client: httpx.AsyncClient,
+ base_timeout: typing.Callable[[], typing.Optional[float]],
+ base_headers: typing.Callable[[], typing.Dict[str, str]],
+ base_url: typing.Optional[typing.Callable[[], str]] = None,
+ ):
+ self.base_url = base_url
+ self.base_timeout = base_timeout
+ self.base_headers = base_headers
+ self.httpx_client = httpx_client
+
+ def get_base_url(self, maybe_base_url: typing.Optional[str]) -> str:
+ base_url = maybe_base_url
+ if self.base_url is not None and base_url is None:
+ base_url = self.base_url()
+
+ if base_url is None:
+ raise ValueError("A base_url is required to make this request, please provide one and try again.")
+ return base_url
+
+ async def request(
+ self,
+ path: typing.Optional[str] = None,
+ *,
+ method: str,
+ base_url: typing.Optional[str] = None,
+ params: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ json: typing.Optional[typing.Any] = None,
+ data: typing.Optional[typing.Any] = None,
+ content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None,
+ files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None,
+ headers: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ retries: int = 2,
+ omit: typing.Optional[typing.Any] = None,
+ ) -> httpx.Response:
+ base_url = self.get_base_url(base_url)
+ timeout = (
+ request_options.get("timeout_in_seconds")
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
+ else self.base_timeout()
+ )
+
+ json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
+
+ # Add the input to each of these and do None-safety checks
+ response = await self.httpx_client.request(
+ method=method,
+ url=urllib.parse.urljoin(f"{base_url}/", path),
+ headers=jsonable_encoder(
+ remove_none_from_dict(
+ {
+ **self.base_headers(),
+ **(headers if headers is not None else {}),
+ **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}),
+ }
+ )
+ ),
+ params=encode_query(
+ jsonable_encoder(
+ remove_none_from_dict(
+ remove_omit_from_dict(
+ {
+ **(params if params is not None else {}),
+ **(
+ request_options.get("additional_query_parameters", {}) or {}
+ if request_options is not None
+ else {}
+ ),
+ },
+ omit,
+ )
+ )
+ )
+ ),
+ json=json_body,
+ data=data_body,
+ content=content,
+ files=(
+ convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
+ if files is not None
+ else None
+ ),
+ timeout=timeout,
+ )
+
+ max_retries: int = request_options.get("max_retries", 0) if request_options is not None else 0
+ if _should_retry(response=response):
+ if max_retries > retries:
+ await asyncio.sleep(_retry_timeout(response=response, retries=retries))
+ return await self.request(
+ path=path,
+ method=method,
+ base_url=base_url,
+ params=params,
+ json=json,
+ content=content,
+ files=files,
+ headers=headers,
+ request_options=request_options,
+ retries=retries + 1,
+ omit=omit,
+ )
+ return response
+
+ @asynccontextmanager
+ async def stream(
+ self,
+ path: typing.Optional[str] = None,
+ *,
+ method: str,
+ base_url: typing.Optional[str] = None,
+ params: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ json: typing.Optional[typing.Any] = None,
+ data: typing.Optional[typing.Any] = None,
+ content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None,
+ files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None,
+ headers: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ retries: int = 2,
+ omit: typing.Optional[typing.Any] = None,
+ ) -> typing.AsyncIterator[httpx.Response]:
+ base_url = self.get_base_url(base_url)
+ timeout = (
+ request_options.get("timeout_in_seconds")
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
+ else self.base_timeout()
+ )
+
+ json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
+
+ async with self.httpx_client.stream(
+ method=method,
+ url=urllib.parse.urljoin(f"{base_url}/", path),
+ headers=jsonable_encoder(
+ remove_none_from_dict(
+ {
+ **self.base_headers(),
+ **(headers if headers is not None else {}),
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
+ }
+ )
+ ),
+ params=encode_query(
+ jsonable_encoder(
+ remove_none_from_dict(
+ remove_omit_from_dict(
+ {
+ **(params if params is not None else {}),
+ **(
+ request_options.get("additional_query_parameters", {})
+ if request_options is not None
+ else {}
+ ),
+ },
+ omit=omit,
+ )
+ )
+ )
+ ),
+ json=json_body,
+ data=data_body,
+ content=content,
+ files=(
+ convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
+ if files is not None
+ else None
+ ),
+ timeout=timeout,
+ ) as stream:
+ yield stream
diff --git a/src/flagright/core/http_response.py b/src/flagright/core/http_response.py
new file mode 100644
index 0000000..c72a913
--- /dev/null
+++ b/src/flagright/core/http_response.py
@@ -0,0 +1,47 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from typing import Dict, Generic, TypeVar
+
+import httpx
+
+T = TypeVar("T")
+
+
+class HttpResponse(Generic[T]):
+ _response: httpx.Response
+ _data: T
+
+ def __init__(self, response: httpx.Response, data: T):
+ self._response = response
+ self._data = data
+
+ @property
+ def headers(self) -> Dict[str, str]:
+ return dict(self._response.headers)
+
+ @property
+ def data(self) -> T:
+ return self._data
+
+ def close(self) -> None:
+ self._response.close()
+
+
+class AsyncHttpResponse(Generic[T]):
+ _response: httpx.Response
+ _data: T
+
+ def __init__(self, response: httpx.Response, data: T):
+ self._response = response
+ self._data = data
+
+ @property
+ def headers(self) -> Dict[str, str]:
+ return dict(self._response.headers)
+
+ @property
+ def data(self) -> T:
+ return self._data
+
+ async def close(self) -> None:
+ await self._response.aclose()
diff --git a/src/flagright/core/jsonable_encoder.py b/src/flagright/core/jsonable_encoder.py
index 37238ab..afee366 100644
--- a/src/flagright/core/jsonable_encoder.py
+++ b/src/flagright/core/jsonable_encoder.py
@@ -8,37 +8,26 @@
https://github.com/tiangolo/fastapi/blob/master/fastapi/encoders.py
"""
+import base64
import dataclasses
import datetime as dt
-from collections import defaultdict
from enum import Enum
from pathlib import PurePath
from types import GeneratorType
-from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from typing import Any, Callable, Dict, List, Optional, Set, Union
+import pydantic
from .datetime_utils import serialize_datetime
+from .pydantic_utilities import (
+ IS_PYDANTIC_V2,
+ encode_by_type,
+ to_jsonable_with_fallback,
+)
SetIntStr = Set[Union[int, str]]
DictIntStrAny = Dict[Union[int, str], Any]
-def generate_encoders_by_class_tuples(
- type_encoder_map: Dict[Any, Callable[[Any], Any]]
-) -> Dict[Callable[[Any], Any], Tuple[Any, ...]]:
- encoders_by_class_tuples: Dict[Callable[[Any], Any], Tuple[Any, ...]] = defaultdict(tuple)
- for type_, encoder in type_encoder_map.items():
- encoders_by_class_tuples[encoder] += (type_,)
- return encoders_by_class_tuples
-
-
-encoders_by_class_tuples = generate_encoders_by_class_tuples(pydantic.json.ENCODERS_BY_TYPE)
-
-
def jsonable_encoder(obj: Any, custom_encoder: Optional[Dict[Any, Callable[[Any], Any]]] = None) -> Any:
custom_encoder = custom_encoder or {}
if custom_encoder:
@@ -49,26 +38,33 @@ def jsonable_encoder(obj: Any, custom_encoder: Optional[Dict[Any, Callable[[Any]
if isinstance(obj, encoder_type):
return encoder_instance(obj)
if isinstance(obj, pydantic.BaseModel):
- encoder = getattr(obj.__config__, "json_encoders", {})
+ if IS_PYDANTIC_V2:
+ encoder = getattr(obj.model_config, "json_encoders", {}) # type: ignore # Pydantic v2
+ else:
+ encoder = getattr(obj.__config__, "json_encoders", {}) # type: ignore # Pydantic v1
if custom_encoder:
encoder.update(custom_encoder)
obj_dict = obj.dict(by_alias=True)
if "__root__" in obj_dict:
obj_dict = obj_dict["__root__"]
+ if "root" in obj_dict:
+ obj_dict = obj_dict["root"]
return jsonable_encoder(obj_dict, custom_encoder=encoder)
if dataclasses.is_dataclass(obj):
- obj_dict = dataclasses.asdict(obj)
+ obj_dict = dataclasses.asdict(obj) # type: ignore
return jsonable_encoder(obj_dict, custom_encoder=custom_encoder)
+ if isinstance(obj, bytes):
+ return base64.b64encode(obj).decode("utf-8")
if isinstance(obj, Enum):
return obj.value
if isinstance(obj, PurePath):
return str(obj)
if isinstance(obj, (str, int, float, type(None))):
return obj
- if isinstance(obj, dt.date):
- return str(obj)
if isinstance(obj, dt.datetime):
return serialize_datetime(obj)
+ if isinstance(obj, dt.date):
+ return str(obj)
if isinstance(obj, dict):
encoded_dict = {}
allowed_keys = set(obj.keys())
@@ -84,20 +80,21 @@ def jsonable_encoder(obj: Any, custom_encoder: Optional[Dict[Any, Callable[[Any]
encoded_list.append(jsonable_encoder(item, custom_encoder=custom_encoder))
return encoded_list
- if type(obj) in pydantic.json.ENCODERS_BY_TYPE:
- return pydantic.json.ENCODERS_BY_TYPE[type(obj)](obj)
- for encoder, classes_tuple in encoders_by_class_tuples.items():
- if isinstance(obj, classes_tuple):
- return encoder(obj)
+ def fallback_serializer(o: Any) -> Any:
+ attempt_encode = encode_by_type(o)
+ if attempt_encode is not None:
+ return attempt_encode
- try:
- data = dict(obj)
- except Exception as e:
- errors: List[Exception] = []
- errors.append(e)
try:
- data = vars(obj)
+ data = dict(o)
except Exception as e:
+ errors: List[Exception] = []
errors.append(e)
- raise ValueError(errors) from e
- return jsonable_encoder(data, custom_encoder=custom_encoder)
+ try:
+ data = vars(o)
+ except Exception as e:
+ errors.append(e)
+ raise ValueError(errors) from e
+ return jsonable_encoder(data, custom_encoder=custom_encoder)
+
+ return to_jsonable_with_fallback(obj, fallback_serializer)
diff --git a/src/flagright/core/pydantic_utilities.py b/src/flagright/core/pydantic_utilities.py
new file mode 100644
index 0000000..f7467bc
--- /dev/null
+++ b/src/flagright/core/pydantic_utilities.py
@@ -0,0 +1,294 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# nopycln: file
+import datetime as dt
+import typing
+from collections import defaultdict
+
+import pydantic
+import typing_extensions
+from .datetime_utils import serialize_datetime
+from .serialization import convert_and_respect_annotation_metadata
+
+IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.")
+
+if IS_PYDANTIC_V2:
+ # isort will try to reformat the comments on these imports, which breaks mypy
+ # isort: off
+ from pydantic.v1.datetime_parse import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
+ parse_date as parse_date,
+ )
+ from pydantic.v1.datetime_parse import ( # pyright: ignore[reportMissingImports] # Pydantic v2
+ parse_datetime as parse_datetime,
+ )
+ from pydantic.v1.json import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
+ ENCODERS_BY_TYPE as encoders_by_type,
+ )
+ from pydantic.v1.typing import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
+ get_args as get_args,
+ )
+ from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2
+ get_origin as get_origin,
+ )
+ from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2
+ is_literal_type as is_literal_type,
+ )
+ from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2
+ is_union as is_union,
+ )
+ from pydantic.v1.fields import ModelField as ModelField # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
+else:
+ from pydantic.datetime_parse import parse_date as parse_date # type: ignore # Pydantic v1
+ from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore # Pydantic v1
+ from pydantic.fields import ModelField as ModelField # type: ignore # Pydantic v1
+ from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore # Pydantic v1
+ from pydantic.typing import get_args as get_args # type: ignore # Pydantic v1
+ from pydantic.typing import get_origin as get_origin # type: ignore # Pydantic v1
+ from pydantic.typing import is_literal_type as is_literal_type # type: ignore # Pydantic v1
+ from pydantic.typing import is_union as is_union # type: ignore # Pydantic v1
+
+ # isort: on
+
+
+T = typing.TypeVar("T")
+Model = typing.TypeVar("Model", bound=pydantic.BaseModel)
+
+
+def parse_obj_as(type_: typing.Type[T], object_: typing.Any) -> T:
+ dealiased_object = convert_and_respect_annotation_metadata(object_=object_, annotation=type_, direction="read")
+ if IS_PYDANTIC_V2:
+ adapter = pydantic.TypeAdapter(type_) # type: ignore # Pydantic v2
+ return adapter.validate_python(dealiased_object)
+ else:
+ return pydantic.parse_obj_as(type_, dealiased_object)
+
+
+def to_jsonable_with_fallback(
+ obj: typing.Any, fallback_serializer: typing.Callable[[typing.Any], typing.Any]
+) -> typing.Any:
+ if IS_PYDANTIC_V2:
+ from pydantic_core import to_jsonable_python
+
+ return to_jsonable_python(obj, fallback=fallback_serializer)
+ else:
+ return fallback_serializer(obj)
+
+
+class UniversalBaseModel(pydantic.BaseModel):
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
+ # Allow fields beginning with `model_` to be used in the model
+ protected_namespaces=(),
+ ) # type: ignore # Pydantic v2
+
+ @pydantic.model_serializer(mode="wrap", when_used="json") # type: ignore # Pydantic v2
+ def serialize_model(self, handler: pydantic.SerializerFunctionWrapHandler) -> typing.Any: # type: ignore # Pydantic v2
+ serialized = handler(self)
+ data = {k: serialize_datetime(v) if isinstance(v, dt.datetime) else v for k, v in serialized.items()}
+ return data
+
+ else:
+
+ class Config:
+ smart_union = True
+ json_encoders = {dt.datetime: serialize_datetime}
+
+ @classmethod
+ def model_construct(
+ cls: typing.Type["Model"], _fields_set: typing.Optional[typing.Set[str]] = None, **values: typing.Any
+ ) -> "Model":
+ dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read")
+ return cls.construct(_fields_set, **dealiased_object)
+
+ @classmethod
+ def construct(
+ cls: typing.Type["Model"], _fields_set: typing.Optional[typing.Set[str]] = None, **values: typing.Any
+ ) -> "Model":
+ dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read")
+ if IS_PYDANTIC_V2:
+ return super().model_construct(_fields_set, **dealiased_object) # type: ignore # Pydantic v2
+ else:
+ return super().construct(_fields_set, **dealiased_object)
+
+ def json(self, **kwargs: typing.Any) -> str:
+ kwargs_with_defaults: typing.Any = {
+ "by_alias": True,
+ "exclude_unset": True,
+ **kwargs,
+ }
+ if IS_PYDANTIC_V2:
+ return super().model_dump_json(**kwargs_with_defaults) # type: ignore # Pydantic v2
+ else:
+ return super().json(**kwargs_with_defaults)
+
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
+ """
+ Override the default dict method to `exclude_unset` by default. This function patches
+ `exclude_unset` to work include fields within non-None default values.
+ """
+ # Note: the logic here is multiplexed given the levers exposed in Pydantic V1 vs V2
+ # Pydantic V1's .dict can be extremely slow, so we do not want to call it twice.
+ #
+ # We'd ideally do the same for Pydantic V2, but it shells out to a library to serialize models
+ # that we have less control over, and this is less intrusive than custom serializers for now.
+ if IS_PYDANTIC_V2:
+ kwargs_with_defaults_exclude_unset: typing.Any = {
+ **kwargs,
+ "by_alias": True,
+ "exclude_unset": True,
+ "exclude_none": False,
+ }
+ kwargs_with_defaults_exclude_none: typing.Any = {
+ **kwargs,
+ "by_alias": True,
+ "exclude_none": True,
+ "exclude_unset": False,
+ }
+ dict_dump = deep_union_pydantic_dicts(
+ super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore # Pydantic v2
+ super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore # Pydantic v2
+ )
+
+ else:
+ _fields_set = self.__fields_set__.copy()
+
+ fields = _get_model_fields(self.__class__)
+ for name, field in fields.items():
+ if name not in _fields_set:
+ default = _get_field_default(field)
+
+ # If the default values are non-null act like they've been set
+ # This effectively allows exclude_unset to work like exclude_none where
+ # the latter passes through intentionally set none values.
+ if default is not None or ("exclude_unset" in kwargs and not kwargs["exclude_unset"]):
+ _fields_set.add(name)
+
+ if default is not None:
+ self.__fields_set__.add(name)
+
+ kwargs_with_defaults_exclude_unset_include_fields: typing.Any = {
+ "by_alias": True,
+ "exclude_unset": True,
+ "include": _fields_set,
+ **kwargs,
+ }
+
+ dict_dump = super().dict(**kwargs_with_defaults_exclude_unset_include_fields)
+
+ return convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write")
+
+
+def _union_list_of_pydantic_dicts(
+ source: typing.List[typing.Any], destination: typing.List[typing.Any]
+) -> typing.List[typing.Any]:
+ converted_list: typing.List[typing.Any] = []
+ for i, item in enumerate(source):
+ destination_value = destination[i] # type: ignore
+ if isinstance(item, dict):
+ converted_list.append(deep_union_pydantic_dicts(item, destination_value))
+ elif isinstance(item, list):
+ converted_list.append(_union_list_of_pydantic_dicts(item, destination_value))
+ else:
+ converted_list.append(item)
+ return converted_list
+
+
+def deep_union_pydantic_dicts(
+ source: typing.Dict[str, typing.Any], destination: typing.Dict[str, typing.Any]
+) -> typing.Dict[str, typing.Any]:
+ for key, value in source.items():
+ node = destination.setdefault(key, {})
+ if isinstance(value, dict):
+ deep_union_pydantic_dicts(value, node)
+ # Note: we do not do this same processing for sets given we do not have sets of models
+ # and given the sets are unordered, the processing of the set and matching objects would
+ # be non-trivial.
+ elif isinstance(value, list):
+ destination[key] = _union_list_of_pydantic_dicts(value, node)
+ else:
+ destination[key] = value
+
+ return destination
+
+
+if IS_PYDANTIC_V2:
+
+ class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore # Pydantic v2
+ pass
+
+ UniversalRootModel: typing_extensions.TypeAlias = V2RootModel # type: ignore
+else:
+ UniversalRootModel: typing_extensions.TypeAlias = UniversalBaseModel # type: ignore
+
+
+def encode_by_type(o: typing.Any) -> typing.Any:
+ encoders_by_class_tuples: typing.Dict[typing.Callable[[typing.Any], typing.Any], typing.Tuple[typing.Any, ...]] = (
+ defaultdict(tuple)
+ )
+ for type_, encoder in encoders_by_type.items():
+ encoders_by_class_tuples[encoder] += (type_,)
+
+ if type(o) in encoders_by_type:
+ return encoders_by_type[type(o)](o)
+ for encoder, classes_tuple in encoders_by_class_tuples.items():
+ if isinstance(o, classes_tuple):
+ return encoder(o)
+
+
+def update_forward_refs(model: typing.Type["Model"], **localns: typing.Any) -> None:
+ if IS_PYDANTIC_V2:
+ model.model_rebuild(raise_errors=False) # type: ignore # Pydantic v2
+ else:
+ model.update_forward_refs(**localns)
+
+
+# Mirrors Pydantic's internal typing
+AnyCallable = typing.Callable[..., typing.Any]
+
+
+def universal_root_validator(
+ pre: bool = False,
+) -> typing.Callable[[AnyCallable], AnyCallable]:
+ def decorator(func: AnyCallable) -> AnyCallable:
+ if IS_PYDANTIC_V2:
+ return pydantic.model_validator(mode="before" if pre else "after")(func) # type: ignore # Pydantic v2
+ else:
+ return pydantic.root_validator(pre=pre)(func) # type: ignore # Pydantic v1
+
+ return decorator
+
+
+def universal_field_validator(field_name: str, pre: bool = False) -> typing.Callable[[AnyCallable], AnyCallable]:
+ def decorator(func: AnyCallable) -> AnyCallable:
+ if IS_PYDANTIC_V2:
+ return pydantic.field_validator(field_name, mode="before" if pre else "after")(func) # type: ignore # Pydantic v2
+ else:
+ return pydantic.validator(field_name, pre=pre)(func) # type: ignore # Pydantic v1
+
+ return decorator
+
+
+PydanticField = typing.Union[ModelField, pydantic.fields.FieldInfo]
+
+
+def _get_model_fields(
+ model: typing.Type["Model"],
+) -> typing.Mapping[str, PydanticField]:
+ if IS_PYDANTIC_V2:
+ return model.model_fields # type: ignore # Pydantic v2
+ else:
+ return model.__fields__ # type: ignore # Pydantic v1
+
+
+def _get_field_default(field: PydanticField) -> typing.Any:
+ try:
+ value = field.get_default() # type: ignore # Pydantic < v1.10.15
+ except:
+ value = field.default
+ if IS_PYDANTIC_V2:
+ from pydantic_core import PydanticUndefined
+
+ if value == PydanticUndefined:
+ return None
+ return value
+ return value
diff --git a/src/flagright/core/query_encoder.py b/src/flagright/core/query_encoder.py
new file mode 100644
index 0000000..3183001
--- /dev/null
+++ b/src/flagright/core/query_encoder.py
@@ -0,0 +1,58 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from typing import Any, Dict, List, Optional, Tuple
+
+import pydantic
+
+
+# Flattens dicts to be of the form {"key[subkey][subkey2]": value} where value is not a dict
+def traverse_query_dict(dict_flat: Dict[str, Any], key_prefix: Optional[str] = None) -> List[Tuple[str, Any]]:
+ result = []
+ for k, v in dict_flat.items():
+ key = f"{key_prefix}[{k}]" if key_prefix is not None else k
+ if isinstance(v, dict):
+ result.extend(traverse_query_dict(v, key))
+ elif isinstance(v, list):
+ for arr_v in v:
+ if isinstance(arr_v, dict):
+ result.extend(traverse_query_dict(arr_v, key))
+ else:
+ result.append((key, arr_v))
+ else:
+ result.append((key, v))
+ return result
+
+
+def single_query_encoder(query_key: str, query_value: Any) -> List[Tuple[str, Any]]:
+ if isinstance(query_value, pydantic.BaseModel) or isinstance(query_value, dict):
+ if isinstance(query_value, pydantic.BaseModel):
+ obj_dict = query_value.dict(by_alias=True)
+ else:
+ obj_dict = query_value
+ return traverse_query_dict(obj_dict, query_key)
+ elif isinstance(query_value, list):
+ encoded_values: List[Tuple[str, Any]] = []
+ for value in query_value:
+ if isinstance(value, pydantic.BaseModel) or isinstance(value, dict):
+ if isinstance(value, pydantic.BaseModel):
+ obj_dict = value.dict(by_alias=True)
+ elif isinstance(value, dict):
+ obj_dict = value
+
+ encoded_values.extend(single_query_encoder(query_key, obj_dict))
+ else:
+ encoded_values.append((query_key, value))
+
+ return encoded_values
+
+ return [(query_key, query_value)]
+
+
+def encode_query(query: Optional[Dict[str, Any]]) -> Optional[List[Tuple[str, Any]]]:
+ if query is None:
+ return None
+
+ encoded_query = []
+ for k, v in query.items():
+ encoded_query.extend(single_query_encoder(k, v))
+ return encoded_query
diff --git a/src/flagright/core/remove_none_from_dict.py b/src/flagright/core/remove_none_from_dict.py
index 2da30f7..c229814 100644
--- a/src/flagright/core/remove_none_from_dict.py
+++ b/src/flagright/core/remove_none_from_dict.py
@@ -1,9 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
-from typing import Any, Dict, Optional
+from typing import Any, Dict, Mapping, Optional
-def remove_none_from_dict(original: Dict[str, Optional[Any]]) -> Dict[str, Any]:
+def remove_none_from_dict(original: Mapping[str, Optional[Any]]) -> Dict[str, Any]:
new: Dict[str, Any] = {}
for key, value in original.items():
if value is not None:
diff --git a/src/flagright/core/request_options.py b/src/flagright/core/request_options.py
new file mode 100644
index 0000000..1b38804
--- /dev/null
+++ b/src/flagright/core/request_options.py
@@ -0,0 +1,35 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+try:
+ from typing import NotRequired # type: ignore
+except ImportError:
+ from typing_extensions import NotRequired
+
+
+class RequestOptions(typing.TypedDict, total=False):
+ """
+ Additional options for request-specific configuration when calling APIs via the SDK.
+ This is used primarily as an optional final parameter for service functions.
+
+ Attributes:
+ - timeout_in_seconds: int. The number of seconds to await an API call before timing out.
+
+ - max_retries: int. The max number of retries to attempt if the API call fails.
+
+ - additional_headers: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's header dict
+
+ - additional_query_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's query parameters dict
+
+ - additional_body_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's body parameters dict
+
+ - chunk_size: int. The size, in bytes, to process each chunk of data being streamed back within the response. This equates to leveraging `chunk_size` within `requests` or `httpx`, and is only leveraged for file downloads.
+ """
+
+ timeout_in_seconds: NotRequired[int]
+ max_retries: NotRequired[int]
+ additional_headers: NotRequired[typing.Dict[str, typing.Any]]
+ additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]]
+ additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]]
+ chunk_size: NotRequired[int]
diff --git a/src/flagright/core/serialization.py b/src/flagright/core/serialization.py
new file mode 100644
index 0000000..c36e865
--- /dev/null
+++ b/src/flagright/core/serialization.py
@@ -0,0 +1,276 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import collections
+import inspect
+import typing
+
+import pydantic
+import typing_extensions
+
+
+class FieldMetadata:
+ """
+ Metadata class used to annotate fields to provide additional information.
+
+ Example:
+ class MyDict(TypedDict):
+ field: typing.Annotated[str, FieldMetadata(alias="field_name")]
+
+ Will serialize: `{"field": "value"}`
+ To: `{"field_name": "value"}`
+ """
+
+ alias: str
+
+ def __init__(self, *, alias: str) -> None:
+ self.alias = alias
+
+
+def convert_and_respect_annotation_metadata(
+ *,
+ object_: typing.Any,
+ annotation: typing.Any,
+ inner_type: typing.Optional[typing.Any] = None,
+ direction: typing.Literal["read", "write"],
+) -> typing.Any:
+ """
+ Respect the metadata annotations on a field, such as aliasing. This function effectively
+ manipulates the dict-form of an object to respect the metadata annotations. This is primarily used for
+ TypedDicts, which cannot support aliasing out of the box, and can be extended for additional
+ utilities, such as defaults.
+
+ Parameters
+ ----------
+ object_ : typing.Any
+
+ annotation : type
+ The type we're looking to apply typing annotations from
+
+ inner_type : typing.Optional[type]
+
+ Returns
+ -------
+ typing.Any
+ """
+
+ if object_ is None:
+ return None
+ if inner_type is None:
+ inner_type = annotation
+
+ clean_type = _remove_annotations(inner_type)
+ # Pydantic models
+ if (
+ inspect.isclass(clean_type)
+ and issubclass(clean_type, pydantic.BaseModel)
+ and isinstance(object_, typing.Mapping)
+ ):
+ return _convert_mapping(object_, clean_type, direction)
+ # TypedDicts
+ if typing_extensions.is_typeddict(clean_type) and isinstance(object_, typing.Mapping):
+ return _convert_mapping(object_, clean_type, direction)
+
+ if (
+ typing_extensions.get_origin(clean_type) == typing.Dict
+ or typing_extensions.get_origin(clean_type) == dict
+ or clean_type == typing.Dict
+ ) and isinstance(object_, typing.Dict):
+ key_type = typing_extensions.get_args(clean_type)[0]
+ value_type = typing_extensions.get_args(clean_type)[1]
+
+ return {
+ key: convert_and_respect_annotation_metadata(
+ object_=value,
+ annotation=annotation,
+ inner_type=value_type,
+ direction=direction,
+ )
+ for key, value in object_.items()
+ }
+
+ # If you're iterating on a string, do not bother to coerce it to a sequence.
+ if not isinstance(object_, str):
+ if (
+ typing_extensions.get_origin(clean_type) == typing.Set
+ or typing_extensions.get_origin(clean_type) == set
+ or clean_type == typing.Set
+ ) and isinstance(object_, typing.Set):
+ inner_type = typing_extensions.get_args(clean_type)[0]
+ return {
+ convert_and_respect_annotation_metadata(
+ object_=item,
+ annotation=annotation,
+ inner_type=inner_type,
+ direction=direction,
+ )
+ for item in object_
+ }
+ elif (
+ (
+ typing_extensions.get_origin(clean_type) == typing.List
+ or typing_extensions.get_origin(clean_type) == list
+ or clean_type == typing.List
+ )
+ and isinstance(object_, typing.List)
+ ) or (
+ (
+ typing_extensions.get_origin(clean_type) == typing.Sequence
+ or typing_extensions.get_origin(clean_type) == collections.abc.Sequence
+ or clean_type == typing.Sequence
+ )
+ and isinstance(object_, typing.Sequence)
+ ):
+ inner_type = typing_extensions.get_args(clean_type)[0]
+ return [
+ convert_and_respect_annotation_metadata(
+ object_=item,
+ annotation=annotation,
+ inner_type=inner_type,
+ direction=direction,
+ )
+ for item in object_
+ ]
+
+ if typing_extensions.get_origin(clean_type) == typing.Union:
+ # We should be able to ~relatively~ safely try to convert keys against all
+ # member types in the union, the edge case here is if one member aliases a field
+ # of the same name to a different name from another member
+ # Or if another member aliases a field of the same name that another member does not.
+ for member in typing_extensions.get_args(clean_type):
+ object_ = convert_and_respect_annotation_metadata(
+ object_=object_,
+ annotation=annotation,
+ inner_type=member,
+ direction=direction,
+ )
+ return object_
+
+ annotated_type = _get_annotation(annotation)
+ if annotated_type is None:
+ return object_
+
+ # If the object is not a TypedDict, a Union, or other container (list, set, sequence, etc.)
+ # Then we can safely call it on the recursive conversion.
+ return object_
+
+
+def _convert_mapping(
+ object_: typing.Mapping[str, object],
+ expected_type: typing.Any,
+ direction: typing.Literal["read", "write"],
+) -> typing.Mapping[str, object]:
+ converted_object: typing.Dict[str, object] = {}
+ try:
+ annotations = typing_extensions.get_type_hints(expected_type, include_extras=True)
+ except NameError:
+ # The TypedDict contains a circular reference, so
+ # we use the __annotations__ attribute directly.
+ annotations = getattr(expected_type, "__annotations__", {})
+ aliases_to_field_names = _get_alias_to_field_name(annotations)
+ for key, value in object_.items():
+ if direction == "read" and key in aliases_to_field_names:
+ dealiased_key = aliases_to_field_names.get(key)
+ if dealiased_key is not None:
+ type_ = annotations.get(dealiased_key)
+ else:
+ type_ = annotations.get(key)
+ # Note you can't get the annotation by the field name if you're in read mode, so you must check the aliases map
+ #
+ # So this is effectively saying if we're in write mode, and we don't have a type, or if we're in read mode and we don't have an alias
+ # then we can just pass the value through as is
+ if type_ is None:
+ converted_object[key] = value
+ elif direction == "read" and key not in aliases_to_field_names:
+ converted_object[key] = convert_and_respect_annotation_metadata(
+ object_=value, annotation=type_, direction=direction
+ )
+ else:
+ converted_object[_alias_key(key, type_, direction, aliases_to_field_names)] = (
+ convert_and_respect_annotation_metadata(object_=value, annotation=type_, direction=direction)
+ )
+ return converted_object
+
+
+def _get_annotation(type_: typing.Any) -> typing.Optional[typing.Any]:
+ maybe_annotated_type = typing_extensions.get_origin(type_)
+ if maybe_annotated_type is None:
+ return None
+
+ if maybe_annotated_type == typing_extensions.NotRequired:
+ type_ = typing_extensions.get_args(type_)[0]
+ maybe_annotated_type = typing_extensions.get_origin(type_)
+
+ if maybe_annotated_type == typing_extensions.Annotated:
+ return type_
+
+ return None
+
+
+def _remove_annotations(type_: typing.Any) -> typing.Any:
+ maybe_annotated_type = typing_extensions.get_origin(type_)
+ if maybe_annotated_type is None:
+ return type_
+
+ if maybe_annotated_type == typing_extensions.NotRequired:
+ return _remove_annotations(typing_extensions.get_args(type_)[0])
+
+ if maybe_annotated_type == typing_extensions.Annotated:
+ return _remove_annotations(typing_extensions.get_args(type_)[0])
+
+ return type_
+
+
+def get_alias_to_field_mapping(type_: typing.Any) -> typing.Dict[str, str]:
+ annotations = typing_extensions.get_type_hints(type_, include_extras=True)
+ return _get_alias_to_field_name(annotations)
+
+
+def get_field_to_alias_mapping(type_: typing.Any) -> typing.Dict[str, str]:
+ annotations = typing_extensions.get_type_hints(type_, include_extras=True)
+ return _get_field_to_alias_name(annotations)
+
+
+def _get_alias_to_field_name(
+ field_to_hint: typing.Dict[str, typing.Any],
+) -> typing.Dict[str, str]:
+ aliases = {}
+ for field, hint in field_to_hint.items():
+ maybe_alias = _get_alias_from_type(hint)
+ if maybe_alias is not None:
+ aliases[maybe_alias] = field
+ return aliases
+
+
+def _get_field_to_alias_name(
+ field_to_hint: typing.Dict[str, typing.Any],
+) -> typing.Dict[str, str]:
+ aliases = {}
+ for field, hint in field_to_hint.items():
+ maybe_alias = _get_alias_from_type(hint)
+ if maybe_alias is not None:
+ aliases[field] = maybe_alias
+ return aliases
+
+
+def _get_alias_from_type(type_: typing.Any) -> typing.Optional[str]:
+ maybe_annotated_type = _get_annotation(type_)
+
+ if maybe_annotated_type is not None:
+ # The actual annotations are 1 onward, the first is the annotated type
+ annotations = typing_extensions.get_args(maybe_annotated_type)[1:]
+
+ for annotation in annotations:
+ if isinstance(annotation, FieldMetadata) and annotation.alias is not None:
+ return annotation.alias
+ return None
+
+
+def _alias_key(
+ key: str,
+ type_: typing.Any,
+ direction: typing.Literal["read", "write"],
+ aliases_to_field_names: typing.Dict[str, str],
+) -> str:
+ if direction == "read":
+ return aliases_to_field_names.get(key, key)
+ return _get_alias_from_type(type_=type_) or key
diff --git a/src/flagright/resources/__init__.py b/src/flagright/resources/__init__.py
deleted file mode 100644
index 1ecdb63..0000000
--- a/src/flagright/resources/__init__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-from . import (
- batch,
- business_user_events,
- business_users,
- consumer_user_events,
- consumer_users,
- transaction_events,
- transactions,
-)
-from .business_users import BusinessUsersCreateResponse
-from .consumer_users import ConsumerUsersCreateResponse
-from .transactions import TransactionsVerifyResponse
-
-__all__ = [
- "BusinessUsersCreateResponse",
- "ConsumerUsersCreateResponse",
- "TransactionsVerifyResponse",
- "batch",
- "business_user_events",
- "business_users",
- "consumer_user_events",
- "consumer_users",
- "transaction_events",
- "transactions",
-]
diff --git a/src/flagright/resources/batch/client.py b/src/flagright/resources/batch/client.py
deleted file mode 100644
index a89c642..0000000
--- a/src/flagright/resources/batch/client.py
+++ /dev/null
@@ -1,667 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-import urllib.parse
-from json.decoder import JSONDecodeError
-
-from ...core.api_error import ApiError
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from ...core.jsonable_encoder import jsonable_encoder
-from ...core.remove_none_from_dict import remove_none_from_dict
-from ...errors.bad_request_error import BadRequestError
-from ...errors.conflict_error import ConflictError
-from ...errors.too_many_requests_error import TooManyRequestsError
-from ...errors.unauthorized_error import UnauthorizedError
-from ...types.api_error_response import ApiErrorResponse
-from ...types.batch_response import BatchResponse
-from ...types.boolean_string import BooleanString
-from ...types.business import Business
-from ...types.business_user_event import BusinessUserEvent
-from ...types.consumer_user_event import ConsumerUserEvent
-from ...types.transaction import Transaction
-from ...types.transaction_event import TransactionEvent
-from ...types.user import User
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-# this is used as the default value for optional parameters
-OMIT = typing.cast(typing.Any, ...)
-
-
-class BatchClient:
- def __init__(self, *, client_wrapper: SyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- def verify_transaction(
- self,
- *,
- validate_origin_user_id: typing.Optional[BooleanString] = None,
- validate_destination_user_id: typing.Optional[BooleanString] = None,
- batch_id: typing.Optional[str] = OMIT,
- data: typing.List[Transaction],
- ) -> BatchResponse:
- """
- Parameters:
- - validate_origin_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided originUserId exist. True by default
-
- - validate_destination_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
-
- - batch_id: typing.Optional[str].
-
- - data: typing.List[Transaction].
- ---
- from flagright import Transaction, TransactionType
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.batch.verify_transaction(
- data=[
- Transaction(
- type=TransactionType.DEPOSIT,
- transaction_id="transactionId",
- timestamp=1.1,
- )
- ],
- )
- """
- _request: typing.Dict[str, typing.Any] = {"data": data}
- if batch_id is not OMIT:
- _request["batchId"] = batch_id
- _response = self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "batch/transactions"),
- params=remove_none_from_dict(
- {
- "validateOriginUserId": validate_origin_user_id,
- "validateDestinationUserId": validate_destination_user_id,
- }
- ),
- json=jsonable_encoder(_request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BatchResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- def create_transaction_events(
- self, *, batch_id: typing.Optional[str] = OMIT, data: typing.List[TransactionEvent]
- ) -> BatchResponse:
- """
- Parameters:
- - batch_id: typing.Optional[str].
-
- - data: typing.List[TransactionEvent].
- ---
- from flagright import TransactionEvent, TransactionState
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.batch.create_transaction_events(
- data=[
- TransactionEvent(
- transaction_state=TransactionState.CREATED,
- timestamp=1.1,
- transaction_id="transactionId",
- )
- ],
- )
- """
- _request: typing.Dict[str, typing.Any] = {"data": data}
- if batch_id is not OMIT:
- _request["batchId"] = batch_id
- _response = self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "batch/events/transaction"),
- json=jsonable_encoder(_request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BatchResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 409:
- raise ConflictError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- def create_consumer_users(self, *, batch_id: typing.Optional[str] = OMIT, data: typing.List[User]) -> BatchResponse:
- """
- Parameters:
- - batch_id: typing.Optional[str].
-
- - data: typing.List[User].
- ---
- from flagright import User
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.batch.create_consumer_users(
- data=[
- User(
- user_id="userId",
- created_timestamp=1.1,
- )
- ],
- )
- """
- _request: typing.Dict[str, typing.Any] = {"data": data}
- if batch_id is not OMIT:
- _request["batchId"] = batch_id
- _response = self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "batch/consumer/users"),
- json=jsonable_encoder(_request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BatchResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- def create_business_users(
- self, *, batch_id: typing.Optional[str] = OMIT, data: typing.List[Business]
- ) -> BatchResponse:
- """
- Parameters:
- - batch_id: typing.Optional[str].
-
- - data: typing.List[Business].
- ---
- from flagright import Business, CompanyGeneralDetails, LegalEntity
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.batch.create_business_users(
- data=[
- Business(
- user_id="userId",
- created_timestamp=1.1,
- legal_entity=LegalEntity(
- company_general_details=CompanyGeneralDetails(
- legal_name="Ozkan Hazelnut Export JSC",
- business_industry=["Farming"],
- main_products_services_sold=["Hazelnut"],
- ),
- ),
- )
- ],
- )
- """
- _request: typing.Dict[str, typing.Any] = {"data": data}
- if batch_id is not OMIT:
- _request["batchId"] = batch_id
- _response = self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "batch/business/users"),
- json=jsonable_encoder(_request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BatchResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- def create_consumer_user_events(
- self, *, batch_id: typing.Optional[str] = OMIT, data: typing.List[ConsumerUserEvent]
- ) -> BatchResponse:
- """
- Parameters:
- - batch_id: typing.Optional[str].
-
- - data: typing.List[ConsumerUserEvent].
- ---
- from flagright import ConsumerUserEvent
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.batch.create_consumer_user_events(
- data=[
- ConsumerUserEvent(
- timestamp=1.1,
- user_id="userId",
- )
- ],
- )
- """
- _request: typing.Dict[str, typing.Any] = {"data": data}
- if batch_id is not OMIT:
- _request["batchId"] = batch_id
- _response = self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "batch/events/consumer/user"),
- json=jsonable_encoder(_request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BatchResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- def create_business_user_events(
- self, *, batch_id: typing.Optional[str] = OMIT, data: typing.List[BusinessUserEvent]
- ) -> BatchResponse:
- """
- Parameters:
- - batch_id: typing.Optional[str].
-
- - data: typing.List[BusinessUserEvent].
- ---
- from flagright import BusinessUserEvent
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.batch.create_business_user_events(
- data=[
- BusinessUserEvent(
- timestamp=1.1,
- user_id="userId",
- )
- ],
- )
- """
- _request: typing.Dict[str, typing.Any] = {"data": data}
- if batch_id is not OMIT:
- _request["batchId"] = batch_id
- _response = self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "batch/events/business/user"),
- json=jsonable_encoder(_request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BatchResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
-
-class AsyncBatchClient:
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- async def verify_transaction(
- self,
- *,
- validate_origin_user_id: typing.Optional[BooleanString] = None,
- validate_destination_user_id: typing.Optional[BooleanString] = None,
- batch_id: typing.Optional[str] = OMIT,
- data: typing.List[Transaction],
- ) -> BatchResponse:
- """
- Parameters:
- - validate_origin_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided originUserId exist. True by default
-
- - validate_destination_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
-
- - batch_id: typing.Optional[str].
-
- - data: typing.List[Transaction].
- ---
- from flagright import Transaction, TransactionType
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.batch.verify_transaction(
- data=[
- Transaction(
- type=TransactionType.DEPOSIT,
- transaction_id="transactionId",
- timestamp=1.1,
- )
- ],
- )
- """
- _request: typing.Dict[str, typing.Any] = {"data": data}
- if batch_id is not OMIT:
- _request["batchId"] = batch_id
- _response = await self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "batch/transactions"),
- params=remove_none_from_dict(
- {
- "validateOriginUserId": validate_origin_user_id,
- "validateDestinationUserId": validate_destination_user_id,
- }
- ),
- json=jsonable_encoder(_request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BatchResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- async def create_transaction_events(
- self, *, batch_id: typing.Optional[str] = OMIT, data: typing.List[TransactionEvent]
- ) -> BatchResponse:
- """
- Parameters:
- - batch_id: typing.Optional[str].
-
- - data: typing.List[TransactionEvent].
- ---
- from flagright import TransactionEvent, TransactionState
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.batch.create_transaction_events(
- data=[
- TransactionEvent(
- transaction_state=TransactionState.CREATED,
- timestamp=1.1,
- transaction_id="transactionId",
- )
- ],
- )
- """
- _request: typing.Dict[str, typing.Any] = {"data": data}
- if batch_id is not OMIT:
- _request["batchId"] = batch_id
- _response = await self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "batch/events/transaction"),
- json=jsonable_encoder(_request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BatchResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 409:
- raise ConflictError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- async def create_consumer_users(
- self, *, batch_id: typing.Optional[str] = OMIT, data: typing.List[User]
- ) -> BatchResponse:
- """
- Parameters:
- - batch_id: typing.Optional[str].
-
- - data: typing.List[User].
- ---
- from flagright import User
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.batch.create_consumer_users(
- data=[
- User(
- user_id="userId",
- created_timestamp=1.1,
- )
- ],
- )
- """
- _request: typing.Dict[str, typing.Any] = {"data": data}
- if batch_id is not OMIT:
- _request["batchId"] = batch_id
- _response = await self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "batch/consumer/users"),
- json=jsonable_encoder(_request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BatchResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- async def create_business_users(
- self, *, batch_id: typing.Optional[str] = OMIT, data: typing.List[Business]
- ) -> BatchResponse:
- """
- Parameters:
- - batch_id: typing.Optional[str].
-
- - data: typing.List[Business].
- ---
- from flagright import Business, CompanyGeneralDetails, LegalEntity
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.batch.create_business_users(
- data=[
- Business(
- user_id="userId",
- created_timestamp=1.1,
- legal_entity=LegalEntity(
- company_general_details=CompanyGeneralDetails(
- legal_name="Ozkan Hazelnut Export JSC",
- business_industry=["Farming"],
- main_products_services_sold=["Hazelnut"],
- ),
- ),
- )
- ],
- )
- """
- _request: typing.Dict[str, typing.Any] = {"data": data}
- if batch_id is not OMIT:
- _request["batchId"] = batch_id
- _response = await self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "batch/business/users"),
- json=jsonable_encoder(_request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BatchResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- async def create_consumer_user_events(
- self, *, batch_id: typing.Optional[str] = OMIT, data: typing.List[ConsumerUserEvent]
- ) -> BatchResponse:
- """
- Parameters:
- - batch_id: typing.Optional[str].
-
- - data: typing.List[ConsumerUserEvent].
- ---
- from flagright import ConsumerUserEvent
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.batch.create_consumer_user_events(
- data=[
- ConsumerUserEvent(
- timestamp=1.1,
- user_id="userId",
- )
- ],
- )
- """
- _request: typing.Dict[str, typing.Any] = {"data": data}
- if batch_id is not OMIT:
- _request["batchId"] = batch_id
- _response = await self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "batch/events/consumer/user"),
- json=jsonable_encoder(_request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BatchResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- async def create_business_user_events(
- self, *, batch_id: typing.Optional[str] = OMIT, data: typing.List[BusinessUserEvent]
- ) -> BatchResponse:
- """
- Parameters:
- - batch_id: typing.Optional[str].
-
- - data: typing.List[BusinessUserEvent].
- ---
- from flagright import BusinessUserEvent
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.batch.create_business_user_events(
- data=[
- BusinessUserEvent(
- timestamp=1.1,
- user_id="userId",
- )
- ],
- )
- """
- _request: typing.Dict[str, typing.Any] = {"data": data}
- if batch_id is not OMIT:
- _request["batchId"] = batch_id
- _response = await self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "batch/events/business/user"),
- json=jsonable_encoder(_request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BatchResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/business_user_events/client.py b/src/flagright/resources/business_user_events/client.py
deleted file mode 100644
index 6137922..0000000
--- a/src/flagright/resources/business_user_events/client.py
+++ /dev/null
@@ -1,273 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-import urllib.parse
-from json.decoder import JSONDecodeError
-
-from ...core.api_error import ApiError
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from ...core.jsonable_encoder import jsonable_encoder
-from ...core.remove_none_from_dict import remove_none_from_dict
-from ...errors.bad_request_error import BadRequestError
-from ...errors.conflict_error import ConflictError
-from ...errors.too_many_requests_error import TooManyRequestsError
-from ...errors.unauthorized_error import UnauthorizedError
-from ...types.api_error_response import ApiErrorResponse
-from ...types.boolean_string import BooleanString
-from ...types.business_user_event import BusinessUserEvent
-from ...types.business_user_event_with_rules_result import BusinessUserEventWithRulesResult
-from ...types.business_with_rules_result import BusinessWithRulesResult
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-# this is used as the default value for optional parameters
-OMIT = typing.cast(typing.Any, ...)
-
-
-class BusinessUserEventsClient:
- def __init__(self, *, client_wrapper: SyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- def create(
- self,
- *,
- allow_user_type_conversion: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- request: BusinessUserEvent,
- ) -> BusinessWithRulesResult:
- """
- ## POST Business User Events
-
- `/events/business/user` endpoint allows you to operate on the Business User Events entity.
-
- User events are created after the initial `POST /business/users` call (which creates a user) and are used to:
-
- * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
- * Update the user details, using the `updatedBusinessUserAttributes` field.
-
- > If you have neither of the above two use cases, you do not need to use user events.
-
- ### Payload
-
- Each user event needs three mandatory fields:
-
- * `timestamp`- the timestamp of when the event was created or occured in your system
- * `userId` - The ID of the transaction for which this event is generated.
-
- In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
-
- Parameters:
- - allow_user_type_conversion: typing.Optional[BooleanString]. Boolean string whether Flagright should allow a Business user event to be applied to a Consumer user with the same user ID. This will converts a Consumer user to a Business user.
-
- - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
-
- - lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
-
- - request: BusinessUserEvent.
- ---
- from flagright import BusinessUserEvent
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.business_user_events.create(
- request=BusinessUserEvent(
- timestamp=1.1,
- user_id="userId",
- ),
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "events/business/user"),
- params=remove_none_from_dict(
- {
- "allowUserTypeConversion": allow_user_type_conversion,
- "lockKycRiskLevel": lock_kyc_risk_level,
- "lockCraRiskLevel": lock_cra_risk_level,
- }
- ),
- json=jsonable_encoder(request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BusinessWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 409:
- raise ConflictError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- def get(self, event_id: str) -> BusinessUserEventWithRulesResult:
- """
- ### GET a Business User Event
- You can retrieve any business user event you created using the [POST Business User Events](/api-reference/api-reference/business-user-events/create) call.
-
- Parameters:
- - event_id: str. Unique Business User Event Identifier
- ---
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.business_user_events.get(
- event_id="eventId",
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- "GET",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"events/business/user/{event_id}"),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BusinessUserEventWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
-
-class AsyncBusinessUserEventsClient:
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- async def create(
- self,
- *,
- allow_user_type_conversion: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- request: BusinessUserEvent,
- ) -> BusinessWithRulesResult:
- """
- ## POST Business User Events
-
- `/events/business/user` endpoint allows you to operate on the Business User Events entity.
-
- User events are created after the initial `POST /business/users` call (which creates a user) and are used to:
-
- * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
- * Update the user details, using the `updatedBusinessUserAttributes` field.
-
- > If you have neither of the above two use cases, you do not need to use user events.
-
- ### Payload
-
- Each user event needs three mandatory fields:
-
- * `timestamp`- the timestamp of when the event was created or occured in your system
- * `userId` - The ID of the transaction for which this event is generated.
-
- In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
-
- Parameters:
- - allow_user_type_conversion: typing.Optional[BooleanString]. Boolean string whether Flagright should allow a Business user event to be applied to a Consumer user with the same user ID. This will converts a Consumer user to a Business user.
-
- - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
-
- - lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
-
- - request: BusinessUserEvent.
- ---
- from flagright import BusinessUserEvent
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.business_user_events.create(
- request=BusinessUserEvent(
- timestamp=1.1,
- user_id="userId",
- ),
- )
- """
- _response = await self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "events/business/user"),
- params=remove_none_from_dict(
- {
- "allowUserTypeConversion": allow_user_type_conversion,
- "lockKycRiskLevel": lock_kyc_risk_level,
- "lockCraRiskLevel": lock_cra_risk_level,
- }
- ),
- json=jsonable_encoder(request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BusinessWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 409:
- raise ConflictError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- async def get(self, event_id: str) -> BusinessUserEventWithRulesResult:
- """
- ### GET a Business User Event
- You can retrieve any business user event you created using the [POST Business User Events](/api-reference/api-reference/business-user-events/create) call.
-
- Parameters:
- - event_id: str. Unique Business User Event Identifier
- ---
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.business_user_events.get(
- event_id="eventId",
- )
- """
- _response = await self._client_wrapper.httpx_client.request(
- "GET",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"events/business/user/{event_id}"),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BusinessUserEventWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/business_users/client.py b/src/flagright/resources/business_users/client.py
deleted file mode 100644
index 7c3efdb..0000000
--- a/src/flagright/resources/business_users/client.py
+++ /dev/null
@@ -1,286 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-import urllib.parse
-from json.decoder import JSONDecodeError
-
-from ...core.api_error import ApiError
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from ...core.jsonable_encoder import jsonable_encoder
-from ...core.remove_none_from_dict import remove_none_from_dict
-from ...errors.bad_request_error import BadRequestError
-from ...errors.too_many_requests_error import TooManyRequestsError
-from ...errors.unauthorized_error import UnauthorizedError
-from ...types.api_error_response import ApiErrorResponse
-from ...types.boolean_string import BooleanString
-from ...types.business import Business
-from ...types.business_with_rules_result import BusinessWithRulesResult
-from .types.business_users_create_response import BusinessUsersCreateResponse
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-# this is used as the default value for optional parameters
-OMIT = typing.cast(typing.Any, ...)
-
-
-class BusinessUsersClient:
- def __init__(self, *, client_wrapper: SyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- def create(
- self,
- *,
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- validate_user_id: typing.Optional[BooleanString] = None,
- krs_only: typing.Optional[BooleanString] = None,
- request: Business,
- ) -> BusinessUsersCreateResponse:
- """
- ## POST Business User
-
- `/business/user` endpoint allows you to operate on the Business user entity.
-
- In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
-
- ### Payload
-
-
- Each business user needs three mandatory fields:
-
- * `userId` - Unique identifier for the user
- * `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
- * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
-
- Parameters:
- - lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
-
- - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
-
- - validate_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate the userId
-
- - krs_only: typing.Optional[BooleanString].
-
- - request: Business.
- ---
- from flagright import Business, CompanyGeneralDetails, LegalEntity
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.business_users.create(
- request=Business(
- user_id="userId",
- created_timestamp=1.1,
- legal_entity=LegalEntity(
- company_general_details=CompanyGeneralDetails(
- legal_name="Ozkan Hazelnut Export JSC",
- business_industry=["Farming"],
- main_products_services_sold=["Hazelnut"],
- ),
- ),
- ),
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "business/users"),
- params=remove_none_from_dict(
- {
- "lockCraRiskLevel": lock_cra_risk_level,
- "lockKycRiskLevel": lock_kyc_risk_level,
- "validateUserId": validate_user_id,
- "_krsOnly": krs_only,
- }
- ),
- json=jsonable_encoder(request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BusinessUsersCreateResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- def get(self, user_id: str) -> BusinessWithRulesResult:
- """
- ### GET Business User
-
- `/business/user` endpoint allows you to operate on the Business User entity.
-
- Calling `GET /business/user/{userId}` will return the entire User payload and rule execution results for the User with the corresponding `userId`
-
- Parameters:
- - user_id: str.
- ---
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.business_users.get(
- user_id="userId",
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- "GET",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"business/users/{user_id}"),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BusinessWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
-
-class AsyncBusinessUsersClient:
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- async def create(
- self,
- *,
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- validate_user_id: typing.Optional[BooleanString] = None,
- krs_only: typing.Optional[BooleanString] = None,
- request: Business,
- ) -> BusinessUsersCreateResponse:
- """
- ## POST Business User
-
- `/business/user` endpoint allows you to operate on the Business user entity.
-
- In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
-
- ### Payload
-
-
- Each business user needs three mandatory fields:
-
- * `userId` - Unique identifier for the user
- * `legalEntity` - Details of the business legal entity (CompanyGeneralDetails, FinancialDetails etc) - only `legalName`in `CompanyGeneralDetails` is mandatory
- * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
-
- Parameters:
- - lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
-
- - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
-
- - validate_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate the userId
-
- - krs_only: typing.Optional[BooleanString].
-
- - request: Business.
- ---
- from flagright import Business, CompanyGeneralDetails, LegalEntity
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.business_users.create(
- request=Business(
- user_id="userId",
- created_timestamp=1.1,
- legal_entity=LegalEntity(
- company_general_details=CompanyGeneralDetails(
- legal_name="Ozkan Hazelnut Export JSC",
- business_industry=["Farming"],
- main_products_services_sold=["Hazelnut"],
- ),
- ),
- ),
- )
- """
- _response = await self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "business/users"),
- params=remove_none_from_dict(
- {
- "lockCraRiskLevel": lock_cra_risk_level,
- "lockKycRiskLevel": lock_kyc_risk_level,
- "validateUserId": validate_user_id,
- "_krsOnly": krs_only,
- }
- ),
- json=jsonable_encoder(request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BusinessUsersCreateResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- async def get(self, user_id: str) -> BusinessWithRulesResult:
- """
- ### GET Business User
-
- `/business/user` endpoint allows you to operate on the Business User entity.
-
- Calling `GET /business/user/{userId}` will return the entire User payload and rule execution results for the User with the corresponding `userId`
-
- Parameters:
- - user_id: str.
- ---
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.business_users.get(
- user_id="userId",
- )
- """
- _response = await self._client_wrapper.httpx_client.request(
- "GET",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"business/users/{user_id}"),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(BusinessWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/business_users/types/business_users_create_response.py b/src/flagright/resources/business_users/types/business_users_create_response.py
deleted file mode 100644
index 0f46ee0..0000000
--- a/src/flagright/resources/business_users/types/business_users_create_response.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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 ....types.business_user_monitoring_result import BusinessUserMonitoringResult
-
-
-class BusinessUsersCreateResponse(BusinessUserMonitoringResult):
- message: typing.Optional[str]
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
diff --git a/src/flagright/resources/consumer_user_events/client.py b/src/flagright/resources/consumer_user_events/client.py
deleted file mode 100644
index 920a47e..0000000
--- a/src/flagright/resources/consumer_user_events/client.py
+++ /dev/null
@@ -1,273 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-import urllib.parse
-from json.decoder import JSONDecodeError
-
-from ...core.api_error import ApiError
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from ...core.jsonable_encoder import jsonable_encoder
-from ...core.remove_none_from_dict import remove_none_from_dict
-from ...errors.bad_request_error import BadRequestError
-from ...errors.conflict_error import ConflictError
-from ...errors.too_many_requests_error import TooManyRequestsError
-from ...errors.unauthorized_error import UnauthorizedError
-from ...types.api_error_response import ApiErrorResponse
-from ...types.boolean_string import BooleanString
-from ...types.consumer_user_event import ConsumerUserEvent
-from ...types.consumer_user_event_with_rules_result import ConsumerUserEventWithRulesResult
-from ...types.user_with_rules_result import UserWithRulesResult
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-# this is used as the default value for optional parameters
-OMIT = typing.cast(typing.Any, ...)
-
-
-class ConsumerUserEventsClient:
- def __init__(self, *, client_wrapper: SyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- def create(
- self,
- *,
- allow_user_type_conversion: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- request: ConsumerUserEvent,
- ) -> UserWithRulesResult:
- """
- ## POST Consumer User Events
-
- `/events/consumer/user` endpoint allows you to operate on the Consumer User Events entity.
-
- User events are created after the initial `POST /consumer/users` call (which creates a user) and are used to:
-
- * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
- * Update the user details, using the `updatedConsumerUserAttributes` field.
-
- > If you have neither of the above two use cases, you do not need to use user events.
-
- ### Payload
-
- Each user event needs three mandatory fields:
-
- * `timestamp`- the timestamp of when the event was created or occured in your system
- * `userId` - The ID of the transaction for which this event is generated.
-
- In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
-
- Parameters:
- - allow_user_type_conversion: typing.Optional[BooleanString]. Boolean string whether Flagright should allow a Consumer user event to be applied to a Business user with the same user ID. This will converts a Business user to a Consumer user.
-
- - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
-
- - lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
-
- - request: ConsumerUserEvent.
- ---
- from flagright import ConsumerUserEvent
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.consumer_user_events.create(
- request=ConsumerUserEvent(
- timestamp=1.1,
- user_id="userId",
- ),
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "events/consumer/user"),
- params=remove_none_from_dict(
- {
- "allowUserTypeConversion": allow_user_type_conversion,
- "lockKycRiskLevel": lock_kyc_risk_level,
- "lockCraRiskLevel": lock_cra_risk_level,
- }
- ),
- json=jsonable_encoder(request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(UserWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 409:
- raise ConflictError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- def get(self, event_id: str) -> ConsumerUserEventWithRulesResult:
- """
- ### GET a Consumer User Event
- You can retrieve any consumer user event you created using the [POST Consumer User Events](/api-reference/api-reference/consumer-user-events/create) call.
-
- Parameters:
- - event_id: str. Unique Consumer User Event Identifier
- ---
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.consumer_user_events.get(
- event_id="eventId",
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- "GET",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"events/consumer/user/{event_id}"),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(ConsumerUserEventWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
-
-class AsyncConsumerUserEventsClient:
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- async def create(
- self,
- *,
- allow_user_type_conversion: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- request: ConsumerUserEvent,
- ) -> UserWithRulesResult:
- """
- ## POST Consumer User Events
-
- `/events/consumer/user` endpoint allows you to operate on the Consumer User Events entity.
-
- User events are created after the initial `POST /consumer/users` call (which creates a user) and are used to:
-
- * Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
- * Update the user details, using the `updatedConsumerUserAttributes` field.
-
- > If you have neither of the above two use cases, you do not need to use user events.
-
- ### Payload
-
- Each user event needs three mandatory fields:
-
- * `timestamp`- the timestamp of when the event was created or occured in your system
- * `userId` - The ID of the transaction for which this event is generated.
-
- In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
-
- Parameters:
- - allow_user_type_conversion: typing.Optional[BooleanString]. Boolean string whether Flagright should allow a Consumer user event to be applied to a Business user with the same user ID. This will converts a Business user to a Consumer user.
-
- - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
-
- - lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
-
- - request: ConsumerUserEvent.
- ---
- from flagright import ConsumerUserEvent
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.consumer_user_events.create(
- request=ConsumerUserEvent(
- timestamp=1.1,
- user_id="userId",
- ),
- )
- """
- _response = await self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "events/consumer/user"),
- params=remove_none_from_dict(
- {
- "allowUserTypeConversion": allow_user_type_conversion,
- "lockKycRiskLevel": lock_kyc_risk_level,
- "lockCraRiskLevel": lock_cra_risk_level,
- }
- ),
- json=jsonable_encoder(request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(UserWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 409:
- raise ConflictError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- async def get(self, event_id: str) -> ConsumerUserEventWithRulesResult:
- """
- ### GET a Consumer User Event
- You can retrieve any consumer user event you created using the [POST Consumer User Events](/api-reference/api-reference/consumer-user-events/create) call.
-
- Parameters:
- - event_id: str. Unique Consumer User Event Identifier
- ---
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.consumer_user_events.get(
- event_id="eventId",
- )
- """
- _response = await self._client_wrapper.httpx_client.request(
- "GET",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"events/consumer/user/{event_id}"),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(ConsumerUserEventWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/consumer_users/client.py b/src/flagright/resources/consumer_users/client.py
deleted file mode 100644
index fdb6bdd..0000000
--- a/src/flagright/resources/consumer_users/client.py
+++ /dev/null
@@ -1,390 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-import urllib.parse
-from json.decoder import JSONDecodeError
-
-from ...core.api_error import ApiError
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from ...core.jsonable_encoder import jsonable_encoder
-from ...core.remove_none_from_dict import remove_none_from_dict
-from ...errors.bad_request_error import BadRequestError
-from ...errors.too_many_requests_error import TooManyRequestsError
-from ...errors.unauthorized_error import UnauthorizedError
-from ...types.api_error_response import ApiErrorResponse
-from ...types.boolean_string import BooleanString
-from ...types.user import User
-from ...types.user_with_rules_result import UserWithRulesResult
-from .types.consumer_users_create_response import ConsumerUsersCreateResponse
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-# this is used as the default value for optional parameters
-OMIT = typing.cast(typing.Any, ...)
-
-
-class ConsumerUsersClient:
- def __init__(self, *, client_wrapper: SyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- def create(
- self,
- *,
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- validate_user_id: typing.Optional[BooleanString] = None,
- krs_only: typing.Optional[BooleanString] = None,
- request: User,
- ) -> ConsumerUsersCreateResponse:
- """
- ## POST Consumer User
-
- `/consumer/user` endpoint allows you to operate on the Consumer user entity.
-
- In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
-
- ### Payload
-
- Each consumer user needs two mandatory fields:
-
- * `userId` - Unique identifier for the user
- * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
-
- Parameters:
- - lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
-
- - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
-
- - validate_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate the userId
-
- - krs_only: typing.Optional[BooleanString].
-
- - request: User.
- ---
- from flagright import (
- Address,
- ConsumerName,
- ContactDetails,
- CountryCode,
- LegalDocument,
- Tag,
- User,
- UserDetails,
- UserTag,
- )
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.consumer_users.create(
- request=User(
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
- created_timestamp=1641654664000.0,
- user_details=UserDetails(
- name=ConsumerName(
- first_name="Baran",
- middle_name="Realblood",
- last_name="Ozkan",
- ),
- date_of_birth="1991-01-01",
- country_of_residence=CountryCode.US,
- country_of_nationality=CountryCode.DE,
- ),
- legal_documents=[
- LegalDocument(
- document_type="passport",
- document_number="Z9431P",
- document_issued_date=1639939034000.0,
- document_expiration_date=1839939034000.0,
- document_issued_country=CountryCode.DE,
- tags=[
- Tag(
- key="customerType",
- value="wallet",
- )
- ],
- )
- ],
- contact_details=ContactDetails(
- email_ids=["baran@flagright.com"],
- contact_numbers=["+37112345432"],
- websites=["flagright.com"],
- addresses=[
- Address(
- address_lines=["Klara-Franke Str 20"],
- postcode="10557",
- city="Berlin",
- state="Berlin",
- country="Germany",
- tags=[
- Tag(
- key="customKey",
- value="customValue",
- )
- ],
- )
- ],
- ),
- tags=[
- UserTag(
- key="customKey",
- value="customValue",
- )
- ],
- ),
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "consumer/users"),
- params=remove_none_from_dict(
- {
- "lockCraRiskLevel": lock_cra_risk_level,
- "lockKycRiskLevel": lock_kyc_risk_level,
- "validateUserId": validate_user_id,
- "_krsOnly": krs_only,
- }
- ),
- json=jsonable_encoder(request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(ConsumerUsersCreateResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- def get(self, user_id: str) -> UserWithRulesResult:
- """
- ### GET Consumer User
-
- `/consumer/user` endpoint allows you to operate on the Consumer User entity.
-
- Calling `GET /consumer/user/{userId}` will return the entire user payload and rule execution results for the user with the corresponding `userId`
-
- Parameters:
- - user_id: str.
- ---
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.consumer_users.get(
- user_id="userId",
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- "GET",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"consumer/users/{user_id}"),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(UserWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
-
-class AsyncConsumerUsersClient:
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- async def create(
- self,
- *,
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- validate_user_id: typing.Optional[BooleanString] = None,
- krs_only: typing.Optional[BooleanString] = None,
- request: User,
- ) -> ConsumerUsersCreateResponse:
- """
- ## POST Consumer User
-
- `/consumer/user` endpoint allows you to operate on the Consumer user entity.
-
- In order to pass the payload of a User to Flagright and verify the User, you will need to call this endpoint with the User payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
-
- ### Payload
-
- Each consumer user needs two mandatory fields:
-
- * `userId` - Unique identifier for the user
- * `createdTimestamp` - UNIX timestamp in *milliseconds* for when the User is created in your system
-
- Parameters:
- - lock_cra_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the CRA risk level for the user.
-
- - lock_kyc_risk_level: typing.Optional[BooleanString]. Boolean string whether Flagright should lock the KYC risk level for the user.
-
- - validate_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate the userId
-
- - krs_only: typing.Optional[BooleanString].
-
- - request: User.
- ---
- from flagright import (
- Address,
- ConsumerName,
- ContactDetails,
- CountryCode,
- LegalDocument,
- Tag,
- User,
- UserDetails,
- UserTag,
- )
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.consumer_users.create(
- request=User(
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
- created_timestamp=1641654664000.0,
- user_details=UserDetails(
- name=ConsumerName(
- first_name="Baran",
- middle_name="Realblood",
- last_name="Ozkan",
- ),
- date_of_birth="1991-01-01",
- country_of_residence=CountryCode.US,
- country_of_nationality=CountryCode.DE,
- ),
- legal_documents=[
- LegalDocument(
- document_type="passport",
- document_number="Z9431P",
- document_issued_date=1639939034000.0,
- document_expiration_date=1839939034000.0,
- document_issued_country=CountryCode.DE,
- tags=[
- Tag(
- key="customerType",
- value="wallet",
- )
- ],
- )
- ],
- contact_details=ContactDetails(
- email_ids=["baran@flagright.com"],
- contact_numbers=["+37112345432"],
- websites=["flagright.com"],
- addresses=[
- Address(
- address_lines=["Klara-Franke Str 20"],
- postcode="10557",
- city="Berlin",
- state="Berlin",
- country="Germany",
- tags=[
- Tag(
- key="customKey",
- value="customValue",
- )
- ],
- )
- ],
- ),
- tags=[
- UserTag(
- key="customKey",
- value="customValue",
- )
- ],
- ),
- )
- """
- _response = await self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "consumer/users"),
- params=remove_none_from_dict(
- {
- "lockCraRiskLevel": lock_cra_risk_level,
- "lockKycRiskLevel": lock_kyc_risk_level,
- "validateUserId": validate_user_id,
- "_krsOnly": krs_only,
- }
- ),
- json=jsonable_encoder(request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(ConsumerUsersCreateResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- async def get(self, user_id: str) -> UserWithRulesResult:
- """
- ### GET Consumer User
-
- `/consumer/user` endpoint allows you to operate on the Consumer User entity.
-
- Calling `GET /consumer/user/{userId}` will return the entire user payload and rule execution results for the user with the corresponding `userId`
-
- Parameters:
- - user_id: str.
- ---
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.consumer_users.get(
- user_id="userId",
- )
- """
- _response = await self._client_wrapper.httpx_client.request(
- "GET",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"consumer/users/{user_id}"),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(UserWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/consumer_users/types/consumer_users_create_response.py b/src/flagright/resources/consumer_users/types/consumer_users_create_response.py
deleted file mode 100644
index f900c4e..0000000
--- a/src/flagright/resources/consumer_users/types/consumer_users_create_response.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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 ....types.consumer_user_monitoring_result import ConsumerUserMonitoringResult
-
-
-class ConsumerUsersCreateResponse(ConsumerUserMonitoringResult):
- message: typing.Optional[str]
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
diff --git a/src/flagright/resources/transaction_events/client.py b/src/flagright/resources/transaction_events/client.py
deleted file mode 100644
index 9c775f1..0000000
--- a/src/flagright/resources/transaction_events/client.py
+++ /dev/null
@@ -1,254 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-import urllib.parse
-from json.decoder import JSONDecodeError
-
-from ...core.api_error import ApiError
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from ...core.jsonable_encoder import jsonable_encoder
-from ...errors.bad_request_error import BadRequestError
-from ...errors.too_many_requests_error import TooManyRequestsError
-from ...errors.unauthorized_error import UnauthorizedError
-from ...types.api_error_response import ApiErrorResponse
-from ...types.transaction_event import TransactionEvent
-from ...types.transaction_event_monitoring_result import TransactionEventMonitoringResult
-from ...types.transaction_event_with_rules_result import TransactionEventWithRulesResult
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-# this is used as the default value for optional parameters
-OMIT = typing.cast(typing.Any, ...)
-
-
-class TransactionEventsClient:
- def __init__(self, *, client_wrapper: SyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- def create(self, *, request: TransactionEvent) -> TransactionEventMonitoringResult:
- """
- ## POST Transaction Events
-
- `/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event)
-
- Transaction events are created after the initial `POST /transactions` call (which creates a transaction) and are used to:
-
- * Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- * Update the transaction details, using the `updatedTransactionAttributes` field.
-
- > If you have neither of the above two use cases, you do not need to use transaction events.
-
- ### Payload
-
- Each transaction event needs three mandatory fields:
-
- * `transactionState` - STATE of the transaction -> value is set to `CREATED` after `POST /transactions` call
- * `timestamp`- the timestamp of when the event was created or occured in your system
- * `transactionId` - The ID of the transaction for which this event is generated.
-
- In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
-
- Parameters:
- - request: TransactionEvent.
- ---
- from flagright import DeviceData, TransactionEvent, TransactionState
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.transaction_events.create(
- request=TransactionEvent(
- transaction_state=TransactionState.SUCCESSFUL,
- timestamp=1431231244001.0,
- transaction_id="443dea26147a406b957d9ee3a1247b11",
- event_id="aaeeb166147a406b957dd9147a406b957",
- event_description="Transaction created",
- meta_data=DeviceData(
- battery_level=76.3,
- device_latitude=13.009711,
- device_longitude=76.102898,
- ip_address="79.144.2.20",
- vpn_used=True,
- ),
- ),
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "events/transaction"),
- json=jsonable_encoder(request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(TransactionEventMonitoringResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- def get(self, event_id: str) -> TransactionEventWithRulesResult:
- """
- ### GET Transaction Events
-
- `/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event).
-
- You can retrieve any transaction event you created using the [POST Transaction Events](/api-reference/api-reference/transaction-events/create) call.
-
- Parameters:
- - event_id: str. Unique Transaction Identifier
- ---
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.transaction_events.get(
- event_id="eventId",
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- "GET",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"events/transaction/{event_id}"),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(TransactionEventWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
-
-class AsyncTransactionEventsClient:
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- async def create(self, *, request: TransactionEvent) -> TransactionEventMonitoringResult:
- """
- ## POST Transaction Events
-
- `/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event)
-
- Transaction events are created after the initial `POST /transactions` call (which creates a transaction) and are used to:
-
- * Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- * Update the transaction details, using the `updatedTransactionAttributes` field.
-
- > If you have neither of the above two use cases, you do not need to use transaction events.
-
- ### Payload
-
- Each transaction event needs three mandatory fields:
-
- * `transactionState` - STATE of the transaction -> value is set to `CREATED` after `POST /transactions` call
- * `timestamp`- the timestamp of when the event was created or occured in your system
- * `transactionId` - The ID of the transaction for which this event is generated.
-
- In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
-
- Parameters:
- - request: TransactionEvent.
- ---
- from flagright import DeviceData, TransactionEvent, TransactionState
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.transaction_events.create(
- request=TransactionEvent(
- transaction_state=TransactionState.SUCCESSFUL,
- timestamp=1431231244001.0,
- transaction_id="443dea26147a406b957d9ee3a1247b11",
- event_id="aaeeb166147a406b957dd9147a406b957",
- event_description="Transaction created",
- meta_data=DeviceData(
- battery_level=76.3,
- device_latitude=13.009711,
- device_longitude=76.102898,
- ip_address="79.144.2.20",
- vpn_used=True,
- ),
- ),
- )
- """
- _response = await self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "events/transaction"),
- json=jsonable_encoder(request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(TransactionEventMonitoringResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- async def get(self, event_id: str) -> TransactionEventWithRulesResult:
- """
- ### GET Transaction Events
-
- `/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event).
-
- You can retrieve any transaction event you created using the [POST Transaction Events](/api-reference/api-reference/transaction-events/create) call.
-
- Parameters:
- - event_id: str. Unique Transaction Identifier
- ---
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.transaction_events.get(
- event_id="eventId",
- )
- """
- _response = await self._client_wrapper.httpx_client.request(
- "GET",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"events/transaction/{event_id}"),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(TransactionEventWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/transactions/client.py b/src/flagright/resources/transactions/client.py
deleted file mode 100644
index a437993..0000000
--- a/src/flagright/resources/transactions/client.py
+++ /dev/null
@@ -1,412 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-import urllib.parse
-from json.decoder import JSONDecodeError
-
-from ...core.api_error import ApiError
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from ...core.jsonable_encoder import jsonable_encoder
-from ...core.remove_none_from_dict import remove_none_from_dict
-from ...errors.bad_request_error import BadRequestError
-from ...errors.too_many_requests_error import TooManyRequestsError
-from ...errors.unauthorized_error import UnauthorizedError
-from ...types.api_error_response import ApiErrorResponse
-from ...types.boolean_string import BooleanString
-from ...types.transaction import Transaction
-from ...types.transaction_with_rules_result import TransactionWithRulesResult
-from .types.transactions_verify_response import TransactionsVerifyResponse
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-# this is used as the default value for optional parameters
-OMIT = typing.cast(typing.Any, ...)
-
-
-class TransactionsClient:
- def __init__(self, *, client_wrapper: SyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- def verify(
- self,
- *,
- validate_origin_user_id: typing.Optional[BooleanString] = None,
- validate_destination_user_id: typing.Optional[BooleanString] = None,
- validate_transaction_id: typing.Optional[BooleanString] = None,
- trs_only: typing.Optional[BooleanString] = None,
- request: Transaction,
- ) -> TransactionsVerifyResponse:
- """
- ## POST Transactions
-
- `/transactions` endpoint allows you to operate on the [Transaction entity.](/guides/overview/entities#transaction)
-
- In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
-
-
- ### Payload
-
- Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
-
- * `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
- * `transactionId` - Unique Identifier for the transaction.
- * `timestamp` - UNIX timestamp in *milliseconds* of when the transaction took place
- * `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- * `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
- * `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
- * `originAmountDetails` - Details of the amount being sent from the origin
- * `destinationAmountDetails` - Details of the amount being received at the destination
- * `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
- * `destinationPaymentDetails` - Payment details (if any) used at the destination (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
-
- Parameters:
- - validate_origin_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided originUserId exist. True by default
-
- - validate_destination_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
-
- - validate_transaction_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided transactionId exist. True by default
-
- - trs_only: typing.Optional[BooleanString].
-
- - request: Transaction.
- ---
- from flagright import (
- CountryCode,
- CurrencyCode,
- DeviceData,
- Tag,
- Transaction,
- TransactionAmountDetails,
- TransactionDestinationPaymentDetails_Cash,
- TransactionOriginPaymentDetails_Cash,
- TransactionType,
- )
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.transactions.verify(
- request=Transaction(
- type=TransactionType.DEPOSIT,
- transaction_id="7b80a539eea6e78acbd6d458e5971482",
- timestamp=1641654664000.0,
- origin_user_id="8650a2611d0771cba03310f74bf6",
- destination_user_id="9350a2611e0771cba03310f74bf6",
- origin_amount_details=TransactionAmountDetails(
- transaction_amount=800.0,
- transaction_currency=CurrencyCode.EUR,
- country=CountryCode.DE,
- ),
- destination_amount_details=TransactionAmountDetails(
- transaction_amount=68351.34,
- transaction_currency=CurrencyCode.INR,
- country=CountryCode.IN,
- ),
- origin_payment_details=TransactionOriginPaymentDetails_Cash(
- method="CASH",
- ),
- destination_payment_details=TransactionDestinationPaymentDetails_Cash(
- method="CASH",
- ),
- promotion_code_used=True,
- reference="loan repayment",
- origin_device_data=DeviceData(
- battery_level=95.0,
- device_latitude=13.0033,
- device_longitude=76.1004,
- ip_address="10.23.191.2",
- device_identifier="3c49f915d04485e34caba",
- vpn_used=False,
- operating_system="Android 11.2",
- device_maker="ASUS",
- device_model="Zenphone M2 Pro Max",
- device_year="2018",
- app_version="1.1.0",
- ),
- destination_device_data=DeviceData(
- battery_level=95.0,
- device_latitude=13.0033,
- device_longitude=76.1004,
- ip_address="10.23.191.2",
- device_identifier="3c49f915d04485e34caba",
- vpn_used=False,
- operating_system="Android 11.2",
- device_maker="ASUS",
- device_model="Zenphone M2 Pro Max",
- device_year="2018",
- app_version="1.1.0",
- ),
- tags=[
- Tag(
- key="customKey",
- value="customValue",
- )
- ],
- ),
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "transactions"),
- params=remove_none_from_dict(
- {
- "validateOriginUserId": validate_origin_user_id,
- "validateDestinationUserId": validate_destination_user_id,
- "validateTransactionId": validate_transaction_id,
- "_trsOnly": trs_only,
- }
- ),
- json=jsonable_encoder(request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(TransactionsVerifyResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- def get(self, transaction_id: str) -> TransactionWithRulesResult:
- """
- ### GET Transactions
-
- `/transactions` endpoint allows you to operate on the [Transaction entity](/guides/overview/entities#transaction).
-
- Calling `GET /transactions/{transactionId}` will return the entire transaction payload and rule execution results for the transaction with the corresponding `transactionId`
-
- Parameters:
- - transaction_id: str. Unique Transaction Identifier
- ---
- from flagright.client import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.transactions.get(
- transaction_id="transactionId",
- )
- """
- _response = self._client_wrapper.httpx_client.request(
- "GET",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"transactions/{transaction_id}"),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(TransactionWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
-
-class AsyncTransactionsClient:
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- async def verify(
- self,
- *,
- validate_origin_user_id: typing.Optional[BooleanString] = None,
- validate_destination_user_id: typing.Optional[BooleanString] = None,
- validate_transaction_id: typing.Optional[BooleanString] = None,
- trs_only: typing.Optional[BooleanString] = None,
- request: Transaction,
- ) -> TransactionsVerifyResponse:
- """
- ## POST Transactions
-
- `/transactions` endpoint allows you to operate on the [Transaction entity.](/guides/overview/entities#transaction)
-
- In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
-
-
- ### Payload
-
- Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
-
- * `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
- * `transactionId` - Unique Identifier for the transaction.
- * `timestamp` - UNIX timestamp in *milliseconds* of when the transaction took place
- * `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
- * `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
- * `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
- * `originAmountDetails` - Details of the amount being sent from the origin
- * `destinationAmountDetails` - Details of the amount being received at the destination
- * `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
- * `destinationPaymentDetails` - Payment details (if any) used at the destination (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
-
- Parameters:
- - validate_origin_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided originUserId exist. True by default
-
- - validate_destination_user_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
-
- - validate_transaction_id: typing.Optional[BooleanString]. Boolean string whether Flagright should validate if provided transactionId exist. True by default
-
- - trs_only: typing.Optional[BooleanString].
-
- - request: Transaction.
- ---
- from flagright import (
- CountryCode,
- CurrencyCode,
- DeviceData,
- Tag,
- Transaction,
- TransactionAmountDetails,
- TransactionDestinationPaymentDetails_Cash,
- TransactionOriginPaymentDetails_Cash,
- TransactionType,
- )
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.transactions.verify(
- request=Transaction(
- type=TransactionType.DEPOSIT,
- transaction_id="7b80a539eea6e78acbd6d458e5971482",
- timestamp=1641654664000.0,
- origin_user_id="8650a2611d0771cba03310f74bf6",
- destination_user_id="9350a2611e0771cba03310f74bf6",
- origin_amount_details=TransactionAmountDetails(
- transaction_amount=800.0,
- transaction_currency=CurrencyCode.EUR,
- country=CountryCode.DE,
- ),
- destination_amount_details=TransactionAmountDetails(
- transaction_amount=68351.34,
- transaction_currency=CurrencyCode.INR,
- country=CountryCode.IN,
- ),
- origin_payment_details=TransactionOriginPaymentDetails_Cash(
- method="CASH",
- ),
- destination_payment_details=TransactionDestinationPaymentDetails_Cash(
- method="CASH",
- ),
- promotion_code_used=True,
- reference="loan repayment",
- origin_device_data=DeviceData(
- battery_level=95.0,
- device_latitude=13.0033,
- device_longitude=76.1004,
- ip_address="10.23.191.2",
- device_identifier="3c49f915d04485e34caba",
- vpn_used=False,
- operating_system="Android 11.2",
- device_maker="ASUS",
- device_model="Zenphone M2 Pro Max",
- device_year="2018",
- app_version="1.1.0",
- ),
- destination_device_data=DeviceData(
- battery_level=95.0,
- device_latitude=13.0033,
- device_longitude=76.1004,
- ip_address="10.23.191.2",
- device_identifier="3c49f915d04485e34caba",
- vpn_used=False,
- operating_system="Android 11.2",
- device_maker="ASUS",
- device_model="Zenphone M2 Pro Max",
- device_year="2018",
- app_version="1.1.0",
- ),
- tags=[
- Tag(
- key="customKey",
- value="customValue",
- )
- ],
- ),
- )
- """
- _response = await self._client_wrapper.httpx_client.request(
- "POST",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "transactions"),
- params=remove_none_from_dict(
- {
- "validateOriginUserId": validate_origin_user_id,
- "validateDestinationUserId": validate_destination_user_id,
- "validateTransactionId": validate_transaction_id,
- "_trsOnly": trs_only,
- }
- ),
- json=jsonable_encoder(request),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(TransactionsVerifyResponse, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
-
- async def get(self, transaction_id: str) -> TransactionWithRulesResult:
- """
- ### GET Transactions
-
- `/transactions` endpoint allows you to operate on the [Transaction entity](/guides/overview/entities#transaction).
-
- Calling `GET /transactions/{transactionId}` will return the entire transaction payload and rule execution results for the transaction with the corresponding `transactionId`
-
- Parameters:
- - transaction_id: str. Unique Transaction Identifier
- ---
- from flagright.client import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
- await client.transactions.get(
- transaction_id="transactionId",
- )
- """
- _response = await self._client_wrapper.httpx_client.request(
- "GET",
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"transactions/{transaction_id}"),
- headers=self._client_wrapper.get_headers(),
- timeout=60,
- )
- if 200 <= _response.status_code < 300:
- return pydantic.parse_obj_as(TransactionWithRulesResult, _response.json()) # type: ignore
- if _response.status_code == 400:
- raise BadRequestError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 401:
- raise UnauthorizedError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- if _response.status_code == 429:
- raise TooManyRequestsError(pydantic.parse_obj_as(ApiErrorResponse, _response.json())) # type: ignore
- try:
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/transactions/types/transactions_verify_response.py b/src/flagright/resources/transactions/types/transactions_verify_response.py
deleted file mode 100644
index 729bf1a..0000000
--- a/src/flagright/resources/transactions/types/transactions_verify_response.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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 ....types.transaction_monitoring_result import TransactionMonitoringResult
-
-
-class TransactionsVerifyResponse(TransactionMonitoringResult):
- message: typing.Optional[str]
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
diff --git a/src/flagright/resources/transaction_events/__init__.py b/src/flagright/transaction_events/__init__.py
similarity index 100%
rename from src/flagright/resources/transaction_events/__init__.py
rename to src/flagright/transaction_events/__init__.py
diff --git a/src/flagright/transaction_events/client.py b/src/flagright/transaction_events/client.py
new file mode 100644
index 0000000..9c17342
--- /dev/null
+++ b/src/flagright/transaction_events/client.py
@@ -0,0 +1,340 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from .raw_client import RawTransactionEventsClient
+from ..types.transaction_state import TransactionState
+from ..types.transaction_updatable import TransactionUpdatable
+from ..types.device_data import DeviceData
+from ..core.request_options import RequestOptions
+from ..types.transaction_event_monitoring_result import TransactionEventMonitoringResult
+from ..types.transaction_event_with_rules_result import TransactionEventWithRulesResult
+from ..core.client_wrapper import AsyncClientWrapper
+from .raw_client import AsyncRawTransactionEventsClient
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class TransactionEventsClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._raw_client = RawTransactionEventsClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> RawTransactionEventsClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ RawTransactionEventsClient
+ """
+ return self._raw_client
+
+ def create(
+ self,
+ *,
+ transaction_state: TransactionState,
+ timestamp: float,
+ transaction_id: str,
+ event_id: typing.Optional[str] = OMIT,
+ reason: typing.Optional[str] = OMIT,
+ event_description: typing.Optional[str] = OMIT,
+ updated_transaction_attributes: typing.Optional[TransactionUpdatable] = OMIT,
+ meta_data: typing.Optional[DeviceData] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> TransactionEventMonitoringResult:
+ """
+ ## POST Transaction Events
+
+ `/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event)
+
+ Transaction events are created after the initial `POST /transactions` call (which creates a transaction) and are used to:
+
+ * Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+ * Update the transaction details, using the `updatedTransactionAttributes` field.
+
+ > If you have neither of the above two use cases, you do not need to use transaction events.
+
+ ### Payload
+
+ Each transaction event needs three mandatory fields:
+
+ * `transactionState` - STATE of the transaction -> value is set to `CREATED` after `POST /transactions` call
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `transactionId` - The ID of the transaction for which this event is generated.
+
+ In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+ Parameters
+ ----------
+ transaction_state : TransactionState
+
+ timestamp : float
+ Timestamp of the event
+
+ transaction_id : str
+ Transaction ID the event pertains to
+
+ event_id : typing.Optional[str]
+ Unique event ID
+
+ reason : typing.Optional[str]
+ Reason for the event or a state change
+
+ event_description : typing.Optional[str]
+ Event description
+
+ updated_transaction_attributes : typing.Optional[TransactionUpdatable]
+
+ meta_data : typing.Optional[DeviceData]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ TransactionEventMonitoringResult
+ Created
+
+ Examples
+ --------
+ from flagright import DeviceData, Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.transaction_events.create(
+ transaction_state="SUCCESSFUL",
+ timestamp=1431231244001.0,
+ transaction_id="443dea26147a406b957d9ee3a1247b11",
+ event_id="aaeeb166147a406b957dd9147a406b957",
+ event_description="Transaction created",
+ meta_data=DeviceData(
+ battery_level=76.3,
+ device_latitude=13.009711,
+ device_longitude=76.102898,
+ ip_address="79.144.2.20",
+ vpn_used=True,
+ ),
+ )
+ """
+ response = self._raw_client.create(
+ transaction_state=transaction_state,
+ timestamp=timestamp,
+ transaction_id=transaction_id,
+ event_id=event_id,
+ reason=reason,
+ event_description=event_description,
+ updated_transaction_attributes=updated_transaction_attributes,
+ meta_data=meta_data,
+ request_options=request_options,
+ )
+ return response.data
+
+ def get(
+ self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> TransactionEventWithRulesResult:
+ """
+ ### GET Transaction Events
+
+ `/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event).
+
+ You can retrieve any transaction event you created using the [POST Transaction Events](/api-reference/api-reference/transaction-events/create) call.
+
+ Parameters
+ ----------
+ event_id : str
+ Unique Transaction Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ TransactionEventWithRulesResult
+ OK
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.transaction_events.get(
+ event_id="eventId",
+ )
+ """
+ response = self._raw_client.get(event_id, request_options=request_options)
+ return response.data
+
+
+class AsyncTransactionEventsClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._raw_client = AsyncRawTransactionEventsClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> AsyncRawTransactionEventsClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ AsyncRawTransactionEventsClient
+ """
+ return self._raw_client
+
+ async def create(
+ self,
+ *,
+ transaction_state: TransactionState,
+ timestamp: float,
+ transaction_id: str,
+ event_id: typing.Optional[str] = OMIT,
+ reason: typing.Optional[str] = OMIT,
+ event_description: typing.Optional[str] = OMIT,
+ updated_transaction_attributes: typing.Optional[TransactionUpdatable] = OMIT,
+ meta_data: typing.Optional[DeviceData] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> TransactionEventMonitoringResult:
+ """
+ ## POST Transaction Events
+
+ `/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event)
+
+ Transaction events are created after the initial `POST /transactions` call (which creates a transaction) and are used to:
+
+ * Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+ * Update the transaction details, using the `updatedTransactionAttributes` field.
+
+ > If you have neither of the above two use cases, you do not need to use transaction events.
+
+ ### Payload
+
+ Each transaction event needs three mandatory fields:
+
+ * `transactionState` - STATE of the transaction -> value is set to `CREATED` after `POST /transactions` call
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `transactionId` - The ID of the transaction for which this event is generated.
+
+ In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+ Parameters
+ ----------
+ transaction_state : TransactionState
+
+ timestamp : float
+ Timestamp of the event
+
+ transaction_id : str
+ Transaction ID the event pertains to
+
+ event_id : typing.Optional[str]
+ Unique event ID
+
+ reason : typing.Optional[str]
+ Reason for the event or a state change
+
+ event_description : typing.Optional[str]
+ Event description
+
+ updated_transaction_attributes : typing.Optional[TransactionUpdatable]
+
+ meta_data : typing.Optional[DeviceData]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ TransactionEventMonitoringResult
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright, DeviceData
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.transaction_events.create(
+ transaction_state="SUCCESSFUL",
+ timestamp=1431231244001.0,
+ transaction_id="443dea26147a406b957d9ee3a1247b11",
+ event_id="aaeeb166147a406b957dd9147a406b957",
+ event_description="Transaction created",
+ meta_data=DeviceData(
+ battery_level=76.3,
+ device_latitude=13.009711,
+ device_longitude=76.102898,
+ ip_address="79.144.2.20",
+ vpn_used=True,
+ ),
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.create(
+ transaction_state=transaction_state,
+ timestamp=timestamp,
+ transaction_id=transaction_id,
+ event_id=event_id,
+ reason=reason,
+ event_description=event_description,
+ updated_transaction_attributes=updated_transaction_attributes,
+ meta_data=meta_data,
+ request_options=request_options,
+ )
+ return response.data
+
+ async def get(
+ self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> TransactionEventWithRulesResult:
+ """
+ ### GET Transaction Events
+
+ `/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event).
+
+ You can retrieve any transaction event you created using the [POST Transaction Events](/api-reference/api-reference/transaction-events/create) call.
+
+ Parameters
+ ----------
+ event_id : str
+ Unique Transaction Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ TransactionEventWithRulesResult
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.transaction_events.get(
+ event_id="eventId",
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.get(event_id, request_options=request_options)
+ return response.data
diff --git a/src/flagright/transaction_events/raw_client.py b/src/flagright/transaction_events/raw_client.py
new file mode 100644
index 0000000..ff80b16
--- /dev/null
+++ b/src/flagright/transaction_events/raw_client.py
@@ -0,0 +1,443 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from ..types.transaction_state import TransactionState
+from ..types.transaction_updatable import TransactionUpdatable
+from ..types.device_data import DeviceData
+from ..core.request_options import RequestOptions
+from ..core.http_response import HttpResponse
+from ..types.transaction_event_monitoring_result import TransactionEventMonitoringResult
+from ..core.serialization import convert_and_respect_annotation_metadata
+from ..core.pydantic_utilities import parse_obj_as
+from ..errors.bad_request_error import BadRequestError
+from ..types.api_error_response import ApiErrorResponse
+from ..errors.unauthorized_error import UnauthorizedError
+from ..errors.too_many_requests_error import TooManyRequestsError
+from json.decoder import JSONDecodeError
+from ..core.api_error import ApiError
+from ..types.transaction_event_with_rules_result import TransactionEventWithRulesResult
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.client_wrapper import AsyncClientWrapper
+from ..core.http_response import AsyncHttpResponse
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class RawTransactionEventsClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ def create(
+ self,
+ *,
+ transaction_state: TransactionState,
+ timestamp: float,
+ transaction_id: str,
+ event_id: typing.Optional[str] = OMIT,
+ reason: typing.Optional[str] = OMIT,
+ event_description: typing.Optional[str] = OMIT,
+ updated_transaction_attributes: typing.Optional[TransactionUpdatable] = OMIT,
+ meta_data: typing.Optional[DeviceData] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[TransactionEventMonitoringResult]:
+ """
+ ## POST Transaction Events
+
+ `/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event)
+
+ Transaction events are created after the initial `POST /transactions` call (which creates a transaction) and are used to:
+
+ * Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+ * Update the transaction details, using the `updatedTransactionAttributes` field.
+
+ > If you have neither of the above two use cases, you do not need to use transaction events.
+
+ ### Payload
+
+ Each transaction event needs three mandatory fields:
+
+ * `transactionState` - STATE of the transaction -> value is set to `CREATED` after `POST /transactions` call
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `transactionId` - The ID of the transaction for which this event is generated.
+
+ In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+ Parameters
+ ----------
+ transaction_state : TransactionState
+
+ timestamp : float
+ Timestamp of the event
+
+ transaction_id : str
+ Transaction ID the event pertains to
+
+ event_id : typing.Optional[str]
+ Unique event ID
+
+ reason : typing.Optional[str]
+ Reason for the event or a state change
+
+ event_description : typing.Optional[str]
+ Event description
+
+ updated_transaction_attributes : typing.Optional[TransactionUpdatable]
+
+ meta_data : typing.Optional[DeviceData]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[TransactionEventMonitoringResult]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "events/transaction",
+ method="POST",
+ json={
+ "transactionState": transaction_state,
+ "timestamp": timestamp,
+ "transactionId": transaction_id,
+ "eventId": event_id,
+ "reason": reason,
+ "eventDescription": event_description,
+ "updatedTransactionAttributes": convert_and_respect_annotation_metadata(
+ object_=updated_transaction_attributes, annotation=TransactionUpdatable, direction="write"
+ ),
+ "metaData": convert_and_respect_annotation_metadata(
+ object_=meta_data, annotation=DeviceData, direction="write"
+ ),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ TransactionEventMonitoringResult,
+ parse_obj_as(
+ type_=TransactionEventMonitoringResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def get(
+ self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[TransactionEventWithRulesResult]:
+ """
+ ### GET Transaction Events
+
+ `/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event).
+
+ You can retrieve any transaction event you created using the [POST Transaction Events](/api-reference/api-reference/transaction-events/create) call.
+
+ Parameters
+ ----------
+ event_id : str
+ Unique Transaction Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[TransactionEventWithRulesResult]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"events/transaction/{jsonable_encoder(event_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ TransactionEventWithRulesResult,
+ parse_obj_as(
+ type_=TransactionEventWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+
+class AsyncRawTransactionEventsClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def create(
+ self,
+ *,
+ transaction_state: TransactionState,
+ timestamp: float,
+ transaction_id: str,
+ event_id: typing.Optional[str] = OMIT,
+ reason: typing.Optional[str] = OMIT,
+ event_description: typing.Optional[str] = OMIT,
+ updated_transaction_attributes: typing.Optional[TransactionUpdatable] = OMIT,
+ meta_data: typing.Optional[DeviceData] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[TransactionEventMonitoringResult]:
+ """
+ ## POST Transaction Events
+
+ `/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event)
+
+ Transaction events are created after the initial `POST /transactions` call (which creates a transaction) and are used to:
+
+ * Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+ * Update the transaction details, using the `updatedTransactionAttributes` field.
+
+ > If you have neither of the above two use cases, you do not need to use transaction events.
+
+ ### Payload
+
+ Each transaction event needs three mandatory fields:
+
+ * `transactionState` - STATE of the transaction -> value is set to `CREATED` after `POST /transactions` call
+ * `timestamp`- the timestamp of when the event was created or occured in your system
+ * `transactionId` - The ID of the transaction for which this event is generated.
+
+ In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
+
+ Parameters
+ ----------
+ transaction_state : TransactionState
+
+ timestamp : float
+ Timestamp of the event
+
+ transaction_id : str
+ Transaction ID the event pertains to
+
+ event_id : typing.Optional[str]
+ Unique event ID
+
+ reason : typing.Optional[str]
+ Reason for the event or a state change
+
+ event_description : typing.Optional[str]
+ Event description
+
+ updated_transaction_attributes : typing.Optional[TransactionUpdatable]
+
+ meta_data : typing.Optional[DeviceData]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[TransactionEventMonitoringResult]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "events/transaction",
+ method="POST",
+ json={
+ "transactionState": transaction_state,
+ "timestamp": timestamp,
+ "transactionId": transaction_id,
+ "eventId": event_id,
+ "reason": reason,
+ "eventDescription": event_description,
+ "updatedTransactionAttributes": convert_and_respect_annotation_metadata(
+ object_=updated_transaction_attributes, annotation=TransactionUpdatable, direction="write"
+ ),
+ "metaData": convert_and_respect_annotation_metadata(
+ object_=meta_data, annotation=DeviceData, direction="write"
+ ),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ TransactionEventMonitoringResult,
+ parse_obj_as(
+ type_=TransactionEventMonitoringResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def get(
+ self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[TransactionEventWithRulesResult]:
+ """
+ ### GET Transaction Events
+
+ `/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event).
+
+ You can retrieve any transaction event you created using the [POST Transaction Events](/api-reference/api-reference/transaction-events/create) call.
+
+ Parameters
+ ----------
+ event_id : str
+ Unique Transaction Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[TransactionEventWithRulesResult]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"events/transaction/{jsonable_encoder(event_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ TransactionEventWithRulesResult,
+ parse_obj_as(
+ type_=TransactionEventWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/transactions/__init__.py b/src/flagright/transactions/__init__.py
similarity index 100%
rename from src/flagright/resources/transactions/__init__.py
rename to src/flagright/transactions/__init__.py
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
new file mode 100644
index 0000000..9c12f1f
--- /dev/null
+++ b/src/flagright/transactions/client.py
@@ -0,0 +1,588 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from .raw_client import RawTransactionsClient
+from ..types.transaction_type import TransactionType
+from ..types.boolean_string import BooleanString
+from ..types.transaction_state import TransactionState
+from ..types.transaction_amount_details import TransactionAmountDetails
+from ..types.transaction_origin_payment_details import TransactionOriginPaymentDetails
+from ..types.transaction_destination_payment_details import TransactionDestinationPaymentDetails
+from ..types.origin_funds_info import OriginFundsInfo
+from ..types.device_data import DeviceData
+from ..types.tag import Tag
+from ..core.request_options import RequestOptions
+from .types.transactions_verify_response import TransactionsVerifyResponse
+from ..types.transaction_with_rules_result import TransactionWithRulesResult
+from ..core.client_wrapper import AsyncClientWrapper
+from .raw_client import AsyncRawTransactionsClient
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class TransactionsClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._raw_client = RawTransactionsClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> RawTransactionsClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ RawTransactionsClient
+ """
+ return self._raw_client
+
+ def verify(
+ self,
+ *,
+ type: TransactionType,
+ transaction_id: str,
+ timestamp: float,
+ validate_origin_user_id: typing.Optional[BooleanString] = None,
+ validate_destination_user_id: typing.Optional[BooleanString] = None,
+ validate_transaction_id: typing.Optional[BooleanString] = None,
+ trs_only: typing.Optional[BooleanString] = None,
+ origin_user_id: typing.Optional[str] = OMIT,
+ destination_user_id: typing.Optional[str] = OMIT,
+ transaction_state: typing.Optional[TransactionState] = OMIT,
+ origin_amount_details: typing.Optional[TransactionAmountDetails] = OMIT,
+ destination_amount_details: typing.Optional[TransactionAmountDetails] = OMIT,
+ origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = OMIT,
+ destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = OMIT,
+ origin_funds_info: typing.Optional[OriginFundsInfo] = OMIT,
+ related_transaction_ids: typing.Optional[typing.Sequence[str]] = OMIT,
+ product_type: typing.Optional[str] = OMIT,
+ promotion_code_used: typing.Optional[bool] = OMIT,
+ reference: typing.Optional[str] = OMIT,
+ origin_device_data: typing.Optional[DeviceData] = OMIT,
+ destination_device_data: typing.Optional[DeviceData] = OMIT,
+ tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> TransactionsVerifyResponse:
+ """
+ ## POST Transactions
+
+ `/transactions` endpoint allows you to operate on the [Transaction entity.](/guides/overview/entities#transaction)
+
+ In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+
+ ### Payload
+
+ Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
+
+ * `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
+ * `transactionId` - Unique Identifier for the transaction.
+ * `timestamp` - UNIX timestamp in *milliseconds* of when the transaction took place
+ * `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+ * `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+ * `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+ * `originAmountDetails` - Details of the amount being sent from the origin
+ * `destinationAmountDetails` - Details of the amount being received at the destination
+ * `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+ * `destinationPaymentDetails` - Payment details (if any) used at the destination (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+
+ Parameters
+ ----------
+ type : TransactionType
+
+ transaction_id : str
+ Unique transaction identifier
+
+ timestamp : float
+ Timestamp of when transaction took place
+
+ validate_origin_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided originUserId exist. True by default
+
+ validate_destination_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+
+ validate_transaction_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided transactionId exist. True by default
+
+ trs_only : typing.Optional[BooleanString]
+
+ origin_user_id : typing.Optional[str]
+ UserId for where the transaction originates from
+
+ destination_user_id : typing.Optional[str]
+ UserId for transaction's destination. In other words, where the value is being transferred to.
+
+ transaction_state : typing.Optional[TransactionState]
+
+ origin_amount_details : typing.Optional[TransactionAmountDetails]
+
+ destination_amount_details : typing.Optional[TransactionAmountDetails]
+
+ origin_payment_details : typing.Optional[TransactionOriginPaymentDetails]
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+
+ destination_payment_details : typing.Optional[TransactionDestinationPaymentDetails]
+
+ origin_funds_info : typing.Optional[OriginFundsInfo]
+
+ related_transaction_ids : typing.Optional[typing.Sequence[str]]
+ IDs of transactions related to this transaction. Ex: refund, split bills
+
+ product_type : typing.Optional[str]
+ Type of produce being used by the consumer (ex wallets, payments etc)
+
+ promotion_code_used : typing.Optional[bool]
+ Whether a promotion code was used or not the transaction
+
+ reference : typing.Optional[str]
+ Reference field for the transaction indicating the purpose of the transaction etc.
+
+ origin_device_data : typing.Optional[DeviceData]
+
+ destination_device_data : typing.Optional[DeviceData]
+
+ tags : typing.Optional[typing.Sequence[Tag]]
+ Additional information that can be added via tags
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ TransactionsVerifyResponse
+ Created
+
+ Examples
+ --------
+ from flagright import (
+ DeviceData,
+ Flagright,
+ Tag,
+ TransactionAmountDetails,
+ TransactionDestinationPaymentDetails_Card,
+ TransactionOriginPaymentDetails_Card,
+ )
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.transactions.verify(
+ type="DEPOSIT",
+ transaction_id="7b80a539eea6e78acbd6d458e5971482",
+ timestamp=1641654664000.0,
+ origin_user_id="8650a2611d0771cba03310f74bf6",
+ destination_user_id="9350a2611e0771cba03310f74bf6",
+ origin_amount_details=TransactionAmountDetails(
+ transaction_amount=800.0,
+ transaction_currency="EUR",
+ country="DE",
+ ),
+ destination_amount_details=TransactionAmountDetails(
+ transaction_amount=68351.34,
+ transaction_currency="INR",
+ country="IN",
+ ),
+ origin_payment_details=TransactionOriginPaymentDetails_Card(
+ card_fingerprint="20ac00fed8ef913aefb17cfae1097cce",
+ card_issued_country="TR",
+ transaction_reference_field="Deposit",
+ f_3_ds_done=True,
+ ),
+ destination_payment_details=TransactionDestinationPaymentDetails_Card(
+ card_fingerprint="20ac00fed8ef913aefb17cfae1097cce",
+ card_issued_country="TR",
+ transaction_reference_field="Deposit",
+ f_3_ds_done=True,
+ ),
+ promotion_code_used=True,
+ reference="loan repayment",
+ origin_device_data=DeviceData(
+ battery_level=95.0,
+ device_latitude=13.0033,
+ device_longitude=76.1004,
+ ip_address="10.23.191.2",
+ device_identifier="3c49f915d04485e34caba",
+ vpn_used=False,
+ operating_system="Android 11.2",
+ device_maker="ASUS",
+ device_model="Zenphone M2 Pro Max",
+ device_year="2018",
+ app_version="1.1.0",
+ ),
+ destination_device_data=DeviceData(
+ battery_level=95.0,
+ device_latitude=13.0033,
+ device_longitude=76.1004,
+ ip_address="10.23.191.2",
+ device_identifier="3c49f915d04485e34caba",
+ vpn_used=False,
+ operating_system="Android 11.2",
+ device_maker="ASUS",
+ device_model="Zenphone M2 Pro Max",
+ device_year="2018",
+ app_version="1.1.0",
+ ),
+ tags=[
+ Tag(
+ key="customKey",
+ value="customValue",
+ )
+ ],
+ )
+ """
+ response = self._raw_client.verify(
+ type=type,
+ transaction_id=transaction_id,
+ timestamp=timestamp,
+ validate_origin_user_id=validate_origin_user_id,
+ validate_destination_user_id=validate_destination_user_id,
+ validate_transaction_id=validate_transaction_id,
+ trs_only=trs_only,
+ origin_user_id=origin_user_id,
+ destination_user_id=destination_user_id,
+ transaction_state=transaction_state,
+ origin_amount_details=origin_amount_details,
+ destination_amount_details=destination_amount_details,
+ origin_payment_details=origin_payment_details,
+ destination_payment_details=destination_payment_details,
+ origin_funds_info=origin_funds_info,
+ related_transaction_ids=related_transaction_ids,
+ product_type=product_type,
+ promotion_code_used=promotion_code_used,
+ reference=reference,
+ origin_device_data=origin_device_data,
+ destination_device_data=destination_device_data,
+ tags=tags,
+ request_options=request_options,
+ )
+ return response.data
+
+ def get(
+ self, transaction_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> TransactionWithRulesResult:
+ """
+ ### GET Transactions
+
+ `/transactions` endpoint allows you to operate on the [Transaction entity](/guides/overview/entities#transaction).
+
+ Calling `GET /transactions/{transactionId}` will return the entire transaction payload and rule execution results for the transaction with the corresponding `transactionId`
+
+ Parameters
+ ----------
+ transaction_id : str
+ Unique Transaction Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ TransactionWithRulesResult
+ OK
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.transactions.get(
+ transaction_id="transactionId",
+ )
+ """
+ response = self._raw_client.get(transaction_id, request_options=request_options)
+ return response.data
+
+
+class AsyncTransactionsClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._raw_client = AsyncRawTransactionsClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> AsyncRawTransactionsClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ AsyncRawTransactionsClient
+ """
+ return self._raw_client
+
+ async def verify(
+ self,
+ *,
+ type: TransactionType,
+ transaction_id: str,
+ timestamp: float,
+ validate_origin_user_id: typing.Optional[BooleanString] = None,
+ validate_destination_user_id: typing.Optional[BooleanString] = None,
+ validate_transaction_id: typing.Optional[BooleanString] = None,
+ trs_only: typing.Optional[BooleanString] = None,
+ origin_user_id: typing.Optional[str] = OMIT,
+ destination_user_id: typing.Optional[str] = OMIT,
+ transaction_state: typing.Optional[TransactionState] = OMIT,
+ origin_amount_details: typing.Optional[TransactionAmountDetails] = OMIT,
+ destination_amount_details: typing.Optional[TransactionAmountDetails] = OMIT,
+ origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = OMIT,
+ destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = OMIT,
+ origin_funds_info: typing.Optional[OriginFundsInfo] = OMIT,
+ related_transaction_ids: typing.Optional[typing.Sequence[str]] = OMIT,
+ product_type: typing.Optional[str] = OMIT,
+ promotion_code_used: typing.Optional[bool] = OMIT,
+ reference: typing.Optional[str] = OMIT,
+ origin_device_data: typing.Optional[DeviceData] = OMIT,
+ destination_device_data: typing.Optional[DeviceData] = OMIT,
+ tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> TransactionsVerifyResponse:
+ """
+ ## POST Transactions
+
+ `/transactions` endpoint allows you to operate on the [Transaction entity.](/guides/overview/entities#transaction)
+
+ In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+
+ ### Payload
+
+ Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
+
+ * `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
+ * `transactionId` - Unique Identifier for the transaction.
+ * `timestamp` - UNIX timestamp in *milliseconds* of when the transaction took place
+ * `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+ * `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+ * `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+ * `originAmountDetails` - Details of the amount being sent from the origin
+ * `destinationAmountDetails` - Details of the amount being received at the destination
+ * `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+ * `destinationPaymentDetails` - Payment details (if any) used at the destination (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+
+ Parameters
+ ----------
+ type : TransactionType
+
+ transaction_id : str
+ Unique transaction identifier
+
+ timestamp : float
+ Timestamp of when transaction took place
+
+ validate_origin_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided originUserId exist. True by default
+
+ validate_destination_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+
+ validate_transaction_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided transactionId exist. True by default
+
+ trs_only : typing.Optional[BooleanString]
+
+ origin_user_id : typing.Optional[str]
+ UserId for where the transaction originates from
+
+ destination_user_id : typing.Optional[str]
+ UserId for transaction's destination. In other words, where the value is being transferred to.
+
+ transaction_state : typing.Optional[TransactionState]
+
+ origin_amount_details : typing.Optional[TransactionAmountDetails]
+
+ destination_amount_details : typing.Optional[TransactionAmountDetails]
+
+ origin_payment_details : typing.Optional[TransactionOriginPaymentDetails]
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+
+ destination_payment_details : typing.Optional[TransactionDestinationPaymentDetails]
+
+ origin_funds_info : typing.Optional[OriginFundsInfo]
+
+ related_transaction_ids : typing.Optional[typing.Sequence[str]]
+ IDs of transactions related to this transaction. Ex: refund, split bills
+
+ product_type : typing.Optional[str]
+ Type of produce being used by the consumer (ex wallets, payments etc)
+
+ promotion_code_used : typing.Optional[bool]
+ Whether a promotion code was used or not the transaction
+
+ reference : typing.Optional[str]
+ Reference field for the transaction indicating the purpose of the transaction etc.
+
+ origin_device_data : typing.Optional[DeviceData]
+
+ destination_device_data : typing.Optional[DeviceData]
+
+ tags : typing.Optional[typing.Sequence[Tag]]
+ Additional information that can be added via tags
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ TransactionsVerifyResponse
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import (
+ AsyncFlagright,
+ DeviceData,
+ Tag,
+ TransactionAmountDetails,
+ TransactionDestinationPaymentDetails_Card,
+ TransactionOriginPaymentDetails_Card,
+ )
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.transactions.verify(
+ type="DEPOSIT",
+ transaction_id="7b80a539eea6e78acbd6d458e5971482",
+ timestamp=1641654664000.0,
+ origin_user_id="8650a2611d0771cba03310f74bf6",
+ destination_user_id="9350a2611e0771cba03310f74bf6",
+ origin_amount_details=TransactionAmountDetails(
+ transaction_amount=800.0,
+ transaction_currency="EUR",
+ country="DE",
+ ),
+ destination_amount_details=TransactionAmountDetails(
+ transaction_amount=68351.34,
+ transaction_currency="INR",
+ country="IN",
+ ),
+ origin_payment_details=TransactionOriginPaymentDetails_Card(
+ card_fingerprint="20ac00fed8ef913aefb17cfae1097cce",
+ card_issued_country="TR",
+ transaction_reference_field="Deposit",
+ f_3_ds_done=True,
+ ),
+ destination_payment_details=TransactionDestinationPaymentDetails_Card(
+ card_fingerprint="20ac00fed8ef913aefb17cfae1097cce",
+ card_issued_country="TR",
+ transaction_reference_field="Deposit",
+ f_3_ds_done=True,
+ ),
+ promotion_code_used=True,
+ reference="loan repayment",
+ origin_device_data=DeviceData(
+ battery_level=95.0,
+ device_latitude=13.0033,
+ device_longitude=76.1004,
+ ip_address="10.23.191.2",
+ device_identifier="3c49f915d04485e34caba",
+ vpn_used=False,
+ operating_system="Android 11.2",
+ device_maker="ASUS",
+ device_model="Zenphone M2 Pro Max",
+ device_year="2018",
+ app_version="1.1.0",
+ ),
+ destination_device_data=DeviceData(
+ battery_level=95.0,
+ device_latitude=13.0033,
+ device_longitude=76.1004,
+ ip_address="10.23.191.2",
+ device_identifier="3c49f915d04485e34caba",
+ vpn_used=False,
+ operating_system="Android 11.2",
+ device_maker="ASUS",
+ device_model="Zenphone M2 Pro Max",
+ device_year="2018",
+ app_version="1.1.0",
+ ),
+ tags=[
+ Tag(
+ key="customKey",
+ value="customValue",
+ )
+ ],
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.verify(
+ type=type,
+ transaction_id=transaction_id,
+ timestamp=timestamp,
+ validate_origin_user_id=validate_origin_user_id,
+ validate_destination_user_id=validate_destination_user_id,
+ validate_transaction_id=validate_transaction_id,
+ trs_only=trs_only,
+ origin_user_id=origin_user_id,
+ destination_user_id=destination_user_id,
+ transaction_state=transaction_state,
+ origin_amount_details=origin_amount_details,
+ destination_amount_details=destination_amount_details,
+ origin_payment_details=origin_payment_details,
+ destination_payment_details=destination_payment_details,
+ origin_funds_info=origin_funds_info,
+ related_transaction_ids=related_transaction_ids,
+ product_type=product_type,
+ promotion_code_used=promotion_code_used,
+ reference=reference,
+ origin_device_data=origin_device_data,
+ destination_device_data=destination_device_data,
+ tags=tags,
+ request_options=request_options,
+ )
+ return response.data
+
+ async def get(
+ self, transaction_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> TransactionWithRulesResult:
+ """
+ ### GET Transactions
+
+ `/transactions` endpoint allows you to operate on the [Transaction entity](/guides/overview/entities#transaction).
+
+ Calling `GET /transactions/{transactionId}` will return the entire transaction payload and rule execution results for the transaction with the corresponding `transactionId`
+
+ Parameters
+ ----------
+ transaction_id : str
+ Unique Transaction Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ TransactionWithRulesResult
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.transactions.get(
+ transaction_id="transactionId",
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.get(transaction_id, request_options=request_options)
+ return response.data
diff --git a/src/flagright/transactions/raw_client.py b/src/flagright/transactions/raw_client.py
new file mode 100644
index 0000000..f3d398a
--- /dev/null
+++ b/src/flagright/transactions/raw_client.py
@@ -0,0 +1,611 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from ..core.client_wrapper import SyncClientWrapper
+from ..types.transaction_type import TransactionType
+from ..types.boolean_string import BooleanString
+from ..types.transaction_state import TransactionState
+from ..types.transaction_amount_details import TransactionAmountDetails
+from ..types.transaction_origin_payment_details import TransactionOriginPaymentDetails
+from ..types.transaction_destination_payment_details import TransactionDestinationPaymentDetails
+from ..types.origin_funds_info import OriginFundsInfo
+from ..types.device_data import DeviceData
+from ..types.tag import Tag
+from ..core.request_options import RequestOptions
+from ..core.http_response import HttpResponse
+from .types.transactions_verify_response import TransactionsVerifyResponse
+from ..core.serialization import convert_and_respect_annotation_metadata
+from ..core.pydantic_utilities import parse_obj_as
+from ..errors.bad_request_error import BadRequestError
+from ..types.api_error_response import ApiErrorResponse
+from ..errors.unauthorized_error import UnauthorizedError
+from ..errors.too_many_requests_error import TooManyRequestsError
+from json.decoder import JSONDecodeError
+from ..core.api_error import ApiError
+from ..types.transaction_with_rules_result import TransactionWithRulesResult
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.client_wrapper import AsyncClientWrapper
+from ..core.http_response import AsyncHttpResponse
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class RawTransactionsClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ def verify(
+ self,
+ *,
+ type: TransactionType,
+ transaction_id: str,
+ timestamp: float,
+ validate_origin_user_id: typing.Optional[BooleanString] = None,
+ validate_destination_user_id: typing.Optional[BooleanString] = None,
+ validate_transaction_id: typing.Optional[BooleanString] = None,
+ trs_only: typing.Optional[BooleanString] = None,
+ origin_user_id: typing.Optional[str] = OMIT,
+ destination_user_id: typing.Optional[str] = OMIT,
+ transaction_state: typing.Optional[TransactionState] = OMIT,
+ origin_amount_details: typing.Optional[TransactionAmountDetails] = OMIT,
+ destination_amount_details: typing.Optional[TransactionAmountDetails] = OMIT,
+ origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = OMIT,
+ destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = OMIT,
+ origin_funds_info: typing.Optional[OriginFundsInfo] = OMIT,
+ related_transaction_ids: typing.Optional[typing.Sequence[str]] = OMIT,
+ product_type: typing.Optional[str] = OMIT,
+ promotion_code_used: typing.Optional[bool] = OMIT,
+ reference: typing.Optional[str] = OMIT,
+ origin_device_data: typing.Optional[DeviceData] = OMIT,
+ destination_device_data: typing.Optional[DeviceData] = OMIT,
+ tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[TransactionsVerifyResponse]:
+ """
+ ## POST Transactions
+
+ `/transactions` endpoint allows you to operate on the [Transaction entity.](/guides/overview/entities#transaction)
+
+ In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+
+ ### Payload
+
+ Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
+
+ * `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
+ * `transactionId` - Unique Identifier for the transaction.
+ * `timestamp` - UNIX timestamp in *milliseconds* of when the transaction took place
+ * `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+ * `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+ * `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+ * `originAmountDetails` - Details of the amount being sent from the origin
+ * `destinationAmountDetails` - Details of the amount being received at the destination
+ * `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+ * `destinationPaymentDetails` - Payment details (if any) used at the destination (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+
+ Parameters
+ ----------
+ type : TransactionType
+
+ transaction_id : str
+ Unique transaction identifier
+
+ timestamp : float
+ Timestamp of when transaction took place
+
+ validate_origin_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided originUserId exist. True by default
+
+ validate_destination_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+
+ validate_transaction_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided transactionId exist. True by default
+
+ trs_only : typing.Optional[BooleanString]
+
+ origin_user_id : typing.Optional[str]
+ UserId for where the transaction originates from
+
+ destination_user_id : typing.Optional[str]
+ UserId for transaction's destination. In other words, where the value is being transferred to.
+
+ transaction_state : typing.Optional[TransactionState]
+
+ origin_amount_details : typing.Optional[TransactionAmountDetails]
+
+ destination_amount_details : typing.Optional[TransactionAmountDetails]
+
+ origin_payment_details : typing.Optional[TransactionOriginPaymentDetails]
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+
+ destination_payment_details : typing.Optional[TransactionDestinationPaymentDetails]
+
+ origin_funds_info : typing.Optional[OriginFundsInfo]
+
+ related_transaction_ids : typing.Optional[typing.Sequence[str]]
+ IDs of transactions related to this transaction. Ex: refund, split bills
+
+ product_type : typing.Optional[str]
+ Type of produce being used by the consumer (ex wallets, payments etc)
+
+ promotion_code_used : typing.Optional[bool]
+ Whether a promotion code was used or not the transaction
+
+ reference : typing.Optional[str]
+ Reference field for the transaction indicating the purpose of the transaction etc.
+
+ origin_device_data : typing.Optional[DeviceData]
+
+ destination_device_data : typing.Optional[DeviceData]
+
+ tags : typing.Optional[typing.Sequence[Tag]]
+ Additional information that can be added via tags
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[TransactionsVerifyResponse]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "transactions",
+ method="POST",
+ params={
+ "validateOriginUserId": validate_origin_user_id,
+ "validateDestinationUserId": validate_destination_user_id,
+ "validateTransactionId": validate_transaction_id,
+ "_trsOnly": trs_only,
+ },
+ json={
+ "type": type,
+ "transactionId": transaction_id,
+ "timestamp": timestamp,
+ "originUserId": origin_user_id,
+ "destinationUserId": destination_user_id,
+ "transactionState": transaction_state,
+ "originAmountDetails": convert_and_respect_annotation_metadata(
+ object_=origin_amount_details, annotation=TransactionAmountDetails, direction="write"
+ ),
+ "destinationAmountDetails": convert_and_respect_annotation_metadata(
+ object_=destination_amount_details, annotation=TransactionAmountDetails, direction="write"
+ ),
+ "originPaymentDetails": convert_and_respect_annotation_metadata(
+ object_=origin_payment_details, annotation=TransactionOriginPaymentDetails, direction="write"
+ ),
+ "destinationPaymentDetails": convert_and_respect_annotation_metadata(
+ object_=destination_payment_details,
+ annotation=TransactionDestinationPaymentDetails,
+ direction="write",
+ ),
+ "originFundsInfo": convert_and_respect_annotation_metadata(
+ object_=origin_funds_info, annotation=OriginFundsInfo, direction="write"
+ ),
+ "relatedTransactionIds": related_transaction_ids,
+ "productType": product_type,
+ "promotionCodeUsed": promotion_code_used,
+ "reference": reference,
+ "originDeviceData": convert_and_respect_annotation_metadata(
+ object_=origin_device_data, annotation=DeviceData, direction="write"
+ ),
+ "destinationDeviceData": convert_and_respect_annotation_metadata(
+ object_=destination_device_data, annotation=DeviceData, direction="write"
+ ),
+ "tags": convert_and_respect_annotation_metadata(
+ object_=tags, annotation=typing.Sequence[Tag], direction="write"
+ ),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ TransactionsVerifyResponse,
+ parse_obj_as(
+ type_=TransactionsVerifyResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def get(
+ self, transaction_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[TransactionWithRulesResult]:
+ """
+ ### GET Transactions
+
+ `/transactions` endpoint allows you to operate on the [Transaction entity](/guides/overview/entities#transaction).
+
+ Calling `GET /transactions/{transactionId}` will return the entire transaction payload and rule execution results for the transaction with the corresponding `transactionId`
+
+ Parameters
+ ----------
+ transaction_id : str
+ Unique Transaction Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[TransactionWithRulesResult]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"transactions/{jsonable_encoder(transaction_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ TransactionWithRulesResult,
+ parse_obj_as(
+ type_=TransactionWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+
+class AsyncRawTransactionsClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def verify(
+ self,
+ *,
+ type: TransactionType,
+ transaction_id: str,
+ timestamp: float,
+ validate_origin_user_id: typing.Optional[BooleanString] = None,
+ validate_destination_user_id: typing.Optional[BooleanString] = None,
+ validate_transaction_id: typing.Optional[BooleanString] = None,
+ trs_only: typing.Optional[BooleanString] = None,
+ origin_user_id: typing.Optional[str] = OMIT,
+ destination_user_id: typing.Optional[str] = OMIT,
+ transaction_state: typing.Optional[TransactionState] = OMIT,
+ origin_amount_details: typing.Optional[TransactionAmountDetails] = OMIT,
+ destination_amount_details: typing.Optional[TransactionAmountDetails] = OMIT,
+ origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = OMIT,
+ destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = OMIT,
+ origin_funds_info: typing.Optional[OriginFundsInfo] = OMIT,
+ related_transaction_ids: typing.Optional[typing.Sequence[str]] = OMIT,
+ product_type: typing.Optional[str] = OMIT,
+ promotion_code_used: typing.Optional[bool] = OMIT,
+ reference: typing.Optional[str] = OMIT,
+ origin_device_data: typing.Optional[DeviceData] = OMIT,
+ destination_device_data: typing.Optional[DeviceData] = OMIT,
+ tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[TransactionsVerifyResponse]:
+ """
+ ## POST Transactions
+
+ `/transactions` endpoint allows you to operate on the [Transaction entity.](/guides/overview/entities#transaction)
+
+ In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+
+
+ ### Payload
+
+ Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
+
+ * `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
+ * `transactionId` - Unique Identifier for the transaction.
+ * `timestamp` - UNIX timestamp in *milliseconds* of when the transaction took place
+ * `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
+ * `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+ * `destinationUserId` - Unique identifier (if any) of the user who is receiving the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
+ * `originAmountDetails` - Details of the amount being sent from the origin
+ * `destinationAmountDetails` - Details of the amount being received at the destination
+ * `originPaymentDetails` - Payment details (if any) used at the origin (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+ * `destinationPaymentDetails` - Payment details (if any) used at the destination (ex: `CARD`, `IBAN`, `WALLET` etc). You can click on the dropdown next to the field in the schema below to view all supported payment types.
+
+ Parameters
+ ----------
+ type : TransactionType
+
+ transaction_id : str
+ Unique transaction identifier
+
+ timestamp : float
+ Timestamp of when transaction took place
+
+ validate_origin_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided originUserId exist. True by default
+
+ validate_destination_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+
+ validate_transaction_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided transactionId exist. True by default
+
+ trs_only : typing.Optional[BooleanString]
+
+ origin_user_id : typing.Optional[str]
+ UserId for where the transaction originates from
+
+ destination_user_id : typing.Optional[str]
+ UserId for transaction's destination. In other words, where the value is being transferred to.
+
+ transaction_state : typing.Optional[TransactionState]
+
+ origin_amount_details : typing.Optional[TransactionAmountDetails]
+
+ destination_amount_details : typing.Optional[TransactionAmountDetails]
+
+ origin_payment_details : typing.Optional[TransactionOriginPaymentDetails]
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+
+ destination_payment_details : typing.Optional[TransactionDestinationPaymentDetails]
+
+ origin_funds_info : typing.Optional[OriginFundsInfo]
+
+ related_transaction_ids : typing.Optional[typing.Sequence[str]]
+ IDs of transactions related to this transaction. Ex: refund, split bills
+
+ product_type : typing.Optional[str]
+ Type of produce being used by the consumer (ex wallets, payments etc)
+
+ promotion_code_used : typing.Optional[bool]
+ Whether a promotion code was used or not the transaction
+
+ reference : typing.Optional[str]
+ Reference field for the transaction indicating the purpose of the transaction etc.
+
+ origin_device_data : typing.Optional[DeviceData]
+
+ destination_device_data : typing.Optional[DeviceData]
+
+ tags : typing.Optional[typing.Sequence[Tag]]
+ Additional information that can be added via tags
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[TransactionsVerifyResponse]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "transactions",
+ method="POST",
+ params={
+ "validateOriginUserId": validate_origin_user_id,
+ "validateDestinationUserId": validate_destination_user_id,
+ "validateTransactionId": validate_transaction_id,
+ "_trsOnly": trs_only,
+ },
+ json={
+ "type": type,
+ "transactionId": transaction_id,
+ "timestamp": timestamp,
+ "originUserId": origin_user_id,
+ "destinationUserId": destination_user_id,
+ "transactionState": transaction_state,
+ "originAmountDetails": convert_and_respect_annotation_metadata(
+ object_=origin_amount_details, annotation=TransactionAmountDetails, direction="write"
+ ),
+ "destinationAmountDetails": convert_and_respect_annotation_metadata(
+ object_=destination_amount_details, annotation=TransactionAmountDetails, direction="write"
+ ),
+ "originPaymentDetails": convert_and_respect_annotation_metadata(
+ object_=origin_payment_details, annotation=TransactionOriginPaymentDetails, direction="write"
+ ),
+ "destinationPaymentDetails": convert_and_respect_annotation_metadata(
+ object_=destination_payment_details,
+ annotation=TransactionDestinationPaymentDetails,
+ direction="write",
+ ),
+ "originFundsInfo": convert_and_respect_annotation_metadata(
+ object_=origin_funds_info, annotation=OriginFundsInfo, direction="write"
+ ),
+ "relatedTransactionIds": related_transaction_ids,
+ "productType": product_type,
+ "promotionCodeUsed": promotion_code_used,
+ "reference": reference,
+ "originDeviceData": convert_and_respect_annotation_metadata(
+ object_=origin_device_data, annotation=DeviceData, direction="write"
+ ),
+ "destinationDeviceData": convert_and_respect_annotation_metadata(
+ object_=destination_device_data, annotation=DeviceData, direction="write"
+ ),
+ "tags": convert_and_respect_annotation_metadata(
+ object_=tags, annotation=typing.Sequence[Tag], direction="write"
+ ),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ TransactionsVerifyResponse,
+ parse_obj_as(
+ type_=TransactionsVerifyResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def get(
+ self, transaction_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[TransactionWithRulesResult]:
+ """
+ ### GET Transactions
+
+ `/transactions` endpoint allows you to operate on the [Transaction entity](/guides/overview/entities#transaction).
+
+ Calling `GET /transactions/{transactionId}` will return the entire transaction payload and rule execution results for the transaction with the corresponding `transactionId`
+
+ Parameters
+ ----------
+ transaction_id : str
+ Unique Transaction Identifier
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[TransactionWithRulesResult]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"transactions/{jsonable_encoder(transaction_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ TransactionWithRulesResult,
+ parse_obj_as(
+ type_=TransactionWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
diff --git a/src/flagright/resources/transactions/types/__init__.py b/src/flagright/transactions/types/__init__.py
similarity index 100%
rename from src/flagright/resources/transactions/types/__init__.py
rename to src/flagright/transactions/types/__init__.py
diff --git a/src/flagright/transactions/types/transactions_verify_response.py b/src/flagright/transactions/types/transactions_verify_response.py
new file mode 100644
index 0000000..3c65c69
--- /dev/null
+++ b/src/flagright/transactions/types/transactions_verify_response.py
@@ -0,0 +1,19 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ...types.transaction_monitoring_result import TransactionMonitoringResult
+import typing
+from ...core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class TransactionsVerifyResponse(TransactionMonitoringResult):
+ message: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/ach_details.py b/src/flagright/types/ach_details.py
index 09dbd71..22a95fe 100644
--- a/src/flagright/types/ach_details.py
+++ b/src/flagright/types/ach_details.py
@@ -1,53 +1,68 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .address import Address
+from ..core.serialization import FieldMetadata
+import pydantic
from .amount import Amount
+from .address import Address
from .email_id import EmailId
from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-class AchDetails(pydantic.BaseModel):
+class AchDetails(UniversalBaseModel):
"""
Model for ACH payment method
"""
- routing_number: typing.Optional[str] = pydantic.Field(
- alias="routingNumber", description="Routing number of the bank"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = (
+ pydantic.Field(default=None)
)
- account_number: typing.Optional[str] = pydantic.Field(
- alias="accountNumber", description="Bank account number of the individual"
+ """
+ Routing number of the bank
+ """
+
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = (
+ pydantic.Field(default=None)
)
- account_balance: typing.Optional[Amount] = pydantic.Field(alias="accountBalance")
- bank_name: typing.Optional[str] = pydantic.Field(alias="bankName", description="Name of the bank")
- name: typing.Optional[str] = pydantic.Field(description="Name of the account holder")
- bank_address: typing.Optional[Address] = pydantic.Field(alias="bankAddress")
- beneficiary_name: typing.Optional[str] = pydantic.Field(
- alias="beneficiaryName", description="Beneficiary name of the account"
+ """
+ Bank account number of the individual
+ """
+
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = pydantic.Field(
+ default=None
)
- email_id: typing.Optional[EmailId] = pydantic.Field(alias="emailId")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ """
+ Name of the bank
+ """
+
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Name of the account holder
+ """
+
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = (
+ pydantic.Field(default=None)
)
+ """
+ Beneficiary name of the account
+ """
- 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)
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/ach_payment_method.py b/src/flagright/types/ach_payment_method.py
index 8ff602f..22993f1 100644
--- a/src/flagright/types/ach_payment_method.py
+++ b/src/flagright/types/ach_payment_method.py
@@ -1,5 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import typing_extensions
+import typing
-AchPaymentMethod = typing_extensions.Literal["ACH"]
+AchPaymentMethod = typing.Literal["ACH"]
diff --git a/src/flagright/types/acquisition_channel.py b/src/flagright/types/acquisition_channel.py
index 4387ea5..e9565b6 100644
--- a/src/flagright/types/acquisition_channel.py
+++ b/src/flagright/types/acquisition_channel.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AcquisitionChannel(str, enum.Enum):
- """
- Model for User acquisition channel
- """
-
- ORGANIC = "ORGANIC"
- PAID = "PAID"
- REFERRAL = "REFERRAL"
- OFFLINE = "OFFLINE"
- GATHERING = "GATHERING"
- UNKNOWN = "UNKNOWN"
-
- def visit(
- self,
- organic: typing.Callable[[], T_Result],
- paid: typing.Callable[[], T_Result],
- referral: typing.Callable[[], T_Result],
- offline: typing.Callable[[], T_Result],
- gathering: typing.Callable[[], T_Result],
- unknown: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AcquisitionChannel.ORGANIC:
- return organic()
- if self is AcquisitionChannel.PAID:
- return paid()
- if self is AcquisitionChannel.REFERRAL:
- return referral()
- if self is AcquisitionChannel.OFFLINE:
- return offline()
- if self is AcquisitionChannel.GATHERING:
- return gathering()
- if self is AcquisitionChannel.UNKNOWN:
- return unknown()
+AcquisitionChannel = typing.Union[
+ typing.Literal["ORGANIC", "PAID", "REFERRAL", "OFFLINE", "GATHERING", "UNKNOWN"], typing.Any
+]
diff --git a/src/flagright/types/address.py b/src/flagright/types/address.py
index 2fb8dfe..449f340 100644
--- a/src/flagright/types/address.py
+++ b/src/flagright/types/address.py
@@ -1,46 +1,61 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from ..core.serialization import FieldMetadata
+import pydantic
from .tag import Tag
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class Address(pydantic.BaseModel):
+class Address(UniversalBaseModel):
"""
Model for standardized address
"""
- address_lines: typing.List[str] = pydantic.Field(
- alias="addressLines", description="Address lines of the user's residence address"
- )
- postcode: typing.Optional[str] = pydantic.Field(description="Post code of the user's residence address")
- city: typing.Optional[str] = pydantic.Field(description="City of the user's residence address")
- state: typing.Optional[str] = pydantic.Field(description="State of the user's residence address")
- country: typing.Optional[str] = pydantic.Field(description="User's country of residence")
- address_type: typing.Optional[str] = pydantic.Field(
- alias="addressType", description="Type of the address (ex - Residential, Postal, etc.)"
- )
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ address_lines: typing_extensions.Annotated[typing.List[str], FieldMetadata(alias="addressLines")] = pydantic.Field()
+ """
+ Address lines of the user's residence address
+ """
+
+ postcode: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Post code of the user's residence address
+ """
+
+ city: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ City of the user's residence address
+ """
+
+ state: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ State of the user's residence address
+ """
+
+ country: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ User's country of residence
+ """
+
+ address_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="addressType")] = (
+ pydantic.Field(default=None)
)
+ """
+ Type of the address (ex - Residential, Postal, etc.)
+ """
- 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)
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/alert_closed_details.py b/src/flagright/types/alert_closed_details.py
index 9e400dd..b63758a 100644
--- a/src/flagright/types/alert_closed_details.py
+++ b/src/flagright/types/alert_closed_details.py
@@ -1,39 +1,35 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class AlertClosedDetails(pydantic.BaseModel):
- alert_id: typing.Optional[str] = pydantic.Field(alias="alertId")
- status: typing.Optional[str]
- reasons: typing.Optional[typing.List[str]]
- reason_description_for_other: typing.Optional[str] = pydantic.Field(alias="reasonDescriptionForOther")
- comment: typing.Optional[str]
- user_id: typing.Optional[str] = pydantic.Field(alias="userId")
- transaction_ids: typing.Optional[typing.List[str]] = pydantic.Field(alias="transactionIds")
- rule_name: typing.Optional[str] = pydantic.Field(alias="ruleName")
- rule_description: typing.Optional[str] = pydantic.Field(alias="ruleDescription")
- rule_id: typing.Optional[str] = pydantic.Field(alias="ruleId")
- rule_instance_id: typing.Optional[str] = pydantic.Field(alias="ruleInstanceId")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class AlertClosedDetails(UniversalBaseModel):
+ alert_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="alertId")] = None
+ status: typing.Optional[str] = None
+ reasons: typing.Optional[typing.List[str]] = None
+ reason_description_for_other: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="reasonDescriptionForOther")
+ ] = None
+ comment: typing.Optional[str] = None
+ user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userId")] = None
+ transaction_ids: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="transactionIds")
+ ] = None
+ rule_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleName")] = None
+ rule_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleDescription")] = None
+ rule_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleId")] = None
+ rule_instance_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleInstanceId")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/alert_opened_details.py b/src/flagright/types/alert_opened_details.py
index 0810dff..9acc590 100644
--- a/src/flagright/types/alert_opened_details.py
+++ b/src/flagright/types/alert_opened_details.py
@@ -1,37 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class AlertOpenedDetails(pydantic.BaseModel):
- alert_id: typing.Optional[str] = pydantic.Field(alias="alertId")
- status: typing.Optional[str]
- transaction_ids: typing.Optional[typing.List[str]] = pydantic.Field(alias="transactionIds")
- rule_name: typing.Optional[str] = pydantic.Field(alias="ruleName")
- rule_description: typing.Optional[str] = pydantic.Field(alias="ruleDescription")
- rule_id: typing.Optional[str] = pydantic.Field(alias="ruleId")
- rule_instance_id: typing.Optional[str] = pydantic.Field(alias="ruleInstanceId")
- case_id: typing.Optional[str] = pydantic.Field(alias="caseId")
- user_id: typing.Optional[str] = pydantic.Field(alias="userId")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class AlertOpenedDetails(UniversalBaseModel):
+ alert_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="alertId")] = None
+ status: typing.Optional[str] = None
+ transaction_ids: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="transactionIds")
+ ] = None
+ rule_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleName")] = None
+ rule_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleDescription")] = None
+ rule_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleId")] = None
+ rule_instance_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleInstanceId")] = None
+ case_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="caseId")] = None
+ user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userId")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/amount.py b/src/flagright/types/amount.py
index 3410198..763f0fc 100644
--- a/src/flagright/types/amount.py
+++ b/src/flagright/types/amount.py
@@ -1,35 +1,31 @@
# 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 UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
from .currency_code import CurrencyCode
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
-class Amount(pydantic.BaseModel):
+class Amount(UniversalBaseModel):
"""
Model for amount
"""
- amount_value: float = pydantic.Field(alias="amountValue", description="Numerical value of the transaction")
- amount_currency: CurrencyCode = pydantic.Field(alias="amountCurrency")
+ amount_value: typing_extensions.Annotated[float, FieldMetadata(alias="amountValue")] = pydantic.Field()
+ """
+ Numerical value of the 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)
+ amount_currency: typing_extensions.Annotated[CurrencyCode, FieldMetadata(alias="amountCurrency")]
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/api_error_response.py b/src/flagright/types/api_error_response.py
index 503f73e..5280db4 100644
--- a/src/flagright/types/api_error_response.py
+++ b/src/flagright/types/api_error_response.py
@@ -1,30 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class ApiErrorResponse(pydantic.BaseModel):
+class ApiErrorResponse(UniversalBaseModel):
message: str
- validation_errors: typing.Optional[str] = pydantic.Field(alias="validationErrors")
-
- 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)
+ validation_errors: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="validationErrors")] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_response.py b/src/flagright/types/batch_response.py
index 5fbd740..4e9bf5c 100644
--- a/src/flagright/types/batch_response.py
+++ b/src/flagright/types/batch_response.py
@@ -1,40 +1,34 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+from .batch_response_status import BatchResponseStatus
+import typing_extensions
+from ..core.serialization import FieldMetadata
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .batch_response_failed_record import BatchResponseFailedRecord
-from .batch_response_status import BatchResponseStatus
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class BatchResponse(pydantic.BaseModel):
+class BatchResponse(UniversalBaseModel):
"""
Response from creation of a batch
"""
status: BatchResponseStatus
- batch_id: str = pydantic.Field(alias="batchId")
+ batch_id: typing_extensions.Annotated[str, FieldMetadata(alias="batchId")]
successful: float
failed: float
- failed_records: typing.Optional[typing.List[BatchResponseFailedRecord]] = pydantic.Field(alias="failedRecords")
- message: typing.Optional[str]
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ failed_records: typing_extensions.Annotated[
+ typing.Optional[typing.List[BatchResponseFailedRecord]], FieldMetadata(alias="failedRecords")
+ ] = None
+ message: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_response_failed_record.py b/src/flagright/types/batch_response_failed_record.py
index 8967237..b2ff571 100644
--- a/src/flagright/types/batch_response_failed_record.py
+++ b/src/flagright/types/batch_response_failed_record.py
@@ -1,34 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
+import typing_extensions
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class BatchResponseFailedRecord(pydantic.BaseModel):
+class BatchResponseFailedRecord(UniversalBaseModel):
"""
Failed record in a batch response
"""
- id: typing.Optional[str]
- reason_code: typing.Optional[str] = pydantic.Field(alias="reasonCode")
-
- 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)
+ id: typing.Optional[str] = None
+ reason_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="reasonCode")] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_response_status.py b/src/flagright/types/batch_response_status.py
index 56ab399..47c4aae 100644
--- a/src/flagright/types/batch_response_status.py
+++ b/src/flagright/types/batch_response_status.py
@@ -1,29 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class BatchResponseStatus(str, enum.Enum):
- """
- Status of the batch response
- """
-
- SUCCESS = "SUCCESS"
- PARTIAL_FAILURE = "PARTIAL_FAILURE"
- FAILURE = "FAILURE"
-
- def visit(
- self,
- success: typing.Callable[[], T_Result],
- partial_failure: typing.Callable[[], T_Result],
- failure: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is BatchResponseStatus.SUCCESS:
- return success()
- if self is BatchResponseStatus.PARTIAL_FAILURE:
- return partial_failure()
- if self is BatchResponseStatus.FAILURE:
- return failure()
+BatchResponseStatus = typing.Union[typing.Literal["SUCCESS", "PARTIAL_FAILURE", "FAILURE"], typing.Any]
diff --git a/src/flagright/types/boolean_string.py b/src/flagright/types/boolean_string.py
index 3e0f221..3282c38 100644
--- a/src/flagright/types/boolean_string.py
+++ b/src/flagright/types/boolean_string.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class BooleanString(str, enum.Enum):
- TRUE = "true"
- FALSE = "false"
-
- def visit(self, true: typing.Callable[[], T_Result], false: typing.Callable[[], T_Result]) -> T_Result:
- if self is BooleanString.TRUE:
- return true()
- if self is BooleanString.FALSE:
- return false()
+BooleanString = typing.Union[typing.Literal["true", "false"], typing.Any]
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index 47a5699..4df39d4 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -1,77 +1,103 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+from .legal_entity import LegalEntity
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .acquisition_channel import AcquisitionChannel
-from .business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
+from .user_state_details import UserStateDetails
from .kyc_status_details import KycStatusDetails
-from .legal_entity import LegalEntity
-from .mcc_details import MccDetails
-from .payment_method import PaymentMethod
from .person import Person
-from .person_attachment import PersonAttachment
-from .risk_level import RiskLevel
from .transaction_limits import TransactionLimits
+from .risk_level import RiskLevel
+from .payment_method import PaymentMethod
from .user_entity_link import UserEntityLink
-from .user_state_details import UserStateDetails
+from .acquisition_channel import AcquisitionChannel
+from .business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
+from .mcc_details import MccDetails
from .user_tag import UserTag
+from .person_attachment import PersonAttachment
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class Business(UniversalBaseModel):
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Unique user ID for the user
+ """
+
+ created_timestamp: typing_extensions.Annotated[float, FieldMetadata(alias="createdTimestamp")] = pydantic.Field()
+ """
+ Timestamp when the user was created
+ """
+
+ legal_entity: typing_extensions.Annotated[LegalEntity, FieldMetadata(alias="legalEntity")]
+ activated_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="activatedTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp when the user was activated
+ """
+
+ user_state_details: typing_extensions.Annotated[
+ typing.Optional[UserStateDetails], FieldMetadata(alias="userStateDetails")
+ ] = None
+ kyc_status_details: typing_extensions.Annotated[
+ typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
+ ] = None
+ share_holders: typing_extensions.Annotated[
+ typing.Optional[typing.List[Person]], FieldMetadata(alias="shareHolders")
+ ] = pydantic.Field(default=None)
+ """
+ Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
+ """
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+ directors: typing.Optional[typing.List[Person]] = pydantic.Field(default=None)
+ """
+ Director(s) of the company. Must be at least one
+ """
+ transaction_limits: typing_extensions.Annotated[
+ typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
+ ] = None
+ risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
+ kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
+ allowed_payment_methods: typing_extensions.Annotated[
+ typing.Optional[typing.List[PaymentMethod]], FieldMetadata(alias="allowedPaymentMethods")
+ ] = None
+ last_transaction_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp of the last successful transaction of the user
+ """
-class Business(pydantic.BaseModel):
- user_id: str = pydantic.Field(alias="userId", description="Unique user ID for the user")
- created_timestamp: float = pydantic.Field(
- alias="createdTimestamp", description="Timestamp when the user was created"
- )
- legal_entity: LegalEntity = pydantic.Field(alias="legalEntity")
- activated_timestamp: typing.Optional[float] = pydantic.Field(
- alias="activatedTimestamp", description="Timestamp when the user was activated"
- )
- user_state_details: typing.Optional[UserStateDetails] = pydantic.Field(alias="userStateDetails")
- kyc_status_details: typing.Optional[KycStatusDetails] = pydantic.Field(alias="kycStatusDetails")
- share_holders: typing.Optional[typing.List[Person]] = pydantic.Field(
- alias="shareHolders",
- description="Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual",
- )
- directors: typing.Optional[typing.List[Person]] = pydantic.Field(
- description="Director(s) of the company. Must be at least one"
- )
- transaction_limits: typing.Optional[TransactionLimits] = pydantic.Field(alias="transactionLimits")
- risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="riskLevel")
- kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
- allowed_payment_methods: typing.Optional[typing.List[PaymentMethod]] = pydantic.Field(alias="allowedPaymentMethods")
- last_transaction_timestamp: typing.Optional[float] = pydantic.Field(
- alias="lastTransactionTimestamp", description="Timestamp of the last successful transaction of the user"
- )
- linked_entities: typing.Optional[UserEntityLink] = pydantic.Field(alias="linkedEntities")
- acquisition_channel: typing.Optional[AcquisitionChannel] = pydantic.Field(alias="acquisitionChannel")
- saved_payment_details: typing.Optional[typing.List[BusinessSavedPaymentDetailsItem]] = pydantic.Field(
- alias="savedPaymentDetails"
- )
- mcc_details: typing.Optional[MccDetails] = pydantic.Field(alias="mccDetails")
- tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(
- description="Additional information that can be added via tags"
- )
- attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
- description="User's attachments uploaded by business user"
- )
+ linked_entities: typing_extensions.Annotated[
+ typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
+ ] = None
+ acquisition_channel: typing_extensions.Annotated[
+ typing.Optional[AcquisitionChannel], FieldMetadata(alias="acquisitionChannel")
+ ] = None
+ saved_payment_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[BusinessSavedPaymentDetailsItem]], FieldMetadata(alias="savedPaymentDetails")
+ ] = None
+ mcc_details: typing_extensions.Annotated[typing.Optional[MccDetails], FieldMetadata(alias="mccDetails")] = None
+ tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(default=None)
+ """
+ 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}
- return super().json(**kwargs_with_defaults)
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(default=None)
+ """
+ User's attachments uploaded by business user
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/business_base.py b/src/flagright/types/business_base.py
index e1e8ad1..7dbcab7 100644
--- a/src/flagright/types/business_base.py
+++ b/src/flagright/types/business_base.py
@@ -1,38 +1,36 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+from .legal_entity import LegalEntity
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
import typing
-from ..core.datetime_utils import serialize_datetime
-from .legal_entity import LegalEntity
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class BusinessBase(UniversalBaseModel):
+ """
+ Model for a business user base fields
+ """
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Unique user ID for the user
+ """
-class BusinessBase(pydantic.BaseModel):
+ created_timestamp: typing_extensions.Annotated[float, FieldMetadata(alias="createdTimestamp")] = pydantic.Field()
"""
- Model for a business user base fields
+ Timestamp when the user was created
"""
- user_id: str = pydantic.Field(alias="userId", description="Unique user ID for the user")
- created_timestamp: float = pydantic.Field(
- alias="createdTimestamp", description="Timestamp when the user was created"
- )
- legal_entity: LegalEntity = pydantic.Field(alias="legalEntity")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ legal_entity: typing_extensions.Annotated[LegalEntity, FieldMetadata(alias="legalEntity")]
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index 083bc40..415b793 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -1,77 +1,98 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .acquisition_channel import AcquisitionChannel
-from .business_optional_saved_payment_details_item import BusinessOptionalSavedPaymentDetailsItem
+from ..core.serialization import FieldMetadata
+import pydantic
+from .user_state_details import UserStateDetails
from .kyc_status_details import KycStatusDetails
from .legal_entity import LegalEntity
-from .mcc_details import MccDetails
-from .payment_method import PaymentMethod
from .person import Person
-from .person_attachment import PersonAttachment
-from .risk_level import RiskLevel
from .transaction_limits import TransactionLimits
+from .risk_level import RiskLevel
+from .payment_method import PaymentMethod
from .user_entity_link import UserEntityLink
-from .user_state_details import UserStateDetails
+from .acquisition_channel import AcquisitionChannel
+from .business_optional_saved_payment_details_item import BusinessOptionalSavedPaymentDetailsItem
+from .mcc_details import MccDetails
from .user_tag import UserTag
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from .person_attachment import PersonAttachment
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class BusinessOptional(pydantic.BaseModel):
+class BusinessOptional(UniversalBaseModel):
"""
Model for a business user - optional fields
"""
- activated_timestamp: typing.Optional[float] = pydantic.Field(
- alias="activatedTimestamp", description="Timestamp when the user was activated"
- )
- user_state_details: typing.Optional[UserStateDetails] = pydantic.Field(alias="userStateDetails")
- kyc_status_details: typing.Optional[KycStatusDetails] = pydantic.Field(alias="kycStatusDetails")
- legal_entity: typing.Optional[LegalEntity] = pydantic.Field(alias="legalEntity")
- share_holders: typing.Optional[typing.List[Person]] = pydantic.Field(
- alias="shareHolders",
- description="Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual",
- )
- directors: typing.Optional[typing.List[Person]] = pydantic.Field(
- description="Director(s) of the company. Must be at least one"
- )
- transaction_limits: typing.Optional[TransactionLimits] = pydantic.Field(alias="transactionLimits")
- risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="riskLevel")
- kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
- allowed_payment_methods: typing.Optional[typing.List[PaymentMethod]] = pydantic.Field(alias="allowedPaymentMethods")
- last_transaction_timestamp: typing.Optional[float] = pydantic.Field(
- alias="lastTransactionTimestamp", description="Timestamp of the last successful transaction of the user"
- )
- linked_entities: typing.Optional[UserEntityLink] = pydantic.Field(alias="linkedEntities")
- acquisition_channel: typing.Optional[AcquisitionChannel] = pydantic.Field(alias="acquisitionChannel")
- saved_payment_details: typing.Optional[typing.List[BusinessOptionalSavedPaymentDetailsItem]] = pydantic.Field(
- alias="savedPaymentDetails"
- )
- mcc_details: typing.Optional[MccDetails] = pydantic.Field(alias="mccDetails")
- tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(
- description="Additional information that can be added via tags"
- )
- attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
- description="User's attachments uploaded by business user"
- )
+ activated_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="activatedTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp when the user was activated
+ """
+
+ user_state_details: typing_extensions.Annotated[
+ typing.Optional[UserStateDetails], FieldMetadata(alias="userStateDetails")
+ ] = None
+ kyc_status_details: typing_extensions.Annotated[
+ typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
+ ] = None
+ legal_entity: typing_extensions.Annotated[typing.Optional[LegalEntity], FieldMetadata(alias="legalEntity")] = None
+ share_holders: typing_extensions.Annotated[
+ typing.Optional[typing.List[Person]], FieldMetadata(alias="shareHolders")
+ ] = pydantic.Field(default=None)
+ """
+ Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
+ """
+
+ directors: typing.Optional[typing.List[Person]] = pydantic.Field(default=None)
+ """
+ Director(s) of the company. Must be at least one
+ """
- 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)
+ transaction_limits: typing_extensions.Annotated[
+ typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
+ ] = None
+ risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
+ kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
+ allowed_payment_methods: typing_extensions.Annotated[
+ typing.Optional[typing.List[PaymentMethod]], FieldMetadata(alias="allowedPaymentMethods")
+ ] = None
+ last_transaction_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp of the last successful transaction of the user
+ """
+
+ linked_entities: typing_extensions.Annotated[
+ typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
+ ] = None
+ acquisition_channel: typing_extensions.Annotated[
+ typing.Optional[AcquisitionChannel], FieldMetadata(alias="acquisitionChannel")
+ ] = None
+ saved_payment_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[BusinessOptionalSavedPaymentDetailsItem]],
+ FieldMetadata(alias="savedPaymentDetails"),
+ ] = None
+ mcc_details: typing_extensions.Annotated[typing.Optional[MccDetails], FieldMetadata(alias="mccDetails")] = None
+ tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(default=None)
+ """
+ User's attachments uploaded by business user
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
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 1b99cc7..4e71735 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -1,111 +1,272 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
import typing_extensions
-
-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
-from .mpesa_details import MpesaDetails
-from .swift_details import SwiftDetails
-from .upi_details import UpiDetails
-from .wallet_details import WalletDetails
-
-
-class BusinessOptionalSavedPaymentDetailsItem_Card(CardDetails):
- method: typing_extensions.Literal["CARD"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount(GenericBankAccountDetails):
- method: typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessOptionalSavedPaymentDetailsItem_Iban(IbanDetails):
- method: typing_extensions.Literal["IBAN"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessOptionalSavedPaymentDetailsItem_Ach(AchDetails):
- method: typing_extensions.Literal["ACH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessOptionalSavedPaymentDetailsItem_Swift(SwiftDetails):
- method: typing_extensions.Literal["SWIFT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessOptionalSavedPaymentDetailsItem_Mpesa(MpesaDetails):
- method: typing_extensions.Literal["MPESA"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessOptionalSavedPaymentDetailsItem_Upi(UpiDetails):
- method: typing_extensions.Literal["UPI"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessOptionalSavedPaymentDetailsItem_Wallet(WalletDetails):
- method: typing_extensions.Literal["WALLET"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessOptionalSavedPaymentDetailsItem_Check(CheckDetails):
- method: typing_extensions.Literal["CHECK"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessOptionalSavedPaymentDetailsItem_Cash(CashDetails):
- method: typing_extensions.Literal["CASH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .mpesa_transaction_type import MpesaTransactionType
+from .wallet_network import WalletNetwork
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class BusinessOptionalSavedPaymentDetailsItem_Card(UniversalBaseModel):
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessOptionalSavedPaymentDetailsItem_Iban(UniversalBaseModel):
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessOptionalSavedPaymentDetailsItem_Ach(UniversalBaseModel):
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessOptionalSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessOptionalSavedPaymentDetailsItem_Upi(UniversalBaseModel):
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessOptionalSavedPaymentDetailsItem_Check(UniversalBaseModel):
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessOptionalSavedPaymentDetailsItem_Cash(UniversalBaseModel):
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
BusinessOptionalSavedPaymentDetailsItem = typing.Union[
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index 7c39600..3f8aa59 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -1,111 +1,272 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
import typing_extensions
-
-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
-from .mpesa_details import MpesaDetails
-from .swift_details import SwiftDetails
-from .upi_details import UpiDetails
-from .wallet_details import WalletDetails
-
-
-class BusinessSavedPaymentDetailsItem_Card(CardDetails):
- method: typing_extensions.Literal["CARD"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessSavedPaymentDetailsItem_GenericBankAccount(GenericBankAccountDetails):
- method: typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessSavedPaymentDetailsItem_Iban(IbanDetails):
- method: typing_extensions.Literal["IBAN"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessSavedPaymentDetailsItem_Ach(AchDetails):
- method: typing_extensions.Literal["ACH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessSavedPaymentDetailsItem_Swift(SwiftDetails):
- method: typing_extensions.Literal["SWIFT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessSavedPaymentDetailsItem_Mpesa(MpesaDetails):
- method: typing_extensions.Literal["MPESA"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessSavedPaymentDetailsItem_Upi(UpiDetails):
- method: typing_extensions.Literal["UPI"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessSavedPaymentDetailsItem_Wallet(WalletDetails):
- method: typing_extensions.Literal["WALLET"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessSavedPaymentDetailsItem_Check(CheckDetails):
- method: typing_extensions.Literal["CHECK"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessSavedPaymentDetailsItem_Cash(CashDetails):
- method: typing_extensions.Literal["CASH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .mpesa_transaction_type import MpesaTransactionType
+from .wallet_network import WalletNetwork
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class BusinessSavedPaymentDetailsItem_Card(UniversalBaseModel):
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessSavedPaymentDetailsItem_Iban(UniversalBaseModel):
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessSavedPaymentDetailsItem_Ach(UniversalBaseModel):
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessSavedPaymentDetailsItem_Swift(UniversalBaseModel):
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessSavedPaymentDetailsItem_Upi(UniversalBaseModel):
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessSavedPaymentDetailsItem_Check(UniversalBaseModel):
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessSavedPaymentDetailsItem_Cash(UniversalBaseModel):
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
BusinessSavedPaymentDetailsItem = typing.Union[
diff --git a/src/flagright/types/business_user_event.py b/src/flagright/types/business_user_event.py
index f3ee1c5..60160a0 100644
--- a/src/flagright/types/business_user_event.py
+++ b/src/flagright/types/business_user_event.py
@@ -1,41 +1,57 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import pydantic
+import typing_extensions
+from ..core.serialization import FieldMetadata
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .business_optional import BusinessOptional
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class BusinessUserEvent(pydantic.BaseModel):
+class BusinessUserEvent(UniversalBaseModel):
"""
Model for business user-related events
"""
- timestamp: float = pydantic.Field(description="Timestamp of the event")
- user_id: str = pydantic.Field(alias="userId", description="Transaction ID the event pertains to")
- event_id: typing.Optional[str] = pydantic.Field(alias="eventId", description="Unique event ID")
- reason: typing.Optional[str] = pydantic.Field(description="Reason for the event or a state change")
- event_description: typing.Optional[str] = pydantic.Field(alias="eventDescription", description="Event description")
- updated_business_user_attributes: typing.Optional[BusinessOptional] = pydantic.Field(
- alias="updatedBusinessUserAttributes"
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of the event
+ """
+
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Transaction ID the event pertains to
+ """
+
+ event_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventId")] = pydantic.Field(
+ default=None
)
+ """
+ Unique event ID
+ """
+
+ reason: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Reason for the event or a state change
+ """
+
+ event_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventDescription")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Event description
+ """
- 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)
+ updated_business_user_attributes: typing_extensions.Annotated[
+ typing.Optional[BusinessOptional], FieldMetadata(alias="updatedBusinessUserAttributes")
+ ] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/business_user_event_with_rules_result.py b/src/flagright/types/business_user_event_with_rules_result.py
index 5b34b86..ea80675 100644
--- a/src/flagright/types/business_user_event_with_rules_result.py
+++ b/src/flagright/types/business_user_event_with_rules_result.py
@@ -1,43 +1,65 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import pydantic
+import typing_extensions
+from ..core.serialization import FieldMetadata
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .business_optional import BusinessOptional
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
from .user_risk_score_details import UserRiskScoreDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class BusinessUserEventWithRulesResult(UniversalBaseModel):
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of the event
+ """
+
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Transaction ID the event pertains to
+ """
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+ event_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventId")] = pydantic.Field(
+ default=None
+ )
+ """
+ Unique event ID
+ """
+ reason: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Reason for the event or a state change
+ """
-class BusinessUserEventWithRulesResult(pydantic.BaseModel):
- timestamp: float = pydantic.Field(description="Timestamp of the event")
- user_id: str = pydantic.Field(alias="userId", description="Transaction ID the event pertains to")
- event_id: typing.Optional[str] = pydantic.Field(alias="eventId", description="Unique event ID")
- reason: typing.Optional[str] = pydantic.Field(description="Reason for the event or a state change")
- event_description: typing.Optional[str] = pydantic.Field(alias="eventDescription", description="Event description")
- updated_business_user_attributes: typing.Optional[BusinessOptional] = pydantic.Field(
- alias="updatedBusinessUserAttributes"
+ event_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventDescription")] = (
+ pydantic.Field(default=None)
)
- executed_rules: typing.Optional[typing.List[ExecutedRulesResult]] = pydantic.Field(alias="executedRules")
- hit_rules: typing.Optional[typing.List[HitRulesDetails]] = pydantic.Field(alias="hitRules")
- risk_score_details: typing.Optional[UserRiskScoreDetails] = pydantic.Field(alias="riskScoreDetails")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Event description
+ """
+
+ updated_business_user_attributes: typing_extensions.Annotated[
+ typing.Optional[BusinessOptional], FieldMetadata(alias="updatedBusinessUserAttributes")
+ ] = None
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+ hit_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[HitRulesDetails]], FieldMetadata(alias="hitRules")
+ ] = None
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[UserRiskScoreDetails], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/business_user_monitoring_result.py b/src/flagright/types/business_user_monitoring_result.py
index 6b8a79f..59a2800 100644
--- a/src/flagright/types/business_user_monitoring_result.py
+++ b/src/flagright/types/business_user_monitoring_result.py
@@ -1,39 +1,41 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .executed_rules_result import ExecutedRulesResult
-from .hit_rules_details import HitRulesDetails
from .user_risk_score_details import UserRiskScoreDetails
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from .hit_rules_details import HitRulesDetails
+from .executed_rules_result import ExecutedRulesResult
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class BusinessUserMonitoringResult(pydantic.BaseModel):
+class BusinessUserMonitoringResult(UniversalBaseModel):
"""
Model for business user risk score response
"""
- user_id: str = pydantic.Field(alias="userId", description="user ID the risk score pertains to")
- risk_score_details: typing.Optional[UserRiskScoreDetails] = pydantic.Field(alias="riskScoreDetails")
- hit_rules: typing.Optional[typing.List[HitRulesDetails]] = pydantic.Field(alias="hitRules")
- executed_rules: typing.Optional[typing.List[ExecutedRulesResult]] = pydantic.Field(alias="executedRules")
-
- 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)
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ user ID the risk score pertains to
+ """
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[UserRiskScoreDetails], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+ hit_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[HitRulesDetails]], FieldMetadata(alias="hitRules")
+ ] = None
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/business_user_segment.py b/src/flagright/types/business_user_segment.py
index bdb66eb..931aeea 100644
--- a/src/flagright/types/business_user_segment.py
+++ b/src/flagright/types/business_user_segment.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class BusinessUserSegment(str, enum.Enum):
- SOLE_PROPRIETORSHIP = "SOLE_PROPRIETORSHIP"
- LIMITED = "LIMITED"
- SMB = "SMB"
- SMALL = "SMALL"
- MEDIUM = "MEDIUM"
- LARGE = "LARGE"
- UNKNOWN = "UNKNOWN"
-
- def visit(
- self,
- sole_proprietorship: typing.Callable[[], T_Result],
- limited: typing.Callable[[], T_Result],
- smb: typing.Callable[[], T_Result],
- small: typing.Callable[[], T_Result],
- medium: typing.Callable[[], T_Result],
- large: typing.Callable[[], T_Result],
- unknown: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is BusinessUserSegment.SOLE_PROPRIETORSHIP:
- return sole_proprietorship()
- if self is BusinessUserSegment.LIMITED:
- return limited()
- if self is BusinessUserSegment.SMB:
- return smb()
- if self is BusinessUserSegment.SMALL:
- return small()
- if self is BusinessUserSegment.MEDIUM:
- return medium()
- if self is BusinessUserSegment.LARGE:
- return large()
- if self is BusinessUserSegment.UNKNOWN:
- return unknown()
+BusinessUserSegment = typing.Union[
+ typing.Literal["SOLE_PROPRIETORSHIP", "LIMITED", "SMB", "SMALL", "MEDIUM", "LARGE", "UNKNOWN"], typing.Any
+]
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 9357cd0..2c07507 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -1,83 +1,117 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+from .legal_entity import LegalEntity
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .acquisition_channel import AcquisitionChannel
-from .business_with_rules_result_saved_payment_details_item import BusinessWithRulesResultSavedPaymentDetailsItem
-from .executed_rules_result import ExecutedRulesResult
-from .hit_rules_details import HitRulesDetails
+from .user_state_details import UserStateDetails
from .kyc_status_details import KycStatusDetails
-from .legal_entity import LegalEntity
-from .mcc_details import MccDetails
-from .payment_method import PaymentMethod
from .person import Person
-from .person_attachment import PersonAttachment
-from .risk_level import RiskLevel
from .transaction_limits import TransactionLimits
+from .risk_level import RiskLevel
+from .payment_method import PaymentMethod
from .user_entity_link import UserEntityLink
-from .user_risk_score_details import UserRiskScoreDetails
-from .user_state_details import UserStateDetails
+from .acquisition_channel import AcquisitionChannel
+from .business_with_rules_result_saved_payment_details_item import BusinessWithRulesResultSavedPaymentDetailsItem
+from .mcc_details import MccDetails
from .user_tag import UserTag
+from .person_attachment import PersonAttachment
+from .executed_rules_result import ExecutedRulesResult
+from .hit_rules_details import HitRulesDetails
+from .user_risk_score_details import UserRiskScoreDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class BusinessWithRulesResult(UniversalBaseModel):
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Unique user ID for the user
+ """
+
+ created_timestamp: typing_extensions.Annotated[float, FieldMetadata(alias="createdTimestamp")] = pydantic.Field()
+ """
+ Timestamp when the user was created
+ """
+
+ legal_entity: typing_extensions.Annotated[LegalEntity, FieldMetadata(alias="legalEntity")]
+ activated_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="activatedTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp when the user was activated
+ """
+
+ user_state_details: typing_extensions.Annotated[
+ typing.Optional[UserStateDetails], FieldMetadata(alias="userStateDetails")
+ ] = None
+ kyc_status_details: typing_extensions.Annotated[
+ typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
+ ] = None
+ share_holders: typing_extensions.Annotated[
+ typing.Optional[typing.List[Person]], FieldMetadata(alias="shareHolders")
+ ] = pydantic.Field(default=None)
+ """
+ Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
+ """
+
+ directors: typing.Optional[typing.List[Person]] = pydantic.Field(default=None)
+ """
+ Director(s) of the company. Must be at least one
+ """
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+ transaction_limits: typing_extensions.Annotated[
+ typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
+ ] = None
+ risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
+ kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
+ allowed_payment_methods: typing_extensions.Annotated[
+ typing.Optional[typing.List[PaymentMethod]], FieldMetadata(alias="allowedPaymentMethods")
+ ] = None
+ last_transaction_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp of the last successful transaction of the user
+ """
+ linked_entities: typing_extensions.Annotated[
+ typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
+ ] = None
+ acquisition_channel: typing_extensions.Annotated[
+ typing.Optional[AcquisitionChannel], FieldMetadata(alias="acquisitionChannel")
+ ] = None
+ saved_payment_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[BusinessWithRulesResultSavedPaymentDetailsItem]],
+ FieldMetadata(alias="savedPaymentDetails"),
+ ] = None
+ mcc_details: typing_extensions.Annotated[typing.Optional[MccDetails], FieldMetadata(alias="mccDetails")] = None
+ tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
-class BusinessWithRulesResult(pydantic.BaseModel):
- user_id: str = pydantic.Field(alias="userId", description="Unique user ID for the user")
- created_timestamp: float = pydantic.Field(
- alias="createdTimestamp", description="Timestamp when the user was created"
- )
- legal_entity: LegalEntity = pydantic.Field(alias="legalEntity")
- activated_timestamp: typing.Optional[float] = pydantic.Field(
- alias="activatedTimestamp", description="Timestamp when the user was activated"
- )
- user_state_details: typing.Optional[UserStateDetails] = pydantic.Field(alias="userStateDetails")
- kyc_status_details: typing.Optional[KycStatusDetails] = pydantic.Field(alias="kycStatusDetails")
- share_holders: typing.Optional[typing.List[Person]] = pydantic.Field(
- alias="shareHolders",
- description="Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual",
- )
- directors: typing.Optional[typing.List[Person]] = pydantic.Field(
- description="Director(s) of the company. Must be at least one"
- )
- transaction_limits: typing.Optional[TransactionLimits] = pydantic.Field(alias="transactionLimits")
- risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="riskLevel")
- kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
- allowed_payment_methods: typing.Optional[typing.List[PaymentMethod]] = pydantic.Field(alias="allowedPaymentMethods")
- last_transaction_timestamp: typing.Optional[float] = pydantic.Field(
- alias="lastTransactionTimestamp", description="Timestamp of the last successful transaction of the user"
- )
- linked_entities: typing.Optional[UserEntityLink] = pydantic.Field(alias="linkedEntities")
- acquisition_channel: typing.Optional[AcquisitionChannel] = pydantic.Field(alias="acquisitionChannel")
- saved_payment_details: typing.Optional[
- typing.List[BusinessWithRulesResultSavedPaymentDetailsItem]
- ] = pydantic.Field(alias="savedPaymentDetails")
- mcc_details: typing.Optional[MccDetails] = pydantic.Field(alias="mccDetails")
- tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(
- description="Additional information that can be added via tags"
- )
- attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
- description="User's attachments uploaded by business user"
- )
- executed_rules: typing.Optional[typing.List[ExecutedRulesResult]] = pydantic.Field(alias="executedRules")
- hit_rules: typing.Optional[typing.List[HitRulesDetails]] = pydantic.Field(alias="hitRules")
- risk_score_details: typing.Optional[UserRiskScoreDetails] = pydantic.Field(alias="riskScoreDetails")
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(default=None)
+ """
+ User's attachments uploaded by business user
+ """
- 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)
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+ hit_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[HitRulesDetails]], FieldMetadata(alias="hitRules")
+ ] = None
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[UserRiskScoreDetails], FieldMetadata(alias="riskScoreDetails")
+ ] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
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 bc5407c..4094350 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
@@ -1,111 +1,272 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
import typing_extensions
-
-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
-from .mpesa_details import MpesaDetails
-from .swift_details import SwiftDetails
-from .upi_details import UpiDetails
-from .wallet_details import WalletDetails
-
-
-class BusinessWithRulesResultSavedPaymentDetailsItem_Card(CardDetails):
- method: typing_extensions.Literal["CARD"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(GenericBankAccountDetails):
- method: typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessWithRulesResultSavedPaymentDetailsItem_Iban(IbanDetails):
- method: typing_extensions.Literal["IBAN"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessWithRulesResultSavedPaymentDetailsItem_Ach(AchDetails):
- method: typing_extensions.Literal["ACH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessWithRulesResultSavedPaymentDetailsItem_Swift(SwiftDetails):
- method: typing_extensions.Literal["SWIFT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa(MpesaDetails):
- method: typing_extensions.Literal["MPESA"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessWithRulesResultSavedPaymentDetailsItem_Upi(UpiDetails):
- method: typing_extensions.Literal["UPI"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessWithRulesResultSavedPaymentDetailsItem_Wallet(WalletDetails):
- method: typing_extensions.Literal["WALLET"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessWithRulesResultSavedPaymentDetailsItem_Check(CheckDetails):
- method: typing_extensions.Literal["CHECK"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class BusinessWithRulesResultSavedPaymentDetailsItem_Cash(CashDetails):
- method: typing_extensions.Literal["CASH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .mpesa_transaction_type import MpesaTransactionType
+from .wallet_network import WalletNetwork
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class BusinessWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBaseModel):
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseModel):
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessWithRulesResultSavedPaymentDetailsItem_Upi(UniversalBaseModel):
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BusinessWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
BusinessWithRulesResultSavedPaymentDetailsItem = typing.Union[
diff --git a/src/flagright/types/card_brand.py b/src/flagright/types/card_brand.py
index 3b35bd1..b1424a7 100644
--- a/src/flagright/types/card_brand.py
+++ b/src/flagright/types/card_brand.py
@@ -1,45 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CardBrand(str, enum.Enum):
- """
- Brand of Card
- """
-
- VISA = "VISA"
- MASTERCARD = "MASTERCARD"
- AMERICAN_EXPRESS = "AMERICAN_EXPRESS"
- DISCOVER = "DISCOVER"
- UNIONPAY = "UNIONPAY"
- RUPAY = "RUPAY"
- JCB = "JCB"
-
- def visit(
- self,
- visa: typing.Callable[[], T_Result],
- mastercard: typing.Callable[[], T_Result],
- american_express: typing.Callable[[], T_Result],
- discover: typing.Callable[[], T_Result],
- unionpay: typing.Callable[[], T_Result],
- rupay: typing.Callable[[], T_Result],
- jcb: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CardBrand.VISA:
- return visa()
- if self is CardBrand.MASTERCARD:
- return mastercard()
- if self is CardBrand.AMERICAN_EXPRESS:
- return american_express()
- if self is CardBrand.DISCOVER:
- return discover()
- if self is CardBrand.UNIONPAY:
- return unionpay()
- if self is CardBrand.RUPAY:
- return rupay()
- if self is CardBrand.JCB:
- return jcb()
+CardBrand = typing.Union[
+ typing.Literal["VISA", "MASTERCARD", "AMERICAN_EXPRESS", "DISCOVER", "UNIONPAY", "RUPAY", "JCB"], typing.Any
+]
diff --git a/src/flagright/types/card_details.py b/src/flagright/types/card_details.py
index 5469767..6a3b5df 100644
--- a/src/flagright/types/card_details.py
+++ b/src/flagright/types/card_details.py
@@ -1,80 +1,112 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .amount import Amount
-from .card_brand import CardBrand
-from .card_expiry import CardExpiry
-from .card_funding import CardFunding
-from .card_merchant_details import CardMerchantDetails
+from ..core.serialization import FieldMetadata
+import pydantic
+from .email_id import EmailId
from .card_status import CardStatus
-from .card_type import CardType
-from .consumer_name import ConsumerName
from .country_code import CountryCode
-from .email_id import EmailId
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-class CardDetails(pydantic.BaseModel):
+class CardDetails(UniversalBaseModel):
"""
Model for credit or debit card details
"""
- card_fingerprint: typing.Optional[str] = pydantic.Field(
- alias="cardFingerprint",
- description="Unique card fingerprint that helps identify a specific card without having to use explicit card number. This is likely available at your card payment scheme provider",
- )
- email_id: typing.Optional[EmailId] = pydantic.Field(alias="emailId")
- card_status: typing.Optional[CardStatus] = pydantic.Field(alias="cardStatus")
- card_issued_country: typing.Optional[CountryCode] = pydantic.Field(alias="cardIssuedCountry")
- transaction_reference_field: typing.Optional[str] = pydantic.Field(
- alias="transactionReferenceField", description="Reference for the transaction"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = (
+ pydantic.Field(default=None)
)
- _3_ds_done: typing.Optional[bool] = pydantic.Field(
- alias="3dsDone", description="Whether 3ds was successfully enforced for the transaction"
+ """
+ Unique card fingerprint that helps identify a specific card without having to use explicit card number. This is likely available at your card payment scheme provider
+ """
+
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = pydantic.Field(default=None)
+ """
+ Reference for the transaction
+ """
+
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = pydantic.Field(
+ default=None
)
- name_on_card: typing.Optional[ConsumerName] = pydantic.Field(alias="nameOnCard")
- card_expiry: typing.Optional[CardExpiry] = pydantic.Field(alias="cardExpiry")
- pos_details: typing.Optional[PosDetails] = pydantic.Field(alias="posDetails")
- card_last_4_digits: typing.Optional[str] = pydantic.Field(
- alias="cardLast4Digits", description="Last 4 digits of Card"
+ """
+ Whether 3ds was successfully enforced for the transaction
+ """
+
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = (
+ pydantic.Field(default=None)
)
- card_brand: typing.Optional[CardBrand] = pydantic.Field(alias="cardBrand")
- card_funding: typing.Optional[CardFunding] = pydantic.Field(alias="cardFunding")
- card_authenticated: typing.Optional[bool] = pydantic.Field(
- alias="cardAuthenticated", description="Authentication of Card"
+ """
+ Last 4 digits of Card
+ """
+
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ pydantic.Field(default=None)
)
- card_tokenized: typing.Optional[bool] = pydantic.Field(alias="cardTokenized", description="Was the card tokenized")
- card_present: typing.Optional[bool] = pydantic.Field(alias="cardPresent", description="Card Present")
- payment_channel: typing.Optional[str] = pydantic.Field(alias="paymentChannel")
- card_type: typing.Optional[CardType] = pydantic.Field(alias="cardType")
- card_balance: typing.Optional[Amount] = pydantic.Field(alias="cardBalance")
- merchant_details: typing.Optional[CardMerchantDetails] = pydantic.Field(alias="merchantDetails")
- network_provider_risk_score: typing.Optional[float] = pydantic.Field(
- alias="networkProviderRiskScore", description="Risk score of the card from your network provider"
+ """
+ Authentication of Card
+ """
+
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = (
+ pydantic.Field(default=None)
)
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ """
+ Was the card tokenized
+ """
+
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = (
+ pydantic.Field(default=None)
)
+ """
+ Card Present
+ """
- 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)
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = pydantic.Field(default=None)
+ """
+ Risk score of the card from your network provider
+ """
+
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/card_expiry.py b/src/flagright/types/card_expiry.py
index f7d6675..53de53f 100644
--- a/src/flagright/types/card_expiry.py
+++ b/src/flagright/types/card_expiry.py
@@ -1,29 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class CardExpiry(UniversalBaseModel):
+ month: typing.Optional[float] = None
+ year: typing.Optional[float] = None
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
-class CardExpiry(pydantic.BaseModel):
- month: typing.Optional[float]
- year: typing.Optional[float]
-
- 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}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/card_funding.py b/src/flagright/types/card_funding.py
index 412e6ad..e70b784 100644
--- a/src/flagright/types/card_funding.py
+++ b/src/flagright/types/card_funding.py
@@ -1,29 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CardFunding(str, enum.Enum):
- """
- Funding of Card
- """
-
- CREDIT = "CREDIT"
- DEBIT = "DEBIT"
- PREPAID = "PREPAID"
-
- def visit(
- self,
- credit: typing.Callable[[], T_Result],
- debit: typing.Callable[[], T_Result],
- prepaid: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CardFunding.CREDIT:
- return credit()
- if self is CardFunding.DEBIT:
- return debit()
- if self is CardFunding.PREPAID:
- return prepaid()
+CardFunding = typing.Union[typing.Literal["CREDIT", "DEBIT", "PREPAID"], typing.Any]
diff --git a/src/flagright/types/card_merchant_details.py b/src/flagright/types/card_merchant_details.py
index 6b42fef..de993a7 100644
--- a/src/flagright/types/card_merchant_details.py
+++ b/src/flagright/types/card_merchant_details.py
@@ -1,37 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ..core.datetime_utils import serialize_datetime
+import typing_extensions
+from ..core.serialization import FieldMetadata
from .country_code import CountryCode
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class CardMerchantDetails(pydantic.BaseModel):
- id: typing.Optional[str]
- name: typing.Optional[str]
- category: typing.Optional[str]
- mcc: typing.Optional[str] = pydantic.Field(alias="MCC")
- city: typing.Optional[str]
- country: typing.Optional[CountryCode]
- state: typing.Optional[str]
- post_code: typing.Optional[str] = pydantic.Field(alias="postCode")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class CardMerchantDetails(UniversalBaseModel):
+ id: typing.Optional[str] = None
+ name: typing.Optional[str] = None
+ category: typing.Optional[str] = None
+ mcc: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="MCC")] = None
+ city: typing.Optional[str] = None
+ country: typing.Optional[CountryCode] = None
+ state: typing.Optional[str] = None
+ post_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="postCode")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/card_payment_method.py b/src/flagright/types/card_payment_method.py
index a9b5acd..08b9227 100644
--- a/src/flagright/types/card_payment_method.py
+++ b/src/flagright/types/card_payment_method.py
@@ -1,5 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import typing_extensions
+import typing
-CardPaymentMethod = typing_extensions.Literal["CARD"]
+CardPaymentMethod = typing.Literal["CARD"]
diff --git a/src/flagright/types/card_status.py b/src/flagright/types/card_status.py
index bf62d2b..ffb1c4e 100644
--- a/src/flagright/types/card_status.py
+++ b/src/flagright/types/card_status.py
@@ -1,49 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CardStatus(str, enum.Enum):
- """
- Status of the card
- """
-
- ACTIVE = "ACTIVE"
- FROZEN = "FROZEN"
- BLOCKED = "BLOCKED"
- SUSPECTED_FRAUD = "SUSPECTED_FRAUD"
- STOLEN = "STOLEN"
- LOST = "LOST"
- CLOSED = "CLOSED"
- OTHER = "OTHER"
-
- def visit(
- self,
- active: typing.Callable[[], T_Result],
- frozen: typing.Callable[[], T_Result],
- blocked: typing.Callable[[], T_Result],
- suspected_fraud: typing.Callable[[], T_Result],
- stolen: typing.Callable[[], T_Result],
- lost: typing.Callable[[], T_Result],
- closed: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CardStatus.ACTIVE:
- return active()
- if self is CardStatus.FROZEN:
- return frozen()
- if self is CardStatus.BLOCKED:
- return blocked()
- if self is CardStatus.SUSPECTED_FRAUD:
- return suspected_fraud()
- if self is CardStatus.STOLEN:
- return stolen()
- if self is CardStatus.LOST:
- return lost()
- if self is CardStatus.CLOSED:
- return closed()
- if self is CardStatus.OTHER:
- return other()
+CardStatus = typing.Union[
+ typing.Literal["ACTIVE", "FROZEN", "BLOCKED", "SUSPECTED_FRAUD", "STOLEN", "LOST", "CLOSED", "OTHER"], typing.Any
+]
diff --git a/src/flagright/types/card_type.py b/src/flagright/types/card_type.py
index 69a0d68..d92d45d 100644
--- a/src/flagright/types/card_type.py
+++ b/src/flagright/types/card_type.py
@@ -1,21 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CardType(str, enum.Enum):
- """
- Type of card
- """
-
- VIRTUAL = "VIRTUAL"
- PHYSICAL = "PHYSICAL"
-
- def visit(self, virtual: typing.Callable[[], T_Result], physical: typing.Callable[[], T_Result]) -> T_Result:
- if self is CardType.VIRTUAL:
- return virtual()
- if self is CardType.PHYSICAL:
- return physical()
+CardType = typing.Union[typing.Literal["VIRTUAL", "PHYSICAL"], typing.Any]
diff --git a/src/flagright/types/case_closed_details.py b/src/flagright/types/case_closed_details.py
index 837225f..93331af 100644
--- a/src/flagright/types/case_closed_details.py
+++ b/src/flagright/types/case_closed_details.py
@@ -1,35 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class CaseClosedDetails(pydantic.BaseModel):
- case_id: typing.Optional[str] = pydantic.Field(alias="caseId")
- status: typing.Optional[str]
- reasons: typing.Optional[typing.List[str]]
- reason_description_for_other: typing.Optional[str] = pydantic.Field(alias="reasonDescriptionForOther")
- comment: typing.Optional[str]
- user_id: typing.Optional[str] = pydantic.Field(alias="userId")
- transaction_ids: typing.Optional[typing.List[str]] = pydantic.Field(alias="transactionIds")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class CaseClosedDetails(UniversalBaseModel):
+ case_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="caseId")] = None
+ status: typing.Optional[str] = None
+ reasons: typing.Optional[typing.List[str]] = None
+ reason_description_for_other: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="reasonDescriptionForOther")
+ ] = None
+ comment: typing.Optional[str] = None
+ user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userId")] = None
+ transaction_ids: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="transactionIds")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/case_management_event.py b/src/flagright/types/case_management_event.py
index 56a0580..e506d8e 100644
--- a/src/flagright/types/case_management_event.py
+++ b/src/flagright/types/case_management_event.py
@@ -1,50 +1,72 @@
# 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 UniversalBaseModel
+import typing_extensions
from .case_management_event_case_status import CaseManagementEventCaseStatus
+from ..core.serialization import FieldMetadata
+import pydantic
from .case_management_event_case_status_reason import CaseManagementEventCaseStatusReason
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class CaseManagementEvent(pydantic.BaseModel):
+class CaseManagementEvent(UniversalBaseModel):
"""
Model for case management events
"""
- case_status: CaseManagementEventCaseStatus = pydantic.Field(
- alias="caseStatus", description="Status of a case. E.g. Open, Closed etc."
+ case_status: typing_extensions.Annotated[CaseManagementEventCaseStatus, FieldMetadata(alias="caseStatus")] = (
+ pydantic.Field()
)
- timestamp: float = pydantic.Field(description="Timestamp of the event")
- case_status_reason: CaseManagementEventCaseStatusReason = pydantic.Field(
- alias="caseStatusReason",
- description="Case status reason. E.g. Closed & False Positive, Closed & Investigation Completed etc.",
+ """
+ Status of a case. E.g. Open, Closed etc.
+ """
+
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of the event
+ """
+
+ case_status_reason: typing_extensions.Annotated[
+ CaseManagementEventCaseStatusReason, FieldMetadata(alias="caseStatusReason")
+ ] = pydantic.Field()
+ """
+ Case status reason. E.g. Closed & False Positive, Closed & Investigation Completed etc.
+ """
+
+ transaction_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionId")] = (
+ pydantic.Field(default=None)
)
- transaction_id: typing.Optional[str] = pydantic.Field(
- alias="transactionId", description="Transaction ID the case pertains to"
+ """
+ Transaction ID the case pertains to
+ """
+
+ user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userId")] = pydantic.Field(
+ default=None
)
- user_id: typing.Optional[str] = pydantic.Field(alias="userId", description="User ID the case pertains to")
- event_id: typing.Optional[str] = pydantic.Field(alias="eventId", description="Event ID the case pertains to")
- case_status_reason_description: typing.Optional[str] = pydantic.Field(
- alias="caseStatusReasonDescription", description="Case status reason description"
+ """
+ User ID the case pertains to
+ """
+
+ event_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventId")] = pydantic.Field(
+ default=None
)
+ """
+ Event ID the case pertains to
+ """
- 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)
+ case_status_reason_description: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="caseStatusReasonDescription")
+ ] = pydantic.Field(default=None)
+ """
+ Case status reason description
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/case_management_event_case_status.py b/src/flagright/types/case_management_event_case_status.py
index 93121ec..5bab649 100644
--- a/src/flagright/types/case_management_event_case_status.py
+++ b/src/flagright/types/case_management_event_case_status.py
@@ -1,21 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CaseManagementEventCaseStatus(str, enum.Enum):
- """
- Status of a case. E.g. Open, Closed etc.
- """
-
- CLOSED = "CLOSED"
- HIT = "HIT"
-
- def visit(self, closed: typing.Callable[[], T_Result], hit: typing.Callable[[], T_Result]) -> T_Result:
- if self is CaseManagementEventCaseStatus.CLOSED:
- return closed()
- if self is CaseManagementEventCaseStatus.HIT:
- return hit()
+CaseManagementEventCaseStatus = typing.Union[typing.Literal["CLOSED", "HIT"], typing.Any]
diff --git a/src/flagright/types/case_management_event_case_status_reason.py b/src/flagright/types/case_management_event_case_status_reason.py
index 463db53..d36329e 100644
--- a/src/flagright/types/case_management_event_case_status_reason.py
+++ b/src/flagright/types/case_management_event_case_status_reason.py
@@ -1,33 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CaseManagementEventCaseStatusReason(str, enum.Enum):
- """
- Case status reason. E.g. Closed & False Positive, Closed & Investigation Completed etc.
- """
-
- FALSE_POSITIVE = "FALSE_POSITIVE"
- INVESTIGATION_COMPLETED = "INVESTIGATION_COMPLETED"
- DOCUMENTS_COLLECTED = "DOCUMENTS_COLLECTED"
- OTHER = "OTHER"
-
- def visit(
- self,
- false_positive: typing.Callable[[], T_Result],
- investigation_completed: typing.Callable[[], T_Result],
- documents_collected: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CaseManagementEventCaseStatusReason.FALSE_POSITIVE:
- return false_positive()
- if self is CaseManagementEventCaseStatusReason.INVESTIGATION_COMPLETED:
- return investigation_completed()
- if self is CaseManagementEventCaseStatusReason.DOCUMENTS_COLLECTED:
- return documents_collected()
- if self is CaseManagementEventCaseStatusReason.OTHER:
- return other()
+CaseManagementEventCaseStatusReason = typing.Union[
+ typing.Literal["FALSE_POSITIVE", "INVESTIGATION_COMPLETED", "DOCUMENTS_COLLECTED", "OTHER"], typing.Any
+]
diff --git a/src/flagright/types/case_opened_details.py b/src/flagright/types/case_opened_details.py
index ac9a507..50f0982 100644
--- a/src/flagright/types/case_opened_details.py
+++ b/src/flagright/types/case_opened_details.py
@@ -1,32 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class CaseOpenedDetails(pydantic.BaseModel):
- case_id: typing.Optional[str] = pydantic.Field(alias="caseId")
- status: typing.Optional[str]
- user_id: typing.Optional[str] = pydantic.Field(alias="userId")
- transaction_ids: typing.Optional[typing.List[str]] = pydantic.Field(alias="transactionIds")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class CaseOpenedDetails(UniversalBaseModel):
+ case_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="caseId")] = None
+ status: typing.Optional[str] = None
+ user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userId")] = None
+ transaction_ids: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="transactionIds")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/cash_details.py b/src/flagright/types/cash_details.py
index a4cc7a9..53fd148 100644
--- a/src/flagright/types/cash_details.py
+++ b/src/flagright/types/cash_details.py
@@ -1,28 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class CashDetails(UniversalBaseModel):
+ identifier: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Identifier for the cash transaction
+ """
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
-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}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/cash_payment_method.py b/src/flagright/types/cash_payment_method.py
index 4d8a735..e600155 100644
--- a/src/flagright/types/cash_payment_method.py
+++ b/src/flagright/types/cash_payment_method.py
@@ -1,5 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import typing_extensions
+import typing
-CashPaymentMethod = typing_extensions.Literal["CASH"]
+CashPaymentMethod = typing.Literal["CASH"]
diff --git a/src/flagright/types/check_delivery_status.py b/src/flagright/types/check_delivery_status.py
index 237e4fc..c25d868 100644
--- a/src/flagright/types/check_delivery_status.py
+++ b/src/flagright/types/check_delivery_status.py
@@ -1,37 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CheckDeliveryStatus(str, enum.Enum):
- COMPLETED = "COMPLETED"
- PENDING = "PENDING"
- SETTLED = "SETTLED"
- CANCELED = "CANCELED"
- REFUND = "REFUND"
- DECLINED = "DECLINED"
-
- def visit(
- self,
- completed: typing.Callable[[], T_Result],
- pending: typing.Callable[[], T_Result],
- settled: typing.Callable[[], T_Result],
- canceled: typing.Callable[[], T_Result],
- refund: typing.Callable[[], T_Result],
- declined: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CheckDeliveryStatus.COMPLETED:
- return completed()
- if self is CheckDeliveryStatus.PENDING:
- return pending()
- if self is CheckDeliveryStatus.SETTLED:
- return settled()
- if self is CheckDeliveryStatus.CANCELED:
- return canceled()
- if self is CheckDeliveryStatus.REFUND:
- return refund()
- if self is CheckDeliveryStatus.DECLINED:
- return declined()
+CheckDeliveryStatus = typing.Union[
+ typing.Literal["COMPLETED", "PENDING", "SETTLED", "CANCELED", "REFUND", "DECLINED"], typing.Any
+]
diff --git a/src/flagright/types/check_details.py b/src/flagright/types/check_details.py
index 9694de8..8dd6047 100644
--- a/src/flagright/types/check_details.py
+++ b/src/flagright/types/check_details.py
@@ -1,40 +1,37 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .address import Address
+from ..core.serialization import FieldMetadata
from .check_delivery_status import CheckDeliveryStatus
+from .address import Address
from .tag import Tag
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class CheckDetails(pydantic.BaseModel):
- 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"
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class CheckDetails(UniversalBaseModel):
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ 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
- json_encoders = {dt.datetime: serialize_datetime}
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/check_payment_method.py b/src/flagright/types/check_payment_method.py
index 35b75bd..5af6eca 100644
--- a/src/flagright/types/check_payment_method.py
+++ b/src/flagright/types/check_payment_method.py
@@ -1,5 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import typing_extensions
+import typing
-CheckPaymentMethod = typing_extensions.Literal["CHECK"]
+CheckPaymentMethod = typing.Literal["CHECK"]
diff --git a/src/flagright/types/company_financial_details.py b/src/flagright/types/company_financial_details.py
index d40013f..466ae64 100644
--- a/src/flagright/types/company_financial_details.py
+++ b/src/flagright/types/company_financial_details.py
@@ -1,41 +1,36 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .amount import Amount
+from ..core.serialization import FieldMetadata
from .tag import Tag
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class CompanyFinancialDetails(pydantic.BaseModel):
+class CompanyFinancialDetails(UniversalBaseModel):
"""
Model for business user company financial details
"""
- expected_transaction_amount_per_month: typing.Optional[Amount] = pydantic.Field(
- alias="expectedTransactionAmountPerMonth"
- )
- expected_turnover_per_month: typing.Optional[Amount] = pydantic.Field(alias="expectedTurnoverPerMonth")
- 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}
- return super().json(**kwargs_with_defaults)
+ expected_transaction_amount_per_month: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="expectedTransactionAmountPerMonth")
+ ] = None
+ expected_turnover_per_month: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="expectedTurnoverPerMonth")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/company_general_details.py b/src/flagright/types/company_general_details.py
index 19cd5a4..8e09593 100644
--- a/src/flagright/types/company_general_details.py
+++ b/src/flagright/types/company_general_details.py
@@ -1,54 +1,75 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from ..core.serialization import FieldMetadata
+import pydantic
from .business_user_segment import BusinessUserSegment
+from .user_registration_status import UserRegistrationStatus
from .country_code import CountryCode
from .tag import Tag
-from .user_registration_status import UserRegistrationStatus
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class CompanyGeneralDetails(pydantic.BaseModel):
+class CompanyGeneralDetails(UniversalBaseModel):
"""
Model for business user company general details
"""
- legal_name: typing.Optional[str] = pydantic.Field(alias="legalName", description="Legal name of the company")
- business_industry: typing.Optional[typing.List[str]] = pydantic.Field(
- alias="businessIndustry", description="The industry in which the business operates for a business customer"
- )
- main_products_services_sold: typing.Optional[typing.List[str]] = pydantic.Field(
- alias="mainProductsServicesSold", description="The key products and services provided by the company"
- )
- user_segment: typing.Optional[BusinessUserSegment] = pydantic.Field(
- alias="userSegment", description="Segmentation of the business user"
- )
- user_registration_status: typing.Optional[UserRegistrationStatus] = pydantic.Field(alias="userRegistrationStatus")
- operating_countries: typing.Optional[typing.List[CountryCode]] = pydantic.Field(
- alias="operatingCountries", description="Countries where the business operates"
- )
- alias: typing.Optional[typing.List[str]] = pydantic.Field(description="Alias names of the business entity")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ legal_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="legalName")] = pydantic.Field(
+ default=None
)
+ """
+ Legal name of the company
+ """
- 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)
+ business_industry: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="businessIndustry")
+ ] = pydantic.Field(default=None)
+ """
+ The industry in which the business operates for a business customer
+ """
+
+ main_products_services_sold: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="mainProductsServicesSold")
+ ] = pydantic.Field(default=None)
+ """
+ The key products and services provided by the company
+ """
+
+ user_segment: typing_extensions.Annotated[
+ typing.Optional[BusinessUserSegment], FieldMetadata(alias="userSegment")
+ ] = pydantic.Field(default=None)
+ """
+ Segmentation of the business user
+ """
+
+ user_registration_status: typing_extensions.Annotated[
+ typing.Optional[UserRegistrationStatus], FieldMetadata(alias="userRegistrationStatus")
+ ] = None
+ operating_countries: typing_extensions.Annotated[
+ typing.Optional[typing.List[CountryCode]], FieldMetadata(alias="operatingCountries")
+ ] = pydantic.Field(default=None)
+ """
+ Countries where the business operates
+ """
+
+ alias: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Alias names of the business entity
+ """
+
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/company_registration_details.py b/src/flagright/types/company_registration_details.py
index ab5dd36..59ea440 100644
--- a/src/flagright/types/company_registration_details.py
+++ b/src/flagright/types/company_registration_details.py
@@ -1,50 +1,58 @@
# 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 UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
from .country_code import CountryCode
+import typing
from .tag import Tag
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class CompanyRegistrationDetails(pydantic.BaseModel):
+class CompanyRegistrationDetails(UniversalBaseModel):
"""
Model for business user company registration details
"""
- registration_identifier: str = pydantic.Field(
- alias="registrationIdentifier",
- description="Commercial registry registration number for the company in its registration country",
+ registration_identifier: typing_extensions.Annotated[str, FieldMetadata(alias="registrationIdentifier")] = (
+ pydantic.Field()
)
- registration_country: CountryCode = pydantic.Field(alias="registrationCountry")
- tax_residence_country: typing.Optional[CountryCode] = pydantic.Field(alias="taxResidenceCountry")
- tax_identifier: typing.Optional[str] = pydantic.Field(
- alias="taxIdentifier", description="Tax ID number of the registered entity"
- )
- legal_entity_type: typing.Optional[str] = pydantic.Field(
- alias="legalEntityType", description="Type of legal entity, e.g., Limited Liability"
+ """
+ Commercial registry registration number for the company in its registration country
+ """
+
+ registration_country: typing_extensions.Annotated[CountryCode, FieldMetadata(alias="registrationCountry")]
+ tax_residence_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="taxResidenceCountry")
+ ] = None
+ tax_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="taxIdentifier")] = (
+ pydantic.Field(default=None)
)
- date_of_registration: typing.Optional[str] = pydantic.Field(alias="dateOfRegistration")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ """
+ Tax ID number of the registered entity
+ """
+
+ legal_entity_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="legalEntityType")] = (
+ pydantic.Field(default=None)
)
+ """
+ Type of legal entity, e.g., Limited Liability
+ """
- 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)
+ date_of_registration: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="dateOfRegistration")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/consumer_name.py b/src/flagright/types/consumer_name.py
index 2503e62..5b62518 100644
--- a/src/flagright/types/consumer_name.py
+++ b/src/flagright/types/consumer_name.py
@@ -1,35 +1,42 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class ConsumerName(pydantic.BaseModel):
+class ConsumerName(UniversalBaseModel):
"""
Model for a generic consumer name
"""
- first_name: str = pydantic.Field(alias="firstName", description="First name of the user")
- middle_name: typing.Optional[str] = pydantic.Field(alias="middleName", description="Middle name of the user")
- last_name: typing.Optional[str] = pydantic.Field(alias="lastName", description="Last name of the user")
+ first_name: typing_extensions.Annotated[str, FieldMetadata(alias="firstName")] = pydantic.Field()
+ """
+ First name of the user
+ """
- 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)
+ middle_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="middleName")] = pydantic.Field(
+ default=None
+ )
+ """
+ Middle name of the user
+ """
+
+ last_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="lastName")] = pydantic.Field(
+ default=None
+ )
+ """
+ Last name of the user
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/consumer_user_event.py b/src/flagright/types/consumer_user_event.py
index 20d1545..ec20342 100644
--- a/src/flagright/types/consumer_user_event.py
+++ b/src/flagright/types/consumer_user_event.py
@@ -1,41 +1,57 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import pydantic
+import typing_extensions
+from ..core.serialization import FieldMetadata
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .user_optional import UserOptional
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class ConsumerUserEvent(pydantic.BaseModel):
+class ConsumerUserEvent(UniversalBaseModel):
"""
Model for consumer user-related events
"""
- timestamp: float = pydantic.Field(description="Timestamp of the event")
- user_id: str = pydantic.Field(alias="userId", description="Transaction ID the event pertains to")
- event_id: typing.Optional[str] = pydantic.Field(alias="eventId", description="Unique event ID")
- reason: typing.Optional[str] = pydantic.Field(description="Reason for the event or a state change")
- event_description: typing.Optional[str] = pydantic.Field(alias="eventDescription", description="Event description")
- updated_consumer_user_attributes: typing.Optional[UserOptional] = pydantic.Field(
- alias="updatedConsumerUserAttributes"
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of the event
+ """
+
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Transaction ID the event pertains to
+ """
+
+ event_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventId")] = pydantic.Field(
+ default=None
)
+ """
+ Unique event ID
+ """
+
+ reason: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Reason for the event or a state change
+ """
+
+ event_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventDescription")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Event description
+ """
- 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)
+ updated_consumer_user_attributes: typing_extensions.Annotated[
+ typing.Optional[UserOptional], FieldMetadata(alias="updatedConsumerUserAttributes")
+ ] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/consumer_user_event_with_rules_result.py b/src/flagright/types/consumer_user_event_with_rules_result.py
index 419f7ce..6eda5f0 100644
--- a/src/flagright/types/consumer_user_event_with_rules_result.py
+++ b/src/flagright/types/consumer_user_event_with_rules_result.py
@@ -1,43 +1,65 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import pydantic
+import typing_extensions
+from ..core.serialization import FieldMetadata
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from .user_optional import UserOptional
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
-from .user_optional import UserOptional
from .user_risk_score_details import UserRiskScoreDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class ConsumerUserEventWithRulesResult(UniversalBaseModel):
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of the event
+ """
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Transaction ID the event pertains to
+ """
+ event_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventId")] = pydantic.Field(
+ default=None
+ )
+ """
+ Unique event ID
+ """
+
+ reason: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Reason for the event or a state change
+ """
-class ConsumerUserEventWithRulesResult(pydantic.BaseModel):
- timestamp: float = pydantic.Field(description="Timestamp of the event")
- user_id: str = pydantic.Field(alias="userId", description="Transaction ID the event pertains to")
- event_id: typing.Optional[str] = pydantic.Field(alias="eventId", description="Unique event ID")
- reason: typing.Optional[str] = pydantic.Field(description="Reason for the event or a state change")
- event_description: typing.Optional[str] = pydantic.Field(alias="eventDescription", description="Event description")
- updated_consumer_user_attributes: typing.Optional[UserOptional] = pydantic.Field(
- alias="updatedConsumerUserAttributes"
+ event_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventDescription")] = (
+ pydantic.Field(default=None)
)
- executed_rules: typing.Optional[typing.List[ExecutedRulesResult]] = pydantic.Field(alias="executedRules")
- hit_rules: typing.Optional[typing.List[HitRulesDetails]] = pydantic.Field(alias="hitRules")
- risk_score_details: typing.Optional[UserRiskScoreDetails] = pydantic.Field(alias="riskScoreDetails")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Event description
+ """
+
+ updated_consumer_user_attributes: typing_extensions.Annotated[
+ typing.Optional[UserOptional], FieldMetadata(alias="updatedConsumerUserAttributes")
+ ] = None
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+ hit_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[HitRulesDetails]], FieldMetadata(alias="hitRules")
+ ] = None
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[UserRiskScoreDetails], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/consumer_user_monitoring_result.py b/src/flagright/types/consumer_user_monitoring_result.py
index c1e7c7a..5409855 100644
--- a/src/flagright/types/consumer_user_monitoring_result.py
+++ b/src/flagright/types/consumer_user_monitoring_result.py
@@ -1,39 +1,41 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .executed_rules_result import ExecutedRulesResult
-from .hit_rules_details import HitRulesDetails
from .user_risk_score_details import UserRiskScoreDetails
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from .hit_rules_details import HitRulesDetails
+from .executed_rules_result import ExecutedRulesResult
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class ConsumerUserMonitoringResult(pydantic.BaseModel):
+class ConsumerUserMonitoringResult(UniversalBaseModel):
"""
Model for consumer user risk score response
"""
- user_id: str = pydantic.Field(alias="userId", description="user ID the risk score pertains to")
- risk_score_details: typing.Optional[UserRiskScoreDetails] = pydantic.Field(alias="riskScoreDetails")
- hit_rules: typing.Optional[typing.List[HitRulesDetails]] = pydantic.Field(alias="hitRules")
- executed_rules: typing.Optional[typing.List[ExecutedRulesResult]] = pydantic.Field(alias="executedRules")
-
- 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)
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ user ID the risk score pertains to
+ """
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[UserRiskScoreDetails], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+ hit_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[HitRulesDetails]], FieldMetadata(alias="hitRules")
+ ] = None
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/consumer_user_segment.py b/src/flagright/types/consumer_user_segment.py
index 77db7df..ab90bd3 100644
--- a/src/flagright/types/consumer_user_segment.py
+++ b/src/flagright/types/consumer_user_segment.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ConsumerUserSegment(str, enum.Enum):
- RETAIL = "RETAIL"
- PROFESSIONAL = "PROFESSIONAL"
-
- def visit(self, retail: typing.Callable[[], T_Result], professional: typing.Callable[[], T_Result]) -> T_Result:
- if self is ConsumerUserSegment.RETAIL:
- return retail()
- if self is ConsumerUserSegment.PROFESSIONAL:
- return professional()
+ConsumerUserSegment = typing.Union[typing.Literal["RETAIL", "PROFESSIONAL"], typing.Any]
diff --git a/src/flagright/types/contact_details.py b/src/flagright/types/contact_details.py
index ca4ea16..c00019f 100644
--- a/src/flagright/types/contact_details.py
+++ b/src/flagright/types/contact_details.py
@@ -1,44 +1,55 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from ..core.serialization import FieldMetadata
+import pydantic
from .address import Address
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class ContactDetails(pydantic.BaseModel):
+class ContactDetails(UniversalBaseModel):
"""
Model for business user contact information details
"""
- email_ids: typing.Optional[typing.List[str]] = pydantic.Field(
- alias="emailIds", description="Email addresses of the contacts for a given business customer"
- )
- contact_numbers: typing.Optional[typing.List[str]] = pydantic.Field(
- alias="contactNumbers", description="Phone numbers to contact a given business customer"
+ email_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="emailIds")] = (
+ pydantic.Field(default=None)
)
- fax_numbers: typing.Optional[typing.List[str]] = pydantic.Field(
- alias="faxNumbers", description="Fax numbers to contact a business customer"
+ """
+ Email addresses of the contacts for a given business customer
+ """
+
+ contact_numbers: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="contactNumbers")
+ ] = pydantic.Field(default=None)
+ """
+ Phone numbers to contact a given business customer
+ """
+
+ fax_numbers: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="faxNumbers")] = (
+ pydantic.Field(default=None)
)
- websites: typing.Optional[typing.List[str]] = pydantic.Field(description="Website of the company")
- addresses: typing.Optional[typing.List[Address]] = pydantic.Field(description="Address(es) of the company")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Fax numbers to contact a business customer
+ """
+
+ websites: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Website of the company
+ """
+
+ addresses: typing.Optional[typing.List[Address]] = pydantic.Field(default=None)
+ """
+ Address(es) of the company
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/country_code.py b/src/flagright/types/country_code.py
index bf31bda..cb6e45d 100644
--- a/src/flagright/types/country_code.py
+++ b/src/flagright/types/country_code.py
@@ -1,1113 +1,284 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CountryCode(str, enum.Enum):
- AF = "AF"
- AL = "AL"
- DZ = "DZ"
- AS = "AS"
- AD = "AD"
- AO = "AO"
- AI = "AI"
- AQ = "AQ"
- AG = "AG"
- AR = "AR"
- AM = "AM"
- AW = "AW"
- AU = "AU"
- AT = "AT"
- AZ = "AZ"
- BS = "BS"
- BH = "BH"
- BD = "BD"
- BB = "BB"
- BY = "BY"
- BE = "BE"
- BZ = "BZ"
- BJ = "BJ"
- BM = "BM"
- BT = "BT"
- BO = "BO"
- BQ = "BQ"
- BA = "BA"
- BW = "BW"
- BV = "BV"
- BR = "BR"
- IO = "IO"
- BN = "BN"
- BG = "BG"
- BF = "BF"
- BI = "BI"
- CV = "CV"
- KH = "KH"
- CM = "CM"
- CA = "CA"
- KY = "KY"
- CF = "CF"
- TD = "TD"
- CL = "CL"
- CN = "CN"
- CX = "CX"
- CC = "CC"
- CO = "CO"
- KM = "KM"
- CD = "CD"
- CG = "CG"
- CK = "CK"
- CR = "CR"
- HR = "HR"
- CU = "CU"
- CW = "CW"
- CY = "CY"
- CZ = "CZ"
- CI = "CI"
- DK = "DK"
- DJ = "DJ"
- DM = "DM"
- DO = "DO"
- EC = "EC"
- EG = "EG"
- SV = "SV"
- GQ = "GQ"
- ER = "ER"
- EE = "EE"
- SZ = "SZ"
- ET = "ET"
- FK = "FK"
- FO = "FO"
- FJ = "FJ"
- FI = "FI"
- FR = "FR"
- GF = "GF"
- PF = "PF"
- TF = "TF"
- GA = "GA"
- GM = "GM"
- GE = "GE"
- DE = "DE"
- GH = "GH"
- GI = "GI"
- GR = "GR"
- GL = "GL"
- GD = "GD"
- GP = "GP"
- GU = "GU"
- GT = "GT"
- GG = "GG"
- GN = "GN"
- GW = "GW"
- GY = "GY"
- HT = "HT"
- HM = "HM"
- VA = "VA"
- HN = "HN"
- HK = "HK"
- HU = "HU"
- IS = "IS"
- IN = "IN"
- ID = "ID"
- IR = "IR"
- IQ = "IQ"
- IE = "IE"
- IM = "IM"
- IL = "IL"
- IT = "IT"
- JM = "JM"
- JP = "JP"
- JE = "JE"
- JO = "JO"
- KZ = "KZ"
- KE = "KE"
- KI = "KI"
- KP = "KP"
- KR = "KR"
- KW = "KW"
- KG = "KG"
- LA = "LA"
- LV = "LV"
- LB = "LB"
- LS = "LS"
- LR = "LR"
- LY = "LY"
- LI = "LI"
- LT = "LT"
- LU = "LU"
- MO = "MO"
- MG = "MG"
- MW = "MW"
- MY = "MY"
- MV = "MV"
- ML = "ML"
- MT = "MT"
- MH = "MH"
- MQ = "MQ"
- MR = "MR"
- MU = "MU"
- YT = "YT"
- MX = "MX"
- FM = "FM"
- MD = "MD"
- MC = "MC"
- MN = "MN"
- ME = "ME"
- MS = "MS"
- MA = "MA"
- MZ = "MZ"
- MM = "MM"
- NA = "NA"
- NR = "NR"
- NP = "NP"
- NL = "NL"
- NC = "NC"
- NZ = "NZ"
- NI = "NI"
- NE = "NE"
- NG = "NG"
- NU = "NU"
- NF = "NF"
- MK = "MK"
- MP = "MP"
- NO = "NO"
- OM = "OM"
- PK = "PK"
- PW = "PW"
- PS = "PS"
- PA = "PA"
- PG = "PG"
- PY = "PY"
- PE = "PE"
- PH = "PH"
- PN = "PN"
- PL = "PL"
- PT = "PT"
- PR = "PR"
- QA = "QA"
- RO = "RO"
- RU = "RU"
- RW = "RW"
- RE = "RE"
- BL = "BL"
- SH = "SH"
- KN = "KN"
- LC = "LC"
- MF = "MF"
- PM = "PM"
- VC = "VC"
- WS = "WS"
- SM = "SM"
- ST = "ST"
- SA = "SA"
- SN = "SN"
- RS = "RS"
- SC = "SC"
- SL = "SL"
- SG = "SG"
- SX = "SX"
- SK = "SK"
- SI = "SI"
- SB = "SB"
- SO = "SO"
- ZA = "ZA"
- GS = "GS"
- SS = "SS"
- ES = "ES"
- LK = "LK"
- SD = "SD"
- SR = "SR"
- SJ = "SJ"
- SE = "SE"
- CH = "CH"
- SY = "SY"
- TW = "TW"
- TJ = "TJ"
- TZ = "TZ"
- TH = "TH"
- TL = "TL"
- TG = "TG"
- TK = "TK"
- TO = "TO"
- TT = "TT"
- TN = "TN"
- TM = "TM"
- TC = "TC"
- TV = "TV"
- TR = "TR"
- UG = "UG"
- UA = "UA"
- AE = "AE"
- GB = "GB"
- UM = "UM"
- US = "US"
- UY = "UY"
- UZ = "UZ"
- VU = "VU"
- VE = "VE"
- VN = "VN"
- VG = "VG"
- VI = "VI"
- WF = "WF"
- EH = "EH"
- YE = "YE"
- ZM = "ZM"
- ZW = "ZW"
- AX = "AX"
- XA = "XA"
- XB = "XB"
- XC = "XC"
- XD = "XD"
- XE = "XE"
- XF = "XF"
- XG = "XG"
- XH = "XH"
- XI = "XI"
- XJ = "XJ"
- XK = "XK"
- XL = "XL"
- XM = "XM"
- XN = "XN"
- XO = "XO"
- XP = "XP"
- XQ = "XQ"
- XR = "XR"
- XS = "XS"
- XT = "XT"
- XU = "XU"
- XV = "XV"
- XW = "XW"
- XY = "XY"
- XZ = "XZ"
- NOT_APPLICABLE = "N/A"
-
- def visit(
- self,
- af: typing.Callable[[], T_Result],
- al: typing.Callable[[], T_Result],
- dz: typing.Callable[[], T_Result],
- as_: typing.Callable[[], T_Result],
- ad: typing.Callable[[], T_Result],
- ao: typing.Callable[[], T_Result],
- ai: typing.Callable[[], T_Result],
- aq: typing.Callable[[], T_Result],
- ag: typing.Callable[[], T_Result],
- ar: typing.Callable[[], T_Result],
- am: typing.Callable[[], T_Result],
- aw: typing.Callable[[], T_Result],
- au: typing.Callable[[], T_Result],
- at: typing.Callable[[], T_Result],
- az: typing.Callable[[], T_Result],
- bs: typing.Callable[[], T_Result],
- bh: typing.Callable[[], T_Result],
- bd: typing.Callable[[], T_Result],
- bb: typing.Callable[[], T_Result],
- by: typing.Callable[[], T_Result],
- be: typing.Callable[[], T_Result],
- bz: typing.Callable[[], T_Result],
- bj: typing.Callable[[], T_Result],
- bm: typing.Callable[[], T_Result],
- bt: typing.Callable[[], T_Result],
- bo: typing.Callable[[], T_Result],
- bq: typing.Callable[[], T_Result],
- ba: typing.Callable[[], T_Result],
- bw: typing.Callable[[], T_Result],
- bv: typing.Callable[[], T_Result],
- br: typing.Callable[[], T_Result],
- io: typing.Callable[[], T_Result],
- bn: typing.Callable[[], T_Result],
- bg: typing.Callable[[], T_Result],
- bf: typing.Callable[[], T_Result],
- bi: typing.Callable[[], T_Result],
- cv: typing.Callable[[], T_Result],
- kh: typing.Callable[[], T_Result],
- cm: typing.Callable[[], T_Result],
- ca: typing.Callable[[], T_Result],
- ky: typing.Callable[[], T_Result],
- cf: typing.Callable[[], T_Result],
- td: typing.Callable[[], T_Result],
- cl: typing.Callable[[], T_Result],
- cn: typing.Callable[[], T_Result],
- cx: typing.Callable[[], T_Result],
- cc: typing.Callable[[], T_Result],
- co: typing.Callable[[], T_Result],
- km: typing.Callable[[], T_Result],
- cd: typing.Callable[[], T_Result],
- cg: typing.Callable[[], T_Result],
- ck: typing.Callable[[], T_Result],
- cr: typing.Callable[[], T_Result],
- hr: typing.Callable[[], T_Result],
- cu: typing.Callable[[], T_Result],
- cw: typing.Callable[[], T_Result],
- cy: typing.Callable[[], T_Result],
- cz: typing.Callable[[], T_Result],
- ci: typing.Callable[[], T_Result],
- dk: typing.Callable[[], T_Result],
- dj: typing.Callable[[], T_Result],
- dm: typing.Callable[[], T_Result],
- do: typing.Callable[[], T_Result],
- ec: typing.Callable[[], T_Result],
- eg: typing.Callable[[], T_Result],
- sv: typing.Callable[[], T_Result],
- gq: typing.Callable[[], T_Result],
- er: typing.Callable[[], T_Result],
- ee: typing.Callable[[], T_Result],
- sz: typing.Callable[[], T_Result],
- et: typing.Callable[[], T_Result],
- fk: typing.Callable[[], T_Result],
- fo: typing.Callable[[], T_Result],
- fj: typing.Callable[[], T_Result],
- fi: typing.Callable[[], T_Result],
- fr: typing.Callable[[], T_Result],
- gf: typing.Callable[[], T_Result],
- pf: typing.Callable[[], T_Result],
- tf: typing.Callable[[], T_Result],
- ga: typing.Callable[[], T_Result],
- gm: typing.Callable[[], T_Result],
- ge: typing.Callable[[], T_Result],
- de: typing.Callable[[], T_Result],
- gh: typing.Callable[[], T_Result],
- gi: typing.Callable[[], T_Result],
- gr: typing.Callable[[], T_Result],
- gl: typing.Callable[[], T_Result],
- gd: typing.Callable[[], T_Result],
- gp: typing.Callable[[], T_Result],
- gu: typing.Callable[[], T_Result],
- gt: typing.Callable[[], T_Result],
- gg: typing.Callable[[], T_Result],
- gn: typing.Callable[[], T_Result],
- gw: typing.Callable[[], T_Result],
- gy: typing.Callable[[], T_Result],
- ht: typing.Callable[[], T_Result],
- hm: typing.Callable[[], T_Result],
- va: typing.Callable[[], T_Result],
- hn: typing.Callable[[], T_Result],
- hk: typing.Callable[[], T_Result],
- hu: typing.Callable[[], T_Result],
- is_: typing.Callable[[], T_Result],
- in_: typing.Callable[[], T_Result],
- id: typing.Callable[[], T_Result],
- ir: typing.Callable[[], T_Result],
- iq: typing.Callable[[], T_Result],
- ie: typing.Callable[[], T_Result],
- im: typing.Callable[[], T_Result],
- il: typing.Callable[[], T_Result],
- it: typing.Callable[[], T_Result],
- jm: typing.Callable[[], T_Result],
- jp: typing.Callable[[], T_Result],
- je: typing.Callable[[], T_Result],
- jo: typing.Callable[[], T_Result],
- kz: typing.Callable[[], T_Result],
- ke: typing.Callable[[], T_Result],
- ki: typing.Callable[[], T_Result],
- kp: typing.Callable[[], T_Result],
- kr: typing.Callable[[], T_Result],
- kw: typing.Callable[[], T_Result],
- kg: typing.Callable[[], T_Result],
- la: typing.Callable[[], T_Result],
- lv: typing.Callable[[], T_Result],
- lb: typing.Callable[[], T_Result],
- ls: typing.Callable[[], T_Result],
- lr: typing.Callable[[], T_Result],
- ly: typing.Callable[[], T_Result],
- li: typing.Callable[[], T_Result],
- lt: typing.Callable[[], T_Result],
- lu: typing.Callable[[], T_Result],
- mo: typing.Callable[[], T_Result],
- mg: typing.Callable[[], T_Result],
- mw: typing.Callable[[], T_Result],
- my: typing.Callable[[], T_Result],
- mv: typing.Callable[[], T_Result],
- ml: typing.Callable[[], T_Result],
- mt: typing.Callable[[], T_Result],
- mh: typing.Callable[[], T_Result],
- mq: typing.Callable[[], T_Result],
- mr: typing.Callable[[], T_Result],
- mu: typing.Callable[[], T_Result],
- yt: typing.Callable[[], T_Result],
- mx: typing.Callable[[], T_Result],
- fm: typing.Callable[[], T_Result],
- md: typing.Callable[[], T_Result],
- mc: typing.Callable[[], T_Result],
- mn: typing.Callable[[], T_Result],
- me: typing.Callable[[], T_Result],
- ms: typing.Callable[[], T_Result],
- ma: typing.Callable[[], T_Result],
- mz: typing.Callable[[], T_Result],
- mm: typing.Callable[[], T_Result],
- na: typing.Callable[[], T_Result],
- nr: typing.Callable[[], T_Result],
- np: typing.Callable[[], T_Result],
- nl: typing.Callable[[], T_Result],
- nc: typing.Callable[[], T_Result],
- nz: typing.Callable[[], T_Result],
- ni: typing.Callable[[], T_Result],
- ne: typing.Callable[[], T_Result],
- ng: typing.Callable[[], T_Result],
- nu: typing.Callable[[], T_Result],
- nf: typing.Callable[[], T_Result],
- mk: typing.Callable[[], T_Result],
- mp: typing.Callable[[], T_Result],
- no: typing.Callable[[], T_Result],
- om: typing.Callable[[], T_Result],
- pk: typing.Callable[[], T_Result],
- pw: typing.Callable[[], T_Result],
- ps: typing.Callable[[], T_Result],
- pa: typing.Callable[[], T_Result],
- pg: typing.Callable[[], T_Result],
- py: typing.Callable[[], T_Result],
- pe: typing.Callable[[], T_Result],
- ph: typing.Callable[[], T_Result],
- pn: typing.Callable[[], T_Result],
- pl: typing.Callable[[], T_Result],
- pt: typing.Callable[[], T_Result],
- pr: typing.Callable[[], T_Result],
- qa: typing.Callable[[], T_Result],
- ro: typing.Callable[[], T_Result],
- ru: typing.Callable[[], T_Result],
- rw: typing.Callable[[], T_Result],
- re: typing.Callable[[], T_Result],
- bl: typing.Callable[[], T_Result],
- sh: typing.Callable[[], T_Result],
- kn: typing.Callable[[], T_Result],
- lc: typing.Callable[[], T_Result],
- mf: typing.Callable[[], T_Result],
- pm: typing.Callable[[], T_Result],
- vc: typing.Callable[[], T_Result],
- ws: typing.Callable[[], T_Result],
- sm: typing.Callable[[], T_Result],
- st: typing.Callable[[], T_Result],
- sa: typing.Callable[[], T_Result],
- sn: typing.Callable[[], T_Result],
- rs: typing.Callable[[], T_Result],
- sc: typing.Callable[[], T_Result],
- sl: typing.Callable[[], T_Result],
- sg: typing.Callable[[], T_Result],
- sx: typing.Callable[[], T_Result],
- sk: typing.Callable[[], T_Result],
- si: typing.Callable[[], T_Result],
- sb: typing.Callable[[], T_Result],
- so: typing.Callable[[], T_Result],
- za: typing.Callable[[], T_Result],
- gs: typing.Callable[[], T_Result],
- ss: typing.Callable[[], T_Result],
- es: typing.Callable[[], T_Result],
- lk: typing.Callable[[], T_Result],
- sd: typing.Callable[[], T_Result],
- sr: typing.Callable[[], T_Result],
- sj: typing.Callable[[], T_Result],
- se: typing.Callable[[], T_Result],
- ch: typing.Callable[[], T_Result],
- sy: typing.Callable[[], T_Result],
- tw: typing.Callable[[], T_Result],
- tj: typing.Callable[[], T_Result],
- tz: typing.Callable[[], T_Result],
- th: typing.Callable[[], T_Result],
- tl: typing.Callable[[], T_Result],
- tg: typing.Callable[[], T_Result],
- tk: typing.Callable[[], T_Result],
- to: typing.Callable[[], T_Result],
- tt: typing.Callable[[], T_Result],
- tn: typing.Callable[[], T_Result],
- tm: typing.Callable[[], T_Result],
- tc: typing.Callable[[], T_Result],
- tv: typing.Callable[[], T_Result],
- tr: typing.Callable[[], T_Result],
- ug: typing.Callable[[], T_Result],
- ua: typing.Callable[[], T_Result],
- ae: typing.Callable[[], T_Result],
- gb: typing.Callable[[], T_Result],
- um: typing.Callable[[], T_Result],
- us: typing.Callable[[], T_Result],
- uy: typing.Callable[[], T_Result],
- uz: typing.Callable[[], T_Result],
- vu: typing.Callable[[], T_Result],
- ve: typing.Callable[[], T_Result],
- vn: typing.Callable[[], T_Result],
- vg: typing.Callable[[], T_Result],
- vi: typing.Callable[[], T_Result],
- wf: typing.Callable[[], T_Result],
- eh: typing.Callable[[], T_Result],
- ye: typing.Callable[[], T_Result],
- zm: typing.Callable[[], T_Result],
- zw: typing.Callable[[], T_Result],
- ax: typing.Callable[[], T_Result],
- xa: typing.Callable[[], T_Result],
- xb: typing.Callable[[], T_Result],
- xc: typing.Callable[[], T_Result],
- xd: typing.Callable[[], T_Result],
- xe: typing.Callable[[], T_Result],
- xf: typing.Callable[[], T_Result],
- xg: typing.Callable[[], T_Result],
- xh: typing.Callable[[], T_Result],
- xi: typing.Callable[[], T_Result],
- xj: typing.Callable[[], T_Result],
- xk: typing.Callable[[], T_Result],
- xl: typing.Callable[[], T_Result],
- xm: typing.Callable[[], T_Result],
- xn: typing.Callable[[], T_Result],
- xo: typing.Callable[[], T_Result],
- xp: typing.Callable[[], T_Result],
- xq: typing.Callable[[], T_Result],
- xr: typing.Callable[[], T_Result],
- xs: typing.Callable[[], T_Result],
- xt: typing.Callable[[], T_Result],
- xu: typing.Callable[[], T_Result],
- xv: typing.Callable[[], T_Result],
- xw: typing.Callable[[], T_Result],
- xy: typing.Callable[[], T_Result],
- xz: typing.Callable[[], T_Result],
- not_applicable: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CountryCode.AF:
- return af()
- if self is CountryCode.AL:
- return al()
- if self is CountryCode.DZ:
- return dz()
- if self is CountryCode.AS:
- return as_()
- if self is CountryCode.AD:
- return ad()
- if self is CountryCode.AO:
- return ao()
- if self is CountryCode.AI:
- return ai()
- if self is CountryCode.AQ:
- return aq()
- if self is CountryCode.AG:
- return ag()
- if self is CountryCode.AR:
- return ar()
- if self is CountryCode.AM:
- return am()
- if self is CountryCode.AW:
- return aw()
- if self is CountryCode.AU:
- return au()
- if self is CountryCode.AT:
- return at()
- if self is CountryCode.AZ:
- return az()
- if self is CountryCode.BS:
- return bs()
- if self is CountryCode.BH:
- return bh()
- if self is CountryCode.BD:
- return bd()
- if self is CountryCode.BB:
- return bb()
- if self is CountryCode.BY:
- return by()
- if self is CountryCode.BE:
- return be()
- if self is CountryCode.BZ:
- return bz()
- if self is CountryCode.BJ:
- return bj()
- if self is CountryCode.BM:
- return bm()
- if self is CountryCode.BT:
- return bt()
- if self is CountryCode.BO:
- return bo()
- if self is CountryCode.BQ:
- return bq()
- if self is CountryCode.BA:
- return ba()
- if self is CountryCode.BW:
- return bw()
- if self is CountryCode.BV:
- return bv()
- if self is CountryCode.BR:
- return br()
- if self is CountryCode.IO:
- return io()
- if self is CountryCode.BN:
- return bn()
- if self is CountryCode.BG:
- return bg()
- if self is CountryCode.BF:
- return bf()
- if self is CountryCode.BI:
- return bi()
- if self is CountryCode.CV:
- return cv()
- if self is CountryCode.KH:
- return kh()
- if self is CountryCode.CM:
- return cm()
- if self is CountryCode.CA:
- return ca()
- if self is CountryCode.KY:
- return ky()
- if self is CountryCode.CF:
- return cf()
- if self is CountryCode.TD:
- return td()
- if self is CountryCode.CL:
- return cl()
- if self is CountryCode.CN:
- return cn()
- if self is CountryCode.CX:
- return cx()
- if self is CountryCode.CC:
- return cc()
- if self is CountryCode.CO:
- return co()
- if self is CountryCode.KM:
- return km()
- if self is CountryCode.CD:
- return cd()
- if self is CountryCode.CG:
- return cg()
- if self is CountryCode.CK:
- return ck()
- if self is CountryCode.CR:
- return cr()
- if self is CountryCode.HR:
- return hr()
- if self is CountryCode.CU:
- return cu()
- if self is CountryCode.CW:
- return cw()
- if self is CountryCode.CY:
- return cy()
- if self is CountryCode.CZ:
- return cz()
- if self is CountryCode.CI:
- return ci()
- if self is CountryCode.DK:
- return dk()
- if self is CountryCode.DJ:
- return dj()
- if self is CountryCode.DM:
- return dm()
- if self is CountryCode.DO:
- return do()
- if self is CountryCode.EC:
- return ec()
- if self is CountryCode.EG:
- return eg()
- if self is CountryCode.SV:
- return sv()
- if self is CountryCode.GQ:
- return gq()
- if self is CountryCode.ER:
- return er()
- if self is CountryCode.EE:
- return ee()
- if self is CountryCode.SZ:
- return sz()
- if self is CountryCode.ET:
- return et()
- if self is CountryCode.FK:
- return fk()
- if self is CountryCode.FO:
- return fo()
- if self is CountryCode.FJ:
- return fj()
- if self is CountryCode.FI:
- return fi()
- if self is CountryCode.FR:
- return fr()
- if self is CountryCode.GF:
- return gf()
- if self is CountryCode.PF:
- return pf()
- if self is CountryCode.TF:
- return tf()
- if self is CountryCode.GA:
- return ga()
- if self is CountryCode.GM:
- return gm()
- if self is CountryCode.GE:
- return ge()
- if self is CountryCode.DE:
- return de()
- if self is CountryCode.GH:
- return gh()
- if self is CountryCode.GI:
- return gi()
- if self is CountryCode.GR:
- return gr()
- if self is CountryCode.GL:
- return gl()
- if self is CountryCode.GD:
- return gd()
- if self is CountryCode.GP:
- return gp()
- if self is CountryCode.GU:
- return gu()
- if self is CountryCode.GT:
- return gt()
- if self is CountryCode.GG:
- return gg()
- if self is CountryCode.GN:
- return gn()
- if self is CountryCode.GW:
- return gw()
- if self is CountryCode.GY:
- return gy()
- if self is CountryCode.HT:
- return ht()
- if self is CountryCode.HM:
- return hm()
- if self is CountryCode.VA:
- return va()
- if self is CountryCode.HN:
- return hn()
- if self is CountryCode.HK:
- return hk()
- if self is CountryCode.HU:
- return hu()
- if self is CountryCode.IS:
- return is_()
- if self is CountryCode.IN:
- return in_()
- if self is CountryCode.ID:
- return id()
- if self is CountryCode.IR:
- return ir()
- if self is CountryCode.IQ:
- return iq()
- if self is CountryCode.IE:
- return ie()
- if self is CountryCode.IM:
- return im()
- if self is CountryCode.IL:
- return il()
- if self is CountryCode.IT:
- return it()
- if self is CountryCode.JM:
- return jm()
- if self is CountryCode.JP:
- return jp()
- if self is CountryCode.JE:
- return je()
- if self is CountryCode.JO:
- return jo()
- if self is CountryCode.KZ:
- return kz()
- if self is CountryCode.KE:
- return ke()
- if self is CountryCode.KI:
- return ki()
- if self is CountryCode.KP:
- return kp()
- if self is CountryCode.KR:
- return kr()
- if self is CountryCode.KW:
- return kw()
- if self is CountryCode.KG:
- return kg()
- if self is CountryCode.LA:
- return la()
- if self is CountryCode.LV:
- return lv()
- if self is CountryCode.LB:
- return lb()
- if self is CountryCode.LS:
- return ls()
- if self is CountryCode.LR:
- return lr()
- if self is CountryCode.LY:
- return ly()
- if self is CountryCode.LI:
- return li()
- if self is CountryCode.LT:
- return lt()
- if self is CountryCode.LU:
- return lu()
- if self is CountryCode.MO:
- return mo()
- if self is CountryCode.MG:
- return mg()
- if self is CountryCode.MW:
- return mw()
- if self is CountryCode.MY:
- return my()
- if self is CountryCode.MV:
- return mv()
- if self is CountryCode.ML:
- return ml()
- if self is CountryCode.MT:
- return mt()
- if self is CountryCode.MH:
- return mh()
- if self is CountryCode.MQ:
- return mq()
- if self is CountryCode.MR:
- return mr()
- if self is CountryCode.MU:
- return mu()
- if self is CountryCode.YT:
- return yt()
- if self is CountryCode.MX:
- return mx()
- if self is CountryCode.FM:
- return fm()
- if self is CountryCode.MD:
- return md()
- if self is CountryCode.MC:
- return mc()
- if self is CountryCode.MN:
- return mn()
- if self is CountryCode.ME:
- return me()
- if self is CountryCode.MS:
- return ms()
- if self is CountryCode.MA:
- return ma()
- if self is CountryCode.MZ:
- return mz()
- if self is CountryCode.MM:
- return mm()
- if self is CountryCode.NA:
- return na()
- if self is CountryCode.NR:
- return nr()
- if self is CountryCode.NP:
- return np()
- if self is CountryCode.NL:
- return nl()
- if self is CountryCode.NC:
- return nc()
- if self is CountryCode.NZ:
- return nz()
- if self is CountryCode.NI:
- return ni()
- if self is CountryCode.NE:
- return ne()
- if self is CountryCode.NG:
- return ng()
- if self is CountryCode.NU:
- return nu()
- if self is CountryCode.NF:
- return nf()
- if self is CountryCode.MK:
- return mk()
- if self is CountryCode.MP:
- return mp()
- if self is CountryCode.NO:
- return no()
- if self is CountryCode.OM:
- return om()
- if self is CountryCode.PK:
- return pk()
- if self is CountryCode.PW:
- return pw()
- if self is CountryCode.PS:
- return ps()
- if self is CountryCode.PA:
- return pa()
- if self is CountryCode.PG:
- return pg()
- if self is CountryCode.PY:
- return py()
- if self is CountryCode.PE:
- return pe()
- if self is CountryCode.PH:
- return ph()
- if self is CountryCode.PN:
- return pn()
- if self is CountryCode.PL:
- return pl()
- if self is CountryCode.PT:
- return pt()
- if self is CountryCode.PR:
- return pr()
- if self is CountryCode.QA:
- return qa()
- if self is CountryCode.RO:
- return ro()
- if self is CountryCode.RU:
- return ru()
- if self is CountryCode.RW:
- return rw()
- if self is CountryCode.RE:
- return re()
- if self is CountryCode.BL:
- return bl()
- if self is CountryCode.SH:
- return sh()
- if self is CountryCode.KN:
- return kn()
- if self is CountryCode.LC:
- return lc()
- if self is CountryCode.MF:
- return mf()
- if self is CountryCode.PM:
- return pm()
- if self is CountryCode.VC:
- return vc()
- if self is CountryCode.WS:
- return ws()
- if self is CountryCode.SM:
- return sm()
- if self is CountryCode.ST:
- return st()
- if self is CountryCode.SA:
- return sa()
- if self is CountryCode.SN:
- return sn()
- if self is CountryCode.RS:
- return rs()
- if self is CountryCode.SC:
- return sc()
- if self is CountryCode.SL:
- return sl()
- if self is CountryCode.SG:
- return sg()
- if self is CountryCode.SX:
- return sx()
- if self is CountryCode.SK:
- return sk()
- if self is CountryCode.SI:
- return si()
- if self is CountryCode.SB:
- return sb()
- if self is CountryCode.SO:
- return so()
- if self is CountryCode.ZA:
- return za()
- if self is CountryCode.GS:
- return gs()
- if self is CountryCode.SS:
- return ss()
- if self is CountryCode.ES:
- return es()
- if self is CountryCode.LK:
- return lk()
- if self is CountryCode.SD:
- return sd()
- if self is CountryCode.SR:
- return sr()
- if self is CountryCode.SJ:
- return sj()
- if self is CountryCode.SE:
- return se()
- if self is CountryCode.CH:
- return ch()
- if self is CountryCode.SY:
- return sy()
- if self is CountryCode.TW:
- return tw()
- if self is CountryCode.TJ:
- return tj()
- if self is CountryCode.TZ:
- return tz()
- if self is CountryCode.TH:
- return th()
- if self is CountryCode.TL:
- return tl()
- if self is CountryCode.TG:
- return tg()
- if self is CountryCode.TK:
- return tk()
- if self is CountryCode.TO:
- return to()
- if self is CountryCode.TT:
- return tt()
- if self is CountryCode.TN:
- return tn()
- if self is CountryCode.TM:
- return tm()
- if self is CountryCode.TC:
- return tc()
- if self is CountryCode.TV:
- return tv()
- if self is CountryCode.TR:
- return tr()
- if self is CountryCode.UG:
- return ug()
- if self is CountryCode.UA:
- return ua()
- if self is CountryCode.AE:
- return ae()
- if self is CountryCode.GB:
- return gb()
- if self is CountryCode.UM:
- return um()
- if self is CountryCode.US:
- return us()
- if self is CountryCode.UY:
- return uy()
- if self is CountryCode.UZ:
- return uz()
- if self is CountryCode.VU:
- return vu()
- if self is CountryCode.VE:
- return ve()
- if self is CountryCode.VN:
- return vn()
- if self is CountryCode.VG:
- return vg()
- if self is CountryCode.VI:
- return vi()
- if self is CountryCode.WF:
- return wf()
- if self is CountryCode.EH:
- return eh()
- if self is CountryCode.YE:
- return ye()
- if self is CountryCode.ZM:
- return zm()
- if self is CountryCode.ZW:
- return zw()
- if self is CountryCode.AX:
- return ax()
- if self is CountryCode.XA:
- return xa()
- if self is CountryCode.XB:
- return xb()
- if self is CountryCode.XC:
- return xc()
- if self is CountryCode.XD:
- return xd()
- if self is CountryCode.XE:
- return xe()
- if self is CountryCode.XF:
- return xf()
- if self is CountryCode.XG:
- return xg()
- if self is CountryCode.XH:
- return xh()
- if self is CountryCode.XI:
- return xi()
- if self is CountryCode.XJ:
- return xj()
- if self is CountryCode.XK:
- return xk()
- if self is CountryCode.XL:
- return xl()
- if self is CountryCode.XM:
- return xm()
- if self is CountryCode.XN:
- return xn()
- if self is CountryCode.XO:
- return xo()
- if self is CountryCode.XP:
- return xp()
- if self is CountryCode.XQ:
- return xq()
- if self is CountryCode.XR:
- return xr()
- if self is CountryCode.XS:
- return xs()
- if self is CountryCode.XT:
- return xt()
- if self is CountryCode.XU:
- return xu()
- if self is CountryCode.XV:
- return xv()
- if self is CountryCode.XW:
- return xw()
- if self is CountryCode.XY:
- return xy()
- if self is CountryCode.XZ:
- return xz()
- if self is CountryCode.NOT_APPLICABLE:
- return not_applicable()
+CountryCode = typing.Union[
+ typing.Literal[
+ "AF",
+ "AL",
+ "DZ",
+ "AS",
+ "AD",
+ "AO",
+ "AI",
+ "AQ",
+ "AG",
+ "AR",
+ "AM",
+ "AW",
+ "AU",
+ "AT",
+ "AZ",
+ "BS",
+ "BH",
+ "BD",
+ "BB",
+ "BY",
+ "BE",
+ "BZ",
+ "BJ",
+ "BM",
+ "BT",
+ "BO",
+ "BQ",
+ "BA",
+ "BW",
+ "BV",
+ "BR",
+ "IO",
+ "BN",
+ "BG",
+ "BF",
+ "BI",
+ "CV",
+ "KH",
+ "CM",
+ "CA",
+ "KY",
+ "CF",
+ "TD",
+ "CL",
+ "CN",
+ "CX",
+ "CC",
+ "CO",
+ "KM",
+ "CD",
+ "CG",
+ "CK",
+ "CR",
+ "HR",
+ "CU",
+ "CW",
+ "CY",
+ "CZ",
+ "CI",
+ "DK",
+ "DJ",
+ "DM",
+ "DO",
+ "EC",
+ "EG",
+ "SV",
+ "GQ",
+ "ER",
+ "EE",
+ "SZ",
+ "ET",
+ "FK",
+ "FO",
+ "FJ",
+ "FI",
+ "FR",
+ "GF",
+ "PF",
+ "TF",
+ "GA",
+ "GM",
+ "GE",
+ "DE",
+ "GH",
+ "GI",
+ "GR",
+ "GL",
+ "GD",
+ "GP",
+ "GU",
+ "GT",
+ "GG",
+ "GN",
+ "GW",
+ "GY",
+ "HT",
+ "HM",
+ "VA",
+ "HN",
+ "HK",
+ "HU",
+ "IS",
+ "IN",
+ "ID",
+ "IR",
+ "IQ",
+ "IE",
+ "IM",
+ "IL",
+ "IT",
+ "JM",
+ "JP",
+ "JE",
+ "JO",
+ "KZ",
+ "KE",
+ "KI",
+ "KP",
+ "KR",
+ "KW",
+ "KG",
+ "LA",
+ "LV",
+ "LB",
+ "LS",
+ "LR",
+ "LY",
+ "LI",
+ "LT",
+ "LU",
+ "MO",
+ "MG",
+ "MW",
+ "MY",
+ "MV",
+ "ML",
+ "MT",
+ "MH",
+ "MQ",
+ "MR",
+ "MU",
+ "YT",
+ "MX",
+ "FM",
+ "MD",
+ "MC",
+ "MN",
+ "ME",
+ "MS",
+ "MA",
+ "MZ",
+ "MM",
+ "NA",
+ "NR",
+ "NP",
+ "NL",
+ "NC",
+ "NZ",
+ "NI",
+ "NE",
+ "NG",
+ "NU",
+ "NF",
+ "MK",
+ "MP",
+ "NO",
+ "OM",
+ "PK",
+ "PW",
+ "PS",
+ "PA",
+ "PG",
+ "PY",
+ "PE",
+ "PH",
+ "PN",
+ "PL",
+ "PT",
+ "PR",
+ "QA",
+ "RO",
+ "RU",
+ "RW",
+ "RE",
+ "BL",
+ "SH",
+ "KN",
+ "LC",
+ "MF",
+ "PM",
+ "VC",
+ "WS",
+ "SM",
+ "ST",
+ "SA",
+ "SN",
+ "RS",
+ "SC",
+ "SL",
+ "SG",
+ "SX",
+ "SK",
+ "SI",
+ "SB",
+ "SO",
+ "ZA",
+ "GS",
+ "SS",
+ "ES",
+ "LK",
+ "SD",
+ "SR",
+ "SJ",
+ "SE",
+ "CH",
+ "SY",
+ "TW",
+ "TJ",
+ "TZ",
+ "TH",
+ "TL",
+ "TG",
+ "TK",
+ "TO",
+ "TT",
+ "TN",
+ "TM",
+ "TC",
+ "TV",
+ "TR",
+ "UG",
+ "UA",
+ "AE",
+ "GB",
+ "UM",
+ "US",
+ "UY",
+ "UZ",
+ "VU",
+ "VE",
+ "VN",
+ "VG",
+ "VI",
+ "WF",
+ "EH",
+ "YE",
+ "ZM",
+ "ZW",
+ "AX",
+ "XA",
+ "XB",
+ "XC",
+ "XD",
+ "XE",
+ "XF",
+ "XG",
+ "XH",
+ "XI",
+ "XJ",
+ "XK",
+ "XL",
+ "XM",
+ "XN",
+ "XO",
+ "XP",
+ "XQ",
+ "XR",
+ "XS",
+ "XT",
+ "XU",
+ "XV",
+ "XW",
+ "XY",
+ "XZ",
+ "N/A",
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/types/cra_risk_level_updated_details.py b/src/flagright/types/cra_risk_level_updated_details.py
index 02ca508..2ce1578 100644
--- a/src/flagright/types/cra_risk_level_updated_details.py
+++ b/src/flagright/types/cra_risk_level_updated_details.py
@@ -1,30 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class CraRiskLevelUpdatedDetails(UniversalBaseModel):
+ risk_level: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="riskLevel")] = None
+ user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userId")] = None
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
-class CraRiskLevelUpdatedDetails(pydantic.BaseModel):
- risk_level: typing.Optional[str] = pydantic.Field(alias="riskLevel")
- user_id: typing.Optional[str] = pydantic.Field(alias="userId")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/currency_code.py b/src/flagright/types/currency_code.py
index 91b0f79..8d97bae 100644
--- a/src/flagright/types/currency_code.py
+++ b/src/flagright/types/currency_code.py
@@ -1,1913 +1,484 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CurrencyCode(str, enum.Enum):
- ONE_INCH = "1INCH"
- AAVE = "AAVE"
- ABT = "ABT"
- ACH = "ACH"
- ACS = "ACS"
- ADA = "ADA"
- AED = "AED"
- AERGO = "AERGO"
- AERO = "AERO"
- AFN = "AFN"
- AGLD = "AGLD"
- AIOZ = "AIOZ"
- ALCX = "ALCX"
- ALEPH = "ALEPH"
- ALGO = "ALGO"
- ALICE = "ALICE"
- ALL = "ALL"
- AMD = "AMD"
- AMP = "AMP"
- ANG = "ANG"
- ANKR = "ANKR"
- ANT = "ANT"
- AOA = "AOA"
- APE = "APE"
- API_3 = "API3"
- APT = "APT"
- ARB = "ARB"
- ARPA = "ARPA"
- ARS = "ARS"
- ASM = "ASM"
- AST = "AST"
- ATA = "ATA"
- ATOM = "ATOM"
- AUCTION = "AUCTION"
- AUD = "AUD"
- AUDIO = "AUDIO"
- AURORA = "AURORA"
- AVAX = "AVAX"
- AVT = "AVT"
- AWG = "AWG"
- AXL = "AXL"
- AXS = "AXS"
- AZN = "AZN"
- BADGER = "BADGER"
- BAL = "BAL"
- BAM = "BAM"
- BAND = "BAND"
- BAT = "BAT"
- BBD = "BBD"
- BCH = "BCH"
- BDT = "BDT"
- BGN = "BGN"
- BHD = "BHD"
- BICO = "BICO"
- BIF = "BIF"
- BIGTIME = "BIGTIME"
- BIT = "BIT"
- BLUR = "BLUR"
- BLZ = "BLZ"
- BMD = "BMD"
- BND = "BND"
- BNT = "BNT"
- BOB = "BOB"
- BOBA = "BOBA"
- BOND = "BOND"
- BONK = "BONK"
- BRL = "BRL"
- BSD = "BSD"
- BSV = "BSV"
- BTC = "BTC"
- BTN = "BTN"
- BTRST = "BTRST"
- BUSD = "BUSD"
- BWP = "BWP"
- BYN = "BYN"
- BYR = "BYR"
- BZD = "BZD"
- C_98 = "C98"
- CAD = "CAD"
- CBETH = "CBETH"
- CDF = "CDF"
- CELR = "CELR"
- CGLD = "CGLD"
- CHF = "CHF"
- CHZ = "CHZ"
- CLF = "CLF"
- CLP = "CLP"
- CLV = "CLV"
- CNH = "CNH"
- CNY = "CNY"
- COMP = "COMP"
- COP = "COP"
- COTI = "COTI"
- COVAL = "COVAL"
- CRC = "CRC"
- CRO = "CRO"
- CRPT = "CRPT"
- CRV = "CRV"
- CTSI = "CTSI"
- CTX = "CTX"
- CUC = "CUC"
- CUP = "CUP"
- CVC = "CVC"
- CVE = "CVE"
- CVX = "CVX"
- CZK = "CZK"
- DAI = "DAI"
- DAR = "DAR"
- DASH = "DASH"
- DDX = "DDX"
- DESO = "DESO"
- DEXT = "DEXT"
- DIA = "DIA"
- DIMO = "DIMO"
- DJF = "DJF"
- DKK = "DKK"
- DNT = "DNT"
- DOGE = "DOGE"
- DOP = "DOP"
- DOT = "DOT"
- DREP = "DREP"
- DYP = "DYP"
- DZD = "DZD"
- EEK = "EEK"
- EGLD = "EGLD"
- EGP = "EGP"
- ELA = "ELA"
- ENJ = "ENJ"
- ENS = "ENS"
- EOS = "EOS"
- ERN = "ERN"
- ETB = "ETB"
- ETC = "ETC"
- ETH = "ETH"
- ETH_2 = "ETH2"
- EUR = "EUR"
- EUROC = "EUROC"
- FARM = "FARM"
- FET = "FET"
- FIDA = "FIDA"
- FIL = "FIL"
- FIS = "FIS"
- FJD = "FJD"
- FKP = "FKP"
- FLOW = "FLOW"
- FLR = "FLR"
- FORT = "FORT"
- FORTH = "FORTH"
- FOX = "FOX"
- FX = "FX"
- GAL = "GAL"
- GALA = "GALA"
- GBP = "GBP"
- GEL = "GEL"
- GFI = "GFI"
- GGP = "GGP"
- GHS = "GHS"
- GHST = "GHST"
- GIP = "GIP"
- GLM = "GLM"
- GMD = "GMD"
- GMT = "GMT"
- GNF = "GNF"
- GNO = "GNO"
- GNT = "GNT"
- GODS = "GODS"
- GRT = "GRT"
- GST = "GST"
- GTC = "GTC"
- GTQ = "GTQ"
- GUSD = "GUSD"
- GYD = "GYD"
- GYEN = "GYEN"
- HBAR = "HBAR"
- HFT = "HFT"
- HIGH = "HIGH"
- HKD = "HKD"
- HNL = "HNL"
- HNT = "HNT"
- HONEY = "HONEY"
- HOPR = "HOPR"
- HRK = "HRK"
- HTG = "HTG"
- HUF = "HUF"
- ICP = "ICP"
- IDEX = "IDEX"
- IDR = "IDR"
- ILS = "ILS"
- ILV = "ILV"
- IMP = "IMP"
- IMX = "IMX"
- INDEX = "INDEX"
- INJ = "INJ"
- INR = "INR"
- INV = "INV"
- IOTX = "IOTX"
- IQD = "IQD"
- IRR = "IRR"
- ISK = "ISK"
- JASMY = "JASMY"
- JEP = "JEP"
- JMD = "JMD"
- JOD = "JOD"
- JPY = "JPY"
- JTO = "JTO"
- JUP = "JUP"
- KAVA = "KAVA"
- KEEP = "KEEP"
- KES = "KES"
- KGS = "KGS"
- KHR = "KHR"
- KMF = "KMF"
- KNC = "KNC"
- KPW = "KPW"
- KRL = "KRL"
- KRW = "KRW"
- KSM = "KSM"
- KWD = "KWD"
- KYD = "KYD"
- KZT = "KZT"
- LAK = "LAK"
- LBP = "LBP"
- LCX = "LCX"
- LDO = "LDO"
- LINK = "LINK"
- LIT = "LIT"
- LKR = "LKR"
- LOKA = "LOKA"
- LOOM = "LOOM"
- LPT = "LPT"
- LQTY = "LQTY"
- LRC = "LRC"
- LRD = "LRD"
- LSETH = "LSETH"
- LSL = "LSL"
- LTC = "LTC"
- LTL = "LTL"
- LVL = "LVL"
- LYD = "LYD"
- MAD = "MAD"
- MAGIC = "MAGIC"
- MANA = "MANA"
- MASK = "MASK"
- MATH = "MATH"
- MATIC = "MATIC"
- MCO_2 = "MCO2"
- MDL = "MDL"
- MDT = "MDT"
- MEDIA = "MEDIA"
- METIS = "METIS"
- MGA = "MGA"
- MINA = "MINA"
- MIR = "MIR"
- MKD = "MKD"
- MKR = "MKR"
- MLN = "MLN"
- MMK = "MMK"
- MNDE = "MNDE"
- MNT = "MNT"
- MOBILE = "MOBILE"
- MONA = "MONA"
- MOP = "MOP"
- MPL = "MPL"
- MRO = "MRO"
- MRU = "MRU"
- MSOL = "MSOL"
- MTL = "MTL"
- MULTI = "MULTI"
- MUR = "MUR"
- MUSE = "MUSE"
- MVR = "MVR"
- MWK = "MWK"
- MXC = "MXC"
- MXN = "MXN"
- MYR = "MYR"
- MZN = "MZN"
- NAD = "NAD"
- NCT = "NCT"
- NEAR = "NEAR"
- NEST = "NEST"
- NGN = "NGN"
- NIO = "NIO"
- NKN = "NKN"
- NMR = "NMR"
- NOK = "NOK"
- NPR = "NPR"
- NU = "NU"
- NZD = "NZD"
- OCEAN = "OCEAN"
- OGN = "OGN"
- OMG = "OMG"
- OMR = "OMR"
- ONDO = "ONDO"
- OOKI = "OOKI"
- OP = "OP"
- ORCA = "ORCA"
- ORN = "ORN"
- OSMO = "OSMO"
- OXT = "OXT"
- PAB = "PAB"
- PAX = "PAX"
- PEN = "PEN"
- PERP = "PERP"
- PGK = "PGK"
- PHP = "PHP"
- PKR = "PKR"
- PLA = "PLA"
- PLN = "PLN"
- PLU = "PLU"
- PNG = "PNG"
- POLS = "POLS"
- POLY = "POLY"
- POND = "POND"
- POWR = "POWR"
- PRIME = "PRIME"
- PRO = "PRO"
- PRQ = "PRQ"
- PUNDIX = "PUNDIX"
- PYG = "PYG"
- PYR = "PYR"
- PYUSD = "PYUSD"
- QAR = "QAR"
- QI = "QI"
- QNT = "QNT"
- QSP = "QSP"
- QUICK = "QUICK"
- RAD = "RAD"
- RAI = "RAI"
- RARE = "RARE"
- RARI = "RARI"
- RBN = "RBN"
- REN = "REN"
- RENDER = "RENDER"
- REP = "REP"
- REPV_2 = "REPV2"
- REQ = "REQ"
- RGT = "RGT"
- RLC = "RLC"
- RLY = "RLY"
- RNDR = "RNDR"
- RON = "RON"
- ROSE = "ROSE"
- RPL = "RPL"
- RSD = "RSD"
- RUB = "RUB"
- RWF = "RWF"
- SAND = "SAND"
- SAR = "SAR"
- SBD = "SBD"
- SCR = "SCR"
- SDG = "SDG"
- SEAM = "SEAM"
- SEI = "SEI"
- SEK = "SEK"
- SGD = "SGD"
- SHIB = "SHIB"
- SHP = "SHP"
- SHPING = "SHPING"
- SKK = "SKK"
- SKL = "SKL"
- SLL = "SLL"
- SNT = "SNT"
- SNX = "SNX"
- SOL = "SOL"
- SOS = "SOS"
- SPA = "SPA"
- SPELL = "SPELL"
- SRD = "SRD"
- SSP = "SSP"
- STD = "STD"
- STG = "STG"
- STORJ = "STORJ"
- STRK = "STRK"
- STX = "STX"
- SUI = "SUI"
- SUKU = "SUKU"
- SUPER = "SUPER"
- SUSHI = "SUSHI"
- SVC = "SVC"
- SWFTC = "SWFTC"
- SYLO = "SYLO"
- SYN = "SYN"
- SYP = "SYP"
- SZL = "SZL"
- T = "T"
- THB = "THB"
- TIA = "TIA"
- TIME = "TIME"
- TJS = "TJS"
- TMM = "TMM"
- TMT = "TMT"
- TND = "TND"
- TONE = "TONE"
- TOP = "TOP"
- TRAC = "TRAC"
- TRB = "TRB"
- TRIBE = "TRIBE"
- TRU = "TRU"
- TRY = "TRY"
- TTD = "TTD"
- TVK = "TVK"
- TWD = "TWD"
- TZS = "TZS"
- UAH = "UAH"
- UGX = "UGX"
- UMA = "UMA"
- UNFI = "UNFI"
- UNI = "UNI"
- UPI = "UPI"
- USD = "USD"
- USDC = "USDC"
- USDT = "USDT"
- UST = "UST"
- UYU = "UYU"
- UZS = "UZS"
- VARA = "VARA"
- VEF = "VEF"
- VELO = "VELO"
- VES = "VES"
- VET = "VET"
- VGX = "VGX"
- VND = "VND"
- VOXEL = "VOXEL"
- VTHO = "VTHO"
- VUV = "VUV"
- WAMPL = "WAMPL"
- WAXL = "WAXL"
- WBTC = "WBTC"
- WCFG = "WCFG"
- WLUNA = "WLUNA"
- WST = "WST"
- XAF = "XAF"
- XAG = "XAG"
- XAU = "XAU"
- XCD = "XCD"
- XCN = "XCN"
- XDR = "XDR"
- XLM = "XLM"
- XMON = "XMON"
- XOF = "XOF"
- XPD = "XPD"
- XPF = "XPF"
- XPT = "XPT"
- XRP = "XRP"
- XTZ = "XTZ"
- XYO = "XYO"
- YER = "YER"
- YFI = "YFI"
- YFII = "YFII"
- ZAR = "ZAR"
- ZEC = "ZEC"
- ZEN = "ZEN"
- ZETA = "ZETA"
- ZMK = "ZMK"
- ZMW = "ZMW"
- ZRX = "ZRX"
- ZWD = "ZWD"
- FDUSD = "FDUSD"
- AGX = "AGX"
- AUX = "AUX"
- BNB = "BNB"
- CUBE = "CUBE"
- EMON = "EMON"
- FDGT = "FDGT"
- KGLD = "KGLD"
- LODE = "LODE"
- PASS = "PASS"
- PREMIA = "PREMIA"
- TAB_1 = "TAB1"
- TD_USD = "TD-USD"
- TRX = "TRX"
- TYUGA = "TYUGA"
- VIC = "VIC"
- XAI = "XAI"
- SLE = "SLE"
-
- def visit(
- self,
- one_inch: typing.Callable[[], T_Result],
- aave: typing.Callable[[], T_Result],
- abt: typing.Callable[[], T_Result],
- ach: typing.Callable[[], T_Result],
- acs: typing.Callable[[], T_Result],
- ada: typing.Callable[[], T_Result],
- aed: typing.Callable[[], T_Result],
- aergo: typing.Callable[[], T_Result],
- aero: typing.Callable[[], T_Result],
- afn: typing.Callable[[], T_Result],
- agld: typing.Callable[[], T_Result],
- aioz: typing.Callable[[], T_Result],
- alcx: typing.Callable[[], T_Result],
- aleph: typing.Callable[[], T_Result],
- algo: typing.Callable[[], T_Result],
- alice: typing.Callable[[], T_Result],
- all_: typing.Callable[[], T_Result],
- amd: typing.Callable[[], T_Result],
- amp: typing.Callable[[], T_Result],
- ang: typing.Callable[[], T_Result],
- ankr: typing.Callable[[], T_Result],
- ant: typing.Callable[[], T_Result],
- aoa: typing.Callable[[], T_Result],
- ape: typing.Callable[[], T_Result],
- api_3: typing.Callable[[], T_Result],
- apt: typing.Callable[[], T_Result],
- arb: typing.Callable[[], T_Result],
- arpa: typing.Callable[[], T_Result],
- ars: typing.Callable[[], T_Result],
- asm: typing.Callable[[], T_Result],
- ast: typing.Callable[[], T_Result],
- ata: typing.Callable[[], T_Result],
- atom: typing.Callable[[], T_Result],
- auction: typing.Callable[[], T_Result],
- aud: typing.Callable[[], T_Result],
- audio: typing.Callable[[], T_Result],
- aurora: typing.Callable[[], T_Result],
- avax: typing.Callable[[], T_Result],
- avt: typing.Callable[[], T_Result],
- awg: typing.Callable[[], T_Result],
- axl: typing.Callable[[], T_Result],
- axs: typing.Callable[[], T_Result],
- azn: typing.Callable[[], T_Result],
- badger: typing.Callable[[], T_Result],
- bal: typing.Callable[[], T_Result],
- bam: typing.Callable[[], T_Result],
- band: typing.Callable[[], T_Result],
- bat: typing.Callable[[], T_Result],
- bbd: typing.Callable[[], T_Result],
- bch: typing.Callable[[], T_Result],
- bdt: typing.Callable[[], T_Result],
- bgn: typing.Callable[[], T_Result],
- bhd: typing.Callable[[], T_Result],
- bico: typing.Callable[[], T_Result],
- bif: typing.Callable[[], T_Result],
- bigtime: typing.Callable[[], T_Result],
- bit: typing.Callable[[], T_Result],
- blur: typing.Callable[[], T_Result],
- blz: typing.Callable[[], T_Result],
- bmd: typing.Callable[[], T_Result],
- bnd: typing.Callable[[], T_Result],
- bnt: typing.Callable[[], T_Result],
- bob: typing.Callable[[], T_Result],
- boba: typing.Callable[[], T_Result],
- bond: typing.Callable[[], T_Result],
- bonk: typing.Callable[[], T_Result],
- brl: typing.Callable[[], T_Result],
- bsd: typing.Callable[[], T_Result],
- bsv: typing.Callable[[], T_Result],
- btc: typing.Callable[[], T_Result],
- btn: typing.Callable[[], T_Result],
- btrst: typing.Callable[[], T_Result],
- busd: typing.Callable[[], T_Result],
- bwp: typing.Callable[[], T_Result],
- byn: typing.Callable[[], T_Result],
- byr: typing.Callable[[], T_Result],
- bzd: typing.Callable[[], T_Result],
- c_98: typing.Callable[[], T_Result],
- cad: typing.Callable[[], T_Result],
- cbeth: typing.Callable[[], T_Result],
- cdf: typing.Callable[[], T_Result],
- celr: typing.Callable[[], T_Result],
- cgld: typing.Callable[[], T_Result],
- chf: typing.Callable[[], T_Result],
- chz: typing.Callable[[], T_Result],
- clf: typing.Callable[[], T_Result],
- clp: typing.Callable[[], T_Result],
- clv: typing.Callable[[], T_Result],
- cnh: typing.Callable[[], T_Result],
- cny: typing.Callable[[], T_Result],
- comp: typing.Callable[[], T_Result],
- cop: typing.Callable[[], T_Result],
- coti: typing.Callable[[], T_Result],
- coval: typing.Callable[[], T_Result],
- crc: typing.Callable[[], T_Result],
- cro: typing.Callable[[], T_Result],
- crpt: typing.Callable[[], T_Result],
- crv: typing.Callable[[], T_Result],
- ctsi: typing.Callable[[], T_Result],
- ctx: typing.Callable[[], T_Result],
- cuc: typing.Callable[[], T_Result],
- cup: typing.Callable[[], T_Result],
- cvc: typing.Callable[[], T_Result],
- cve: typing.Callable[[], T_Result],
- cvx: typing.Callable[[], T_Result],
- czk: typing.Callable[[], T_Result],
- dai: typing.Callable[[], T_Result],
- dar: typing.Callable[[], T_Result],
- dash: typing.Callable[[], T_Result],
- ddx: typing.Callable[[], T_Result],
- deso: typing.Callable[[], T_Result],
- dext: typing.Callable[[], T_Result],
- dia: typing.Callable[[], T_Result],
- dimo: typing.Callable[[], T_Result],
- djf: typing.Callable[[], T_Result],
- dkk: typing.Callable[[], T_Result],
- dnt: typing.Callable[[], T_Result],
- doge: typing.Callable[[], T_Result],
- dop: typing.Callable[[], T_Result],
- dot: typing.Callable[[], T_Result],
- drep: typing.Callable[[], T_Result],
- dyp: typing.Callable[[], T_Result],
- dzd: typing.Callable[[], T_Result],
- eek: typing.Callable[[], T_Result],
- egld: typing.Callable[[], T_Result],
- egp: typing.Callable[[], T_Result],
- ela: typing.Callable[[], T_Result],
- enj: typing.Callable[[], T_Result],
- ens: typing.Callable[[], T_Result],
- eos: typing.Callable[[], T_Result],
- ern: typing.Callable[[], T_Result],
- etb: typing.Callable[[], T_Result],
- etc: typing.Callable[[], T_Result],
- eth: typing.Callable[[], T_Result],
- eth_2: typing.Callable[[], T_Result],
- eur: typing.Callable[[], T_Result],
- euroc: typing.Callable[[], T_Result],
- farm: typing.Callable[[], T_Result],
- fet: typing.Callable[[], T_Result],
- fida: typing.Callable[[], T_Result],
- fil: typing.Callable[[], T_Result],
- fis: typing.Callable[[], T_Result],
- fjd: typing.Callable[[], T_Result],
- fkp: typing.Callable[[], T_Result],
- flow: typing.Callable[[], T_Result],
- flr: typing.Callable[[], T_Result],
- fort: typing.Callable[[], T_Result],
- forth: typing.Callable[[], T_Result],
- fox: typing.Callable[[], T_Result],
- fx: typing.Callable[[], T_Result],
- gal: typing.Callable[[], T_Result],
- gala: typing.Callable[[], T_Result],
- gbp: typing.Callable[[], T_Result],
- gel: typing.Callable[[], T_Result],
- gfi: typing.Callable[[], T_Result],
- ggp: typing.Callable[[], T_Result],
- ghs: typing.Callable[[], T_Result],
- ghst: typing.Callable[[], T_Result],
- gip: typing.Callable[[], T_Result],
- glm: typing.Callable[[], T_Result],
- gmd: typing.Callable[[], T_Result],
- gmt: typing.Callable[[], T_Result],
- gnf: typing.Callable[[], T_Result],
- gno: typing.Callable[[], T_Result],
- gnt: typing.Callable[[], T_Result],
- gods: typing.Callable[[], T_Result],
- grt: typing.Callable[[], T_Result],
- gst: typing.Callable[[], T_Result],
- gtc: typing.Callable[[], T_Result],
- gtq: typing.Callable[[], T_Result],
- gusd: typing.Callable[[], T_Result],
- gyd: typing.Callable[[], T_Result],
- gyen: typing.Callable[[], T_Result],
- hbar: typing.Callable[[], T_Result],
- hft: typing.Callable[[], T_Result],
- high: typing.Callable[[], T_Result],
- hkd: typing.Callable[[], T_Result],
- hnl: typing.Callable[[], T_Result],
- hnt: typing.Callable[[], T_Result],
- honey: typing.Callable[[], T_Result],
- hopr: typing.Callable[[], T_Result],
- hrk: typing.Callable[[], T_Result],
- htg: typing.Callable[[], T_Result],
- huf: typing.Callable[[], T_Result],
- icp: typing.Callable[[], T_Result],
- idex: typing.Callable[[], T_Result],
- idr: typing.Callable[[], T_Result],
- ils: typing.Callable[[], T_Result],
- ilv: typing.Callable[[], T_Result],
- imp: typing.Callable[[], T_Result],
- imx: typing.Callable[[], T_Result],
- index: typing.Callable[[], T_Result],
- inj: typing.Callable[[], T_Result],
- inr: typing.Callable[[], T_Result],
- inv: typing.Callable[[], T_Result],
- iotx: typing.Callable[[], T_Result],
- iqd: typing.Callable[[], T_Result],
- irr: typing.Callable[[], T_Result],
- isk: typing.Callable[[], T_Result],
- jasmy: typing.Callable[[], T_Result],
- jep: typing.Callable[[], T_Result],
- jmd: typing.Callable[[], T_Result],
- jod: typing.Callable[[], T_Result],
- jpy: typing.Callable[[], T_Result],
- jto: typing.Callable[[], T_Result],
- jup: typing.Callable[[], T_Result],
- kava: typing.Callable[[], T_Result],
- keep: typing.Callable[[], T_Result],
- kes: typing.Callable[[], T_Result],
- kgs: typing.Callable[[], T_Result],
- khr: typing.Callable[[], T_Result],
- kmf: typing.Callable[[], T_Result],
- knc: typing.Callable[[], T_Result],
- kpw: typing.Callable[[], T_Result],
- krl: typing.Callable[[], T_Result],
- krw: typing.Callable[[], T_Result],
- ksm: typing.Callable[[], T_Result],
- kwd: typing.Callable[[], T_Result],
- kyd: typing.Callable[[], T_Result],
- kzt: typing.Callable[[], T_Result],
- lak: typing.Callable[[], T_Result],
- lbp: typing.Callable[[], T_Result],
- lcx: typing.Callable[[], T_Result],
- ldo: typing.Callable[[], T_Result],
- link: typing.Callable[[], T_Result],
- lit: typing.Callable[[], T_Result],
- lkr: typing.Callable[[], T_Result],
- loka: typing.Callable[[], T_Result],
- loom: typing.Callable[[], T_Result],
- lpt: typing.Callable[[], T_Result],
- lqty: typing.Callable[[], T_Result],
- lrc: typing.Callable[[], T_Result],
- lrd: typing.Callable[[], T_Result],
- lseth: typing.Callable[[], T_Result],
- lsl: typing.Callable[[], T_Result],
- ltc: typing.Callable[[], T_Result],
- ltl: typing.Callable[[], T_Result],
- lvl: typing.Callable[[], T_Result],
- lyd: typing.Callable[[], T_Result],
- mad: typing.Callable[[], T_Result],
- magic: typing.Callable[[], T_Result],
- mana: typing.Callable[[], T_Result],
- mask: typing.Callable[[], T_Result],
- math: typing.Callable[[], T_Result],
- matic: typing.Callable[[], T_Result],
- mco_2: typing.Callable[[], T_Result],
- mdl: typing.Callable[[], T_Result],
- mdt: typing.Callable[[], T_Result],
- media: typing.Callable[[], T_Result],
- metis: typing.Callable[[], T_Result],
- mga: typing.Callable[[], T_Result],
- mina: typing.Callable[[], T_Result],
- mir: typing.Callable[[], T_Result],
- mkd: typing.Callable[[], T_Result],
- mkr: typing.Callable[[], T_Result],
- mln: typing.Callable[[], T_Result],
- mmk: typing.Callable[[], T_Result],
- mnde: typing.Callable[[], T_Result],
- mnt: typing.Callable[[], T_Result],
- mobile: typing.Callable[[], T_Result],
- mona: typing.Callable[[], T_Result],
- mop: typing.Callable[[], T_Result],
- mpl: typing.Callable[[], T_Result],
- mro: typing.Callable[[], T_Result],
- mru: typing.Callable[[], T_Result],
- msol: typing.Callable[[], T_Result],
- mtl: typing.Callable[[], T_Result],
- multi: typing.Callable[[], T_Result],
- mur: typing.Callable[[], T_Result],
- muse: typing.Callable[[], T_Result],
- mvr: typing.Callable[[], T_Result],
- mwk: typing.Callable[[], T_Result],
- mxc: typing.Callable[[], T_Result],
- mxn: typing.Callable[[], T_Result],
- myr: typing.Callable[[], T_Result],
- mzn: typing.Callable[[], T_Result],
- nad: typing.Callable[[], T_Result],
- nct: typing.Callable[[], T_Result],
- near: typing.Callable[[], T_Result],
- nest: typing.Callable[[], T_Result],
- ngn: typing.Callable[[], T_Result],
- nio: typing.Callable[[], T_Result],
- nkn: typing.Callable[[], T_Result],
- nmr: typing.Callable[[], T_Result],
- nok: typing.Callable[[], T_Result],
- npr: typing.Callable[[], T_Result],
- nu: typing.Callable[[], T_Result],
- nzd: typing.Callable[[], T_Result],
- ocean: typing.Callable[[], T_Result],
- ogn: typing.Callable[[], T_Result],
- omg: typing.Callable[[], T_Result],
- omr: typing.Callable[[], T_Result],
- ondo: typing.Callable[[], T_Result],
- ooki: typing.Callable[[], T_Result],
- op: typing.Callable[[], T_Result],
- orca: typing.Callable[[], T_Result],
- orn: typing.Callable[[], T_Result],
- osmo: typing.Callable[[], T_Result],
- oxt: typing.Callable[[], T_Result],
- pab: typing.Callable[[], T_Result],
- pax: typing.Callable[[], T_Result],
- pen: typing.Callable[[], T_Result],
- perp: typing.Callable[[], T_Result],
- pgk: typing.Callable[[], T_Result],
- php: typing.Callable[[], T_Result],
- pkr: typing.Callable[[], T_Result],
- pla: typing.Callable[[], T_Result],
- pln: typing.Callable[[], T_Result],
- plu: typing.Callable[[], T_Result],
- png: typing.Callable[[], T_Result],
- pols: typing.Callable[[], T_Result],
- poly: typing.Callable[[], T_Result],
- pond: typing.Callable[[], T_Result],
- powr: typing.Callable[[], T_Result],
- prime: typing.Callable[[], T_Result],
- pro: typing.Callable[[], T_Result],
- prq: typing.Callable[[], T_Result],
- pundix: typing.Callable[[], T_Result],
- pyg: typing.Callable[[], T_Result],
- pyr: typing.Callable[[], T_Result],
- pyusd: typing.Callable[[], T_Result],
- qar: typing.Callable[[], T_Result],
- qi: typing.Callable[[], T_Result],
- qnt: typing.Callable[[], T_Result],
- qsp: typing.Callable[[], T_Result],
- quick: typing.Callable[[], T_Result],
- rad: typing.Callable[[], T_Result],
- rai: typing.Callable[[], T_Result],
- rare: typing.Callable[[], T_Result],
- rari: typing.Callable[[], T_Result],
- rbn: typing.Callable[[], T_Result],
- ren: typing.Callable[[], T_Result],
- render: typing.Callable[[], T_Result],
- rep: typing.Callable[[], T_Result],
- repv_2: typing.Callable[[], T_Result],
- req: typing.Callable[[], T_Result],
- rgt: typing.Callable[[], T_Result],
- rlc: typing.Callable[[], T_Result],
- rly: typing.Callable[[], T_Result],
- rndr: typing.Callable[[], T_Result],
- ron: typing.Callable[[], T_Result],
- rose: typing.Callable[[], T_Result],
- rpl: typing.Callable[[], T_Result],
- rsd: typing.Callable[[], T_Result],
- rub: typing.Callable[[], T_Result],
- rwf: typing.Callable[[], T_Result],
- sand: typing.Callable[[], T_Result],
- sar: typing.Callable[[], T_Result],
- sbd: typing.Callable[[], T_Result],
- scr: typing.Callable[[], T_Result],
- sdg: typing.Callable[[], T_Result],
- seam: typing.Callable[[], T_Result],
- sei: typing.Callable[[], T_Result],
- sek: typing.Callable[[], T_Result],
- sgd: typing.Callable[[], T_Result],
- shib: typing.Callable[[], T_Result],
- shp: typing.Callable[[], T_Result],
- shping: typing.Callable[[], T_Result],
- skk: typing.Callable[[], T_Result],
- skl: typing.Callable[[], T_Result],
- sll: typing.Callable[[], T_Result],
- snt: typing.Callable[[], T_Result],
- snx: typing.Callable[[], T_Result],
- sol: typing.Callable[[], T_Result],
- sos: typing.Callable[[], T_Result],
- spa: typing.Callable[[], T_Result],
- spell: typing.Callable[[], T_Result],
- srd: typing.Callable[[], T_Result],
- ssp: typing.Callable[[], T_Result],
- std: typing.Callable[[], T_Result],
- stg: typing.Callable[[], T_Result],
- storj: typing.Callable[[], T_Result],
- strk: typing.Callable[[], T_Result],
- stx: typing.Callable[[], T_Result],
- sui: typing.Callable[[], T_Result],
- suku: typing.Callable[[], T_Result],
- super: typing.Callable[[], T_Result],
- sushi: typing.Callable[[], T_Result],
- svc: typing.Callable[[], T_Result],
- swftc: typing.Callable[[], T_Result],
- sylo: typing.Callable[[], T_Result],
- syn: typing.Callable[[], T_Result],
- syp: typing.Callable[[], T_Result],
- szl: typing.Callable[[], T_Result],
- t: typing.Callable[[], T_Result],
- thb: typing.Callable[[], T_Result],
- tia: typing.Callable[[], T_Result],
- time: typing.Callable[[], T_Result],
- tjs: typing.Callable[[], T_Result],
- tmm: typing.Callable[[], T_Result],
- tmt: typing.Callable[[], T_Result],
- tnd: typing.Callable[[], T_Result],
- tone: typing.Callable[[], T_Result],
- top: typing.Callable[[], T_Result],
- trac: typing.Callable[[], T_Result],
- trb: typing.Callable[[], T_Result],
- tribe: typing.Callable[[], T_Result],
- tru: typing.Callable[[], T_Result],
- try_: typing.Callable[[], T_Result],
- ttd: typing.Callable[[], T_Result],
- tvk: typing.Callable[[], T_Result],
- twd: typing.Callable[[], T_Result],
- tzs: typing.Callable[[], T_Result],
- uah: typing.Callable[[], T_Result],
- ugx: typing.Callable[[], T_Result],
- uma: typing.Callable[[], T_Result],
- unfi: typing.Callable[[], T_Result],
- uni: typing.Callable[[], T_Result],
- upi: typing.Callable[[], T_Result],
- usd: typing.Callable[[], T_Result],
- usdc: typing.Callable[[], T_Result],
- usdt: typing.Callable[[], T_Result],
- ust: typing.Callable[[], T_Result],
- uyu: typing.Callable[[], T_Result],
- uzs: typing.Callable[[], T_Result],
- vara: typing.Callable[[], T_Result],
- vef: typing.Callable[[], T_Result],
- velo: typing.Callable[[], T_Result],
- ves: typing.Callable[[], T_Result],
- vet: typing.Callable[[], T_Result],
- vgx: typing.Callable[[], T_Result],
- vnd: typing.Callable[[], T_Result],
- voxel: typing.Callable[[], T_Result],
- vtho: typing.Callable[[], T_Result],
- vuv: typing.Callable[[], T_Result],
- wampl: typing.Callable[[], T_Result],
- waxl: typing.Callable[[], T_Result],
- wbtc: typing.Callable[[], T_Result],
- wcfg: typing.Callable[[], T_Result],
- wluna: typing.Callable[[], T_Result],
- wst: typing.Callable[[], T_Result],
- xaf: typing.Callable[[], T_Result],
- xag: typing.Callable[[], T_Result],
- xau: typing.Callable[[], T_Result],
- xcd: typing.Callable[[], T_Result],
- xcn: typing.Callable[[], T_Result],
- xdr: typing.Callable[[], T_Result],
- xlm: typing.Callable[[], T_Result],
- xmon: typing.Callable[[], T_Result],
- xof: typing.Callable[[], T_Result],
- xpd: typing.Callable[[], T_Result],
- xpf: typing.Callable[[], T_Result],
- xpt: typing.Callable[[], T_Result],
- xrp: typing.Callable[[], T_Result],
- xtz: typing.Callable[[], T_Result],
- xyo: typing.Callable[[], T_Result],
- yer: typing.Callable[[], T_Result],
- yfi: typing.Callable[[], T_Result],
- yfii: typing.Callable[[], T_Result],
- zar: typing.Callable[[], T_Result],
- zec: typing.Callable[[], T_Result],
- zen: typing.Callable[[], T_Result],
- zeta: typing.Callable[[], T_Result],
- zmk: typing.Callable[[], T_Result],
- zmw: typing.Callable[[], T_Result],
- zrx: typing.Callable[[], T_Result],
- zwd: typing.Callable[[], T_Result],
- fdusd: typing.Callable[[], T_Result],
- agx: typing.Callable[[], T_Result],
- aux: typing.Callable[[], T_Result],
- bnb: typing.Callable[[], T_Result],
- cube: typing.Callable[[], T_Result],
- emon: typing.Callable[[], T_Result],
- fdgt: typing.Callable[[], T_Result],
- kgld: typing.Callable[[], T_Result],
- lode: typing.Callable[[], T_Result],
- pass_: typing.Callable[[], T_Result],
- premia: typing.Callable[[], T_Result],
- tab_1: typing.Callable[[], T_Result],
- td_usd: typing.Callable[[], T_Result],
- trx: typing.Callable[[], T_Result],
- tyuga: typing.Callable[[], T_Result],
- vic: typing.Callable[[], T_Result],
- xai: typing.Callable[[], T_Result],
- sle: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CurrencyCode.ONE_INCH:
- return one_inch()
- if self is CurrencyCode.AAVE:
- return aave()
- if self is CurrencyCode.ABT:
- return abt()
- if self is CurrencyCode.ACH:
- return ach()
- if self is CurrencyCode.ACS:
- return acs()
- if self is CurrencyCode.ADA:
- return ada()
- if self is CurrencyCode.AED:
- return aed()
- if self is CurrencyCode.AERGO:
- return aergo()
- if self is CurrencyCode.AERO:
- return aero()
- if self is CurrencyCode.AFN:
- return afn()
- if self is CurrencyCode.AGLD:
- return agld()
- if self is CurrencyCode.AIOZ:
- return aioz()
- if self is CurrencyCode.ALCX:
- return alcx()
- if self is CurrencyCode.ALEPH:
- return aleph()
- if self is CurrencyCode.ALGO:
- return algo()
- if self is CurrencyCode.ALICE:
- return alice()
- if self is CurrencyCode.ALL:
- return all_()
- if self is CurrencyCode.AMD:
- return amd()
- if self is CurrencyCode.AMP:
- return amp()
- if self is CurrencyCode.ANG:
- return ang()
- if self is CurrencyCode.ANKR:
- return ankr()
- if self is CurrencyCode.ANT:
- return ant()
- if self is CurrencyCode.AOA:
- return aoa()
- if self is CurrencyCode.APE:
- return ape()
- if self is CurrencyCode.API_3:
- return api_3()
- if self is CurrencyCode.APT:
- return apt()
- if self is CurrencyCode.ARB:
- return arb()
- if self is CurrencyCode.ARPA:
- return arpa()
- if self is CurrencyCode.ARS:
- return ars()
- if self is CurrencyCode.ASM:
- return asm()
- if self is CurrencyCode.AST:
- return ast()
- if self is CurrencyCode.ATA:
- return ata()
- if self is CurrencyCode.ATOM:
- return atom()
- if self is CurrencyCode.AUCTION:
- return auction()
- if self is CurrencyCode.AUD:
- return aud()
- if self is CurrencyCode.AUDIO:
- return audio()
- if self is CurrencyCode.AURORA:
- return aurora()
- if self is CurrencyCode.AVAX:
- return avax()
- if self is CurrencyCode.AVT:
- return avt()
- if self is CurrencyCode.AWG:
- return awg()
- if self is CurrencyCode.AXL:
- return axl()
- if self is CurrencyCode.AXS:
- return axs()
- if self is CurrencyCode.AZN:
- return azn()
- if self is CurrencyCode.BADGER:
- return badger()
- if self is CurrencyCode.BAL:
- return bal()
- if self is CurrencyCode.BAM:
- return bam()
- if self is CurrencyCode.BAND:
- return band()
- if self is CurrencyCode.BAT:
- return bat()
- if self is CurrencyCode.BBD:
- return bbd()
- if self is CurrencyCode.BCH:
- return bch()
- if self is CurrencyCode.BDT:
- return bdt()
- if self is CurrencyCode.BGN:
- return bgn()
- if self is CurrencyCode.BHD:
- return bhd()
- if self is CurrencyCode.BICO:
- return bico()
- if self is CurrencyCode.BIF:
- return bif()
- if self is CurrencyCode.BIGTIME:
- return bigtime()
- if self is CurrencyCode.BIT:
- return bit()
- if self is CurrencyCode.BLUR:
- return blur()
- if self is CurrencyCode.BLZ:
- return blz()
- if self is CurrencyCode.BMD:
- return bmd()
- if self is CurrencyCode.BND:
- return bnd()
- if self is CurrencyCode.BNT:
- return bnt()
- if self is CurrencyCode.BOB:
- return bob()
- if self is CurrencyCode.BOBA:
- return boba()
- if self is CurrencyCode.BOND:
- return bond()
- if self is CurrencyCode.BONK:
- return bonk()
- if self is CurrencyCode.BRL:
- return brl()
- if self is CurrencyCode.BSD:
- return bsd()
- if self is CurrencyCode.BSV:
- return bsv()
- if self is CurrencyCode.BTC:
- return btc()
- if self is CurrencyCode.BTN:
- return btn()
- if self is CurrencyCode.BTRST:
- return btrst()
- if self is CurrencyCode.BUSD:
- return busd()
- if self is CurrencyCode.BWP:
- return bwp()
- if self is CurrencyCode.BYN:
- return byn()
- if self is CurrencyCode.BYR:
- return byr()
- if self is CurrencyCode.BZD:
- return bzd()
- if self is CurrencyCode.C_98:
- return c_98()
- if self is CurrencyCode.CAD:
- return cad()
- if self is CurrencyCode.CBETH:
- return cbeth()
- if self is CurrencyCode.CDF:
- return cdf()
- if self is CurrencyCode.CELR:
- return celr()
- if self is CurrencyCode.CGLD:
- return cgld()
- if self is CurrencyCode.CHF:
- return chf()
- if self is CurrencyCode.CHZ:
- return chz()
- if self is CurrencyCode.CLF:
- return clf()
- if self is CurrencyCode.CLP:
- return clp()
- if self is CurrencyCode.CLV:
- return clv()
- if self is CurrencyCode.CNH:
- return cnh()
- if self is CurrencyCode.CNY:
- return cny()
- if self is CurrencyCode.COMP:
- return comp()
- if self is CurrencyCode.COP:
- return cop()
- if self is CurrencyCode.COTI:
- return coti()
- if self is CurrencyCode.COVAL:
- return coval()
- if self is CurrencyCode.CRC:
- return crc()
- if self is CurrencyCode.CRO:
- return cro()
- if self is CurrencyCode.CRPT:
- return crpt()
- if self is CurrencyCode.CRV:
- return crv()
- if self is CurrencyCode.CTSI:
- return ctsi()
- if self is CurrencyCode.CTX:
- return ctx()
- if self is CurrencyCode.CUC:
- return cuc()
- if self is CurrencyCode.CUP:
- return cup()
- if self is CurrencyCode.CVC:
- return cvc()
- if self is CurrencyCode.CVE:
- return cve()
- if self is CurrencyCode.CVX:
- return cvx()
- if self is CurrencyCode.CZK:
- return czk()
- if self is CurrencyCode.DAI:
- return dai()
- if self is CurrencyCode.DAR:
- return dar()
- if self is CurrencyCode.DASH:
- return dash()
- if self is CurrencyCode.DDX:
- return ddx()
- if self is CurrencyCode.DESO:
- return deso()
- if self is CurrencyCode.DEXT:
- return dext()
- if self is CurrencyCode.DIA:
- return dia()
- if self is CurrencyCode.DIMO:
- return dimo()
- if self is CurrencyCode.DJF:
- return djf()
- if self is CurrencyCode.DKK:
- return dkk()
- if self is CurrencyCode.DNT:
- return dnt()
- if self is CurrencyCode.DOGE:
- return doge()
- if self is CurrencyCode.DOP:
- return dop()
- if self is CurrencyCode.DOT:
- return dot()
- if self is CurrencyCode.DREP:
- return drep()
- if self is CurrencyCode.DYP:
- return dyp()
- if self is CurrencyCode.DZD:
- return dzd()
- if self is CurrencyCode.EEK:
- return eek()
- if self is CurrencyCode.EGLD:
- return egld()
- if self is CurrencyCode.EGP:
- return egp()
- if self is CurrencyCode.ELA:
- return ela()
- if self is CurrencyCode.ENJ:
- return enj()
- if self is CurrencyCode.ENS:
- return ens()
- if self is CurrencyCode.EOS:
- return eos()
- if self is CurrencyCode.ERN:
- return ern()
- if self is CurrencyCode.ETB:
- return etb()
- if self is CurrencyCode.ETC:
- return etc()
- if self is CurrencyCode.ETH:
- return eth()
- if self is CurrencyCode.ETH_2:
- return eth_2()
- if self is CurrencyCode.EUR:
- return eur()
- if self is CurrencyCode.EUROC:
- return euroc()
- if self is CurrencyCode.FARM:
- return farm()
- if self is CurrencyCode.FET:
- return fet()
- if self is CurrencyCode.FIDA:
- return fida()
- if self is CurrencyCode.FIL:
- return fil()
- if self is CurrencyCode.FIS:
- return fis()
- if self is CurrencyCode.FJD:
- return fjd()
- if self is CurrencyCode.FKP:
- return fkp()
- if self is CurrencyCode.FLOW:
- return flow()
- if self is CurrencyCode.FLR:
- return flr()
- if self is CurrencyCode.FORT:
- return fort()
- if self is CurrencyCode.FORTH:
- return forth()
- if self is CurrencyCode.FOX:
- return fox()
- if self is CurrencyCode.FX:
- return fx()
- if self is CurrencyCode.GAL:
- return gal()
- if self is CurrencyCode.GALA:
- return gala()
- if self is CurrencyCode.GBP:
- return gbp()
- if self is CurrencyCode.GEL:
- return gel()
- if self is CurrencyCode.GFI:
- return gfi()
- if self is CurrencyCode.GGP:
- return ggp()
- if self is CurrencyCode.GHS:
- return ghs()
- if self is CurrencyCode.GHST:
- return ghst()
- if self is CurrencyCode.GIP:
- return gip()
- if self is CurrencyCode.GLM:
- return glm()
- if self is CurrencyCode.GMD:
- return gmd()
- if self is CurrencyCode.GMT:
- return gmt()
- if self is CurrencyCode.GNF:
- return gnf()
- if self is CurrencyCode.GNO:
- return gno()
- if self is CurrencyCode.GNT:
- return gnt()
- if self is CurrencyCode.GODS:
- return gods()
- if self is CurrencyCode.GRT:
- return grt()
- if self is CurrencyCode.GST:
- return gst()
- if self is CurrencyCode.GTC:
- return gtc()
- if self is CurrencyCode.GTQ:
- return gtq()
- if self is CurrencyCode.GUSD:
- return gusd()
- if self is CurrencyCode.GYD:
- return gyd()
- if self is CurrencyCode.GYEN:
- return gyen()
- if self is CurrencyCode.HBAR:
- return hbar()
- if self is CurrencyCode.HFT:
- return hft()
- if self is CurrencyCode.HIGH:
- return high()
- if self is CurrencyCode.HKD:
- return hkd()
- if self is CurrencyCode.HNL:
- return hnl()
- if self is CurrencyCode.HNT:
- return hnt()
- if self is CurrencyCode.HONEY:
- return honey()
- if self is CurrencyCode.HOPR:
- return hopr()
- if self is CurrencyCode.HRK:
- return hrk()
- if self is CurrencyCode.HTG:
- return htg()
- if self is CurrencyCode.HUF:
- return huf()
- if self is CurrencyCode.ICP:
- return icp()
- if self is CurrencyCode.IDEX:
- return idex()
- if self is CurrencyCode.IDR:
- return idr()
- if self is CurrencyCode.ILS:
- return ils()
- if self is CurrencyCode.ILV:
- return ilv()
- if self is CurrencyCode.IMP:
- return imp()
- if self is CurrencyCode.IMX:
- return imx()
- if self is CurrencyCode.INDEX:
- return index()
- if self is CurrencyCode.INJ:
- return inj()
- if self is CurrencyCode.INR:
- return inr()
- if self is CurrencyCode.INV:
- return inv()
- if self is CurrencyCode.IOTX:
- return iotx()
- if self is CurrencyCode.IQD:
- return iqd()
- if self is CurrencyCode.IRR:
- return irr()
- if self is CurrencyCode.ISK:
- return isk()
- if self is CurrencyCode.JASMY:
- return jasmy()
- if self is CurrencyCode.JEP:
- return jep()
- if self is CurrencyCode.JMD:
- return jmd()
- if self is CurrencyCode.JOD:
- return jod()
- if self is CurrencyCode.JPY:
- return jpy()
- if self is CurrencyCode.JTO:
- return jto()
- if self is CurrencyCode.JUP:
- return jup()
- if self is CurrencyCode.KAVA:
- return kava()
- if self is CurrencyCode.KEEP:
- return keep()
- if self is CurrencyCode.KES:
- return kes()
- if self is CurrencyCode.KGS:
- return kgs()
- if self is CurrencyCode.KHR:
- return khr()
- if self is CurrencyCode.KMF:
- return kmf()
- if self is CurrencyCode.KNC:
- return knc()
- if self is CurrencyCode.KPW:
- return kpw()
- if self is CurrencyCode.KRL:
- return krl()
- if self is CurrencyCode.KRW:
- return krw()
- if self is CurrencyCode.KSM:
- return ksm()
- if self is CurrencyCode.KWD:
- return kwd()
- if self is CurrencyCode.KYD:
- return kyd()
- if self is CurrencyCode.KZT:
- return kzt()
- if self is CurrencyCode.LAK:
- return lak()
- if self is CurrencyCode.LBP:
- return lbp()
- if self is CurrencyCode.LCX:
- return lcx()
- if self is CurrencyCode.LDO:
- return ldo()
- if self is CurrencyCode.LINK:
- return link()
- if self is CurrencyCode.LIT:
- return lit()
- if self is CurrencyCode.LKR:
- return lkr()
- if self is CurrencyCode.LOKA:
- return loka()
- if self is CurrencyCode.LOOM:
- return loom()
- if self is CurrencyCode.LPT:
- return lpt()
- if self is CurrencyCode.LQTY:
- return lqty()
- if self is CurrencyCode.LRC:
- return lrc()
- if self is CurrencyCode.LRD:
- return lrd()
- if self is CurrencyCode.LSETH:
- return lseth()
- if self is CurrencyCode.LSL:
- return lsl()
- if self is CurrencyCode.LTC:
- return ltc()
- if self is CurrencyCode.LTL:
- return ltl()
- if self is CurrencyCode.LVL:
- return lvl()
- if self is CurrencyCode.LYD:
- return lyd()
- if self is CurrencyCode.MAD:
- return mad()
- if self is CurrencyCode.MAGIC:
- return magic()
- if self is CurrencyCode.MANA:
- return mana()
- if self is CurrencyCode.MASK:
- return mask()
- if self is CurrencyCode.MATH:
- return math()
- if self is CurrencyCode.MATIC:
- return matic()
- if self is CurrencyCode.MCO_2:
- return mco_2()
- if self is CurrencyCode.MDL:
- return mdl()
- if self is CurrencyCode.MDT:
- return mdt()
- if self is CurrencyCode.MEDIA:
- return media()
- if self is CurrencyCode.METIS:
- return metis()
- if self is CurrencyCode.MGA:
- return mga()
- if self is CurrencyCode.MINA:
- return mina()
- if self is CurrencyCode.MIR:
- return mir()
- if self is CurrencyCode.MKD:
- return mkd()
- if self is CurrencyCode.MKR:
- return mkr()
- if self is CurrencyCode.MLN:
- return mln()
- if self is CurrencyCode.MMK:
- return mmk()
- if self is CurrencyCode.MNDE:
- return mnde()
- if self is CurrencyCode.MNT:
- return mnt()
- if self is CurrencyCode.MOBILE:
- return mobile()
- if self is CurrencyCode.MONA:
- return mona()
- if self is CurrencyCode.MOP:
- return mop()
- if self is CurrencyCode.MPL:
- return mpl()
- if self is CurrencyCode.MRO:
- return mro()
- if self is CurrencyCode.MRU:
- return mru()
- if self is CurrencyCode.MSOL:
- return msol()
- if self is CurrencyCode.MTL:
- return mtl()
- if self is CurrencyCode.MULTI:
- return multi()
- if self is CurrencyCode.MUR:
- return mur()
- if self is CurrencyCode.MUSE:
- return muse()
- if self is CurrencyCode.MVR:
- return mvr()
- if self is CurrencyCode.MWK:
- return mwk()
- if self is CurrencyCode.MXC:
- return mxc()
- if self is CurrencyCode.MXN:
- return mxn()
- if self is CurrencyCode.MYR:
- return myr()
- if self is CurrencyCode.MZN:
- return mzn()
- if self is CurrencyCode.NAD:
- return nad()
- if self is CurrencyCode.NCT:
- return nct()
- if self is CurrencyCode.NEAR:
- return near()
- if self is CurrencyCode.NEST:
- return nest()
- if self is CurrencyCode.NGN:
- return ngn()
- if self is CurrencyCode.NIO:
- return nio()
- if self is CurrencyCode.NKN:
- return nkn()
- if self is CurrencyCode.NMR:
- return nmr()
- if self is CurrencyCode.NOK:
- return nok()
- if self is CurrencyCode.NPR:
- return npr()
- if self is CurrencyCode.NU:
- return nu()
- if self is CurrencyCode.NZD:
- return nzd()
- if self is CurrencyCode.OCEAN:
- return ocean()
- if self is CurrencyCode.OGN:
- return ogn()
- if self is CurrencyCode.OMG:
- return omg()
- if self is CurrencyCode.OMR:
- return omr()
- if self is CurrencyCode.ONDO:
- return ondo()
- if self is CurrencyCode.OOKI:
- return ooki()
- if self is CurrencyCode.OP:
- return op()
- if self is CurrencyCode.ORCA:
- return orca()
- if self is CurrencyCode.ORN:
- return orn()
- if self is CurrencyCode.OSMO:
- return osmo()
- if self is CurrencyCode.OXT:
- return oxt()
- if self is CurrencyCode.PAB:
- return pab()
- if self is CurrencyCode.PAX:
- return pax()
- if self is CurrencyCode.PEN:
- return pen()
- if self is CurrencyCode.PERP:
- return perp()
- if self is CurrencyCode.PGK:
- return pgk()
- if self is CurrencyCode.PHP:
- return php()
- if self is CurrencyCode.PKR:
- return pkr()
- if self is CurrencyCode.PLA:
- return pla()
- if self is CurrencyCode.PLN:
- return pln()
- if self is CurrencyCode.PLU:
- return plu()
- if self is CurrencyCode.PNG:
- return png()
- if self is CurrencyCode.POLS:
- return pols()
- if self is CurrencyCode.POLY:
- return poly()
- if self is CurrencyCode.POND:
- return pond()
- if self is CurrencyCode.POWR:
- return powr()
- if self is CurrencyCode.PRIME:
- return prime()
- if self is CurrencyCode.PRO:
- return pro()
- if self is CurrencyCode.PRQ:
- return prq()
- if self is CurrencyCode.PUNDIX:
- return pundix()
- if self is CurrencyCode.PYG:
- return pyg()
- if self is CurrencyCode.PYR:
- return pyr()
- if self is CurrencyCode.PYUSD:
- return pyusd()
- if self is CurrencyCode.QAR:
- return qar()
- if self is CurrencyCode.QI:
- return qi()
- if self is CurrencyCode.QNT:
- return qnt()
- if self is CurrencyCode.QSP:
- return qsp()
- if self is CurrencyCode.QUICK:
- return quick()
- if self is CurrencyCode.RAD:
- return rad()
- if self is CurrencyCode.RAI:
- return rai()
- if self is CurrencyCode.RARE:
- return rare()
- if self is CurrencyCode.RARI:
- return rari()
- if self is CurrencyCode.RBN:
- return rbn()
- if self is CurrencyCode.REN:
- return ren()
- if self is CurrencyCode.RENDER:
- return render()
- if self is CurrencyCode.REP:
- return rep()
- if self is CurrencyCode.REPV_2:
- return repv_2()
- if self is CurrencyCode.REQ:
- return req()
- if self is CurrencyCode.RGT:
- return rgt()
- if self is CurrencyCode.RLC:
- return rlc()
- if self is CurrencyCode.RLY:
- return rly()
- if self is CurrencyCode.RNDR:
- return rndr()
- if self is CurrencyCode.RON:
- return ron()
- if self is CurrencyCode.ROSE:
- return rose()
- if self is CurrencyCode.RPL:
- return rpl()
- if self is CurrencyCode.RSD:
- return rsd()
- if self is CurrencyCode.RUB:
- return rub()
- if self is CurrencyCode.RWF:
- return rwf()
- if self is CurrencyCode.SAND:
- return sand()
- if self is CurrencyCode.SAR:
- return sar()
- if self is CurrencyCode.SBD:
- return sbd()
- if self is CurrencyCode.SCR:
- return scr()
- if self is CurrencyCode.SDG:
- return sdg()
- if self is CurrencyCode.SEAM:
- return seam()
- if self is CurrencyCode.SEI:
- return sei()
- if self is CurrencyCode.SEK:
- return sek()
- if self is CurrencyCode.SGD:
- return sgd()
- if self is CurrencyCode.SHIB:
- return shib()
- if self is CurrencyCode.SHP:
- return shp()
- if self is CurrencyCode.SHPING:
- return shping()
- if self is CurrencyCode.SKK:
- return skk()
- if self is CurrencyCode.SKL:
- return skl()
- if self is CurrencyCode.SLL:
- return sll()
- if self is CurrencyCode.SNT:
- return snt()
- if self is CurrencyCode.SNX:
- return snx()
- if self is CurrencyCode.SOL:
- return sol()
- if self is CurrencyCode.SOS:
- return sos()
- if self is CurrencyCode.SPA:
- return spa()
- if self is CurrencyCode.SPELL:
- return spell()
- if self is CurrencyCode.SRD:
- return srd()
- if self is CurrencyCode.SSP:
- return ssp()
- if self is CurrencyCode.STD:
- return std()
- if self is CurrencyCode.STG:
- return stg()
- if self is CurrencyCode.STORJ:
- return storj()
- if self is CurrencyCode.STRK:
- return strk()
- if self is CurrencyCode.STX:
- return stx()
- if self is CurrencyCode.SUI:
- return sui()
- if self is CurrencyCode.SUKU:
- return suku()
- if self is CurrencyCode.SUPER:
- return super()
- if self is CurrencyCode.SUSHI:
- return sushi()
- if self is CurrencyCode.SVC:
- return svc()
- if self is CurrencyCode.SWFTC:
- return swftc()
- if self is CurrencyCode.SYLO:
- return sylo()
- if self is CurrencyCode.SYN:
- return syn()
- if self is CurrencyCode.SYP:
- return syp()
- if self is CurrencyCode.SZL:
- return szl()
- if self is CurrencyCode.T:
- return t()
- if self is CurrencyCode.THB:
- return thb()
- if self is CurrencyCode.TIA:
- return tia()
- if self is CurrencyCode.TIME:
- return time()
- if self is CurrencyCode.TJS:
- return tjs()
- if self is CurrencyCode.TMM:
- return tmm()
- if self is CurrencyCode.TMT:
- return tmt()
- if self is CurrencyCode.TND:
- return tnd()
- if self is CurrencyCode.TONE:
- return tone()
- if self is CurrencyCode.TOP:
- return top()
- if self is CurrencyCode.TRAC:
- return trac()
- if self is CurrencyCode.TRB:
- return trb()
- if self is CurrencyCode.TRIBE:
- return tribe()
- if self is CurrencyCode.TRU:
- return tru()
- if self is CurrencyCode.TRY:
- return try_()
- if self is CurrencyCode.TTD:
- return ttd()
- if self is CurrencyCode.TVK:
- return tvk()
- if self is CurrencyCode.TWD:
- return twd()
- if self is CurrencyCode.TZS:
- return tzs()
- if self is CurrencyCode.UAH:
- return uah()
- if self is CurrencyCode.UGX:
- return ugx()
- if self is CurrencyCode.UMA:
- return uma()
- if self is CurrencyCode.UNFI:
- return unfi()
- if self is CurrencyCode.UNI:
- return uni()
- if self is CurrencyCode.UPI:
- return upi()
- if self is CurrencyCode.USD:
- return usd()
- if self is CurrencyCode.USDC:
- return usdc()
- if self is CurrencyCode.USDT:
- return usdt()
- if self is CurrencyCode.UST:
- return ust()
- if self is CurrencyCode.UYU:
- return uyu()
- if self is CurrencyCode.UZS:
- return uzs()
- if self is CurrencyCode.VARA:
- return vara()
- if self is CurrencyCode.VEF:
- return vef()
- if self is CurrencyCode.VELO:
- return velo()
- if self is CurrencyCode.VES:
- return ves()
- if self is CurrencyCode.VET:
- return vet()
- if self is CurrencyCode.VGX:
- return vgx()
- if self is CurrencyCode.VND:
- return vnd()
- if self is CurrencyCode.VOXEL:
- return voxel()
- if self is CurrencyCode.VTHO:
- return vtho()
- if self is CurrencyCode.VUV:
- return vuv()
- if self is CurrencyCode.WAMPL:
- return wampl()
- if self is CurrencyCode.WAXL:
- return waxl()
- if self is CurrencyCode.WBTC:
- return wbtc()
- if self is CurrencyCode.WCFG:
- return wcfg()
- if self is CurrencyCode.WLUNA:
- return wluna()
- if self is CurrencyCode.WST:
- return wst()
- if self is CurrencyCode.XAF:
- return xaf()
- if self is CurrencyCode.XAG:
- return xag()
- if self is CurrencyCode.XAU:
- return xau()
- if self is CurrencyCode.XCD:
- return xcd()
- if self is CurrencyCode.XCN:
- return xcn()
- if self is CurrencyCode.XDR:
- return xdr()
- if self is CurrencyCode.XLM:
- return xlm()
- if self is CurrencyCode.XMON:
- return xmon()
- if self is CurrencyCode.XOF:
- return xof()
- if self is CurrencyCode.XPD:
- return xpd()
- if self is CurrencyCode.XPF:
- return xpf()
- if self is CurrencyCode.XPT:
- return xpt()
- if self is CurrencyCode.XRP:
- return xrp()
- if self is CurrencyCode.XTZ:
- return xtz()
- if self is CurrencyCode.XYO:
- return xyo()
- if self is CurrencyCode.YER:
- return yer()
- if self is CurrencyCode.YFI:
- return yfi()
- if self is CurrencyCode.YFII:
- return yfii()
- if self is CurrencyCode.ZAR:
- return zar()
- if self is CurrencyCode.ZEC:
- return zec()
- if self is CurrencyCode.ZEN:
- return zen()
- if self is CurrencyCode.ZETA:
- return zeta()
- if self is CurrencyCode.ZMK:
- return zmk()
- if self is CurrencyCode.ZMW:
- return zmw()
- if self is CurrencyCode.ZRX:
- return zrx()
- if self is CurrencyCode.ZWD:
- return zwd()
- if self is CurrencyCode.FDUSD:
- return fdusd()
- if self is CurrencyCode.AGX:
- return agx()
- if self is CurrencyCode.AUX:
- return aux()
- if self is CurrencyCode.BNB:
- return bnb()
- if self is CurrencyCode.CUBE:
- return cube()
- if self is CurrencyCode.EMON:
- return emon()
- if self is CurrencyCode.FDGT:
- return fdgt()
- if self is CurrencyCode.KGLD:
- return kgld()
- if self is CurrencyCode.LODE:
- return lode()
- if self is CurrencyCode.PASS:
- return pass_()
- if self is CurrencyCode.PREMIA:
- return premia()
- if self is CurrencyCode.TAB_1:
- return tab_1()
- if self is CurrencyCode.TD_USD:
- return td_usd()
- if self is CurrencyCode.TRX:
- return trx()
- if self is CurrencyCode.TYUGA:
- return tyuga()
- if self is CurrencyCode.VIC:
- return vic()
- if self is CurrencyCode.XAI:
- return xai()
- if self is CurrencyCode.SLE:
- return sle()
+CurrencyCode = typing.Union[
+ typing.Literal[
+ "1INCH",
+ "AAVE",
+ "ABT",
+ "ACH",
+ "ACS",
+ "ADA",
+ "AED",
+ "AERGO",
+ "AERO",
+ "AFN",
+ "AGLD",
+ "AIOZ",
+ "ALCX",
+ "ALEPH",
+ "ALGO",
+ "ALICE",
+ "ALL",
+ "AMD",
+ "AMP",
+ "ANG",
+ "ANKR",
+ "ANT",
+ "AOA",
+ "APE",
+ "API3",
+ "APT",
+ "ARB",
+ "ARPA",
+ "ARS",
+ "ASM",
+ "AST",
+ "ATA",
+ "ATOM",
+ "AUCTION",
+ "AUD",
+ "AUDIO",
+ "AURORA",
+ "AVAX",
+ "AVT",
+ "AWG",
+ "AXL",
+ "AXS",
+ "AZN",
+ "BADGER",
+ "BAL",
+ "BAM",
+ "BAND",
+ "BAT",
+ "BBD",
+ "BCH",
+ "BDT",
+ "BGN",
+ "BHD",
+ "BICO",
+ "BIF",
+ "BIGTIME",
+ "BIT",
+ "BLUR",
+ "BLZ",
+ "BMD",
+ "BND",
+ "BNT",
+ "BOB",
+ "BOBA",
+ "BOND",
+ "BONK",
+ "BRL",
+ "BSD",
+ "BSV",
+ "BTC",
+ "BTN",
+ "BTRST",
+ "BUSD",
+ "BWP",
+ "BYN",
+ "BYR",
+ "BZD",
+ "C98",
+ "CAD",
+ "CBETH",
+ "CDF",
+ "CELR",
+ "CGLD",
+ "CHF",
+ "CHZ",
+ "CLF",
+ "CLP",
+ "CLV",
+ "CNH",
+ "CNY",
+ "COMP",
+ "COP",
+ "COTI",
+ "COVAL",
+ "CRC",
+ "CRO",
+ "CRPT",
+ "CRV",
+ "CTSI",
+ "CTX",
+ "CUC",
+ "CUP",
+ "CVC",
+ "CVE",
+ "CVX",
+ "CZK",
+ "DAI",
+ "DAR",
+ "DASH",
+ "DDX",
+ "DESO",
+ "DEXT",
+ "DIA",
+ "DIMO",
+ "DJF",
+ "DKK",
+ "DNT",
+ "DOGE",
+ "DOP",
+ "DOT",
+ "DREP",
+ "DYP",
+ "DZD",
+ "EEK",
+ "EGLD",
+ "EGP",
+ "ELA",
+ "ENJ",
+ "ENS",
+ "EOS",
+ "ERN",
+ "ETB",
+ "ETC",
+ "ETH",
+ "ETH2",
+ "EUR",
+ "EUROC",
+ "FARM",
+ "FET",
+ "FIDA",
+ "FIL",
+ "FIS",
+ "FJD",
+ "FKP",
+ "FLOW",
+ "FLR",
+ "FORT",
+ "FORTH",
+ "FOX",
+ "FX",
+ "GAL",
+ "GALA",
+ "GBP",
+ "GEL",
+ "GFI",
+ "GGP",
+ "GHS",
+ "GHST",
+ "GIP",
+ "GLM",
+ "GMD",
+ "GMT",
+ "GNF",
+ "GNO",
+ "GNT",
+ "GODS",
+ "GRT",
+ "GST",
+ "GTC",
+ "GTQ",
+ "GUSD",
+ "GYD",
+ "GYEN",
+ "HBAR",
+ "HFT",
+ "HIGH",
+ "HKD",
+ "HNL",
+ "HNT",
+ "HONEY",
+ "HOPR",
+ "HRK",
+ "HTG",
+ "HUF",
+ "ICP",
+ "IDEX",
+ "IDR",
+ "ILS",
+ "ILV",
+ "IMP",
+ "IMX",
+ "INDEX",
+ "INJ",
+ "INR",
+ "INV",
+ "IOTX",
+ "IQD",
+ "IRR",
+ "ISK",
+ "JASMY",
+ "JEP",
+ "JMD",
+ "JOD",
+ "JPY",
+ "JTO",
+ "JUP",
+ "KAVA",
+ "KEEP",
+ "KES",
+ "KGS",
+ "KHR",
+ "KMF",
+ "KNC",
+ "KPW",
+ "KRL",
+ "KRW",
+ "KSM",
+ "KWD",
+ "KYD",
+ "KZT",
+ "LAK",
+ "LBP",
+ "LCX",
+ "LDO",
+ "LINK",
+ "LIT",
+ "LKR",
+ "LOKA",
+ "LOOM",
+ "LPT",
+ "LQTY",
+ "LRC",
+ "LRD",
+ "LSETH",
+ "LSL",
+ "LTC",
+ "LTL",
+ "LVL",
+ "LYD",
+ "MAD",
+ "MAGIC",
+ "MANA",
+ "MASK",
+ "MATH",
+ "MATIC",
+ "MCO2",
+ "MDL",
+ "MDT",
+ "MEDIA",
+ "METIS",
+ "MGA",
+ "MINA",
+ "MIR",
+ "MKD",
+ "MKR",
+ "MLN",
+ "MMK",
+ "MNDE",
+ "MNT",
+ "MOBILE",
+ "MONA",
+ "MOP",
+ "MPL",
+ "MRO",
+ "MRU",
+ "MSOL",
+ "MTL",
+ "MULTI",
+ "MUR",
+ "MUSE",
+ "MVR",
+ "MWK",
+ "MXC",
+ "MXN",
+ "MYR",
+ "MZN",
+ "NAD",
+ "NCT",
+ "NEAR",
+ "NEST",
+ "NGN",
+ "NIO",
+ "NKN",
+ "NMR",
+ "NOK",
+ "NPR",
+ "NU",
+ "NZD",
+ "OCEAN",
+ "OGN",
+ "OMG",
+ "OMR",
+ "ONDO",
+ "OOKI",
+ "OP",
+ "ORCA",
+ "ORN",
+ "OSMO",
+ "OXT",
+ "PAB",
+ "PAX",
+ "PEN",
+ "PERP",
+ "PGK",
+ "PHP",
+ "PKR",
+ "PLA",
+ "PLN",
+ "PLU",
+ "PNG",
+ "POLS",
+ "POLY",
+ "POND",
+ "POWR",
+ "PRIME",
+ "PRO",
+ "PRQ",
+ "PUNDIX",
+ "PYG",
+ "PYR",
+ "PYUSD",
+ "QAR",
+ "QI",
+ "QNT",
+ "QSP",
+ "QUICK",
+ "RAD",
+ "RAI",
+ "RARE",
+ "RARI",
+ "RBN",
+ "REN",
+ "RENDER",
+ "REP",
+ "REPV2",
+ "REQ",
+ "RGT",
+ "RLC",
+ "RLY",
+ "RNDR",
+ "RON",
+ "ROSE",
+ "RPL",
+ "RSD",
+ "RUB",
+ "RWF",
+ "SAND",
+ "SAR",
+ "SBD",
+ "SCR",
+ "SDG",
+ "SEAM",
+ "SEI",
+ "SEK",
+ "SGD",
+ "SHIB",
+ "SHP",
+ "SHPING",
+ "SKK",
+ "SKL",
+ "SLL",
+ "SNT",
+ "SNX",
+ "SOL",
+ "SOS",
+ "SPA",
+ "SPELL",
+ "SRD",
+ "SSP",
+ "STD",
+ "STG",
+ "STORJ",
+ "STRK",
+ "STX",
+ "SUI",
+ "SUKU",
+ "SUPER",
+ "SUSHI",
+ "SVC",
+ "SWFTC",
+ "SYLO",
+ "SYN",
+ "SYP",
+ "SZL",
+ "T",
+ "THB",
+ "TIA",
+ "TIME",
+ "TJS",
+ "TMM",
+ "TMT",
+ "TND",
+ "TONE",
+ "TOP",
+ "TRAC",
+ "TRB",
+ "TRIBE",
+ "TRU",
+ "TRY",
+ "TTD",
+ "TVK",
+ "TWD",
+ "TZS",
+ "UAH",
+ "UGX",
+ "UMA",
+ "UNFI",
+ "UNI",
+ "UPI",
+ "USD",
+ "USDC",
+ "USDT",
+ "UST",
+ "UYU",
+ "UZS",
+ "VARA",
+ "VEF",
+ "VELO",
+ "VES",
+ "VET",
+ "VGX",
+ "VND",
+ "VOXEL",
+ "VTHO",
+ "VUV",
+ "WAMPL",
+ "WAXL",
+ "WBTC",
+ "WCFG",
+ "WLUNA",
+ "WST",
+ "XAF",
+ "XAG",
+ "XAU",
+ "XCD",
+ "XCN",
+ "XDR",
+ "XLM",
+ "XMON",
+ "XOF",
+ "XPD",
+ "XPF",
+ "XPT",
+ "XRP",
+ "XTZ",
+ "XYO",
+ "YER",
+ "YFI",
+ "YFII",
+ "ZAR",
+ "ZEC",
+ "ZEN",
+ "ZETA",
+ "ZMK",
+ "ZMW",
+ "ZRX",
+ "ZWD",
+ "FDUSD",
+ "AGX",
+ "AUX",
+ "BNB",
+ "CUBE",
+ "EMON",
+ "FDGT",
+ "KGLD",
+ "LODE",
+ "PASS",
+ "PREMIA",
+ "TAB1",
+ "TD-USD",
+ "TRX",
+ "TYUGA",
+ "VIC",
+ "XAI",
+ "SLE",
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/types/date.py b/src/flagright/types/date.py
index 755c560..0462634 100644
--- a/src/flagright/types/date.py
+++ b/src/flagright/types/date.py
@@ -1,34 +1,36 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
import typing
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class Date(pydantic.BaseModel):
+class Date(UniversalBaseModel):
"""
Model for date
"""
- day: float = pydantic.Field(description="Day of date")
- month: float = pydantic.Field(description="Month of date")
- year: float = pydantic.Field(description="Year of date")
+ day: float = pydantic.Field()
+ """
+ Day of date
+ """
- 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)
+ month: float = pydantic.Field()
+ """
+ Month of date
+ """
+
+ year: float = pydantic.Field()
+ """
+ Year of date
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/device_data.py b/src/flagright/types/device_data.py
index 80754f7..080e647 100644
--- a/src/flagright/types/device_data.py
+++ b/src/flagright/types/device_data.py
@@ -1,71 +1,102 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from ..core.serialization import FieldMetadata
+import pydantic
from .country_code import CountryCode
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class DeviceData(pydantic.BaseModel):
+class DeviceData(UniversalBaseModel):
"""
Model for device data
"""
- battery_level: typing.Optional[float] = pydantic.Field(
- alias="batteryLevel",
- description="Battery level of the device used for a transaction or event at a given timestamp",
- )
- device_latitude: typing.Optional[float] = pydantic.Field(
- alias="deviceLatitude", description="Device latitude at a give timestamp for an event or transaction"
+ battery_level: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="batteryLevel")] = (
+ pydantic.Field(default=None)
)
- device_longitude: typing.Optional[float] = pydantic.Field(
- alias="deviceLongitude", description="Device longitude at a give timestamp for an event or transaction"
+ """
+ Battery level of the device used for a transaction or event at a given timestamp
+ """
+
+ device_latitude: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="deviceLatitude")] = (
+ pydantic.Field(default=None)
)
- ip_address: typing.Optional[str] = pydantic.Field(
- alias="ipAddress", description="IP address of the device at a given timestamp for an event or transaction"
+ """
+ Device latitude at a give timestamp for an event or transaction
+ """
+
+ device_longitude: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="deviceLongitude")] = (
+ pydantic.Field(default=None)
)
- ip_country: typing.Optional[CountryCode] = pydantic.Field(alias="ipCountry")
- device_identifier: typing.Optional[str] = pydantic.Field(
- alias="deviceIdentifier", description="Device identifier number"
+ """
+ Device longitude at a give timestamp for an event or transaction
+ """
+
+ ip_address: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ipAddress")] = pydantic.Field(
+ default=None
)
- vpn_used: typing.Optional[bool] = pydantic.Field(
- alias="vpnUsed", description="Whether VPN was used at a given timestamp for an event or transaction"
+ """
+ IP address of the device at a given timestamp for an event or transaction
+ """
+
+ ip_country: typing_extensions.Annotated[typing.Optional[CountryCode], FieldMetadata(alias="ipCountry")] = None
+ device_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="deviceIdentifier")] = (
+ pydantic.Field(default=None)
)
- operating_system: typing.Optional[str] = pydantic.Field(
- alias="operatingSystem",
- description="Operating system of the device at a given timestamp for an event or transaction",
+ """
+ Device identifier number
+ """
+
+ vpn_used: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="vpnUsed")] = pydantic.Field(
+ default=None
)
- device_maker: typing.Optional[str] = pydantic.Field(
- alias="deviceMaker", description="The maker of the device at a given timestamp for an event or transaction"
+ """
+ Whether VPN was used at a given timestamp for an event or transaction
+ """
+
+ operating_system: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="operatingSystem")] = (
+ pydantic.Field(default=None)
)
- device_model: typing.Optional[str] = pydantic.Field(
- alias="deviceModel", description="The model of the device at a given timestamp for an event or transaction"
+ """
+ Operating system of the device at a given timestamp for an event or transaction
+ """
+
+ device_maker: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="deviceMaker")] = (
+ pydantic.Field(default=None)
)
- device_year: typing.Optional[str] = pydantic.Field(
- alias="deviceYear",
- description="The year the device was manufactured at a given timestamp for an event or transaction",
+ """
+ The maker of the device at a given timestamp for an event or transaction
+ """
+
+ device_model: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="deviceModel")] = (
+ pydantic.Field(default=None)
)
- app_version: typing.Optional[str] = pydantic.Field(
- alias="appVersion",
- description="The version of the app your user is using on their device at a given timestamp for an event or transaction",
+ """
+ The model of the device at a given timestamp for an event or transaction
+ """
+
+ device_year: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="deviceYear")] = pydantic.Field(
+ default=None
)
+ """
+ The year the device was manufactured at a given timestamp for an event or 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)
+ app_version: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="appVersion")] = pydantic.Field(
+ default=None
+ )
+ """
+ The version of the app your user is using on their device at a given timestamp for an event or transaction
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/employment_details.py b/src/flagright/types/employment_details.py
index 9a622fb..33b17f8 100644
--- a/src/flagright/types/employment_details.py
+++ b/src/flagright/types/employment_details.py
@@ -1,39 +1,44 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
+from ..core.serialization import FieldMetadata
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class EmploymentDetails(pydantic.BaseModel):
+class EmploymentDetails(UniversalBaseModel):
"""
Details of User's employment
"""
- employment_sector: typing.Optional[str] = pydantic.Field(
- alias="employmentSector", description="Sector of employment"
+ employment_sector: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="employmentSector")] = (
+ pydantic.Field(default=None)
)
- employer_name: typing.Optional[str] = pydantic.Field(alias="employerName", description="Name of the employer")
- business_industry: typing.Optional[typing.List[str]] = pydantic.Field(
- alias="businessIndustry", description="The industry in which the business operates for a business customer"
+ """
+ Sector of employment
+ """
+
+ employer_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="employerName")] = (
+ pydantic.Field(default=None)
)
+ """
+ Name of the employer
+ """
- 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)
+ business_industry: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="businessIndustry")
+ ] = pydantic.Field(default=None)
+ """
+ The industry in which the business operates for a business customer
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/employment_status.py b/src/flagright/types/employment_status.py
index 957e2a5..41023d1 100644
--- a/src/flagright/types/employment_status.py
+++ b/src/flagright/types/employment_status.py
@@ -1,61 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmploymentStatus(str, enum.Enum):
- UNEMPLOYED = "UNEMPLOYED"
- EMPLOYED = "EMPLOYED"
- SELF_EMPLOYED = "SELF_EMPLOYED"
- FREELANCER = "FREELANCER"
- STUDENT = "STUDENT"
- FULL_TIME = "FULL_TIME"
- PART_TIME = "PART_TIME"
- SOLE_PROPRIETOR = "SOLE_PROPRIETOR"
- PENSIONER = "PENSIONER"
- COMPANY_OWNER = "COMPANY_OWNER"
- OTHER = "OTHER"
- NA = "NA"
-
- def visit(
- self,
- unemployed: typing.Callable[[], T_Result],
- employed: typing.Callable[[], T_Result],
- self_employed: typing.Callable[[], T_Result],
- freelancer: typing.Callable[[], T_Result],
- student: typing.Callable[[], T_Result],
- full_time: typing.Callable[[], T_Result],
- part_time: typing.Callable[[], T_Result],
- sole_proprietor: typing.Callable[[], T_Result],
- pensioner: typing.Callable[[], T_Result],
- company_owner: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- na: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmploymentStatus.UNEMPLOYED:
- return unemployed()
- if self is EmploymentStatus.EMPLOYED:
- return employed()
- if self is EmploymentStatus.SELF_EMPLOYED:
- return self_employed()
- if self is EmploymentStatus.FREELANCER:
- return freelancer()
- if self is EmploymentStatus.STUDENT:
- return student()
- if self is EmploymentStatus.FULL_TIME:
- return full_time()
- if self is EmploymentStatus.PART_TIME:
- return part_time()
- if self is EmploymentStatus.SOLE_PROPRIETOR:
- return sole_proprietor()
- if self is EmploymentStatus.PENSIONER:
- return pensioner()
- if self is EmploymentStatus.COMPANY_OWNER:
- return company_owner()
- if self is EmploymentStatus.OTHER:
- return other()
- if self is EmploymentStatus.NA:
- return na()
+EmploymentStatus = typing.Union[
+ typing.Literal[
+ "UNEMPLOYED",
+ "EMPLOYED",
+ "SELF_EMPLOYED",
+ "FREELANCER",
+ "STUDENT",
+ "FULL_TIME",
+ "PART_TIME",
+ "SOLE_PROPRIETOR",
+ "PENSIONER",
+ "COMPANY_OWNER",
+ "OTHER",
+ "NA",
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/types/executed_logic_vars.py b/src/flagright/types/executed_logic_vars.py
index 191f749..8cdc214 100644
--- a/src/flagright/types/executed_logic_vars.py
+++ b/src/flagright/types/executed_logic_vars.py
@@ -1,30 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .rule_hit_direction import RuleHitDirection
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class ExecutedLogicVars(pydantic.BaseModel):
- direction: typing.Optional[RuleHitDirection]
- value: typing.Dict[str, typing.Any]
- 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)
+class ExecutedLogicVars(UniversalBaseModel):
+ direction: typing.Optional[RuleHitDirection] = None
+ value: typing.Dict[str, typing.Optional[typing.Any]]
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/executed_rules_result.py b/src/flagright/types/executed_rules_result.py
index 6b88c79..fd1bfa4 100644
--- a/src/flagright/types/executed_rules_result.py
+++ b/src/flagright/types/executed_rules_result.py
@@ -1,51 +1,61 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .executed_logic_vars import ExecutedLogicVars
+from ..core.serialization import FieldMetadata
+import pydantic
from .rule_action import RuleAction
from .rule_hit_meta import RuleHitMeta
+from .executed_logic_vars import ExecutedLogicVars
from .rule_labels import RuleLabels
from .rule_nature import RuleNature
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-class ExecutedRulesResult(pydantic.BaseModel):
+class ExecutedRulesResult(UniversalBaseModel):
"""
Model for list of executed rules
"""
- rule_id: typing.Optional[str] = pydantic.Field(alias="ruleId", description="Unique rule identifier")
- rule_instance_id: str = pydantic.Field(alias="ruleInstanceId")
- rule_name: str = pydantic.Field(alias="ruleName", description="Name of the rule")
- rule_description: str = pydantic.Field(alias="ruleDescription", description="Description of the rule")
- rule_action: RuleAction = pydantic.Field(alias="ruleAction")
- rule_hit: bool = pydantic.Field(alias="ruleHit")
- executed_at: typing.Optional[float] = pydantic.Field(
- alias="executedAt", description="Timestamp when the rule was executed"
+ rule_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleId")] = pydantic.Field(
+ default=None
)
- rule_hit_meta: typing.Optional[RuleHitMeta] = pydantic.Field(alias="ruleHitMeta")
- vars: typing.Optional[typing.List[ExecutedLogicVars]]
- labels: typing.Optional[typing.List[RuleLabels]]
- nature: typing.Optional[RuleNature]
- is_shadow: typing.Optional[bool] = pydantic.Field(alias="isShadow")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Unique rule identifier
+ """
+
+ rule_instance_id: typing_extensions.Annotated[str, FieldMetadata(alias="ruleInstanceId")]
+ rule_name: typing_extensions.Annotated[str, FieldMetadata(alias="ruleName")] = pydantic.Field()
+ """
+ Name of the rule
+ """
+
+ rule_description: typing_extensions.Annotated[str, FieldMetadata(alias="ruleDescription")] = pydantic.Field()
+ """
+ Description of the rule
+ """
+
+ rule_action: typing_extensions.Annotated[RuleAction, FieldMetadata(alias="ruleAction")]
+ rule_hit: typing_extensions.Annotated[bool, FieldMetadata(alias="ruleHit")]
+ executed_at: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="executedAt")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Timestamp when the rule was executed
+ """
+
+ rule_hit_meta: typing_extensions.Annotated[typing.Optional[RuleHitMeta], FieldMetadata(alias="ruleHitMeta")] = None
+ vars: typing.Optional[typing.List[ExecutedLogicVars]] = None
+ labels: typing.Optional[typing.List[RuleLabels]] = None
+ nature: typing.Optional[RuleNature] = None
+ is_shadow: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isShadow")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/expected_income.py b/src/flagright/types/expected_income.py
index 2c70bdb..610db47 100644
--- a/src/flagright/types/expected_income.py
+++ b/src/flagright/types/expected_income.py
@@ -1,38 +1,40 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .amount import Amount
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ExpectedIncome(pydantic.BaseModel):
+class ExpectedIncome(UniversalBaseModel):
"""
Model for expected income details
"""
- daily_expected_income: typing.Optional[Amount] = pydantic.Field(alias="dailyExpectedIncome")
- weekly_expected_income: typing.Optional[Amount] = pydantic.Field(alias="weeklyExpectedIncome")
- monthly_expected_income: typing.Optional[Amount] = pydantic.Field(alias="monthlyExpectedIncome")
- quarterly_expected_income: typing.Optional[Amount] = pydantic.Field(alias="quarterlyExpectedIncome")
- yearly_expected_income: typing.Optional[Amount] = pydantic.Field(alias="yearlyExpectedIncome")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ daily_expected_income: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="dailyExpectedIncome")
+ ] = None
+ weekly_expected_income: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="weeklyExpectedIncome")
+ ] = None
+ monthly_expected_income: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="monthlyExpectedIncome")
+ ] = None
+ quarterly_expected_income: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="quarterlyExpectedIncome")
+ ] = None
+ yearly_expected_income: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="yearlyExpectedIncome")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/failed_rules_result.py b/src/flagright/types/failed_rules_result.py
index 451fc12..de0bcc0 100644
--- a/src/flagright/types/failed_rules_result.py
+++ b/src/flagright/types/failed_rules_result.py
@@ -1,37 +1,41 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+from .rule_failure_exception import RuleFailureException
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
import typing
-from ..core.datetime_utils import serialize_datetime
-from .rule_failure_exception import RuleFailureException
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class FailedRulesResult(UniversalBaseModel):
+ """
+ Model for list of rules failed execution. It means rules could not be run
+ """
+ rule_id: typing_extensions.Annotated[str, FieldMetadata(alias="ruleId")] = pydantic.Field()
+ """
+ Unique rule identifier
+ """
-class FailedRulesResult(pydantic.BaseModel):
+ rule_name: typing_extensions.Annotated[str, FieldMetadata(alias="ruleName")] = pydantic.Field()
"""
- Model for list of rules failed execution. It means rules could not be run
+ Name of the rule
"""
- rule_id: str = pydantic.Field(alias="ruleId", description="Unique rule identifier")
- rule_name: str = pydantic.Field(alias="ruleName", description="Name of the rule")
- rule_description: str = pydantic.Field(alias="ruleDescription", description="Description of the rule")
- failure_exception: RuleFailureException = pydantic.Field(alias="failureException")
+ rule_description: typing_extensions.Annotated[str, FieldMetadata(alias="ruleDescription")] = pydantic.Field()
+ """
+ Description of the rule
+ """
- 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)
+ failure_exception: typing_extensions.Annotated[RuleFailureException, FieldMetadata(alias="failureException")]
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/false_positive_details.py b/src/flagright/types/false_positive_details.py
index 69745fb..957ce8a 100644
--- a/src/flagright/types/false_positive_details.py
+++ b/src/flagright/types/false_positive_details.py
@@ -1,30 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class FalsePositiveDetails(UniversalBaseModel):
+ is_false_positive: typing_extensions.Annotated[bool, FieldMetadata(alias="isFalsePositive")]
+ confidence_score: typing_extensions.Annotated[float, FieldMetadata(alias="confidenceScore")]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
-class FalsePositiveDetails(pydantic.BaseModel):
- is_false_positive: bool = pydantic.Field(alias="isFalsePositive")
- confidence_score: float = pydantic.Field(alias="confidenceScore")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/file_info.py b/src/flagright/types/file_info.py
index f5a0467..2edd279 100644
--- a/src/flagright/types/file_info.py
+++ b/src/flagright/types/file_info.py
@@ -1,34 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class FileInfo(pydantic.BaseModel):
- s_3_key: str = pydantic.Field(alias="s3Key")
- bucket: typing.Optional[str]
+class FileInfo(UniversalBaseModel):
+ s_3_key: typing_extensions.Annotated[str, FieldMetadata(alias="s3Key")]
+ bucket: typing.Optional[str] = None
filename: str
size: float
- download_link: typing.Optional[str] = pydantic.Field(alias="downloadLink")
- ai_summary: typing.Optional[str] = pydantic.Field(alias="aiSummary")
-
- 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)
+ download_link: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="downloadLink")] = None
+ ai_summary: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="aiSummary")] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/gender.py b/src/flagright/types/gender.py
index 3cf7c14..6f2528b 100644
--- a/src/flagright/types/gender.py
+++ b/src/flagright/types/gender.py
@@ -1,26 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class Gender(str, enum.Enum):
- """
- Gender of the individual - Male, Female or Non-Binary
- """
-
- M = "M"
- F = "F"
- NB = "NB"
-
- def visit(
- self, m: typing.Callable[[], T_Result], f: typing.Callable[[], T_Result], nb: typing.Callable[[], T_Result]
- ) -> T_Result:
- if self is Gender.M:
- return m()
- if self is Gender.F:
- return f()
- if self is Gender.NB:
- return nb()
+Gender = typing.Union[typing.Literal["M", "F", "NB"], typing.Any]
diff --git a/src/flagright/types/general_bank_account_payment_method.py b/src/flagright/types/general_bank_account_payment_method.py
index ece44f5..16f68a2 100644
--- a/src/flagright/types/general_bank_account_payment_method.py
+++ b/src/flagright/types/general_bank_account_payment_method.py
@@ -1,5 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import typing_extensions
+import typing
-GeneralBankAccountPaymentMethod = typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
+GeneralBankAccountPaymentMethod = typing.Literal["GENERIC_BANK_ACCOUNT"]
diff --git a/src/flagright/types/generic_bank_account_details.py b/src/flagright/types/generic_bank_account_details.py
index 8bbcb22..9a21e02 100644
--- a/src/flagright/types/generic_bank_account_details.py
+++ b/src/flagright/types/generic_bank_account_details.py
@@ -1,61 +1,85 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .address import Address
+from ..core.serialization import FieldMetadata
+import pydantic
from .amount import Amount
from .country_code import CountryCode
+from .address import Address
from .email_id import EmailId
from .tag import Tag
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class GenericBankAccountDetails(pydantic.BaseModel):
+class GenericBankAccountDetails(UniversalBaseModel):
"""
Model for any generic bank account
"""
- account_number: typing.Optional[str] = pydantic.Field(alias="accountNumber", description="Bank account number")
- account_type: typing.Optional[str] = pydantic.Field(
- alias="accountType", description="Bank account type. E.g. Checking, Savings etc."
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = (
+ pydantic.Field(default=None)
)
- account_balance: typing.Optional[Amount] = pydantic.Field(alias="accountBalance")
- bank_name: typing.Optional[str] = pydantic.Field(alias="bankName", description="Name of the bank")
- bank_code: typing.Optional[str] = pydantic.Field(
- alias="bankCode",
- description="Unique identifier of the bank. In some countries, this can be the same as the bank's SWIFT code",
- )
- country: typing.Optional[CountryCode]
- name: typing.Optional[str] = pydantic.Field(description="Name of the account holder")
- bank_address: typing.Optional[Address] = pydantic.Field(alias="bankAddress")
- email_id: typing.Optional[EmailId] = pydantic.Field(alias="emailId")
- special_instructions: typing.Optional[str] = pydantic.Field(
- alias="specialInstructions", description="Special instructions to be specified if any"
+ """
+ Bank account number
+ """
+
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = (
+ pydantic.Field(default=None)
)
- payment_channel: typing.Optional[str] = pydantic.Field(alias="paymentChannel")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ """
+ Bank account type. E.g. Checking, Savings etc.
+ """
+
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = pydantic.Field(
+ default=None
)
- transit_number: typing.Optional[str] = pydantic.Field(
- alias="transitNumber", description="Transit number of the bank account"
+ """
+ Name of the bank
+ """
+
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = pydantic.Field(
+ default=None
)
+ """
+ Unique identifier of the bank. In some countries, this can be the same as the bank's SWIFT code
+ """
+
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Name of the account holder
+ """
+
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = pydantic.Field(default=None)
+ """
+ Special instructions to be specified if any
+ """
+
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ 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}
- return super().json(**kwargs_with_defaults)
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Transit number of the bank account
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/hit_rules_details.py b/src/flagright/types/hit_rules_details.py
index b2058d1..f7d8252 100644
--- a/src/flagright/types/hit_rules_details.py
+++ b/src/flagright/types/hit_rules_details.py
@@ -1,48 +1,58 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from ..core.serialization import FieldMetadata
+import pydantic
from .rule_action import RuleAction
from .rule_hit_meta import RuleHitMeta
from .rule_labels import RuleLabels
from .rule_nature import RuleNature
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class HitRulesDetails(pydantic.BaseModel):
+class HitRulesDetails(UniversalBaseModel):
"""
Model for list of hit rules
"""
- rule_id: typing.Optional[str] = pydantic.Field(alias="ruleId", description="Unique rule identifier")
- rule_instance_id: str = pydantic.Field(alias="ruleInstanceId")
- rule_name: str = pydantic.Field(alias="ruleName", description="Name of the rule")
- rule_description: str = pydantic.Field(alias="ruleDescription", description="Description of the rule")
- executed_at: typing.Optional[float] = pydantic.Field(
- alias="executedAt", description="Timestamp when the rule was hit"
+ rule_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleId")] = pydantic.Field(
+ default=None
)
- rule_action: RuleAction = pydantic.Field(alias="ruleAction")
- rule_hit_meta: typing.Optional[RuleHitMeta] = pydantic.Field(alias="ruleHitMeta")
- labels: typing.Optional[typing.List[RuleLabels]]
- nature: typing.Optional[RuleNature]
- is_shadow: typing.Optional[bool] = pydantic.Field(alias="isShadow")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Unique rule identifier
+ """
+
+ rule_instance_id: typing_extensions.Annotated[str, FieldMetadata(alias="ruleInstanceId")]
+ rule_name: typing_extensions.Annotated[str, FieldMetadata(alias="ruleName")] = pydantic.Field()
+ """
+ Name of the rule
+ """
+
+ rule_description: typing_extensions.Annotated[str, FieldMetadata(alias="ruleDescription")] = pydantic.Field()
+ """
+ Description of the rule
+ """
+
+ executed_at: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="executedAt")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Timestamp when the rule was hit
+ """
+
+ rule_action: typing_extensions.Annotated[RuleAction, FieldMetadata(alias="ruleAction")]
+ rule_hit_meta: typing_extensions.Annotated[typing.Optional[RuleHitMeta], FieldMetadata(alias="ruleHitMeta")] = None
+ labels: typing.Optional[typing.List[RuleLabels]] = None
+ nature: typing.Optional[RuleNature] = None
+ is_shadow: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isShadow")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/iban_details.py b/src/flagright/types/iban_details.py
index a43e28c..37466b8 100644
--- a/src/flagright/types/iban_details.py
+++ b/src/flagright/types/iban_details.py
@@ -1,58 +1,67 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from ..core.serialization import FieldMetadata
+import pydantic
from .address import Address
-from .amount import Amount
from .country_code import CountryCode
+from .amount import Amount
from .email_id import EmailId
from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-class IbanDetails(pydantic.BaseModel):
+class IbanDetails(UniversalBaseModel):
"""
Standardized model for Bank Details
"""
- bic: typing.Optional[str] = pydantic.Field(
- alias="BIC",
- description="Identifier for the bank. Can be routing number, BIK number, SWIFT code, BIC number etc.",
- )
- bank_name: typing.Optional[str] = pydantic.Field(alias="bankName", description="Name of the bank")
- bank_address: typing.Optional[Address] = pydantic.Field(alias="bankAddress")
- country: typing.Optional[CountryCode]
- iban: typing.Optional[str] = pydantic.Field(
- alias="IBAN", description="Account number of the user. Can be account number, IBAN number etc."
- )
- account_balance: typing.Optional[Amount] = pydantic.Field(alias="accountBalance")
- name: typing.Optional[str] = pydantic.Field(description="Name of the bank account holder")
- email_id: typing.Optional[EmailId] = pydantic.Field(alias="emailId")
- bank_branch_code: typing.Optional[str] = pydantic.Field(
- alias="bankBranchCode",
- description="Branch code of the bank. In some countries, this can be the same as the bank's SWIFT code",
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = pydantic.Field(default=None)
+ """
+ Identifier for the bank. Can be routing number, BIK number, SWIFT code, BIC number etc.
+ """
+
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = pydantic.Field(
+ default=None
)
- payment_channel: typing.Optional[str] = pydantic.Field(alias="paymentChannel")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ """
+ Name of the bank
+ """
+
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = pydantic.Field(default=None)
+ """
+ Account number of the user. Can be account number, IBAN number etc.
+ """
+
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Name of the bank account holder
+ """
+
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = (
+ pydantic.Field(default=None)
)
+ """
+ Branch code of the bank. In some countries, this can be the same as the bank's SWIFT code
+ """
- 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)
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/iban_payment_method.py b/src/flagright/types/iban_payment_method.py
index f3519e6..ae6c3c9 100644
--- a/src/flagright/types/iban_payment_method.py
+++ b/src/flagright/types/iban_payment_method.py
@@ -1,5 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import typing_extensions
+import typing
-IbanPaymentMethod = typing_extensions.Literal["IBAN"]
+IbanPaymentMethod = typing.Literal["IBAN"]
diff --git a/src/flagright/types/kyc_status.py b/src/flagright/types/kyc_status.py
index fec5cad..0add348 100644
--- a/src/flagright/types/kyc_status.py
+++ b/src/flagright/types/kyc_status.py
@@ -1,49 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class KycStatus(str, enum.Enum):
- SUCCESSFUL = "SUCCESSFUL"
- FAILED = "FAILED"
- NOT_STARTED = "NOT_STARTED"
- IN_PROGRESS = "IN_PROGRESS"
- EXPIRED = "EXPIRED"
- NEW = "NEW"
- CANCELLED = "CANCELLED"
- MANUAL_REVIEW = "MANUAL_REVIEW"
- EDD_IN_PROGRESS = "EDD_IN_PROGRESS"
-
- def visit(
- self,
- successful: typing.Callable[[], T_Result],
- failed: typing.Callable[[], T_Result],
- not_started: typing.Callable[[], T_Result],
- in_progress: typing.Callable[[], T_Result],
- expired: typing.Callable[[], T_Result],
- new: typing.Callable[[], T_Result],
- cancelled: typing.Callable[[], T_Result],
- manual_review: typing.Callable[[], T_Result],
- edd_in_progress: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is KycStatus.SUCCESSFUL:
- return successful()
- if self is KycStatus.FAILED:
- return failed()
- if self is KycStatus.NOT_STARTED:
- return not_started()
- if self is KycStatus.IN_PROGRESS:
- return in_progress()
- if self is KycStatus.EXPIRED:
- return expired()
- if self is KycStatus.NEW:
- return new()
- if self is KycStatus.CANCELLED:
- return cancelled()
- if self is KycStatus.MANUAL_REVIEW:
- return manual_review()
- if self is KycStatus.EDD_IN_PROGRESS:
- return edd_in_progress()
+KycStatus = typing.Union[
+ typing.Literal[
+ "SUCCESSFUL",
+ "FAILED",
+ "NOT_STARTED",
+ "IN_PROGRESS",
+ "EXPIRED",
+ "NEW",
+ "CANCELLED",
+ "MANUAL_REVIEW",
+ "EDD_IN_PROGRESS",
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/types/kyc_status_details.py b/src/flagright/types/kyc_status_details.py
index 2dc6907..db0bf5b 100644
--- a/src/flagright/types/kyc_status_details.py
+++ b/src/flagright/types/kyc_status_details.py
@@ -1,30 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .kyc_status import KycStatus
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class KycStatusDetails(pydantic.BaseModel):
- reason: typing.Optional[str]
- status: typing.Optional[KycStatus]
- 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)
+class KycStatusDetails(UniversalBaseModel):
+ reason: typing.Optional[str] = None
+ status: typing.Optional[KycStatus] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/legal_document.py b/src/flagright/types/legal_document.py
index 2b6c3a5..694ff6a 100644
--- a/src/flagright/types/legal_document.py
+++ b/src/flagright/types/legal_document.py
@@ -1,54 +1,60 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .consumer_name import ConsumerName
from .country_code import CountryCode
from .tag import Tag
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from .consumer_name import ConsumerName
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class LegalDocument(pydantic.BaseModel):
+class LegalDocument(UniversalBaseModel):
"""
LegalDocument model generalizes User's identity document type (ex: Passport)
"""
- document_type: str = pydantic.Field(
- alias="documentType", description="User's identity document type such as passport, national ID etc."
- )
- document_number: str = pydantic.Field(
- alias="documentNumber", description="User's unique identity document number such as passport number"
- )
- document_issued_date: typing.Optional[float] = pydantic.Field(
- alias="documentIssuedDate",
- description="User's identity document issuance date (UNIX timestamp in milliseconds)",
- )
- document_expiration_date: typing.Optional[float] = pydantic.Field(
- alias="documentExpirationDate",
- description="User's identity document expiration date (UNIX timestamp in milliseconds)",
- )
- document_issued_country: CountryCode = pydantic.Field(alias="documentIssuedCountry")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
- )
- name_on_document: typing.Optional[ConsumerName] = pydantic.Field(alias="nameOnDocument")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ document_type: typing_extensions.Annotated[str, FieldMetadata(alias="documentType")] = pydantic.Field()
+ """
+ User's identity document type such as passport, national ID etc.
+ """
+
+ document_number: typing_extensions.Annotated[str, FieldMetadata(alias="documentNumber")] = pydantic.Field()
+ """
+ User's unique identity document number such as passport number
+ """
+
+ document_issued_date: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="documentIssuedDate")
+ ] = pydantic.Field(default=None)
+ """
+ User's identity document issuance date (UNIX timestamp in milliseconds)
+ """
+
+ document_expiration_date: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="documentExpirationDate")
+ ] = pydantic.Field(default=None)
+ """
+ User's identity document expiration date (UNIX timestamp in milliseconds)
+ """
+
+ document_issued_country: typing_extensions.Annotated[CountryCode, FieldMetadata(alias="documentIssuedCountry")]
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ name_on_document: typing_extensions.Annotated[
+ typing.Optional[ConsumerName], FieldMetadata(alias="nameOnDocument")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/legal_entity.py b/src/flagright/types/legal_entity.py
index 87c4b3e..243e1dc 100644
--- a/src/flagright/types/legal_entity.py
+++ b/src/flagright/types/legal_entity.py
@@ -1,47 +1,47 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from .company_general_details import CompanyGeneralDetails
+from ..core.serialization import FieldMetadata
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .company_financial_details import CompanyFinancialDetails
-from .company_general_details import CompanyGeneralDetails
from .company_registration_details import CompanyRegistrationDetails
-from .contact_details import ContactDetails
from .source_of_funds import SourceOfFunds
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from .contact_details import ContactDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class LegalEntity(pydantic.BaseModel):
+class LegalEntity(UniversalBaseModel):
"""
Model for business user legal entity details
"""
- company_general_details: CompanyGeneralDetails = pydantic.Field(alias="companyGeneralDetails")
- company_financial_details: typing.Optional[CompanyFinancialDetails] = pydantic.Field(
- alias="companyFinancialDetails"
- )
- company_registration_details: typing.Optional[CompanyRegistrationDetails] = pydantic.Field(
- alias="companyRegistrationDetails"
- )
- reason_for_account_opening: typing.Optional[typing.List[str]] = pydantic.Field(alias="reasonForAccountOpening")
- source_of_funds: typing.Optional[typing.List[SourceOfFunds]] = pydantic.Field(alias="sourceOfFunds")
- contact_details: typing.Optional[ContactDetails] = pydantic.Field(alias="contactDetails")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ company_general_details: typing_extensions.Annotated[
+ CompanyGeneralDetails, FieldMetadata(alias="companyGeneralDetails")
+ ]
+ company_financial_details: typing_extensions.Annotated[
+ typing.Optional[CompanyFinancialDetails], FieldMetadata(alias="companyFinancialDetails")
+ ] = None
+ company_registration_details: typing_extensions.Annotated[
+ typing.Optional[CompanyRegistrationDetails], FieldMetadata(alias="companyRegistrationDetails")
+ ] = None
+ reason_for_account_opening: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="reasonForAccountOpening")
+ ] = None
+ source_of_funds: typing_extensions.Annotated[
+ typing.Optional[typing.List[SourceOfFunds]], FieldMetadata(alias="sourceOfFunds")
+ ] = None
+ contact_details: typing_extensions.Annotated[
+ typing.Optional[ContactDetails], FieldMetadata(alias="contactDetails")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/list_data.py b/src/flagright/types/list_data.py
index 393774d..eeed926 100644
--- a/src/flagright/types/list_data.py
+++ b/src/flagright/types/list_data.py
@@ -1,35 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .list_item import ListItem
from .list_metadata import ListMetadata
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from .list_item import ListItem
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class ListData(pydantic.BaseModel):
+class ListData(UniversalBaseModel):
"""
Payload of a list, new or existed
"""
- metadata: typing.Optional[ListMetadata]
- items: typing.Optional[typing.List[ListItem]] = pydantic.Field(description="List items")
-
- 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)
+ metadata: typing.Optional[ListMetadata] = None
+ items: typing.Optional[typing.List[ListItem]] = pydantic.Field(default=None)
+ """
+ List items
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/list_existed.py b/src/flagright/types/list_existed.py
index 96a31ec..e70165c 100644
--- a/src/flagright/types/list_existed.py
+++ b/src/flagright/types/list_existed.py
@@ -1,37 +1,32 @@
# 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 UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
from .list_header import ListHeader
+import typing
from .list_item import ListItem
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class ListExisted(pydantic.BaseModel):
+class ListExisted(UniversalBaseModel):
"""
List with ID and header
"""
- list_id: str = pydantic.Field(alias="listId")
+ list_id: typing_extensions.Annotated[str, FieldMetadata(alias="listId")]
header: ListHeader
- items: typing.List[ListItem] = pydantic.Field(description="List items")
-
- 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)
+ items: typing.List[ListItem] = pydantic.Field()
+ """
+ List items
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/list_header.py b/src/flagright/types/list_header.py
index 98bcff1..c3af136 100644
--- a/src/flagright/types/list_header.py
+++ b/src/flagright/types/list_header.py
@@ -1,38 +1,30 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+from .list_type import ListType
+from .list_subtype import ListSubtype
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .list_metadata import ListMetadata
-from .list_subtype import ListSubtype
-from .list_type import ListType
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-class ListHeader(pydantic.BaseModel):
- list_id: str = pydantic.Field(alias="listId")
- list_type: ListType = pydantic.Field(alias="listType")
+class ListHeader(UniversalBaseModel):
+ list_id: typing_extensions.Annotated[str, FieldMetadata(alias="listId")]
+ list_type: typing_extensions.Annotated[ListType, FieldMetadata(alias="listType")]
subtype: ListSubtype
- metadata: typing.Optional[ListMetadata]
- created_timestamp: float = pydantic.Field(alias="createdTimestamp")
- size: typing.Optional[float]
- version: typing.Optional[float]
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ metadata: typing.Optional[ListMetadata] = None
+ created_timestamp: typing_extensions.Annotated[float, FieldMetadata(alias="createdTimestamp")]
+ size: typing.Optional[float] = None
+ version: typing.Optional[float] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/list_item.py b/src/flagright/types/list_item.py
index 1520c14..b385cb3 100644
--- a/src/flagright/types/list_item.py
+++ b/src/flagright/types/list_item.py
@@ -1,31 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .list_key_metadata import ListKeyMetadata
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ListItem(pydantic.BaseModel):
+class ListItem(UniversalBaseModel):
key: str
- metadata: typing.Optional[ListKeyMetadata]
- ttl: typing.Optional[float]
-
- 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)
+ metadata: typing.Optional[ListKeyMetadata] = None
+ ttl: typing.Optional[float] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/list_key_metadata.py b/src/flagright/types/list_key_metadata.py
index e0ed84e..76a7f0e 100644
--- a/src/flagright/types/list_key_metadata.py
+++ b/src/flagright/types/list_key_metadata.py
@@ -2,4 +2,4 @@
import typing
-ListKeyMetadata = typing.Dict[str, typing.Any]
+ListKeyMetadata = typing.Dict[str, typing.Optional[typing.Any]]
diff --git a/src/flagright/types/list_metadata.py b/src/flagright/types/list_metadata.py
index d6f99ac..057be37 100644
--- a/src/flagright/types/list_metadata.py
+++ b/src/flagright/types/list_metadata.py
@@ -1,33 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ..core.datetime_utils import serialize_datetime
+import pydantic
from .list_metadata_ttl import ListMetadataTtl
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class ListMetadata(UniversalBaseModel):
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ List name
+ """
-class ListMetadata(pydantic.BaseModel):
- name: typing.Optional[str] = pydantic.Field(description="List name")
- description: typing.Optional[str] = pydantic.Field(description="List description")
- status: typing.Optional[bool]
- checksum: typing.Optional[str]
- ttl: typing.Optional[ListMetadataTtl]
+ description: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ List description
+ """
- 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)
+ status: typing.Optional[bool] = None
+ checksum: typing.Optional[str] = None
+ ttl: typing.Optional[ListMetadataTtl] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/list_metadata_ttl.py b/src/flagright/types/list_metadata_ttl.py
index c819129..913e486 100644
--- a/src/flagright/types/list_metadata_ttl.py
+++ b/src/flagright/types/list_metadata_ttl.py
@@ -1,30 +1,21 @@
# 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 UniversalBaseModel
from .list_metadata_ttl_unit import ListMetadataTtlUnit
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class ListMetadataTtl(pydantic.BaseModel):
+class ListMetadataTtl(UniversalBaseModel):
unit: ListMetadataTtlUnit
value: float
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/list_metadata_ttl_unit.py b/src/flagright/types/list_metadata_ttl_unit.py
index 7fd474b..bdb5cd4 100644
--- a/src/flagright/types/list_metadata_ttl_unit.py
+++ b/src/flagright/types/list_metadata_ttl_unit.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ListMetadataTtlUnit(str, enum.Enum):
- HOUR = "HOUR"
- DAY = "DAY"
-
- def visit(self, hour: typing.Callable[[], T_Result], day: typing.Callable[[], T_Result]) -> T_Result:
- if self is ListMetadataTtlUnit.HOUR:
- return hour()
- if self is ListMetadataTtlUnit.DAY:
- return day()
+ListMetadataTtlUnit = typing.Union[typing.Literal["HOUR", "DAY"], typing.Any]
diff --git a/src/flagright/types/list_subtype.py b/src/flagright/types/list_subtype.py
index 93fec66..d93a66e 100644
--- a/src/flagright/types/list_subtype.py
+++ b/src/flagright/types/list_subtype.py
@@ -1,65 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ListSubtype(str, enum.Enum):
- USER_ID = "USER_ID"
- CARD_FINGERPRINT_NUMBER = "CARD_FINGERPRINT_NUMBER"
- IBAN_NUMBER = "IBAN_NUMBER"
- BANK_ACCOUNT_NUMBER = "BANK_ACCOUNT_NUMBER"
- ACH_ACCOUNT_NUMBER = "ACH_ACCOUNT_NUMBER"
- SWIFT_ACCOUNT_NUMBER = "SWIFT_ACCOUNT_NUMBER"
- BIC = "BIC"
- BANK_SWIFT_CODE = "BANK_SWIFT_CODE"
- UPI_IDENTIFYING_NUMBER = "UPI_IDENTIFYING_NUMBER"
- IP_ADDRESS = "IP_ADDRESS"
- DEVICE_IDENTIFIER = "DEVICE_IDENTIFIER"
- STRING = "STRING"
- COUNTRY = "COUNTRY"
-
- def visit(
- self,
- user_id: typing.Callable[[], T_Result],
- card_fingerprint_number: typing.Callable[[], T_Result],
- iban_number: typing.Callable[[], T_Result],
- bank_account_number: typing.Callable[[], T_Result],
- ach_account_number: typing.Callable[[], T_Result],
- swift_account_number: typing.Callable[[], T_Result],
- bic: typing.Callable[[], T_Result],
- bank_swift_code: typing.Callable[[], T_Result],
- upi_identifying_number: typing.Callable[[], T_Result],
- ip_address: typing.Callable[[], T_Result],
- device_identifier: typing.Callable[[], T_Result],
- string: typing.Callable[[], T_Result],
- country: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ListSubtype.USER_ID:
- return user_id()
- if self is ListSubtype.CARD_FINGERPRINT_NUMBER:
- return card_fingerprint_number()
- if self is ListSubtype.IBAN_NUMBER:
- return iban_number()
- if self is ListSubtype.BANK_ACCOUNT_NUMBER:
- return bank_account_number()
- if self is ListSubtype.ACH_ACCOUNT_NUMBER:
- return ach_account_number()
- if self is ListSubtype.SWIFT_ACCOUNT_NUMBER:
- return swift_account_number()
- if self is ListSubtype.BIC:
- return bic()
- if self is ListSubtype.BANK_SWIFT_CODE:
- return bank_swift_code()
- if self is ListSubtype.UPI_IDENTIFYING_NUMBER:
- return upi_identifying_number()
- if self is ListSubtype.IP_ADDRESS:
- return ip_address()
- if self is ListSubtype.DEVICE_IDENTIFIER:
- return device_identifier()
- if self is ListSubtype.STRING:
- return string()
- if self is ListSubtype.COUNTRY:
- return country()
+ListSubtype = typing.Union[
+ typing.Literal[
+ "USER_ID",
+ "CARD_FINGERPRINT_NUMBER",
+ "IBAN_NUMBER",
+ "BANK_ACCOUNT_NUMBER",
+ "ACH_ACCOUNT_NUMBER",
+ "SWIFT_ACCOUNT_NUMBER",
+ "BIC",
+ "BANK_SWIFT_CODE",
+ "UPI_IDENTIFYING_NUMBER",
+ "IP_ADDRESS",
+ "DEVICE_IDENTIFIER",
+ "STRING",
+ "COUNTRY",
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/types/list_type.py b/src/flagright/types/list_type.py
index 37c58e9..f61e639 100644
--- a/src/flagright/types/list_type.py
+++ b/src/flagright/types/list_type.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ListType(str, enum.Enum):
- WHITELIST = "WHITELIST"
- BLACKLIST = "BLACKLIST"
- FLAGRIGHT_LIBRARY = "FLAGRIGHT_LIBRARY"
-
- def visit(
- self,
- whitelist: typing.Callable[[], T_Result],
- blacklist: typing.Callable[[], T_Result],
- flagright_library: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ListType.WHITELIST:
- return whitelist()
- if self is ListType.BLACKLIST:
- return blacklist()
- if self is ListType.FLAGRIGHT_LIBRARY:
- return flagright_library()
+ListType = typing.Union[typing.Literal["WHITELIST", "BLACKLIST", "FLAGRIGHT_LIBRARY"], typing.Any]
diff --git a/src/flagright/types/list_updated_details.py b/src/flagright/types/list_updated_details.py
index 8496bef..6e809e9 100644
--- a/src/flagright/types/list_updated_details.py
+++ b/src/flagright/types/list_updated_details.py
@@ -1,33 +1,25 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+from .list_updated_details_action import ListUpdatedDetailsAction
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .list_item import ListItem
-from .list_updated_details_action import ListUpdatedDetailsAction
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-class ListUpdatedDetails(pydantic.BaseModel):
- list_id: str = pydantic.Field(alias="listId")
+class ListUpdatedDetails(UniversalBaseModel):
+ list_id: typing_extensions.Annotated[str, FieldMetadata(alias="listId")]
action: ListUpdatedDetailsAction
items: typing.List[ListItem]
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/list_updated_details_action.py b/src/flagright/types/list_updated_details_action.py
index ed41aeb..bd01915 100644
--- a/src/flagright/types/list_updated_details_action.py
+++ b/src/flagright/types/list_updated_details_action.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ListUpdatedDetailsAction(str, enum.Enum):
- SET = "SET"
- UNSET = "UNSET"
- CLEAR = "CLEAR"
-
- def visit(
- self,
- set_: typing.Callable[[], T_Result],
- unset: typing.Callable[[], T_Result],
- clear: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ListUpdatedDetailsAction.SET:
- return set_()
- if self is ListUpdatedDetailsAction.UNSET:
- return unset()
- if self is ListUpdatedDetailsAction.CLEAR:
- return clear()
+ListUpdatedDetailsAction = typing.Union[typing.Literal["SET", "UNSET", "CLEAR"], typing.Any]
diff --git a/src/flagright/types/marital_status.py b/src/flagright/types/marital_status.py
index 7b0c372..d262480 100644
--- a/src/flagright/types/marital_status.py
+++ b/src/flagright/types/marital_status.py
@@ -1,37 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class MaritalStatus(str, enum.Enum):
- """
- Marital status of the individual
- """
-
- DIVORCED = "DIVORCED"
- MARRIED = "MARRIED"
- SINGLE = "SINGLE"
- WIDOWED = "WIDOWED"
- NA = "NA"
-
- def visit(
- self,
- divorced: typing.Callable[[], T_Result],
- married: typing.Callable[[], T_Result],
- single: typing.Callable[[], T_Result],
- widowed: typing.Callable[[], T_Result],
- na: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is MaritalStatus.DIVORCED:
- return divorced()
- if self is MaritalStatus.MARRIED:
- return married()
- if self is MaritalStatus.SINGLE:
- return single()
- if self is MaritalStatus.WIDOWED:
- return widowed()
- if self is MaritalStatus.NA:
- return na()
+MaritalStatus = typing.Union[typing.Literal["DIVORCED", "MARRIED", "SINGLE", "WIDOWED", "NA"], typing.Any]
diff --git a/src/flagright/types/mcc_details.py b/src/flagright/types/mcc_details.py
index 01b8d58..6bad42d 100644
--- a/src/flagright/types/mcc_details.py
+++ b/src/flagright/types/mcc_details.py
@@ -1,29 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class MccDetails(UniversalBaseModel):
+ code: float = pydantic.Field()
+ """
+ Merchant code
+ """
+ description: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Merchant Description
+ """
-class MccDetails(pydantic.BaseModel):
- code: float = pydantic.Field(description="Merchant code")
- description: typing.Optional[str] = pydantic.Field(description="Merchant Description")
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- 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}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/mpesa_details.py b/src/flagright/types/mpesa_details.py
index 4c615f6..73f569d 100644
--- a/src/flagright/types/mpesa_details.py
+++ b/src/flagright/types/mpesa_details.py
@@ -1,42 +1,43 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+from .mpesa_transaction_type import MpesaTransactionType
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .email_id import EmailId
-from .mpesa_transaction_type import MpesaTransactionType
from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-class MpesaDetails(pydantic.BaseModel):
+class MpesaDetails(UniversalBaseModel):
"""
Model for Mpesa payment method
"""
- business_short_code: str = pydantic.Field(alias="businessShortCode", description="Business code")
- transaction_type: MpesaTransactionType = pydantic.Field(alias="transactionType")
- phone_number: str = pydantic.Field(alias="phoneNumber", description="Contact Number of the account holder")
- email_id: typing.Optional[EmailId] = pydantic.Field(alias="emailId")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
- )
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")] = pydantic.Field()
+ """
+ Business code
+ """
- 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)
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")] = pydantic.Field()
+ """
+ Contact Number of the account holder
+ """
+
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/mpesa_payment_method.py b/src/flagright/types/mpesa_payment_method.py
index 38034bd..6b28f91 100644
--- a/src/flagright/types/mpesa_payment_method.py
+++ b/src/flagright/types/mpesa_payment_method.py
@@ -1,5 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import typing_extensions
+import typing
-MpesaPaymentMethod = typing_extensions.Literal["MPESA"]
+MpesaPaymentMethod = typing.Literal["MPESA"]
diff --git a/src/flagright/types/mpesa_transaction_type.py b/src/flagright/types/mpesa_transaction_type.py
index 4fc8e94..d5a1fb3 100644
--- a/src/flagright/types/mpesa_transaction_type.py
+++ b/src/flagright/types/mpesa_transaction_type.py
@@ -1,37 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class MpesaTransactionType(str, enum.Enum):
- """
- Type of transaction
- """
-
- CUSTOMER_PAY_BILL_ONLINE = "CustomerPayBillOnline"
- CUSTOMER_BUY_GOODS_ONLINE = "CustomerBuyGoodsOnline"
- SALARY_PAYMENT = "SalaryPayment"
- BUSINESS_PAYMENT = "BusinessPayment"
- PROMOTION_PAYMENT = "PromotionPayment"
-
- def visit(
- self,
- customer_pay_bill_online: typing.Callable[[], T_Result],
- customer_buy_goods_online: typing.Callable[[], T_Result],
- salary_payment: typing.Callable[[], T_Result],
- business_payment: typing.Callable[[], T_Result],
- promotion_payment: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is MpesaTransactionType.CUSTOMER_PAY_BILL_ONLINE:
- return customer_pay_bill_online()
- if self is MpesaTransactionType.CUSTOMER_BUY_GOODS_ONLINE:
- return customer_buy_goods_online()
- if self is MpesaTransactionType.SALARY_PAYMENT:
- return salary_payment()
- if self is MpesaTransactionType.BUSINESS_PAYMENT:
- return business_payment()
- if self is MpesaTransactionType.PROMOTION_PAYMENT:
- return promotion_payment()
+MpesaTransactionType = typing.Union[
+ typing.Literal[
+ "CustomerPayBillOnline", "CustomerBuyGoodsOnline", "SalaryPayment", "BusinessPayment", "PromotionPayment"
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/types/origin_funds_info.py b/src/flagright/types/origin_funds_info.py
index ba14c07..a6854b4 100644
--- a/src/flagright/types/origin_funds_info.py
+++ b/src/flagright/types/origin_funds_info.py
@@ -1,36 +1,37 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
+from ..core.serialization import FieldMetadata
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class OriginFundsInfo(pydantic.BaseModel):
+class OriginFundsInfo(UniversalBaseModel):
"""
Model for origin funds information
"""
- source_of_funds: typing.Optional[str] = pydantic.Field(
- alias="sourceOfFunds", description="Source of funds for the transaction"
+ source_of_funds: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sourceOfFunds")] = (
+ pydantic.Field(default=None)
)
- source_of_wealth: typing.Optional[str] = pydantic.Field(alias="sourceOfWealth", description="Source of wealth")
+ """
+ Source of funds for the 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)
+ source_of_wealth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sourceOfWealth")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Source of wealth
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/payment_method.py b/src/flagright/types/payment_method.py
index e65ccd8..43f9a52 100644
--- a/src/flagright/types/payment_method.py
+++ b/src/flagright/types/payment_method.py
@@ -1,53 +1,8 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PaymentMethod(str, enum.Enum):
- ACH = "ACH"
- CARD = "CARD"
- IBAN = "IBAN"
- UPI = "UPI"
- GENERIC_BANK_ACCOUNT = "GENERIC_BANK_ACCOUNT"
- MPESA = "MPESA"
- SWIFT = "SWIFT"
- WALLET = "WALLET"
- CHECK = "CHECK"
- CASH = "CASH"
-
- def visit(
- self,
- ach: typing.Callable[[], T_Result],
- card: typing.Callable[[], T_Result],
- iban: typing.Callable[[], T_Result],
- upi: typing.Callable[[], T_Result],
- generic_bank_account: typing.Callable[[], T_Result],
- mpesa: typing.Callable[[], T_Result],
- swift: typing.Callable[[], T_Result],
- wallet: typing.Callable[[], T_Result],
- check: typing.Callable[[], T_Result],
- cash: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PaymentMethod.ACH:
- return ach()
- if self is PaymentMethod.CARD:
- return card()
- if self is PaymentMethod.IBAN:
- return iban()
- if self is PaymentMethod.UPI:
- return upi()
- if self is PaymentMethod.GENERIC_BANK_ACCOUNT:
- return generic_bank_account()
- if self is PaymentMethod.MPESA:
- return mpesa()
- if self is PaymentMethod.SWIFT:
- return swift()
- if self is PaymentMethod.WALLET:
- return wallet()
- if self is PaymentMethod.CHECK:
- return check()
- if self is PaymentMethod.CASH:
- return cash()
+PaymentMethod = typing.Union[
+ typing.Literal["ACH", "CARD", "IBAN", "UPI", "GENERIC_BANK_ACCOUNT", "MPESA", "SWIFT", "WALLET", "CHECK", "CASH"],
+ typing.Any,
+]
diff --git a/src/flagright/types/pep_rank.py b/src/flagright/types/pep_rank.py
index fb9159f..85f2612 100644
--- a/src/flagright/types/pep_rank.py
+++ b/src/flagright/types/pep_rank.py
@@ -1,29 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PepRank(str, enum.Enum):
- """
- PEP rank
- """
-
- LEVEL_1 = "LEVEL_1"
- LEVEL_2 = "LEVEL_2"
- LEVEL_3 = "LEVEL_3"
-
- def visit(
- self,
- level_1: typing.Callable[[], T_Result],
- level_2: typing.Callable[[], T_Result],
- level_3: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PepRank.LEVEL_1:
- return level_1()
- if self is PepRank.LEVEL_2:
- return level_2()
- if self is PepRank.LEVEL_3:
- return level_3()
+PepRank = typing.Union[typing.Literal["LEVEL_1", "LEVEL_2", "LEVEL_3"], typing.Any]
diff --git a/src/flagright/types/pep_status.py b/src/flagright/types/pep_status.py
index acbda88..0072883 100644
--- a/src/flagright/types/pep_status.py
+++ b/src/flagright/types/pep_status.py
@@ -1,33 +1,25 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .country_code import CountryCode
from .pep_rank import PepRank
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class PepStatus(pydantic.BaseModel):
- is_pep_hit: bool = pydantic.Field(alias="isPepHit")
- pep_country: typing.Optional[CountryCode] = pydantic.Field(alias="pepCountry")
- pep_rank: typing.Optional[PepRank] = pydantic.Field(alias="pepRank")
- 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)
+class PepStatus(UniversalBaseModel):
+ is_pep_hit: typing_extensions.Annotated[bool, FieldMetadata(alias="isPepHit")]
+ pep_country: typing_extensions.Annotated[typing.Optional[CountryCode], FieldMetadata(alias="pepCountry")] = None
+ pep_rank: typing_extensions.Annotated[typing.Optional[PepRank], FieldMetadata(alias="pepRank")] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/person.py b/src/flagright/types/person.py
index 56febde..744e00e 100644
--- a/src/flagright/types/person.py
+++ b/src/flagright/types/person.py
@@ -1,51 +1,60 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .contact_details import ContactDetails
+from ..core.serialization import FieldMetadata
+import pydantic
+from .user_details import UserDetails
from .legal_document import LegalDocument
+from .contact_details import ContactDetails
from .pep_status import PepStatus
-from .person_attachment import PersonAttachment
from .tag import Tag
-from .user_details import UserDetails
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from .person_attachment import PersonAttachment
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class Person(pydantic.BaseModel):
+class Person(UniversalBaseModel):
"""
Model for a generic individual - different from User model by not having userId field
"""
- user_id: typing.Optional[str] = pydantic.Field(alias="userId", description="Unique user ID for the person")
- general_details: UserDetails = pydantic.Field(alias="generalDetails")
- legal_documents: typing.Optional[typing.List[LegalDocument]] = pydantic.Field(
- alias="legalDocuments", description="User's legal identity documents - See Document Model for details"
- )
- contact_details: typing.Optional[ContactDetails] = pydantic.Field(alias="contactDetails")
- pep_status: typing.Optional[typing.List[PepStatus]] = pydantic.Field(alias="pepStatus")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
- )
- attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
- description="User's attachments uploaded by business user"
+ user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userId")] = pydantic.Field(
+ default=None
)
+ """
+ Unique user ID for the person
+ """
+
+ general_details: typing_extensions.Annotated[UserDetails, FieldMetadata(alias="generalDetails")]
+ legal_documents: typing_extensions.Annotated[
+ typing.Optional[typing.List[LegalDocument]], FieldMetadata(alias="legalDocuments")
+ ] = pydantic.Field(default=None)
+ """
+ User's legal identity documents - See Document Model for details
+ """
- 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)
+ contact_details: typing_extensions.Annotated[
+ typing.Optional[ContactDetails], FieldMetadata(alias="contactDetails")
+ ] = None
+ pep_status: typing_extensions.Annotated[
+ typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(default=None)
+ """
+ User's attachments uploaded by business user
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/person_attachment.py b/src/flagright/types/person_attachment.py
index d60c6a7..a2da73d 100644
--- a/src/flagright/types/person_attachment.py
+++ b/src/flagright/types/person_attachment.py
@@ -1,39 +1,35 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ..core.datetime_utils import serialize_datetime
+import pydantic
from .file_info import FileInfo
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+import typing_extensions
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class PersonAttachment(pydantic.BaseModel):
+class PersonAttachment(UniversalBaseModel):
"""
PersonAttachment model generalizes User's uploaded attachments
"""
- id: typing.Optional[str]
- comment: typing.Optional[str] = pydantic.Field(description="User's comment on the attached file.")
- files: typing.List[FileInfo]
- user_id: str = pydantic.Field(alias="userId")
- created_at: typing.Optional[float] = pydantic.Field(alias="createdAt")
- deleted_at: typing.Optional[float] = pydantic.Field(alias="deletedAt")
-
- 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)
+ id: typing.Optional[str] = None
+ comment: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ User's comment on the attached file.
+ """
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ files: typing.List[FileInfo]
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")]
+ created_at: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="createdAt")] = None
+ deleted_at: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="deletedAt")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/place_of_birth.py b/src/flagright/types/place_of_birth.py
index fa22c5e..7238017 100644
--- a/src/flagright/types/place_of_birth.py
+++ b/src/flagright/types/place_of_birth.py
@@ -1,35 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
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
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PlaceOfBirth(pydantic.BaseModel):
+class PlaceOfBirth(UniversalBaseModel):
"""
Place of birth of the individual
"""
- city: typing.Optional[str]
- state: typing.Optional[str]
+ city: typing.Optional[str] = None
+ state: typing.Optional[str] = None
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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/pos_details.py b/src/flagright/types/pos_details.py
index 655edbd..fba5c03 100644
--- a/src/flagright/types/pos_details.py
+++ b/src/flagright/types/pos_details.py
@@ -1,30 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .pos_entry_mode import PosEntryMode
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class PosDetails(pydantic.BaseModel):
- entry_mode: typing.Optional[PosEntryMode] = pydantic.Field(alias="entryMode")
- 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)
+class PosDetails(UniversalBaseModel):
+ entry_mode: typing_extensions.Annotated[typing.Optional[PosEntryMode], FieldMetadata(alias="entryMode")] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/pos_entry_mode.py b/src/flagright/types/pos_entry_mode.py
index e09bd2d..a092466 100644
--- a/src/flagright/types/pos_entry_mode.py
+++ b/src/flagright/types/pos_entry_mode.py
@@ -1,93 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PosEntryMode(str, enum.Enum):
- ZERO = "0"
- ONE = "1"
- TWO = "2"
- THREE = "3"
- FOUR = "4"
- FIVE = "5"
- SIX = "6"
- SEVEN = "7"
- EIGHT = "8"
- NINE = "9"
- TEN = "10"
- SEVENTY_NINE = "79"
- EIGHTY = "80"
- EIGHTY_ONE = "81"
- EIGHTY_TWO = "82"
- EIGHTY_FIVE = "85"
- NINETY = "90"
- NINETY_ONE = "91"
- NINETY_FIVE = "95"
- NINETY_SEVEN = "97"
-
- def visit(
- self,
- zero: typing.Callable[[], T_Result],
- one: typing.Callable[[], T_Result],
- two: typing.Callable[[], T_Result],
- three: typing.Callable[[], T_Result],
- four: typing.Callable[[], T_Result],
- five: typing.Callable[[], T_Result],
- six: typing.Callable[[], T_Result],
- seven: typing.Callable[[], T_Result],
- eight: typing.Callable[[], T_Result],
- nine: typing.Callable[[], T_Result],
- ten: typing.Callable[[], T_Result],
- seventy_nine: typing.Callable[[], T_Result],
- eighty: typing.Callable[[], T_Result],
- eighty_one: typing.Callable[[], T_Result],
- eighty_two: typing.Callable[[], T_Result],
- eighty_five: typing.Callable[[], T_Result],
- ninety: typing.Callable[[], T_Result],
- ninety_one: typing.Callable[[], T_Result],
- ninety_five: typing.Callable[[], T_Result],
- ninety_seven: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PosEntryMode.ZERO:
- return zero()
- if self is PosEntryMode.ONE:
- return one()
- if self is PosEntryMode.TWO:
- return two()
- if self is PosEntryMode.THREE:
- return three()
- if self is PosEntryMode.FOUR:
- return four()
- if self is PosEntryMode.FIVE:
- return five()
- if self is PosEntryMode.SIX:
- return six()
- if self is PosEntryMode.SEVEN:
- return seven()
- if self is PosEntryMode.EIGHT:
- return eight()
- if self is PosEntryMode.NINE:
- return nine()
- if self is PosEntryMode.TEN:
- return ten()
- if self is PosEntryMode.SEVENTY_NINE:
- return seventy_nine()
- if self is PosEntryMode.EIGHTY:
- return eighty()
- if self is PosEntryMode.EIGHTY_ONE:
- return eighty_one()
- if self is PosEntryMode.EIGHTY_TWO:
- return eighty_two()
- if self is PosEntryMode.EIGHTY_FIVE:
- return eighty_five()
- if self is PosEntryMode.NINETY:
- return ninety()
- if self is PosEntryMode.NINETY_ONE:
- return ninety_one()
- if self is PosEntryMode.NINETY_FIVE:
- return ninety_five()
- if self is PosEntryMode.NINETY_SEVEN:
- return ninety_seven()
+PosEntryMode = typing.Union[
+ typing.Literal[
+ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "79", "80", "81", "82", "85", "90", "91", "95", "97"
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/types/risk_level.py b/src/flagright/types/risk_level.py
index 079b271..630d263 100644
--- a/src/flagright/types/risk_level.py
+++ b/src/flagright/types/risk_level.py
@@ -1,33 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RiskLevel(str, enum.Enum):
- VERY_HIGH = "VERY_HIGH"
- HIGH = "HIGH"
- MEDIUM = "MEDIUM"
- LOW = "LOW"
- VERY_LOW = "VERY_LOW"
-
- def visit(
- self,
- very_high: typing.Callable[[], T_Result],
- high: typing.Callable[[], T_Result],
- medium: typing.Callable[[], T_Result],
- low: typing.Callable[[], T_Result],
- very_low: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RiskLevel.VERY_HIGH:
- return very_high()
- if self is RiskLevel.HIGH:
- return high()
- if self is RiskLevel.MEDIUM:
- return medium()
- if self is RiskLevel.LOW:
- return low()
- if self is RiskLevel.VERY_LOW:
- return very_low()
+RiskLevel = typing.Union[typing.Literal["VERY_HIGH", "HIGH", "MEDIUM", "LOW", "VERY_LOW"], typing.Any]
diff --git a/src/flagright/types/rule_action.py b/src/flagright/types/rule_action.py
index f174fe2..69e6401 100644
--- a/src/flagright/types/rule_action.py
+++ b/src/flagright/types/rule_action.py
@@ -1,33 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RuleAction(str, enum.Enum):
- """
- Model for rule action if a rule is hit. This is returned in the API response and can be configured on Console by operational accounts like a Compliance Analyst
- """
-
- ALLOW = "ALLOW"
- FLAG = "FLAG"
- BLOCK = "BLOCK"
- SUSPEND = "SUSPEND"
-
- def visit(
- self,
- allow: typing.Callable[[], T_Result],
- flag: typing.Callable[[], T_Result],
- block: typing.Callable[[], T_Result],
- suspend: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RuleAction.ALLOW:
- return allow()
- if self is RuleAction.FLAG:
- return flag()
- if self is RuleAction.BLOCK:
- return block()
- if self is RuleAction.SUSPEND:
- return suspend()
+RuleAction = typing.Union[typing.Literal["ALLOW", "FLAG", "BLOCK", "SUSPEND"], typing.Any]
diff --git a/src/flagright/types/rule_failure_exception.py b/src/flagright/types/rule_failure_exception.py
index aa5610b..6a53427 100644
--- a/src/flagright/types/rule_failure_exception.py
+++ b/src/flagright/types/rule_failure_exception.py
@@ -1,30 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
import typing
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class RuleFailureException(UniversalBaseModel):
+ exception_name: typing_extensions.Annotated[str, FieldMetadata(alias="exceptionName")] = pydantic.Field()
+ """
+ Unique rule identifier
+ """
+ exception_description: typing_extensions.Annotated[str, FieldMetadata(alias="exceptionDescription")] = (
+ pydantic.Field()
+ )
+ """
+ Name of the rule
+ """
-class RuleFailureException(pydantic.BaseModel):
- exception_name: str = pydantic.Field(alias="exceptionName", description="Unique rule identifier")
- exception_description: str = pydantic.Field(alias="exceptionDescription", description="Name of the rule")
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/rule_hit_direction.py b/src/flagright/types/rule_hit_direction.py
index 4faa50d..7d31cbe 100644
--- a/src/flagright/types/rule_hit_direction.py
+++ b/src/flagright/types/rule_hit_direction.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RuleHitDirection(str, enum.Enum):
- ORIGIN = "ORIGIN"
- DESTINATION = "DESTINATION"
-
- def visit(self, origin: typing.Callable[[], T_Result], destination: typing.Callable[[], T_Result]) -> T_Result:
- if self is RuleHitDirection.ORIGIN:
- return origin()
- if self is RuleHitDirection.DESTINATION:
- return destination()
+RuleHitDirection = typing.Union[typing.Literal["ORIGIN", "DESTINATION"], typing.Any]
diff --git a/src/flagright/types/rule_hit_meta.py b/src/flagright/types/rule_hit_meta.py
index 89bd12b..ca4883a 100644
--- a/src/flagright/types/rule_hit_meta.py
+++ b/src/flagright/types/rule_hit_meta.py
@@ -1,39 +1,39 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .false_positive_details import FalsePositiveDetails
from .rule_hit_direction import RuleHitDirection
+from ..core.serialization import FieldMetadata
+from .false_positive_details import FalsePositiveDetails
from .sanctions_details import SanctionsDetails
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RuleHitMeta(pydantic.BaseModel):
+class RuleHitMeta(UniversalBaseModel):
"""
Details of rule execution, for internal purposes only
"""
- hit_directions: typing.Optional[typing.List[RuleHitDirection]] = pydantic.Field(alias="hitDirections")
- false_positive_details: typing.Optional[FalsePositiveDetails] = pydantic.Field(alias="falsePositiveDetails")
- sanctions_details: typing.Optional[typing.List[SanctionsDetails]] = pydantic.Field(alias="sanctionsDetails")
- is_ongoing_screening_hit: typing.Optional[bool] = pydantic.Field(alias="isOngoingScreeningHit")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ hit_directions: typing_extensions.Annotated[
+ typing.Optional[typing.List[RuleHitDirection]], FieldMetadata(alias="hitDirections")
+ ] = None
+ false_positive_details: typing_extensions.Annotated[
+ typing.Optional[FalsePositiveDetails], FieldMetadata(alias="falsePositiveDetails")
+ ] = None
+ sanctions_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[SanctionsDetails]], FieldMetadata(alias="sanctionsDetails")
+ ] = None
+ is_ongoing_screening_hit: typing_extensions.Annotated[
+ typing.Optional[bool], FieldMetadata(alias="isOngoingScreeningHit")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/rule_labels.py b/src/flagright/types/rule_labels.py
index 3fb6ebb..e62d25f 100644
--- a/src/flagright/types/rule_labels.py
+++ b/src/flagright/types/rule_labels.py
@@ -1,65 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RuleLabels(str, enum.Enum):
- UNEXPECTED_BEHAVIOR = "UNEXPECTED_BEHAVIOR"
- ILLICIT_GAINS_CHECK = "ILLICIT_GAINS_CHECK"
- RFI_TRIGGER = "RFI_TRIGGER"
- EDD_TRIGGER = "EDD_TRIGGER"
- KYC_TRIGGER = "KYC_TRIGGER"
- SCAM = "SCAM"
- ABUSE = "ABUSE"
- ACCOUNT_TAKEOVER = "ACCOUNT_TAKEOVER"
- DISPUTE = "DISPUTE"
- SANCTIONS = "SANCTIONS"
- SANCTIONS_PEP = "SANCTIONS_PEP"
- SANCTIONS_PEP_ADVERSE_MEDIA = "SANCTIONS_PEP_ADVERSE_MEDIA"
- SANCTIONS_MANUAL_REVIEW = "SANCTIONS_MANUAL_REVIEW"
-
- def visit(
- self,
- unexpected_behavior: typing.Callable[[], T_Result],
- illicit_gains_check: typing.Callable[[], T_Result],
- rfi_trigger: typing.Callable[[], T_Result],
- edd_trigger: typing.Callable[[], T_Result],
- kyc_trigger: typing.Callable[[], T_Result],
- scam: typing.Callable[[], T_Result],
- abuse: typing.Callable[[], T_Result],
- account_takeover: typing.Callable[[], T_Result],
- dispute: typing.Callable[[], T_Result],
- sanctions: typing.Callable[[], T_Result],
- sanctions_pep: typing.Callable[[], T_Result],
- sanctions_pep_adverse_media: typing.Callable[[], T_Result],
- sanctions_manual_review: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RuleLabels.UNEXPECTED_BEHAVIOR:
- return unexpected_behavior()
- if self is RuleLabels.ILLICIT_GAINS_CHECK:
- return illicit_gains_check()
- if self is RuleLabels.RFI_TRIGGER:
- return rfi_trigger()
- if self is RuleLabels.EDD_TRIGGER:
- return edd_trigger()
- if self is RuleLabels.KYC_TRIGGER:
- return kyc_trigger()
- if self is RuleLabels.SCAM:
- return scam()
- if self is RuleLabels.ABUSE:
- return abuse()
- if self is RuleLabels.ACCOUNT_TAKEOVER:
- return account_takeover()
- if self is RuleLabels.DISPUTE:
- return dispute()
- if self is RuleLabels.SANCTIONS:
- return sanctions()
- if self is RuleLabels.SANCTIONS_PEP:
- return sanctions_pep()
- if self is RuleLabels.SANCTIONS_PEP_ADVERSE_MEDIA:
- return sanctions_pep_adverse_media()
- if self is RuleLabels.SANCTIONS_MANUAL_REVIEW:
- return sanctions_manual_review()
+RuleLabels = typing.Union[
+ typing.Literal[
+ "UNEXPECTED_BEHAVIOR",
+ "ILLICIT_GAINS_CHECK",
+ "RFI_TRIGGER",
+ "EDD_TRIGGER",
+ "KYC_TRIGGER",
+ "SCAM",
+ "ABUSE",
+ "ACCOUNT_TAKEOVER",
+ "DISPUTE",
+ "SANCTIONS",
+ "SANCTIONS_PEP",
+ "SANCTIONS_PEP_ADVERSE_MEDIA",
+ "SANCTIONS_MANUAL_REVIEW",
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/types/rule_nature.py b/src/flagright/types/rule_nature.py
index 2c7bd1a..cb01684 100644
--- a/src/flagright/types/rule_nature.py
+++ b/src/flagright/types/rule_nature.py
@@ -1,29 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RuleNature(str, enum.Enum):
- AML = "AML"
- FRAUD = "FRAUD"
- CTF = "CTF"
- SCREENING = "SCREENING"
-
- def visit(
- self,
- aml: typing.Callable[[], T_Result],
- fraud: typing.Callable[[], T_Result],
- ctf: typing.Callable[[], T_Result],
- screening: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RuleNature.AML:
- return aml()
- if self is RuleNature.FRAUD:
- return fraud()
- if self is RuleNature.CTF:
- return ctf()
- if self is RuleNature.SCREENING:
- return screening()
+RuleNature = typing.Union[typing.Literal["AML", "FRAUD", "CTF", "SCREENING"], typing.Any]
diff --git a/src/flagright/types/rules_results.py b/src/flagright/types/rules_results.py
index e6b7b79..194f189 100644
--- a/src/flagright/types/rules_results.py
+++ b/src/flagright/types/rules_results.py
@@ -1,36 +1,35 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .executed_rules_result import ExecutedRulesResult
+from ..core.serialization import FieldMetadata
+import pydantic
from .hit_rules_details import HitRulesDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class RulesResults(UniversalBaseModel):
+ executed_rules: typing_extensions.Annotated[
+ typing.List[ExecutedRulesResult], FieldMetadata(alias="executedRules")
+ ] = pydantic.Field()
+ """
+ Unique transaction identifier
+ """
-class RulesResults(pydantic.BaseModel):
- executed_rules: typing.List[ExecutedRulesResult] = pydantic.Field(
- alias="executedRules", description="Unique transaction identifier"
- )
- hit_rules: typing.List[HitRulesDetails] = pydantic.Field(
- alias="hitRules", description="Unique transaction identifier"
+ hit_rules: typing_extensions.Annotated[typing.List[HitRulesDetails], FieldMetadata(alias="hitRules")] = (
+ pydantic.Field()
)
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Unique transaction identifier
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/sanctions_details.py b/src/flagright/types/sanctions_details.py
index 0ea4428..820e36f 100644
--- a/src/flagright/types/sanctions_details.py
+++ b/src/flagright/types/sanctions_details.py
@@ -1,36 +1,34 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .sanctions_details_entity_type import SanctionsDetailsEntityType
from .sanctions_hit_context import SanctionsHitContext
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class SanctionsDetails(pydantic.BaseModel):
+class SanctionsDetails(UniversalBaseModel):
name: str
- search_id: str = pydantic.Field(alias="searchId")
- iban: typing.Optional[str]
- entity_type: typing.Optional[SanctionsDetailsEntityType] = pydantic.Field(alias="entityType")
- sanction_hit_ids: typing.Optional[typing.List[str]] = pydantic.Field(alias="sanctionHitIds")
- hit_context: typing.Optional[SanctionsHitContext] = pydantic.Field(alias="hitContext")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ search_id: typing_extensions.Annotated[str, FieldMetadata(alias="searchId")]
+ iban: typing.Optional[str] = None
+ entity_type: typing_extensions.Annotated[
+ typing.Optional[SanctionsDetailsEntityType], FieldMetadata(alias="entityType")
+ ] = None
+ sanction_hit_ids: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="sanctionHitIds")
+ ] = None
+ hit_context: typing_extensions.Annotated[
+ typing.Optional[SanctionsHitContext], FieldMetadata(alias="hitContext")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/sanctions_details_entity_type.py b/src/flagright/types/sanctions_details_entity_type.py
index 749dccf..f29a017 100644
--- a/src/flagright/types/sanctions_details_entity_type.py
+++ b/src/flagright/types/sanctions_details_entity_type.py
@@ -1,49 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SanctionsDetailsEntityType(str, enum.Enum):
- CONSUMER_NAME = "CONSUMER_NAME"
- LEGAL_NAME = "LEGAL_NAME"
- SHAREHOLDER = "SHAREHOLDER"
- DIRECTOR = "DIRECTOR"
- NAME_ON_CARD = "NAME_ON_CARD"
- PAYMENT_NAME = "PAYMENT_NAME"
- PAYMENT_BENEFICIARY_NAME = "PAYMENT_BENEFICIARY_NAME"
- BANK_NAME = "BANK_NAME"
- BANK_ACCOUNT_HOLDER_NAME = "BANK_ACCOUNT_HOLDER_NAME"
-
- def visit(
- self,
- consumer_name: typing.Callable[[], T_Result],
- legal_name: typing.Callable[[], T_Result],
- shareholder: typing.Callable[[], T_Result],
- director: typing.Callable[[], T_Result],
- name_on_card: typing.Callable[[], T_Result],
- payment_name: typing.Callable[[], T_Result],
- payment_beneficiary_name: typing.Callable[[], T_Result],
- bank_name: typing.Callable[[], T_Result],
- bank_account_holder_name: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is SanctionsDetailsEntityType.CONSUMER_NAME:
- return consumer_name()
- if self is SanctionsDetailsEntityType.LEGAL_NAME:
- return legal_name()
- if self is SanctionsDetailsEntityType.SHAREHOLDER:
- return shareholder()
- if self is SanctionsDetailsEntityType.DIRECTOR:
- return director()
- if self is SanctionsDetailsEntityType.NAME_ON_CARD:
- return name_on_card()
- if self is SanctionsDetailsEntityType.PAYMENT_NAME:
- return payment_name()
- if self is SanctionsDetailsEntityType.PAYMENT_BENEFICIARY_NAME:
- return payment_beneficiary_name()
- if self is SanctionsDetailsEntityType.BANK_NAME:
- return bank_name()
- if self is SanctionsDetailsEntityType.BANK_ACCOUNT_HOLDER_NAME:
- return bank_account_holder_name()
+SanctionsDetailsEntityType = typing.Union[
+ typing.Literal[
+ "CONSUMER_NAME",
+ "LEGAL_NAME",
+ "SHAREHOLDER",
+ "DIRECTOR",
+ "NAME_ON_CARD",
+ "PAYMENT_NAME",
+ "PAYMENT_BENEFICIARY_NAME",
+ "BANK_NAME",
+ "BANK_ACCOUNT_HOLDER_NAME",
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/types/sanctions_hit_context.py b/src/flagright/types/sanctions_hit_context.py
index e129e56..8632606 100644
--- a/src/flagright/types/sanctions_hit_context.py
+++ b/src/flagright/types/sanctions_hit_context.py
@@ -1,38 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+from .sanctions_screening_entity import SanctionsScreeningEntity
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .sanctions_details_entity_type import SanctionsDetailsEntityType
-from .sanctions_screening_entity import SanctionsScreeningEntity
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class SanctionsHitContext(pydantic.BaseModel):
+class SanctionsHitContext(UniversalBaseModel):
entity: SanctionsScreeningEntity
- entity_type: typing.Optional[SanctionsDetailsEntityType] = pydantic.Field(alias="entityType")
- user_id: typing.Optional[str] = pydantic.Field(alias="userId")
- transaction_id: typing.Optional[str] = pydantic.Field(alias="transactionId")
- rule_instance_id: typing.Optional[str] = pydantic.Field(alias="ruleInstanceId")
- iban: typing.Optional[str]
- year_of_birth: typing.Optional[float] = pydantic.Field(alias="yearOfBirth")
- search_term: typing.Optional[str] = pydantic.Field(alias="searchTerm")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ entity_type: typing_extensions.Annotated[
+ typing.Optional[SanctionsDetailsEntityType], FieldMetadata(alias="entityType")
+ ] = None
+ user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userId")] = None
+ transaction_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionId")] = None
+ rule_instance_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleInstanceId")] = None
+ iban: typing.Optional[str] = None
+ year_of_birth: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="yearOfBirth")] = None
+ search_term: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="searchTerm")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/sanctions_screening_entity.py b/src/flagright/types/sanctions_screening_entity.py
index b6bf7e4..5d36da0 100644
--- a/src/flagright/types/sanctions_screening_entity.py
+++ b/src/flagright/types/sanctions_screening_entity.py
@@ -1,29 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SanctionsScreeningEntity(str, enum.Enum):
- USER = "USER"
- BANK = "BANK"
- IBAN = "IBAN"
- EXTERNAL_USER = "EXTERNAL_USER"
-
- def visit(
- self,
- user: typing.Callable[[], T_Result],
- bank: typing.Callable[[], T_Result],
- iban: typing.Callable[[], T_Result],
- external_user: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is SanctionsScreeningEntity.USER:
- return user()
- if self is SanctionsScreeningEntity.BANK:
- return bank()
- if self is SanctionsScreeningEntity.IBAN:
- return iban()
- if self is SanctionsScreeningEntity.EXTERNAL_USER:
- return external_user()
+SanctionsScreeningEntity = typing.Union[typing.Literal["USER", "BANK", "IBAN", "EXTERNAL_USER"], typing.Any]
diff --git a/src/flagright/types/source_of_funds.py b/src/flagright/types/source_of_funds.py
index 0551bea..0b0c737 100644
--- a/src/flagright/types/source_of_funds.py
+++ b/src/flagright/types/source_of_funds.py
@@ -1,105 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SourceOfFunds(str, enum.Enum):
- EARNINGS = "Earnings"
- SAVINGS = "Savings"
- INVESTMENTS_DEPOSITS = "Investments/Deposits"
- WEALTH = "Wealth"
- GIFT = "Gift"
- PENSION = "Pension"
- INHERITANCE = "Inheritance"
- GAMBLING = "Gambling"
- BENEFITS = "Benefits"
- PASSIVE = "Passive"
- FAMILY = "Family"
- INSURANCE = "Insurance"
- LEGAL = "Legal"
- SALES = "Sales"
- ROLLOVER = "Rollover"
- EQUITY = "Equity"
- CRYPTO = "Crypto"
- BUSINESS = "Business"
- EMPLOYMENT = "Employment"
- SALARY = "Salary"
- REAL_ESTATE_SALE = "Real Estate Sale"
- REAL_ESTATE_RENTAL = "Real Estate Rental"
- COMPANY_EXIT = "Company Exit"
-
- def visit(
- self,
- earnings: typing.Callable[[], T_Result],
- savings: typing.Callable[[], T_Result],
- investments_deposits: typing.Callable[[], T_Result],
- wealth: typing.Callable[[], T_Result],
- gift: typing.Callable[[], T_Result],
- pension: typing.Callable[[], T_Result],
- inheritance: typing.Callable[[], T_Result],
- gambling: typing.Callable[[], T_Result],
- benefits: typing.Callable[[], T_Result],
- passive: typing.Callable[[], T_Result],
- family: typing.Callable[[], T_Result],
- insurance: typing.Callable[[], T_Result],
- legal: typing.Callable[[], T_Result],
- sales: typing.Callable[[], T_Result],
- rollover: typing.Callable[[], T_Result],
- equity: typing.Callable[[], T_Result],
- crypto: typing.Callable[[], T_Result],
- business: typing.Callable[[], T_Result],
- employment: typing.Callable[[], T_Result],
- salary: typing.Callable[[], T_Result],
- real_estate_sale: typing.Callable[[], T_Result],
- real_estate_rental: typing.Callable[[], T_Result],
- company_exit: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is SourceOfFunds.EARNINGS:
- return earnings()
- if self is SourceOfFunds.SAVINGS:
- return savings()
- if self is SourceOfFunds.INVESTMENTS_DEPOSITS:
- return investments_deposits()
- if self is SourceOfFunds.WEALTH:
- return wealth()
- if self is SourceOfFunds.GIFT:
- return gift()
- if self is SourceOfFunds.PENSION:
- return pension()
- if self is SourceOfFunds.INHERITANCE:
- return inheritance()
- if self is SourceOfFunds.GAMBLING:
- return gambling()
- if self is SourceOfFunds.BENEFITS:
- return benefits()
- if self is SourceOfFunds.PASSIVE:
- return passive()
- if self is SourceOfFunds.FAMILY:
- return family()
- if self is SourceOfFunds.INSURANCE:
- return insurance()
- if self is SourceOfFunds.LEGAL:
- return legal()
- if self is SourceOfFunds.SALES:
- return sales()
- if self is SourceOfFunds.ROLLOVER:
- return rollover()
- if self is SourceOfFunds.EQUITY:
- return equity()
- if self is SourceOfFunds.CRYPTO:
- return crypto()
- if self is SourceOfFunds.BUSINESS:
- return business()
- if self is SourceOfFunds.EMPLOYMENT:
- return employment()
- if self is SourceOfFunds.SALARY:
- return salary()
- if self is SourceOfFunds.REAL_ESTATE_SALE:
- return real_estate_sale()
- if self is SourceOfFunds.REAL_ESTATE_RENTAL:
- return real_estate_rental()
- if self is SourceOfFunds.COMPANY_EXIT:
- return company_exit()
+SourceOfFunds = typing.Union[
+ typing.Literal[
+ "Earnings",
+ "Savings",
+ "Investments/Deposits",
+ "Wealth",
+ "Gift",
+ "Pension",
+ "Inheritance",
+ "Gambling",
+ "Benefits",
+ "Passive",
+ "Family",
+ "Insurance",
+ "Legal",
+ "Sales",
+ "Rollover",
+ "Equity",
+ "Crypto",
+ "Business",
+ "Employment",
+ "Salary",
+ "Real Estate Sale",
+ "Real Estate Rental",
+ "Company Exit",
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/types/swift_details.py b/src/flagright/types/swift_details.py
index 7ded07c..c984f3d 100644
--- a/src/flagright/types/swift_details.py
+++ b/src/flagright/types/swift_details.py
@@ -1,54 +1,75 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .address import Address
+from ..core.serialization import FieldMetadata
+import pydantic
from .amount import Amount
+from .address import Address
from .email_id import EmailId
from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-class SwiftDetails(pydantic.BaseModel):
+class SwiftDetails(UniversalBaseModel):
"""
Model for SWIFT payment method
"""
- swift_code: typing.Optional[str] = pydantic.Field(
- alias="swiftCode", description="SWIFT code of the financial institution"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = pydantic.Field(
+ default=None
)
- account_number: typing.Optional[str] = pydantic.Field(alias="accountNumber", description="Account number")
- account_balance: typing.Optional[Amount] = pydantic.Field(alias="accountBalance")
- account_type: typing.Optional[str] = pydantic.Field(
- alias="accountType", description="Account type. E.g. Checking, Savings etc."
+ """
+ SWIFT code of the financial institution
+ """
+
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = (
+ pydantic.Field(default=None)
)
- bank_name: typing.Optional[str] = pydantic.Field(alias="bankName", description="Name of the bank")
- name: typing.Optional[str] = pydantic.Field(description="Name of the account holder")
- bank_address: typing.Optional[Address] = pydantic.Field(alias="bankAddress")
- email_id: typing.Optional[EmailId] = pydantic.Field(alias="emailId")
- special_instructions: typing.Optional[str] = pydantic.Field(
- alias="specialInstructions", description="Special instructions if any"
+ """
+ Account number
+ """
+
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = (
+ pydantic.Field(default=None)
)
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ """
+ Account type. E.g. Checking, Savings etc.
+ """
+
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = pydantic.Field(
+ default=None
)
+ """
+ Name of the bank
+ """
+
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Name of the account holder
+ """
- 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)
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = pydantic.Field(default=None)
+ """
+ Special instructions if any
+ """
+
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/swift_payment_method.py b/src/flagright/types/swift_payment_method.py
index a2f2d10..9e1afae 100644
--- a/src/flagright/types/swift_payment_method.py
+++ b/src/flagright/types/swift_payment_method.py
@@ -1,5 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import typing_extensions
+import typing
-SwiftPaymentMethod = typing_extensions.Literal["SWIFT"]
+SwiftPaymentMethod = typing.Literal["SWIFT"]
diff --git a/src/flagright/types/tag.py b/src/flagright/types/tag.py
index 26e56f2..c310e09 100644
--- a/src/flagright/types/tag.py
+++ b/src/flagright/types/tag.py
@@ -1,33 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
import typing
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class Tag(pydantic.BaseModel):
+class Tag(UniversalBaseModel):
"""
Generic key-value pair model to append a custom variable being sent to Flagright API
"""
- key: str = pydantic.Field(description="Key value when you are creating a custom variable")
- value: str = pydantic.Field(description="Value for a given key when you are creating a custom variable")
+ key: str = pydantic.Field()
+ """
+ Key value when you are creating a custom variable
+ """
- 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)
+ value: str = pydantic.Field()
+ """
+ Value for a given key when you are creating a custom variable
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction.py b/src/flagright/types/transaction.py
index 12730d5..26e034e 100644
--- a/src/flagright/types/transaction.py
+++ b/src/flagright/types/transaction.py
@@ -1,77 +1,111 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+from .transaction_type import TransactionType
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .device_data import DeviceData
-from .origin_funds_info import OriginFundsInfo
-from .tag import Tag
+from .transaction_state import TransactionState
from .transaction_amount_details import TransactionAmountDetails
-from .transaction_destination_payment_details import TransactionDestinationPaymentDetails
from .transaction_origin_payment_details import TransactionOriginPaymentDetails
-from .transaction_state import TransactionState
-from .transaction_type import TransactionType
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from .transaction_destination_payment_details import TransactionDestinationPaymentDetails
+from .origin_funds_info import OriginFundsInfo
+from .device_data import DeviceData
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class Transaction(pydantic.BaseModel):
+class Transaction(UniversalBaseModel):
type: TransactionType
- transaction_id: str = pydantic.Field(alias="transactionId", description="Unique transaction identifier")
- timestamp: float = pydantic.Field(description="Timestamp of when transaction took place")
- origin_user_id: typing.Optional[str] = pydantic.Field(
- alias="originUserId", description="UserId for where the transaction originates from"
- )
- destination_user_id: typing.Optional[str] = pydantic.Field(
- alias="destinationUserId",
- description="UserId for transaction's destination. In other words, where the value is being transferred to.",
- )
- transaction_state: typing.Optional[TransactionState] = pydantic.Field(alias="transactionState")
- origin_amount_details: typing.Optional[TransactionAmountDetails] = pydantic.Field(alias="originAmountDetails")
- destination_amount_details: typing.Optional[TransactionAmountDetails] = pydantic.Field(
- alias="destinationAmountDetails"
- )
- origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = pydantic.Field(
- alias="originPaymentDetails",
- description="Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.",
- )
- destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = pydantic.Field(
- alias="destinationPaymentDetails"
- )
- origin_funds_info: typing.Optional[OriginFundsInfo] = pydantic.Field(alias="originFundsInfo")
- related_transaction_ids: typing.Optional[typing.List[str]] = pydantic.Field(
- alias="relatedTransactionIds",
- description="IDs of transactions related to this transaction. Ex: refund, split bills",
- )
- product_type: typing.Optional[str] = pydantic.Field(
- alias="productType", description="Type of produce being used by the consumer (ex wallets, payments etc)"
- )
- promotion_code_used: typing.Optional[bool] = pydantic.Field(
- alias="promotionCodeUsed", description="Whether a promotion code was used or not the transaction"
+ transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
+ """
+ Unique transaction identifier
+ """
+
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of when transaction took place
+ """
+
+ origin_user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="originUserId")] = (
+ pydantic.Field(default=None)
)
- reference: typing.Optional[str] = pydantic.Field(
- description="Reference field for the transaction indicating the purpose of the transaction etc."
+ """
+ UserId for where the transaction originates from
+ """
+
+ destination_user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="destinationUserId")] = (
+ pydantic.Field(default=None)
)
- origin_device_data: typing.Optional[DeviceData] = pydantic.Field(alias="originDeviceData")
- destination_device_data: typing.Optional[DeviceData] = pydantic.Field(alias="destinationDeviceData")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ """
+ UserId for transaction's destination. In other words, where the value is being transferred to.
+ """
+
+ transaction_state: typing_extensions.Annotated[
+ typing.Optional[TransactionState], FieldMetadata(alias="transactionState")
+ ] = None
+ origin_amount_details: typing_extensions.Annotated[
+ typing.Optional[TransactionAmountDetails], FieldMetadata(alias="originAmountDetails")
+ ] = None
+ destination_amount_details: typing_extensions.Annotated[
+ typing.Optional[TransactionAmountDetails], FieldMetadata(alias="destinationAmountDetails")
+ ] = None
+ origin_payment_details: typing_extensions.Annotated[
+ typing.Optional[TransactionOriginPaymentDetails], FieldMetadata(alias="originPaymentDetails")
+ ] = pydantic.Field(default=None)
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ destination_payment_details: typing_extensions.Annotated[
+ typing.Optional[TransactionDestinationPaymentDetails], FieldMetadata(alias="destinationPaymentDetails")
+ ] = None
+ origin_funds_info: typing_extensions.Annotated[
+ typing.Optional[OriginFundsInfo], FieldMetadata(alias="originFundsInfo")
+ ] = None
+ related_transaction_ids: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="relatedTransactionIds")
+ ] = pydantic.Field(default=None)
+ """
+ IDs of transactions related to this transaction. Ex: refund, split bills
+ """
+
+ product_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="productType")] = (
+ pydantic.Field(default=None)
)
+ """
+ Type of produce being used by the consumer (ex wallets, payments etc)
+ """
+
+ promotion_code_used: typing_extensions.Annotated[
+ typing.Optional[bool], FieldMetadata(alias="promotionCodeUsed")
+ ] = pydantic.Field(default=None)
+ """
+ Whether a promotion code was used or not the transaction
+ """
+
+ reference: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Reference field for the transaction indicating the purpose of the transaction etc.
+ """
- 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)
+ origin_device_data: typing_extensions.Annotated[
+ typing.Optional[DeviceData], FieldMetadata(alias="originDeviceData")
+ ] = None
+ destination_device_data: typing_extensions.Annotated[
+ typing.Optional[DeviceData], FieldMetadata(alias="destinationDeviceData")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_amount_details.py b/src/flagright/types/transaction_amount_details.py
index 5f6a987..2023fad 100644
--- a/src/flagright/types/transaction_amount_details.py
+++ b/src/flagright/types/transaction_amount_details.py
@@ -1,37 +1,33 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+from .currency_code import CurrencyCode
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .country_code import CountryCode
-from .currency_code import CurrencyCode
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-class TransactionAmountDetails(pydantic.BaseModel):
+class TransactionAmountDetails(UniversalBaseModel):
"""
Model for transaction amount details
"""
- transaction_amount: float = pydantic.Field(alias="transactionAmount", description="Amount of the transaction")
- transaction_currency: CurrencyCode = pydantic.Field(alias="transactionCurrency")
- country: typing.Optional[CountryCode]
+ transaction_amount: typing_extensions.Annotated[float, FieldMetadata(alias="transactionAmount")] = pydantic.Field()
+ """
+ Amount of the 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)
+ transaction_currency: typing_extensions.Annotated[CurrencyCode, FieldMetadata(alias="transactionCurrency")]
+ country: typing.Optional[CountryCode] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_amount_limit.py b/src/flagright/types/transaction_amount_limit.py
index d5d499e..2bfe035 100644
--- a/src/flagright/types/transaction_amount_limit.py
+++ b/src/flagright/types/transaction_amount_limit.py
@@ -1,32 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .amount import Amount
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class TransactionAmountLimit(pydantic.BaseModel):
- day: typing.Optional[Amount]
- week: typing.Optional[Amount]
- month: typing.Optional[Amount]
- year: typing.Optional[Amount]
- 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)
+class TransactionAmountLimit(UniversalBaseModel):
+ day: typing.Optional[Amount] = None
+ week: typing.Optional[Amount] = None
+ month: typing.Optional[Amount] = None
+ year: typing.Optional[Amount] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_base.py b/src/flagright/types/transaction_base.py
index 194e3fa..ba9397a 100644
--- a/src/flagright/types/transaction_base.py
+++ b/src/flagright/types/transaction_base.py
@@ -1,43 +1,49 @@
# 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 UniversalBaseModel
from .transaction_type import TransactionType
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class TransactionBase(pydantic.BaseModel):
+class TransactionBase(UniversalBaseModel):
"""
Model for transaction base Payload
"""
type: TransactionType
- transaction_id: str = pydantic.Field(alias="transactionId", description="Unique transaction identifier")
- timestamp: float = pydantic.Field(description="Timestamp of when transaction took place")
- origin_user_id: typing.Optional[str] = pydantic.Field(
- alias="originUserId", description="UserId for where the transaction originates from"
- )
- destination_user_id: typing.Optional[str] = pydantic.Field(
- alias="destinationUserId",
- description="UserId for transaction's destination. In other words, where the value is being transferred to.",
+ transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
+ """
+ Unique transaction identifier
+ """
+
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of when transaction took place
+ """
+
+ origin_user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="originUserId")] = (
+ pydantic.Field(default=None)
)
+ """
+ UserId for where the transaction originates from
+ """
- 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)
+ destination_user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="destinationUserId")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ UserId for transaction's destination. In other words, where the value is being transferred to.
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_count_limit.py b/src/flagright/types/transaction_count_limit.py
index a2b2078..63c5102 100644
--- a/src/flagright/types/transaction_count_limit.py
+++ b/src/flagright/types/transaction_count_limit.py
@@ -1,31 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class TransactionCountLimit(UniversalBaseModel):
+ day: typing.Optional[float] = None
+ week: typing.Optional[float] = None
+ month: typing.Optional[float] = None
+ year: typing.Optional[float] = None
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
-class TransactionCountLimit(pydantic.BaseModel):
- day: typing.Optional[float]
- week: typing.Optional[float]
- month: typing.Optional[float]
- year: typing.Optional[float]
-
- 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}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index 165031b..78e060a 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -1,111 +1,272 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
import typing_extensions
-
-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
-from .mpesa_details import MpesaDetails
-from .swift_details import SwiftDetails
-from .upi_details import UpiDetails
-from .wallet_details import WalletDetails
-
-
-class TransactionDestinationPaymentDetails_Card(CardDetails):
- method: typing_extensions.Literal["CARD"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionDestinationPaymentDetails_GenericBankAccount(GenericBankAccountDetails):
- method: typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionDestinationPaymentDetails_Iban(IbanDetails):
- method: typing_extensions.Literal["IBAN"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionDestinationPaymentDetails_Ach(AchDetails):
- method: typing_extensions.Literal["ACH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionDestinationPaymentDetails_Upi(UpiDetails):
- method: typing_extensions.Literal["UPI"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionDestinationPaymentDetails_Wallet(WalletDetails):
- method: typing_extensions.Literal["WALLET"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionDestinationPaymentDetails_Swift(SwiftDetails):
- method: typing_extensions.Literal["SWIFT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionDestinationPaymentDetails_Mpesa(MpesaDetails):
- method: typing_extensions.Literal["MPESA"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionDestinationPaymentDetails_Check(CheckDetails):
- method: typing_extensions.Literal["CHECK"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionDestinationPaymentDetails_Cash(CashDetails):
- method: typing_extensions.Literal["CASH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .wallet_network import WalletNetwork
+from .mpesa_transaction_type import MpesaTransactionType
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class TransactionDestinationPaymentDetails_Card(UniversalBaseModel):
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionDestinationPaymentDetails_GenericBankAccount(UniversalBaseModel):
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionDestinationPaymentDetails_Iban(UniversalBaseModel):
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionDestinationPaymentDetails_Ach(UniversalBaseModel):
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionDestinationPaymentDetails_Upi(UniversalBaseModel):
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionDestinationPaymentDetails_Wallet(UniversalBaseModel):
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionDestinationPaymentDetails_Swift(UniversalBaseModel):
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionDestinationPaymentDetails_Mpesa(UniversalBaseModel):
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionDestinationPaymentDetails_Check(UniversalBaseModel):
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionDestinationPaymentDetails_Cash(UniversalBaseModel):
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
TransactionDestinationPaymentDetails = typing.Union[
diff --git a/src/flagright/types/transaction_event.py b/src/flagright/types/transaction_event.py
index e981cde..872b84c 100644
--- a/src/flagright/types/transaction_event.py
+++ b/src/flagright/types/transaction_event.py
@@ -1,45 +1,61 @@
# 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 .device_data import DeviceData
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
from .transaction_state import TransactionState
+from ..core.serialization import FieldMetadata
+import pydantic
+import typing
from .transaction_updatable import TransactionUpdatable
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from .device_data import DeviceData
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class TransactionEvent(pydantic.BaseModel):
+class TransactionEvent(UniversalBaseModel):
"""
Model for transaction-related events
"""
- transaction_state: TransactionState = pydantic.Field(alias="transactionState")
- timestamp: float = pydantic.Field(description="Timestamp of the event")
- transaction_id: str = pydantic.Field(alias="transactionId", description="Transaction ID the event pertains to")
- event_id: typing.Optional[str] = pydantic.Field(alias="eventId", description="Unique event ID")
- reason: typing.Optional[str] = pydantic.Field(description="Reason for the event or a state change")
- event_description: typing.Optional[str] = pydantic.Field(alias="eventDescription", description="Event description")
- updated_transaction_attributes: typing.Optional[TransactionUpdatable] = pydantic.Field(
- alias="updatedTransactionAttributes"
+ transaction_state: typing_extensions.Annotated[TransactionState, FieldMetadata(alias="transactionState")]
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of the event
+ """
+
+ transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
+ """
+ Transaction ID the event pertains to
+ """
+
+ event_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventId")] = pydantic.Field(
+ default=None
+ )
+ """
+ Unique event ID
+ """
+
+ reason: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Reason for the event or a state change
+ """
+
+ event_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventDescription")] = (
+ pydantic.Field(default=None)
)
- meta_data: typing.Optional[DeviceData] = pydantic.Field(alias="metaData")
+ """
+ Event description
+ """
- 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)
+ updated_transaction_attributes: typing_extensions.Annotated[
+ typing.Optional[TransactionUpdatable], FieldMetadata(alias="updatedTransactionAttributes")
+ ] = None
+ meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_event_monitoring_result.py b/src/flagright/types/transaction_event_monitoring_result.py
index 4f8729d..eaf5a3d 100644
--- a/src/flagright/types/transaction_event_monitoring_result.py
+++ b/src/flagright/types/transaction_event_monitoring_result.py
@@ -1,41 +1,42 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+from .transaction import Transaction
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from .transaction_risk_scoring_result import TransactionRiskScoringResult
from .executed_rules_result import ExecutedRulesResult
+import pydantic
from .hit_rules_details import HitRulesDetails
-from .transaction import Transaction
-from .transaction_risk_scoring_result import TransactionRiskScoringResult
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-class TransactionEventMonitoringResult(pydantic.BaseModel):
- event_id: str = pydantic.Field(alias="eventId")
+class TransactionEventMonitoringResult(UniversalBaseModel):
+ event_id: typing_extensions.Annotated[str, FieldMetadata(alias="eventId")]
transaction: Transaction
- risk_score_details: typing.Optional[TransactionRiskScoringResult] = pydantic.Field(alias="riskScoreDetails")
- executed_rules: typing.List[ExecutedRulesResult] = pydantic.Field(
- alias="executedRules", description="Unique transaction identifier"
- )
- hit_rules: typing.List[HitRulesDetails] = pydantic.Field(
- alias="hitRules", description="Unique transaction identifier"
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[TransactionRiskScoringResult], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+ executed_rules: typing_extensions.Annotated[
+ typing.List[ExecutedRulesResult], FieldMetadata(alias="executedRules")
+ ] = pydantic.Field()
+ """
+ Unique transaction identifier
+ """
+
+ hit_rules: typing_extensions.Annotated[typing.List[HitRulesDetails], FieldMetadata(alias="hitRules")] = (
+ pydantic.Field()
)
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Unique transaction identifier
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_event_with_rules_result.py b/src/flagright/types/transaction_event_with_rules_result.py
index 31f044d..5bc991d 100644
--- a/src/flagright/types/transaction_event_with_rules_result.py
+++ b/src/flagright/types/transaction_event_with_rules_result.py
@@ -1,49 +1,71 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from .transaction_state import TransactionState
+from ..core.serialization import FieldMetadata
+import pydantic
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from .transaction_updatable import TransactionUpdatable
from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
from .rule_action import RuleAction
from .transaction_risk_scoring_result import TransactionRiskScoringResult
-from .transaction_state import TransactionState
-from .transaction_updatable import TransactionUpdatable
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class TransactionEventWithRulesResult(UniversalBaseModel):
+ transaction_state: typing_extensions.Annotated[TransactionState, FieldMetadata(alias="transactionState")]
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of the event
+ """
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class TransactionEventWithRulesResult(pydantic.BaseModel):
- transaction_state: TransactionState = pydantic.Field(alias="transactionState")
- timestamp: float = pydantic.Field(description="Timestamp of the event")
- transaction_id: str = pydantic.Field(alias="transactionId", description="Transaction ID the event pertains to")
- event_id: typing.Optional[str] = pydantic.Field(alias="eventId", description="Unique event ID")
- reason: typing.Optional[str] = pydantic.Field(description="Reason for the event or a state change")
- event_description: typing.Optional[str] = pydantic.Field(alias="eventDescription", description="Event description")
- updated_transaction_attributes: typing.Optional[TransactionUpdatable] = pydantic.Field(
- alias="updatedTransactionAttributes"
+ transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
+ """
+ Transaction ID the event pertains to
+ """
+
+ event_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventId")] = pydantic.Field(
+ default=None
+ )
+ """
+ Unique event ID
+ """
+
+ reason: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Reason for the event or a state change
+ """
+
+ event_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventDescription")] = (
+ pydantic.Field(default=None)
)
- meta_data: typing.Optional[DeviceData] = pydantic.Field(alias="metaData")
- executed_rules: typing.Optional[typing.List[ExecutedRulesResult]] = pydantic.Field(alias="executedRules")
- hit_rules: typing.Optional[typing.List[HitRulesDetails]] = pydantic.Field(alias="hitRules")
- status: typing.Optional[RuleAction]
- risk_score_details: typing.Optional[TransactionRiskScoringResult] = pydantic.Field(alias="riskScoreDetails")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Event description
+ """
+
+ updated_transaction_attributes: typing_extensions.Annotated[
+ typing.Optional[TransactionUpdatable], FieldMetadata(alias="updatedTransactionAttributes")
+ ] = None
+ meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+ hit_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[HitRulesDetails]], FieldMetadata(alias="hitRules")
+ ] = None
+ status: typing.Optional[RuleAction] = None
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[TransactionRiskScoringResult], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_limit.py b/src/flagright/types/transaction_limit.py
index 8e9125e..84ec1a1 100644
--- a/src/flagright/types/transaction_limit.py
+++ b/src/flagright/types/transaction_limit.py
@@ -1,35 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .transaction_amount_limit import TransactionAmountLimit
from .transaction_count_limit import TransactionCountLimit
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class TransactionLimit(pydantic.BaseModel):
- transaction_count_limit: typing.Optional[TransactionCountLimit] = pydantic.Field(alias="transactionCountLimit")
- transaction_amount_limit: typing.Optional[TransactionAmountLimit] = pydantic.Field(alias="transactionAmountLimit")
- average_transaction_amount_limit: typing.Optional[TransactionAmountLimit] = pydantic.Field(
- alias="averageTransactionAmountLimit"
- )
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+from ..core.serialization import FieldMetadata
+from .transaction_amount_limit import TransactionAmountLimit
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class TransactionLimit(UniversalBaseModel):
+ transaction_count_limit: typing_extensions.Annotated[
+ typing.Optional[TransactionCountLimit], FieldMetadata(alias="transactionCountLimit")
+ ] = None
+ transaction_amount_limit: typing_extensions.Annotated[
+ typing.Optional[TransactionAmountLimit], FieldMetadata(alias="transactionAmountLimit")
+ ] = None
+ average_transaction_amount_limit: typing_extensions.Annotated[
+ typing.Optional[TransactionAmountLimit], FieldMetadata(alias="averageTransactionAmountLimit")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_limits.py b/src/flagright/types/transaction_limits.py
index 38edf21..9b86972 100644
--- a/src/flagright/types/transaction_limits.py
+++ b/src/flagright/types/transaction_limits.py
@@ -1,45 +1,47 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .amount import Amount
+from ..core.serialization import FieldMetadata
from .transaction_limits_payment_method_limits import TransactionLimitsPaymentMethodLimits
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class TransactionLimits(pydantic.BaseModel):
+class TransactionLimits(UniversalBaseModel):
"""
Model for transaction limits for a given user
"""
- maximum_daily_transaction_limit: typing.Optional[Amount] = pydantic.Field(alias="maximumDailyTransactionLimit")
- maximum_weekly_transaction_limit: typing.Optional[Amount] = pydantic.Field(alias="maximumWeeklyTransactionLimit")
- maximum_monthly_transaction_limit: typing.Optional[Amount] = pydantic.Field(alias="maximumMonthlyTransactionLimit")
- maximum_quarterly_transaction_limit: typing.Optional[Amount] = pydantic.Field(
- alias="maximumQuarterlyTransactionLimit"
- )
- maximum_transaction_limit: typing.Optional[Amount] = pydantic.Field(alias="maximumTransactionLimit")
- maximum_yearly_transaction_limit: typing.Optional[Amount] = pydantic.Field(alias="maximumYearlyTransactionLimit")
- payment_method_limits: typing.Optional[TransactionLimitsPaymentMethodLimits] = pydantic.Field(
- alias="paymentMethodLimits"
- )
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ maximum_daily_transaction_limit: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="maximumDailyTransactionLimit")
+ ] = None
+ maximum_weekly_transaction_limit: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="maximumWeeklyTransactionLimit")
+ ] = None
+ maximum_monthly_transaction_limit: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="maximumMonthlyTransactionLimit")
+ ] = None
+ maximum_quarterly_transaction_limit: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="maximumQuarterlyTransactionLimit")
+ ] = None
+ maximum_transaction_limit: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="maximumTransactionLimit")
+ ] = None
+ maximum_yearly_transaction_limit: typing_extensions.Annotated[
+ typing.Optional[Amount], FieldMetadata(alias="maximumYearlyTransactionLimit")
+ ] = None
+ payment_method_limits: typing_extensions.Annotated[
+ typing.Optional[TransactionLimitsPaymentMethodLimits], FieldMetadata(alias="paymentMethodLimits")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_limits_payment_method_limits.py b/src/flagright/types/transaction_limits_payment_method_limits.py
index 014be61..d7f712b 100644
--- a/src/flagright/types/transaction_limits_payment_method_limits.py
+++ b/src/flagright/types/transaction_limits_payment_method_limits.py
@@ -1,38 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .transaction_limit import TransactionLimit
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class TransactionLimitsPaymentMethodLimits(pydantic.BaseModel):
- ach: typing.Optional[TransactionLimit] = pydantic.Field(alias="ACH")
- card: typing.Optional[TransactionLimit] = pydantic.Field(alias="CARD")
- iban: typing.Optional[TransactionLimit] = pydantic.Field(alias="IBAN")
- upi: typing.Optional[TransactionLimit] = pydantic.Field(alias="UPI")
- generic_bank_account: typing.Optional[TransactionLimit] = pydantic.Field(alias="GENERIC_BANK_ACCOUNT")
- mpesa: typing.Optional[TransactionLimit] = pydantic.Field(alias="MPESA")
- swift: typing.Optional[TransactionLimit] = pydantic.Field(alias="SWIFT")
- wallet: typing.Optional[TransactionLimit] = pydantic.Field(alias="WALLET")
- check: typing.Optional[TransactionLimit] = pydantic.Field(alias="CHECK")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class TransactionLimitsPaymentMethodLimits(UniversalBaseModel):
+ ach: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="ACH")] = None
+ card: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="CARD")] = None
+ iban: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="IBAN")] = None
+ upi: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="UPI")] = None
+ generic_bank_account: typing_extensions.Annotated[
+ typing.Optional[TransactionLimit], FieldMetadata(alias="GENERIC_BANK_ACCOUNT")
+ ] = None
+ mpesa: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="MPESA")] = None
+ swift: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="SWIFT")] = None
+ wallet: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="WALLET")] = None
+ check: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="CHECK")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_monitoring_result.py b/src/flagright/types/transaction_monitoring_result.py
index 98791c8..a19603d 100644
--- a/src/flagright/types/transaction_monitoring_result.py
+++ b/src/flagright/types/transaction_monitoring_result.py
@@ -1,43 +1,46 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+from .rule_action import RuleAction
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from .transaction_risk_scoring_result import TransactionRiskScoringResult
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
-from .rule_action import RuleAction
-from .transaction_risk_scoring_result import TransactionRiskScoringResult
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class TransactionMonitoringResult(UniversalBaseModel):
+ transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
+ """
+ Transaction ID that the results pertain to
+ """
-class TransactionMonitoringResult(pydantic.BaseModel):
- transaction_id: str = pydantic.Field(
- alias="transactionId", description="Transaction ID that the results pertain to"
- )
status: RuleAction
- risk_score_details: typing.Optional[TransactionRiskScoringResult] = pydantic.Field(alias="riskScoreDetails")
- executed_rules: typing.List[ExecutedRulesResult] = pydantic.Field(
- alias="executedRules", description="Unique transaction identifier"
- )
- hit_rules: typing.List[HitRulesDetails] = pydantic.Field(
- alias="hitRules", description="Unique transaction identifier"
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[TransactionRiskScoringResult], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+ executed_rules: typing_extensions.Annotated[
+ typing.List[ExecutedRulesResult], FieldMetadata(alias="executedRules")
+ ] = pydantic.Field()
+ """
+ Unique transaction identifier
+ """
+
+ hit_rules: typing_extensions.Annotated[typing.List[HitRulesDetails], FieldMetadata(alias="hitRules")] = (
+ pydantic.Field()
)
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Unique transaction identifier
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index 2e0820c..5353c91 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -1,111 +1,312 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
import typing_extensions
-
-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
-from .mpesa_details import MpesaDetails
-from .swift_details import SwiftDetails
-from .upi_details import UpiDetails
-from .wallet_details import WalletDetails
-
-
-class TransactionOriginPaymentDetails_Card(CardDetails):
- method: typing_extensions.Literal["CARD"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionOriginPaymentDetails_GenericBankAccount(GenericBankAccountDetails):
- method: typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionOriginPaymentDetails_Iban(IbanDetails):
- method: typing_extensions.Literal["IBAN"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionOriginPaymentDetails_Ach(AchDetails):
- method: typing_extensions.Literal["ACH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionOriginPaymentDetails_Swift(SwiftDetails):
- method: typing_extensions.Literal["SWIFT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionOriginPaymentDetails_Mpesa(MpesaDetails):
- method: typing_extensions.Literal["MPESA"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionOriginPaymentDetails_Upi(UpiDetails):
- method: typing_extensions.Literal["UPI"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionOriginPaymentDetails_Wallet(WalletDetails):
- method: typing_extensions.Literal["WALLET"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionOriginPaymentDetails_Check(CheckDetails):
- method: typing_extensions.Literal["CHECK"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionOriginPaymentDetails_Cash(CashDetails):
- method: typing_extensions.Literal["CASH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .mpesa_transaction_type import MpesaTransactionType
+from .wallet_network import WalletNetwork
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class TransactionOriginPaymentDetails_Card(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionOriginPaymentDetails_GenericBankAccount(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionOriginPaymentDetails_Iban(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionOriginPaymentDetails_Ach(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionOriginPaymentDetails_Swift(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionOriginPaymentDetails_Mpesa(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionOriginPaymentDetails_Upi(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionOriginPaymentDetails_Wallet(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionOriginPaymentDetails_Check(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionOriginPaymentDetails_Cash(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
TransactionOriginPaymentDetails = typing.Union[
diff --git a/src/flagright/types/transaction_risk_scoring_result.py b/src/flagright/types/transaction_risk_scoring_result.py
index a8cc45d..5107848 100644
--- a/src/flagright/types/transaction_risk_scoring_result.py
+++ b/src/flagright/types/transaction_risk_scoring_result.py
@@ -1,39 +1,47 @@
# 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 UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
from .risk_level import RiskLevel
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class TransactionRiskScoringResult(pydantic.BaseModel):
- trs_score: float = pydantic.Field(alias="trsScore", description="Transaction risk scoring score")
- trs_risk_level: RiskLevel = pydantic.Field(alias="trsRiskLevel")
- origin_user_cra_risk_score: typing.Optional[float] = pydantic.Field(
- alias="originUserCraRiskScore", description="Origin user's CRA risk score"
- )
- destination_user_cra_risk_score: typing.Optional[float] = pydantic.Field(
- alias="destinationUserCraRiskScore", description="Destination user's CRA risk score"
- )
- origin_user_cra_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="originUserCraRiskLevel")
- destination_user_cra_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="destinationUserCraRiskLevel")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class TransactionRiskScoringResult(UniversalBaseModel):
+ trs_score: typing_extensions.Annotated[float, FieldMetadata(alias="trsScore")] = pydantic.Field()
+ """
+ Transaction risk scoring score
+ """
+
+ trs_risk_level: typing_extensions.Annotated[RiskLevel, FieldMetadata(alias="trsRiskLevel")]
+ origin_user_cra_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="originUserCraRiskScore")
+ ] = pydantic.Field(default=None)
+ """
+ Origin user's CRA risk score
+ """
+
+ destination_user_cra_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="destinationUserCraRiskScore")
+ ] = pydantic.Field(default=None)
+ """
+ Destination user's CRA risk score
+ """
+
+ origin_user_cra_risk_level: typing_extensions.Annotated[
+ typing.Optional[RiskLevel], FieldMetadata(alias="originUserCraRiskLevel")
+ ] = None
+ destination_user_cra_risk_level: typing_extensions.Annotated[
+ typing.Optional[RiskLevel], FieldMetadata(alias="destinationUserCraRiskLevel")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_state.py b/src/flagright/types/transaction_state.py
index 3584fab..af6c78a 100644
--- a/src/flagright/types/transaction_state.py
+++ b/src/flagright/types/transaction_state.py
@@ -1,53 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TransactionState(str, enum.Enum):
- """
- Model for transaction states. E.g. Processing, Refunded, Successful etc.
- """
-
- CREATED = "CREATED"
- PROCESSING = "PROCESSING"
- SENT = "SENT"
- EXPIRED = "EXPIRED"
- DECLINED = "DECLINED"
- SUSPENDED = "SUSPENDED"
- REFUNDED = "REFUNDED"
- SUCCESSFUL = "SUCCESSFUL"
- REVERSED = "REVERSED"
-
- def visit(
- self,
- created: typing.Callable[[], T_Result],
- processing: typing.Callable[[], T_Result],
- sent: typing.Callable[[], T_Result],
- expired: typing.Callable[[], T_Result],
- declined: typing.Callable[[], T_Result],
- suspended: typing.Callable[[], T_Result],
- refunded: typing.Callable[[], T_Result],
- successful: typing.Callable[[], T_Result],
- reversed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TransactionState.CREATED:
- return created()
- if self is TransactionState.PROCESSING:
- return processing()
- if self is TransactionState.SENT:
- return sent()
- if self is TransactionState.EXPIRED:
- return expired()
- if self is TransactionState.DECLINED:
- return declined()
- if self is TransactionState.SUSPENDED:
- return suspended()
- if self is TransactionState.REFUNDED:
- return refunded()
- if self is TransactionState.SUCCESSFUL:
- return successful()
- if self is TransactionState.REVERSED:
- return reversed()
+TransactionState = typing.Union[
+ typing.Literal[
+ "CREATED", "PROCESSING", "SENT", "EXPIRED", "DECLINED", "SUSPENDED", "REFUNDED", "SUCCESSFUL", "REVERSED"
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/types/transaction_status_details.py b/src/flagright/types/transaction_status_details.py
index 4cce555..f64e331 100644
--- a/src/flagright/types/transaction_status_details.py
+++ b/src/flagright/types/transaction_status_details.py
@@ -1,33 +1,25 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .rule_action import RuleAction
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class TransactionStatusDetails(pydantic.BaseModel):
- transaction_id: str = pydantic.Field(alias="transactionId")
+class TransactionStatusDetails(UniversalBaseModel):
+ transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")]
reasons: typing.List[str]
status: RuleAction
- comment: typing.Optional[str]
-
- 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)
+ comment: typing.Optional[str] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_type.py b/src/flagright/types/transaction_type.py
index f010e01..5ad4f41 100644
--- a/src/flagright/types/transaction_type.py
+++ b/src/flagright/types/transaction_type.py
@@ -1,37 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TransactionType(str, enum.Enum):
- DEPOSIT = "DEPOSIT"
- TRANSFER = "TRANSFER"
- EXTERNAL_PAYMENT = "EXTERNAL_PAYMENT"
- WITHDRAWAL = "WITHDRAWAL"
- REFUND = "REFUND"
- OTHER = "OTHER"
-
- def visit(
- self,
- deposit: typing.Callable[[], T_Result],
- transfer: typing.Callable[[], T_Result],
- external_payment: typing.Callable[[], T_Result],
- withdrawal: typing.Callable[[], T_Result],
- refund: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TransactionType.DEPOSIT:
- return deposit()
- if self is TransactionType.TRANSFER:
- return transfer()
- if self is TransactionType.EXTERNAL_PAYMENT:
- return external_payment()
- if self is TransactionType.WITHDRAWAL:
- return withdrawal()
- if self is TransactionType.REFUND:
- return refund()
- if self is TransactionType.OTHER:
- return other()
+TransactionType = typing.Union[
+ typing.Literal["DEPOSIT", "TRANSFER", "EXTERNAL_PAYMENT", "WITHDRAWAL", "REFUND", "OTHER"], typing.Any
+]
diff --git a/src/flagright/types/transaction_updatable.py b/src/flagright/types/transaction_updatable.py
index 29ace4e..1854284 100644
--- a/src/flagright/types/transaction_updatable.py
+++ b/src/flagright/types/transaction_updatable.py
@@ -1,70 +1,89 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .device_data import DeviceData
-from .origin_funds_info import OriginFundsInfo
-from .tag import Tag
-from .transaction_amount_details import TransactionAmountDetails
from .transaction_state import TransactionState
-from .transaction_updatable_destination_payment_details import TransactionUpdatableDestinationPaymentDetails
+from ..core.serialization import FieldMetadata
+from .transaction_amount_details import TransactionAmountDetails
from .transaction_updatable_origin_payment_details import TransactionUpdatableOriginPaymentDetails
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+import pydantic
+from .transaction_updatable_destination_payment_details import TransactionUpdatableDestinationPaymentDetails
+from .origin_funds_info import OriginFundsInfo
+from .device_data import DeviceData
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class TransactionUpdatable(pydantic.BaseModel):
+class TransactionUpdatable(UniversalBaseModel):
"""
Model for transaction additional payload
"""
- transaction_state: typing.Optional[TransactionState] = pydantic.Field(alias="transactionState")
- origin_amount_details: typing.Optional[TransactionAmountDetails] = pydantic.Field(alias="originAmountDetails")
- destination_amount_details: typing.Optional[TransactionAmountDetails] = pydantic.Field(
- alias="destinationAmountDetails"
- )
- origin_payment_details: typing.Optional[TransactionUpdatableOriginPaymentDetails] = pydantic.Field(
- alias="originPaymentDetails",
- description="Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.",
- )
- destination_payment_details: typing.Optional[TransactionUpdatableDestinationPaymentDetails] = pydantic.Field(
- alias="destinationPaymentDetails"
- )
- origin_funds_info: typing.Optional[OriginFundsInfo] = pydantic.Field(alias="originFundsInfo")
- related_transaction_ids: typing.Optional[typing.List[str]] = pydantic.Field(
- alias="relatedTransactionIds",
- description="IDs of transactions related to this transaction. Ex: refund, split bills",
- )
- product_type: typing.Optional[str] = pydantic.Field(
- alias="productType", description="Type of produce being used by the consumer (ex wallets, payments etc)"
- )
- promotion_code_used: typing.Optional[bool] = pydantic.Field(
- alias="promotionCodeUsed", description="Whether a promotion code was used or not the transaction"
- )
- reference: typing.Optional[str] = pydantic.Field(
- description="Reference field for the transaction indicating the purpose of the transaction etc."
- )
- origin_device_data: typing.Optional[DeviceData] = pydantic.Field(alias="originDeviceData")
- destination_device_data: typing.Optional[DeviceData] = pydantic.Field(alias="destinationDeviceData")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ transaction_state: typing_extensions.Annotated[
+ typing.Optional[TransactionState], FieldMetadata(alias="transactionState")
+ ] = None
+ origin_amount_details: typing_extensions.Annotated[
+ typing.Optional[TransactionAmountDetails], FieldMetadata(alias="originAmountDetails")
+ ] = None
+ destination_amount_details: typing_extensions.Annotated[
+ typing.Optional[TransactionAmountDetails], FieldMetadata(alias="destinationAmountDetails")
+ ] = None
+ origin_payment_details: typing_extensions.Annotated[
+ typing.Optional[TransactionUpdatableOriginPaymentDetails], FieldMetadata(alias="originPaymentDetails")
+ ] = pydantic.Field(default=None)
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ destination_payment_details: typing_extensions.Annotated[
+ typing.Optional[TransactionUpdatableDestinationPaymentDetails], FieldMetadata(alias="destinationPaymentDetails")
+ ] = None
+ origin_funds_info: typing_extensions.Annotated[
+ typing.Optional[OriginFundsInfo], FieldMetadata(alias="originFundsInfo")
+ ] = None
+ related_transaction_ids: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="relatedTransactionIds")
+ ] = pydantic.Field(default=None)
+ """
+ IDs of transactions related to this transaction. Ex: refund, split bills
+ """
+
+ product_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="productType")] = (
+ pydantic.Field(default=None)
)
+ """
+ Type of produce being used by the consumer (ex wallets, payments etc)
+ """
- 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)
+ promotion_code_used: typing_extensions.Annotated[
+ typing.Optional[bool], FieldMetadata(alias="promotionCodeUsed")
+ ] = pydantic.Field(default=None)
+ """
+ Whether a promotion code was used or not the transaction
+ """
+
+ reference: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Reference field for the transaction indicating the purpose of the transaction etc.
+ """
+
+ origin_device_data: typing_extensions.Annotated[
+ typing.Optional[DeviceData], FieldMetadata(alias="originDeviceData")
+ ] = None
+ destination_device_data: typing_extensions.Annotated[
+ typing.Optional[DeviceData], FieldMetadata(alias="destinationDeviceData")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index 5a0dd9f..5d514c4 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -1,111 +1,272 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
import typing_extensions
-
-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
-from .mpesa_details import MpesaDetails
-from .swift_details import SwiftDetails
-from .upi_details import UpiDetails
-from .wallet_details import WalletDetails
-
-
-class TransactionUpdatableDestinationPaymentDetails_Card(CardDetails):
- method: typing_extensions.Literal["CARD"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableDestinationPaymentDetails_GenericBankAccount(GenericBankAccountDetails):
- method: typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableDestinationPaymentDetails_Iban(IbanDetails):
- method: typing_extensions.Literal["IBAN"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableDestinationPaymentDetails_Ach(AchDetails):
- method: typing_extensions.Literal["ACH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableDestinationPaymentDetails_Upi(UpiDetails):
- method: typing_extensions.Literal["UPI"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableDestinationPaymentDetails_Wallet(WalletDetails):
- method: typing_extensions.Literal["WALLET"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableDestinationPaymentDetails_Swift(SwiftDetails):
- method: typing_extensions.Literal["SWIFT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableDestinationPaymentDetails_Mpesa(MpesaDetails):
- method: typing_extensions.Literal["MPESA"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableDestinationPaymentDetails_Check(CheckDetails):
- method: typing_extensions.Literal["CHECK"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableDestinationPaymentDetails_Cash(CashDetails):
- method: typing_extensions.Literal["CASH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .wallet_network import WalletNetwork
+from .mpesa_transaction_type import MpesaTransactionType
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class TransactionUpdatableDestinationPaymentDetails_Card(UniversalBaseModel):
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableDestinationPaymentDetails_GenericBankAccount(UniversalBaseModel):
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableDestinationPaymentDetails_Iban(UniversalBaseModel):
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableDestinationPaymentDetails_Ach(UniversalBaseModel):
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableDestinationPaymentDetails_Upi(UniversalBaseModel):
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableDestinationPaymentDetails_Wallet(UniversalBaseModel):
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableDestinationPaymentDetails_Swift(UniversalBaseModel):
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableDestinationPaymentDetails_Mpesa(UniversalBaseModel):
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableDestinationPaymentDetails_Check(UniversalBaseModel):
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableDestinationPaymentDetails_Cash(UniversalBaseModel):
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
TransactionUpdatableDestinationPaymentDetails = typing.Union[
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index e6b0931..377d2d1 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -1,111 +1,312 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
import typing_extensions
-
-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
-from .mpesa_details import MpesaDetails
-from .swift_details import SwiftDetails
-from .upi_details import UpiDetails
-from .wallet_details import WalletDetails
-
-
-class TransactionUpdatableOriginPaymentDetails_Card(CardDetails):
- method: typing_extensions.Literal["CARD"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableOriginPaymentDetails_GenericBankAccount(GenericBankAccountDetails):
- method: typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableOriginPaymentDetails_Iban(IbanDetails):
- method: typing_extensions.Literal["IBAN"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableOriginPaymentDetails_Ach(AchDetails):
- method: typing_extensions.Literal["ACH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableOriginPaymentDetails_Swift(SwiftDetails):
- method: typing_extensions.Literal["SWIFT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableOriginPaymentDetails_Mpesa(MpesaDetails):
- method: typing_extensions.Literal["MPESA"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableOriginPaymentDetails_Upi(UpiDetails):
- method: typing_extensions.Literal["UPI"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableOriginPaymentDetails_Wallet(WalletDetails):
- method: typing_extensions.Literal["WALLET"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableOriginPaymentDetails_Check(CheckDetails):
- method: typing_extensions.Literal["CHECK"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionUpdatableOriginPaymentDetails_Cash(CashDetails):
- method: typing_extensions.Literal["CASH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .mpesa_transaction_type import MpesaTransactionType
+from .wallet_network import WalletNetwork
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class TransactionUpdatableOriginPaymentDetails_Card(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableOriginPaymentDetails_GenericBankAccount(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableOriginPaymentDetails_Iban(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableOriginPaymentDetails_Ach(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableOriginPaymentDetails_Swift(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableOriginPaymentDetails_Mpesa(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableOriginPaymentDetails_Upi(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableOriginPaymentDetails_Wallet(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableOriginPaymentDetails_Check(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionUpdatableOriginPaymentDetails_Cash(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
TransactionUpdatableOriginPaymentDetails = typing.Union[
diff --git a/src/flagright/types/transaction_with_rules_result.py b/src/flagright/types/transaction_with_rules_result.py
index a150ca6..c57c6b3 100644
--- a/src/flagright/types/transaction_with_rules_result.py
+++ b/src/flagright/types/transaction_with_rules_result.py
@@ -1,87 +1,125 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+from .transaction_type import TransactionType
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from .transaction_state import TransactionState
+from .transaction_amount_details import TransactionAmountDetails
+from .transaction_with_rules_result_origin_payment_details import TransactionWithRulesResultOriginPaymentDetails
+from .transaction_with_rules_result_destination_payment_details import (
+ TransactionWithRulesResultDestinationPaymentDetails,
+)
+from .origin_funds_info import OriginFundsInfo
from .device_data import DeviceData
+from .tag import Tag
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
-from .origin_funds_info import OriginFundsInfo
from .rule_action import RuleAction
-from .tag import Tag
-from .transaction_amount_details import TransactionAmountDetails
from .transaction_risk_scoring_result import TransactionRiskScoringResult
-from .transaction_state import TransactionState
-from .transaction_type import TransactionType
-from .transaction_with_rules_result_destination_payment_details import (
- TransactionWithRulesResultDestinationPaymentDetails,
-)
-from .transaction_with_rules_result_origin_payment_details import TransactionWithRulesResultOriginPaymentDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-class TransactionWithRulesResult(pydantic.BaseModel):
+class TransactionWithRulesResult(UniversalBaseModel):
type: TransactionType
- transaction_id: str = pydantic.Field(alias="transactionId", description="Unique transaction identifier")
- timestamp: float = pydantic.Field(description="Timestamp of when transaction took place")
- origin_user_id: typing.Optional[str] = pydantic.Field(
- alias="originUserId", description="UserId for where the transaction originates from"
- )
- destination_user_id: typing.Optional[str] = pydantic.Field(
- alias="destinationUserId",
- description="UserId for transaction's destination. In other words, where the value is being transferred to.",
- )
- transaction_state: typing.Optional[TransactionState] = pydantic.Field(alias="transactionState")
- origin_amount_details: typing.Optional[TransactionAmountDetails] = pydantic.Field(alias="originAmountDetails")
- destination_amount_details: typing.Optional[TransactionAmountDetails] = pydantic.Field(
- alias="destinationAmountDetails"
- )
- origin_payment_details: typing.Optional[TransactionWithRulesResultOriginPaymentDetails] = pydantic.Field(
- alias="originPaymentDetails",
- description="Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.",
- )
- destination_payment_details: typing.Optional[TransactionWithRulesResultDestinationPaymentDetails] = pydantic.Field(
- alias="destinationPaymentDetails"
- )
- origin_funds_info: typing.Optional[OriginFundsInfo] = pydantic.Field(alias="originFundsInfo")
- related_transaction_ids: typing.Optional[typing.List[str]] = pydantic.Field(
- alias="relatedTransactionIds",
- description="IDs of transactions related to this transaction. Ex: refund, split bills",
- )
- product_type: typing.Optional[str] = pydantic.Field(
- alias="productType", description="Type of produce being used by the consumer (ex wallets, payments etc)"
- )
- promotion_code_used: typing.Optional[bool] = pydantic.Field(
- alias="promotionCodeUsed", description="Whether a promotion code was used or not the transaction"
+ transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
+ """
+ Unique transaction identifier
+ """
+
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of when transaction took place
+ """
+
+ origin_user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="originUserId")] = (
+ pydantic.Field(default=None)
)
- reference: typing.Optional[str] = pydantic.Field(
- description="Reference field for the transaction indicating the purpose of the transaction etc."
+ """
+ UserId for where the transaction originates from
+ """
+
+ destination_user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="destinationUserId")] = (
+ pydantic.Field(default=None)
)
- origin_device_data: typing.Optional[DeviceData] = pydantic.Field(alias="originDeviceData")
- destination_device_data: typing.Optional[DeviceData] = pydantic.Field(alias="destinationDeviceData")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ """
+ UserId for transaction's destination. In other words, where the value is being transferred to.
+ """
+
+ transaction_state: typing_extensions.Annotated[
+ typing.Optional[TransactionState], FieldMetadata(alias="transactionState")
+ ] = None
+ origin_amount_details: typing_extensions.Annotated[
+ typing.Optional[TransactionAmountDetails], FieldMetadata(alias="originAmountDetails")
+ ] = None
+ destination_amount_details: typing_extensions.Annotated[
+ typing.Optional[TransactionAmountDetails], FieldMetadata(alias="destinationAmountDetails")
+ ] = None
+ origin_payment_details: typing_extensions.Annotated[
+ typing.Optional[TransactionWithRulesResultOriginPaymentDetails], FieldMetadata(alias="originPaymentDetails")
+ ] = pydantic.Field(default=None)
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ destination_payment_details: typing_extensions.Annotated[
+ typing.Optional[TransactionWithRulesResultDestinationPaymentDetails],
+ FieldMetadata(alias="destinationPaymentDetails"),
+ ] = None
+ origin_funds_info: typing_extensions.Annotated[
+ typing.Optional[OriginFundsInfo], FieldMetadata(alias="originFundsInfo")
+ ] = None
+ related_transaction_ids: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="relatedTransactionIds")
+ ] = pydantic.Field(default=None)
+ """
+ IDs of transactions related to this transaction. Ex: refund, split bills
+ """
+
+ product_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="productType")] = (
+ pydantic.Field(default=None)
)
- executed_rules: typing.List[ExecutedRulesResult] = pydantic.Field(alias="executedRules")
- hit_rules: typing.List[HitRulesDetails] = pydantic.Field(alias="hitRules")
- status: RuleAction
- risk_score_details: typing.Optional[TransactionRiskScoringResult] = pydantic.Field(alias="riskScoreDetails")
+ """
+ Type of produce being used by the consumer (ex wallets, payments etc)
+ """
- 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)
+ promotion_code_used: typing_extensions.Annotated[
+ typing.Optional[bool], FieldMetadata(alias="promotionCodeUsed")
+ ] = pydantic.Field(default=None)
+ """
+ Whether a promotion code was used or not the transaction
+ """
+
+ reference: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Reference field for the transaction indicating the purpose of the transaction etc.
+ """
+
+ origin_device_data: typing_extensions.Annotated[
+ typing.Optional[DeviceData], FieldMetadata(alias="originDeviceData")
+ ] = None
+ destination_device_data: typing_extensions.Annotated[
+ typing.Optional[DeviceData], FieldMetadata(alias="destinationDeviceData")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ executed_rules: typing_extensions.Annotated[typing.List[ExecutedRulesResult], FieldMetadata(alias="executedRules")]
+ hit_rules: typing_extensions.Annotated[typing.List[HitRulesDetails], FieldMetadata(alias="hitRules")]
+ status: RuleAction
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[TransactionRiskScoringResult], FieldMetadata(alias="riskScoreDetails")
+ ] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
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 468b9e3..e77df8a 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
@@ -1,111 +1,272 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
import typing_extensions
-
-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
-from .mpesa_details import MpesaDetails
-from .swift_details import SwiftDetails
-from .upi_details import UpiDetails
-from .wallet_details import WalletDetails
-
-
-class TransactionWithRulesResultDestinationPaymentDetails_Card(CardDetails):
- method: typing_extensions.Literal["CARD"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount(GenericBankAccountDetails):
- method: typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultDestinationPaymentDetails_Iban(IbanDetails):
- method: typing_extensions.Literal["IBAN"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultDestinationPaymentDetails_Ach(AchDetails):
- method: typing_extensions.Literal["ACH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultDestinationPaymentDetails_Upi(UpiDetails):
- method: typing_extensions.Literal["UPI"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultDestinationPaymentDetails_Wallet(WalletDetails):
- method: typing_extensions.Literal["WALLET"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultDestinationPaymentDetails_Swift(SwiftDetails):
- method: typing_extensions.Literal["SWIFT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultDestinationPaymentDetails_Mpesa(MpesaDetails):
- method: typing_extensions.Literal["MPESA"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultDestinationPaymentDetails_Check(CheckDetails):
- method: typing_extensions.Literal["CHECK"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultDestinationPaymentDetails_Cash(CashDetails):
- method: typing_extensions.Literal["CASH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .wallet_network import WalletNetwork
+from .mpesa_transaction_type import MpesaTransactionType
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class TransactionWithRulesResultDestinationPaymentDetails_Card(UniversalBaseModel):
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount(UniversalBaseModel):
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultDestinationPaymentDetails_Iban(UniversalBaseModel):
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultDestinationPaymentDetails_Ach(UniversalBaseModel):
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultDestinationPaymentDetails_Upi(UniversalBaseModel):
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultDestinationPaymentDetails_Wallet(UniversalBaseModel):
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultDestinationPaymentDetails_Swift(UniversalBaseModel):
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultDestinationPaymentDetails_Mpesa(UniversalBaseModel):
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultDestinationPaymentDetails_Check(UniversalBaseModel):
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultDestinationPaymentDetails_Cash(UniversalBaseModel):
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
TransactionWithRulesResultDestinationPaymentDetails = typing.Union[
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 786a488..328513f 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
@@ -1,111 +1,312 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
import typing_extensions
-
-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
-from .mpesa_details import MpesaDetails
-from .swift_details import SwiftDetails
-from .upi_details import UpiDetails
-from .wallet_details import WalletDetails
-
-
-class TransactionWithRulesResultOriginPaymentDetails_Card(CardDetails):
- method: typing_extensions.Literal["CARD"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount(GenericBankAccountDetails):
- method: typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultOriginPaymentDetails_Iban(IbanDetails):
- method: typing_extensions.Literal["IBAN"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultOriginPaymentDetails_Ach(AchDetails):
- method: typing_extensions.Literal["ACH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultOriginPaymentDetails_Swift(SwiftDetails):
- method: typing_extensions.Literal["SWIFT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultOriginPaymentDetails_Mpesa(MpesaDetails):
- method: typing_extensions.Literal["MPESA"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultOriginPaymentDetails_Upi(UpiDetails):
- method: typing_extensions.Literal["UPI"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultOriginPaymentDetails_Wallet(WalletDetails):
- method: typing_extensions.Literal["WALLET"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultOriginPaymentDetails_Check(CheckDetails):
- method: typing_extensions.Literal["CHECK"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class TransactionWithRulesResultOriginPaymentDetails_Cash(CashDetails):
- method: typing_extensions.Literal["CASH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .mpesa_transaction_type import MpesaTransactionType
+from .wallet_network import WalletNetwork
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class TransactionWithRulesResultOriginPaymentDetails_Card(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultOriginPaymentDetails_Iban(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultOriginPaymentDetails_Ach(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultOriginPaymentDetails_Swift(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultOriginPaymentDetails_Mpesa(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultOriginPaymentDetails_Upi(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultOriginPaymentDetails_Wallet(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultOriginPaymentDetails_Check(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class TransactionWithRulesResultOriginPaymentDetails_Cash(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
TransactionWithRulesResultOriginPaymentDetails = typing.Union[
diff --git a/src/flagright/types/upi_details.py b/src/flagright/types/upi_details.py
index 68dcc8d..4031980 100644
--- a/src/flagright/types/upi_details.py
+++ b/src/flagright/types/upi_details.py
@@ -1,44 +1,55 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .email_id import EmailId
from .tag import Tag
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class UpiDetails(pydantic.BaseModel):
+class UpiDetails(UniversalBaseModel):
"""
Model for UPI payment method
"""
- upi_id: str = pydantic.Field(alias="upiID", description="UPI Id number")
- bank_provider: typing.Optional[str] = pydantic.Field(alias="bankProvider", description="Bank provider name")
- interface_provider: typing.Optional[str] = pydantic.Field(
- alias="interfaceProvider", description="Interface provider name"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")] = pydantic.Field()
+ """
+ UPI Id number
+ """
+
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = (
+ pydantic.Field(default=None)
)
- name: typing.Optional[str] = pydantic.Field(description="Name of the account holder")
- email_id: typing.Optional[EmailId] = pydantic.Field(alias="emailId")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ """
+ Bank provider name
+ """
+
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ pydantic.Field(default=None)
)
+ """
+ Interface provider name
+ """
- 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)
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Name of the account holder
+ """
+
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/upi_payment_method.py b/src/flagright/types/upi_payment_method.py
index de4c9e1..3a7e64e 100644
--- a/src/flagright/types/upi_payment_method.py
+++ b/src/flagright/types/upi_payment_method.py
@@ -1,5 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import typing_extensions
+import typing
-UpiPaymentMethod = typing_extensions.Literal["UPI"]
+UpiPaymentMethod = typing.Literal["UPI"]
diff --git a/src/flagright/types/user.py b/src/flagright/types/user.py
index 47c41e6..8ce5bdb 100644
--- a/src/flagright/types/user.py
+++ b/src/flagright/types/user.py
@@ -1,84 +1,125 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .acquisition_channel import AcquisitionChannel
-from .consumer_user_segment import ConsumerUserSegment
+from .user_details import UserDetails
+from .user_state_details import UserStateDetails
+from .kyc_status_details import KycStatusDetails
+from .employment_status import EmploymentStatus
+from .legal_document import LegalDocument
from .contact_details import ContactDetails
from .employment_details import EmploymentDetails
-from .employment_status import EmploymentStatus
+from .transaction_limits import TransactionLimits
from .expected_income import ExpectedIncome
-from .kyc_status_details import KycStatusDetails
-from .legal_document import LegalDocument
-from .pep_status import PepStatus
-from .person_attachment import PersonAttachment
from .risk_level import RiskLevel
+from .acquisition_channel import AcquisitionChannel
from .source_of_funds import SourceOfFunds
-from .transaction_limits import TransactionLimits
-from .user_details import UserDetails
+from .consumer_user_segment import ConsumerUserSegment
+from .pep_status import PepStatus
from .user_entity_link import UserEntityLink
from .user_saved_payment_details_item import UserSavedPaymentDetailsItem
-from .user_state_details import UserStateDetails
from .user_tag import UserTag
+from .person_attachment import PersonAttachment
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class User(UniversalBaseModel):
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Unique user ID
+ """
+
+ created_timestamp: typing_extensions.Annotated[float, FieldMetadata(alias="createdTimestamp")] = pydantic.Field()
+ """
+ Timestamp when userId is created
+ """
+
+ activated_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="activatedTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp when user was activated
+ """
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+ user_details: typing_extensions.Annotated[typing.Optional[UserDetails], FieldMetadata(alias="userDetails")] = None
+ user_state_details: typing_extensions.Annotated[
+ typing.Optional[UserStateDetails], FieldMetadata(alias="userStateDetails")
+ ] = None
+ kyc_status_details: typing_extensions.Annotated[
+ typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
+ ] = None
+ eodd_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="eoddDate")] = None
+ employment_status: typing_extensions.Annotated[
+ typing.Optional[EmploymentStatus], FieldMetadata(alias="employmentStatus")
+ ] = None
+ occupation: typing.Optional[str] = None
+ legal_documents: typing_extensions.Annotated[
+ typing.Optional[typing.List[LegalDocument]], FieldMetadata(alias="legalDocuments")
+ ] = pydantic.Field(default=None)
+ """
+ User's legal identity documents - See Document Model for details
+ """
+ contact_details: typing_extensions.Annotated[
+ typing.Optional[ContactDetails], FieldMetadata(alias="contactDetails")
+ ] = None
+ employment_details: typing_extensions.Annotated[
+ typing.Optional[EmploymentDetails], FieldMetadata(alias="employmentDetails")
+ ] = None
+ transaction_limits: typing_extensions.Annotated[
+ typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
+ ] = None
+ expected_income: typing_extensions.Annotated[
+ typing.Optional[ExpectedIncome], FieldMetadata(alias="expectedIncome")
+ ] = None
+ risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
+ kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
+ acquisition_channel: typing_extensions.Annotated[
+ typing.Optional[AcquisitionChannel], FieldMetadata(alias="acquisitionChannel")
+ ] = None
+ reason_for_account_opening: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="reasonForAccountOpening")
+ ] = None
+ source_of_funds: typing_extensions.Annotated[
+ typing.Optional[typing.List[SourceOfFunds]], FieldMetadata(alias="sourceOfFunds")
+ ] = None
+ user_segment: typing_extensions.Annotated[
+ typing.Optional[ConsumerUserSegment], FieldMetadata(alias="userSegment")
+ ] = None
+ pep_status: typing_extensions.Annotated[
+ typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
+ ] = None
+ last_transaction_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp of the last successful transaction of the user
+ """
-class User(pydantic.BaseModel):
- user_id: str = pydantic.Field(alias="userId", description="Unique user ID")
- created_timestamp: float = pydantic.Field(alias="createdTimestamp", description="Timestamp when userId is created")
- activated_timestamp: typing.Optional[float] = pydantic.Field(
- alias="activatedTimestamp", description="Timestamp when user was activated"
- )
- user_details: typing.Optional[UserDetails] = pydantic.Field(alias="userDetails")
- user_state_details: typing.Optional[UserStateDetails] = pydantic.Field(alias="userStateDetails")
- kyc_status_details: typing.Optional[KycStatusDetails] = pydantic.Field(alias="kycStatusDetails")
- eodd_date: typing.Optional[float] = pydantic.Field(alias="eoddDate")
- employment_status: typing.Optional[EmploymentStatus] = pydantic.Field(alias="employmentStatus")
- occupation: typing.Optional[str]
- legal_documents: typing.Optional[typing.List[LegalDocument]] = pydantic.Field(
- alias="legalDocuments", description="User's legal identity documents - See Document Model for details"
- )
- contact_details: typing.Optional[ContactDetails] = pydantic.Field(alias="contactDetails")
- employment_details: typing.Optional[EmploymentDetails] = pydantic.Field(alias="employmentDetails")
- transaction_limits: typing.Optional[TransactionLimits] = pydantic.Field(alias="transactionLimits")
- expected_income: typing.Optional[ExpectedIncome] = pydantic.Field(alias="expectedIncome")
- risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="riskLevel")
- kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
- acquisition_channel: typing.Optional[AcquisitionChannel] = pydantic.Field(alias="acquisitionChannel")
- reason_for_account_opening: typing.Optional[typing.List[str]] = pydantic.Field(alias="reasonForAccountOpening")
- source_of_funds: typing.Optional[typing.List[SourceOfFunds]] = pydantic.Field(alias="sourceOfFunds")
- user_segment: typing.Optional[ConsumerUserSegment] = pydantic.Field(alias="userSegment")
- pep_status: typing.Optional[typing.List[PepStatus]] = pydantic.Field(alias="pepStatus")
- last_transaction_timestamp: typing.Optional[float] = pydantic.Field(
- alias="lastTransactionTimestamp", description="Timestamp of the last successful transaction of the user"
- )
- linked_entities: typing.Optional[UserEntityLink] = pydantic.Field(alias="linkedEntities")
- saved_payment_details: typing.Optional[typing.List[UserSavedPaymentDetailsItem]] = pydantic.Field(
- alias="savedPaymentDetails"
- )
- tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(
- description="Additional information that can be added via tags"
- )
- attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
- description="Uploaded user's attachment"
- )
+ linked_entities: typing_extensions.Annotated[
+ typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
+ ] = None
+ saved_payment_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserSavedPaymentDetailsItem]], FieldMetadata(alias="savedPaymentDetails")
+ ] = None
+ tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(default=None)
+ """
+ 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}
- return super().json(**kwargs_with_defaults)
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(default=None)
+ """
+ Uploaded user's attachment
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/user_base.py b/src/flagright/types/user_base.py
index 93ab8d1..e069905 100644
--- a/src/flagright/types/user_base.py
+++ b/src/flagright/types/user_base.py
@@ -1,34 +1,33 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
import typing
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class UserBase(pydantic.BaseModel):
+class UserBase(UniversalBaseModel):
"""
Model for User details
"""
- user_id: str = pydantic.Field(alias="userId", description="Unique user ID")
- created_timestamp: float = pydantic.Field(alias="createdTimestamp", description="Timestamp when userId is created")
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Unique user ID
+ """
- 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)
+ created_timestamp: typing_extensions.Annotated[float, FieldMetadata(alias="createdTimestamp")] = pydantic.Field()
+ """
+ Timestamp when userId is created
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/user_details.py b/src/flagright/types/user_details.py
index d21350d..5a1c920 100644
--- a/src/flagright/types/user_details.py
+++ b/src/flagright/types/user_details.py
@@ -1,51 +1,64 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .consumer_name import ConsumerName
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
from .country_code import CountryCode
from .gender import Gender
from .marital_status import MaritalStatus
from .place_of_birth import PlaceOfBirth
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class UserDetails(pydantic.BaseModel):
+class UserDetails(UniversalBaseModel):
"""
Model for consumer user personal details
"""
- name: typing.Optional[ConsumerName]
- date_of_birth: typing.Optional[str] = pydantic.Field(
- alias="dateOfBirth", description="Date of birth of the user (YYYY-MM-DD)"
+ name: typing.Optional[ConsumerName] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = (
+ pydantic.Field(default=None)
)
- user_category: typing.Optional[str] = pydantic.Field(
- alias="userCategory", description="Internal category of the user"
+ """
+ Date of birth of the user (YYYY-MM-DD)
+ """
+
+ user_category: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userCategory")] = (
+ pydantic.Field(default=None)
)
- country_of_residence: typing.Optional[CountryCode] = pydantic.Field(alias="countryOfResidence")
- country_of_tax_residence: typing.Optional[CountryCode] = pydantic.Field(alias="countryOfTaxResidence")
- country_of_nationality: typing.Optional[CountryCode] = pydantic.Field(alias="countryOfNationality")
- gender: typing.Optional[Gender]
- marital_status: typing.Optional[MaritalStatus] = pydantic.Field(alias="maritalStatus")
- place_of_birth: typing.Optional[PlaceOfBirth] = pydantic.Field(alias="placeOfBirth")
- alias: typing.Optional[typing.List[str]] = pydantic.Field(description="Alias names of the user")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Internal category of the user
+ """
+
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ country_of_tax_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfTaxResidence")
+ ] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ gender: typing.Optional[Gender] = None
+ marital_status: typing_extensions.Annotated[
+ typing.Optional[MaritalStatus], FieldMetadata(alias="maritalStatus")
+ ] = None
+ place_of_birth: typing_extensions.Annotated[typing.Optional[PlaceOfBirth], FieldMetadata(alias="placeOfBirth")] = (
+ None
+ )
+ alias: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Alias names of the user
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/user_entity_link.py b/src/flagright/types/user_entity_link.py
index a90f22a..4cbe4f9 100644
--- a/src/flagright/types/user_entity_link.py
+++ b/src/flagright/types/user_entity_link.py
@@ -1,29 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class UserEntityLink(UniversalBaseModel):
+ parent_user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="parentUserId")] = None
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
-class UserEntityLink(pydantic.BaseModel):
- parent_user_id: typing.Optional[str] = pydantic.Field(alias="parentUserId")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/user_optional.py b/src/flagright/types/user_optional.py
index 40f1eb7..15e74d4 100644
--- a/src/flagright/types/user_optional.py
+++ b/src/flagright/types/user_optional.py
@@ -1,86 +1,119 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .acquisition_channel import AcquisitionChannel
-from .consumer_user_segment import ConsumerUserSegment
+from ..core.serialization import FieldMetadata
+import pydantic
+from .user_details import UserDetails
+from .user_state_details import UserStateDetails
+from .kyc_status_details import KycStatusDetails
+from .employment_status import EmploymentStatus
+from .legal_document import LegalDocument
from .contact_details import ContactDetails
from .employment_details import EmploymentDetails
-from .employment_status import EmploymentStatus
+from .transaction_limits import TransactionLimits
from .expected_income import ExpectedIncome
-from .kyc_status_details import KycStatusDetails
-from .legal_document import LegalDocument
-from .pep_status import PepStatus
-from .person_attachment import PersonAttachment
from .risk_level import RiskLevel
+from .acquisition_channel import AcquisitionChannel
from .source_of_funds import SourceOfFunds
-from .transaction_limits import TransactionLimits
-from .user_details import UserDetails
+from .consumer_user_segment import ConsumerUserSegment
+from .pep_status import PepStatus
from .user_entity_link import UserEntityLink
from .user_optional_saved_payment_details_item import UserOptionalSavedPaymentDetailsItem
-from .user_state_details import UserStateDetails
from .user_tag import UserTag
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from .person_attachment import PersonAttachment
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-class UserOptional(pydantic.BaseModel):
+class UserOptional(UniversalBaseModel):
"""
Model for User details
"""
- activated_timestamp: typing.Optional[float] = pydantic.Field(
- alias="activatedTimestamp", description="Timestamp when user was activated"
- )
- user_details: typing.Optional[UserDetails] = pydantic.Field(alias="userDetails")
- user_state_details: typing.Optional[UserStateDetails] = pydantic.Field(alias="userStateDetails")
- kyc_status_details: typing.Optional[KycStatusDetails] = pydantic.Field(alias="kycStatusDetails")
- eodd_date: typing.Optional[float] = pydantic.Field(alias="eoddDate")
- employment_status: typing.Optional[EmploymentStatus] = pydantic.Field(alias="employmentStatus")
- occupation: typing.Optional[str]
- legal_documents: typing.Optional[typing.List[LegalDocument]] = pydantic.Field(
- alias="legalDocuments", description="User's legal identity documents - See Document Model for details"
- )
- contact_details: typing.Optional[ContactDetails] = pydantic.Field(alias="contactDetails")
- employment_details: typing.Optional[EmploymentDetails] = pydantic.Field(alias="employmentDetails")
- transaction_limits: typing.Optional[TransactionLimits] = pydantic.Field(alias="transactionLimits")
- expected_income: typing.Optional[ExpectedIncome] = pydantic.Field(alias="expectedIncome")
- risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="riskLevel")
- kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
- acquisition_channel: typing.Optional[AcquisitionChannel] = pydantic.Field(alias="acquisitionChannel")
- reason_for_account_opening: typing.Optional[typing.List[str]] = pydantic.Field(alias="reasonForAccountOpening")
- source_of_funds: typing.Optional[typing.List[SourceOfFunds]] = pydantic.Field(alias="sourceOfFunds")
- user_segment: typing.Optional[ConsumerUserSegment] = pydantic.Field(alias="userSegment")
- pep_status: typing.Optional[typing.List[PepStatus]] = pydantic.Field(alias="pepStatus")
- last_transaction_timestamp: typing.Optional[float] = pydantic.Field(
- alias="lastTransactionTimestamp", description="Timestamp of the last successful transaction of the user"
- )
- linked_entities: typing.Optional[UserEntityLink] = pydantic.Field(alias="linkedEntities")
- saved_payment_details: typing.Optional[typing.List[UserOptionalSavedPaymentDetailsItem]] = pydantic.Field(
- alias="savedPaymentDetails"
- )
- tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(
- description="Additional information that can be added via tags"
- )
- attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
- description="Uploaded user's attachment"
- )
+ activated_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="activatedTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp when user was activated
+ """
+
+ user_details: typing_extensions.Annotated[typing.Optional[UserDetails], FieldMetadata(alias="userDetails")] = None
+ user_state_details: typing_extensions.Annotated[
+ typing.Optional[UserStateDetails], FieldMetadata(alias="userStateDetails")
+ ] = None
+ kyc_status_details: typing_extensions.Annotated[
+ typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
+ ] = None
+ eodd_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="eoddDate")] = None
+ employment_status: typing_extensions.Annotated[
+ typing.Optional[EmploymentStatus], FieldMetadata(alias="employmentStatus")
+ ] = None
+ occupation: typing.Optional[str] = None
+ legal_documents: typing_extensions.Annotated[
+ typing.Optional[typing.List[LegalDocument]], FieldMetadata(alias="legalDocuments")
+ ] = pydantic.Field(default=None)
+ """
+ User's legal identity documents - See Document Model for details
+ """
- 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)
+ contact_details: typing_extensions.Annotated[
+ typing.Optional[ContactDetails], FieldMetadata(alias="contactDetails")
+ ] = None
+ employment_details: typing_extensions.Annotated[
+ typing.Optional[EmploymentDetails], FieldMetadata(alias="employmentDetails")
+ ] = None
+ transaction_limits: typing_extensions.Annotated[
+ typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
+ ] = None
+ expected_income: typing_extensions.Annotated[
+ typing.Optional[ExpectedIncome], FieldMetadata(alias="expectedIncome")
+ ] = None
+ risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
+ kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
+ acquisition_channel: typing_extensions.Annotated[
+ typing.Optional[AcquisitionChannel], FieldMetadata(alias="acquisitionChannel")
+ ] = None
+ reason_for_account_opening: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="reasonForAccountOpening")
+ ] = None
+ source_of_funds: typing_extensions.Annotated[
+ typing.Optional[typing.List[SourceOfFunds]], FieldMetadata(alias="sourceOfFunds")
+ ] = None
+ user_segment: typing_extensions.Annotated[
+ typing.Optional[ConsumerUserSegment], FieldMetadata(alias="userSegment")
+ ] = None
+ pep_status: typing_extensions.Annotated[
+ typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
+ ] = None
+ last_transaction_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp of the last successful transaction of the user
+ """
+
+ linked_entities: typing_extensions.Annotated[
+ typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
+ ] = None
+ saved_payment_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserOptionalSavedPaymentDetailsItem]], FieldMetadata(alias="savedPaymentDetails")
+ ] = None
+ tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(default=None)
+ """
+ Uploaded user's attachment
+ """
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
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 cff2417..71c3336 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -1,111 +1,272 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
import typing_extensions
-
-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
-from .mpesa_details import MpesaDetails
-from .swift_details import SwiftDetails
-from .upi_details import UpiDetails
-from .wallet_details import WalletDetails
-
-
-class UserOptionalSavedPaymentDetailsItem_Card(CardDetails):
- method: typing_extensions.Literal["CARD"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserOptionalSavedPaymentDetailsItem_GenericBankAccount(GenericBankAccountDetails):
- method: typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserOptionalSavedPaymentDetailsItem_Iban(IbanDetails):
- method: typing_extensions.Literal["IBAN"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserOptionalSavedPaymentDetailsItem_Ach(AchDetails):
- method: typing_extensions.Literal["ACH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserOptionalSavedPaymentDetailsItem_Swift(SwiftDetails):
- method: typing_extensions.Literal["SWIFT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserOptionalSavedPaymentDetailsItem_Mpesa(MpesaDetails):
- method: typing_extensions.Literal["MPESA"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserOptionalSavedPaymentDetailsItem_Upi(UpiDetails):
- method: typing_extensions.Literal["UPI"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserOptionalSavedPaymentDetailsItem_Wallet(WalletDetails):
- method: typing_extensions.Literal["WALLET"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserOptionalSavedPaymentDetailsItem_Check(CheckDetails):
- method: typing_extensions.Literal["CHECK"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserOptionalSavedPaymentDetailsItem_Cash(CashDetails):
- method: typing_extensions.Literal["CASH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .mpesa_transaction_type import MpesaTransactionType
+from .wallet_network import WalletNetwork
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class UserOptionalSavedPaymentDetailsItem_Card(UniversalBaseModel):
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserOptionalSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserOptionalSavedPaymentDetailsItem_Iban(UniversalBaseModel):
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserOptionalSavedPaymentDetailsItem_Ach(UniversalBaseModel):
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserOptionalSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserOptionalSavedPaymentDetailsItem_Upi(UniversalBaseModel):
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserOptionalSavedPaymentDetailsItem_Check(UniversalBaseModel):
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserOptionalSavedPaymentDetailsItem_Cash(UniversalBaseModel):
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
UserOptionalSavedPaymentDetailsItem = typing.Union[
diff --git a/src/flagright/types/user_registration_status.py b/src/flagright/types/user_registration_status.py
index f6414e1..098c8eb 100644
--- a/src/flagright/types/user_registration_status.py
+++ b/src/flagright/types/user_registration_status.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class UserRegistrationStatus(str, enum.Enum):
- REGISTERED = "REGISTERED"
- UNREGISTERED = "UNREGISTERED"
-
- def visit(self, registered: typing.Callable[[], T_Result], unregistered: typing.Callable[[], T_Result]) -> T_Result:
- if self is UserRegistrationStatus.REGISTERED:
- return registered()
- if self is UserRegistrationStatus.UNREGISTERED:
- return unregistered()
+UserRegistrationStatus = typing.Union[typing.Literal["REGISTERED", "UNREGISTERED"], typing.Any]
diff --git a/src/flagright/types/user_risk_score_details.py b/src/flagright/types/user_risk_score_details.py
index 445addf..1fa8d7f 100644
--- a/src/flagright/types/user_risk_score_details.py
+++ b/src/flagright/types/user_risk_score_details.py
@@ -1,33 +1,25 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from ..core.serialization import FieldMetadata
from .risk_level import RiskLevel
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class UserRiskScoreDetails(pydantic.BaseModel):
- kyc_risk_score: typing.Optional[float] = pydantic.Field(alias="kycRiskScore")
- cra_risk_score: typing.Optional[float] = pydantic.Field(alias="craRiskScore")
- kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
- cra_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="craRiskLevel")
- 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)
+class UserRiskScoreDetails(UniversalBaseModel):
+ kyc_risk_score: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="kycRiskScore")] = None
+ cra_risk_score: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="craRiskScore")] = None
+ kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
+ cra_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="craRiskLevel")] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/user_rules_result.py b/src/flagright/types/user_rules_result.py
index fd7ff2d..9f50da1 100644
--- a/src/flagright/types/user_rules_result.py
+++ b/src/flagright/types/user_rules_result.py
@@ -1,34 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .executed_rules_result import ExecutedRulesResult
+from ..core.serialization import FieldMetadata
from .hit_rules_details import HitRulesDetails
from .user_risk_score_details import UserRiskScoreDetails
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class UserRulesResult(pydantic.BaseModel):
- executed_rules: typing.Optional[typing.List[ExecutedRulesResult]] = pydantic.Field(alias="executedRules")
- hit_rules: typing.Optional[typing.List[HitRulesDetails]] = pydantic.Field(alias="hitRules")
- risk_score_details: typing.Optional[UserRiskScoreDetails] = pydantic.Field(alias="riskScoreDetails")
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class UserRulesResult(UniversalBaseModel):
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+ hit_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[HitRulesDetails]], FieldMetadata(alias="hitRules")
+ ] = None
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[UserRiskScoreDetails], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 5ed9dec..256198a 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -1,111 +1,272 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
import typing_extensions
-
-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
-from .mpesa_details import MpesaDetails
-from .swift_details import SwiftDetails
-from .upi_details import UpiDetails
-from .wallet_details import WalletDetails
-
-
-class UserSavedPaymentDetailsItem_Card(CardDetails):
- method: typing_extensions.Literal["CARD"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserSavedPaymentDetailsItem_GenericBankAccount(GenericBankAccountDetails):
- method: typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserSavedPaymentDetailsItem_Iban(IbanDetails):
- method: typing_extensions.Literal["IBAN"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserSavedPaymentDetailsItem_Ach(AchDetails):
- method: typing_extensions.Literal["ACH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserSavedPaymentDetailsItem_Swift(SwiftDetails):
- method: typing_extensions.Literal["SWIFT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserSavedPaymentDetailsItem_Mpesa(MpesaDetails):
- method: typing_extensions.Literal["MPESA"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserSavedPaymentDetailsItem_Upi(UpiDetails):
- method: typing_extensions.Literal["UPI"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserSavedPaymentDetailsItem_Wallet(WalletDetails):
- method: typing_extensions.Literal["WALLET"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserSavedPaymentDetailsItem_Check(CheckDetails):
- method: typing_extensions.Literal["CHECK"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserSavedPaymentDetailsItem_Cash(CashDetails):
- method: typing_extensions.Literal["CASH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .mpesa_transaction_type import MpesaTransactionType
+from .wallet_network import WalletNetwork
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class UserSavedPaymentDetailsItem_Card(UniversalBaseModel):
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserSavedPaymentDetailsItem_Iban(UniversalBaseModel):
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserSavedPaymentDetailsItem_Ach(UniversalBaseModel):
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserSavedPaymentDetailsItem_Swift(UniversalBaseModel):
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserSavedPaymentDetailsItem_Upi(UniversalBaseModel):
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserSavedPaymentDetailsItem_Check(UniversalBaseModel):
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserSavedPaymentDetailsItem_Cash(UniversalBaseModel):
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
UserSavedPaymentDetailsItem = typing.Union[
diff --git a/src/flagright/types/user_state.py b/src/flagright/types/user_state.py
index cb692e6..f52d78c 100644
--- a/src/flagright/types/user_state.py
+++ b/src/flagright/types/user_state.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class UserState(str, enum.Enum):
- UNACCEPTABLE = "UNACCEPTABLE"
- TERMINATED = "TERMINATED"
- ACTIVE = "ACTIVE"
- DORMANT = "DORMANT"
- CREATED = "CREATED"
- SUSPENDED = "SUSPENDED"
- BLOCKED = "BLOCKED"
-
- def visit(
- self,
- unacceptable: typing.Callable[[], T_Result],
- terminated: typing.Callable[[], T_Result],
- active: typing.Callable[[], T_Result],
- dormant: typing.Callable[[], T_Result],
- created: typing.Callable[[], T_Result],
- suspended: typing.Callable[[], T_Result],
- blocked: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is UserState.UNACCEPTABLE:
- return unacceptable()
- if self is UserState.TERMINATED:
- return terminated()
- if self is UserState.ACTIVE:
- return active()
- if self is UserState.DORMANT:
- return dormant()
- if self is UserState.CREATED:
- return created()
- if self is UserState.SUSPENDED:
- return suspended()
- if self is UserState.BLOCKED:
- return blocked()
+UserState = typing.Union[
+ typing.Literal["UNACCEPTABLE", "TERMINATED", "ACTIVE", "DORMANT", "CREATED", "SUSPENDED", "BLOCKED"], typing.Any
+]
diff --git a/src/flagright/types/user_state_details.py b/src/flagright/types/user_state_details.py
index 5d07739..6988225 100644
--- a/src/flagright/types/user_state_details.py
+++ b/src/flagright/types/user_state_details.py
@@ -1,30 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ..core.datetime_utils import serialize_datetime
from .user_state import UserState
-
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class UserStateDetails(pydantic.BaseModel):
- reason: typing.Optional[str]
+class UserStateDetails(UniversalBaseModel):
+ reason: typing.Optional[str] = None
state: UserState
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/user_tag.py b/src/flagright/types/user_tag.py
index fae00ba..3def601 100644
--- a/src/flagright/types/user_tag.py
+++ b/src/flagright/types/user_tag.py
@@ -1,33 +1,36 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import pydantic
+import typing_extensions
import typing
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-from ..core.datetime_utils import serialize_datetime
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class UserTag(UniversalBaseModel):
+ key: str = pydantic.Field()
+ """
+ Key value when you are creating a custom variable
+ """
+ value: str = pydantic.Field()
+ """
+ Value for a given key when you are creating a custom variable
+ """
-class UserTag(pydantic.BaseModel):
- key: str = pydantic.Field(description="Key value when you are creating a custom variable")
- value: str = pydantic.Field(description="Value for a given key when you are creating a custom variable")
- is_editable: typing.Optional[bool] = pydantic.Field(
- alias="isEditable", description="Flag to indicate if the tag is editable over the console"
+ is_editable: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isEditable")] = pydantic.Field(
+ 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Flag to indicate if the tag is editable over the console
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/user_tags_update.py b/src/flagright/types/user_tags_update.py
index eebcd50..0c9045d 100644
--- a/src/flagright/types/user_tags_update.py
+++ b/src/flagright/types/user_tags_update.py
@@ -1,31 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
+from ..core.serialization import FieldMetadata
from .user_tag import UserTag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-
-class UserTagsUpdate(pydantic.BaseModel):
- user_id: typing.Optional[str] = pydantic.Field(alias="userId")
- tags: typing.Optional[typing.List[UserTag]]
- 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)
+class UserTagsUpdate(UniversalBaseModel):
+ user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userId")] = None
+ tags: typing.Optional[typing.List[UserTag]] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/user_with_rules_result.py b/src/flagright/types/user_with_rules_result.py
index d73ab21..72ff660 100644
--- a/src/flagright/types/user_with_rules_result.py
+++ b/src/flagright/types/user_with_rules_result.py
@@ -1,90 +1,139 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .acquisition_channel import AcquisitionChannel
-from .consumer_user_segment import ConsumerUserSegment
+from .user_details import UserDetails
+from .user_state_details import UserStateDetails
+from .kyc_status_details import KycStatusDetails
+from .employment_status import EmploymentStatus
+from .legal_document import LegalDocument
from .contact_details import ContactDetails
from .employment_details import EmploymentDetails
-from .employment_status import EmploymentStatus
-from .executed_rules_result import ExecutedRulesResult
+from .transaction_limits import TransactionLimits
from .expected_income import ExpectedIncome
-from .hit_rules_details import HitRulesDetails
-from .kyc_status_details import KycStatusDetails
-from .legal_document import LegalDocument
-from .pep_status import PepStatus
-from .person_attachment import PersonAttachment
from .risk_level import RiskLevel
+from .acquisition_channel import AcquisitionChannel
from .source_of_funds import SourceOfFunds
-from .transaction_limits import TransactionLimits
-from .user_details import UserDetails
+from .consumer_user_segment import ConsumerUserSegment
+from .pep_status import PepStatus
from .user_entity_link import UserEntityLink
-from .user_risk_score_details import UserRiskScoreDetails
-from .user_state_details import UserStateDetails
-from .user_tag import UserTag
from .user_with_rules_result_saved_payment_details_item import UserWithRulesResultSavedPaymentDetailsItem
+from .user_tag import UserTag
+from .person_attachment import PersonAttachment
+from .executed_rules_result import ExecutedRulesResult
+from .hit_rules_details import HitRulesDetails
+from .user_risk_score_details import UserRiskScoreDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class UserWithRulesResult(UniversalBaseModel):
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Unique user ID
+ """
+
+ created_timestamp: typing_extensions.Annotated[float, FieldMetadata(alias="createdTimestamp")] = pydantic.Field()
+ """
+ Timestamp when userId is created
+ """
+
+ activated_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="activatedTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp when user was activated
+ """
+
+ user_details: typing_extensions.Annotated[typing.Optional[UserDetails], FieldMetadata(alias="userDetails")] = None
+ user_state_details: typing_extensions.Annotated[
+ typing.Optional[UserStateDetails], FieldMetadata(alias="userStateDetails")
+ ] = None
+ kyc_status_details: typing_extensions.Annotated[
+ typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
+ ] = None
+ eodd_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="eoddDate")] = None
+ employment_status: typing_extensions.Annotated[
+ typing.Optional[EmploymentStatus], FieldMetadata(alias="employmentStatus")
+ ] = None
+ occupation: typing.Optional[str] = None
+ legal_documents: typing_extensions.Annotated[
+ typing.Optional[typing.List[LegalDocument]], FieldMetadata(alias="legalDocuments")
+ ] = pydantic.Field(default=None)
+ """
+ User's legal identity documents - See Document Model for details
+ """
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+ contact_details: typing_extensions.Annotated[
+ typing.Optional[ContactDetails], FieldMetadata(alias="contactDetails")
+ ] = None
+ employment_details: typing_extensions.Annotated[
+ typing.Optional[EmploymentDetails], FieldMetadata(alias="employmentDetails")
+ ] = None
+ transaction_limits: typing_extensions.Annotated[
+ typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
+ ] = None
+ expected_income: typing_extensions.Annotated[
+ typing.Optional[ExpectedIncome], FieldMetadata(alias="expectedIncome")
+ ] = None
+ risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
+ kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
+ acquisition_channel: typing_extensions.Annotated[
+ typing.Optional[AcquisitionChannel], FieldMetadata(alias="acquisitionChannel")
+ ] = None
+ reason_for_account_opening: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="reasonForAccountOpening")
+ ] = None
+ source_of_funds: typing_extensions.Annotated[
+ typing.Optional[typing.List[SourceOfFunds]], FieldMetadata(alias="sourceOfFunds")
+ ] = None
+ user_segment: typing_extensions.Annotated[
+ typing.Optional[ConsumerUserSegment], FieldMetadata(alias="userSegment")
+ ] = None
+ pep_status: typing_extensions.Annotated[
+ typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
+ ] = None
+ last_transaction_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp of the last successful transaction of the user
+ """
+ linked_entities: typing_extensions.Annotated[
+ typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
+ ] = None
+ saved_payment_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserWithRulesResultSavedPaymentDetailsItem]],
+ FieldMetadata(alias="savedPaymentDetails"),
+ ] = None
+ tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
-class UserWithRulesResult(pydantic.BaseModel):
- user_id: str = pydantic.Field(alias="userId", description="Unique user ID")
- created_timestamp: float = pydantic.Field(alias="createdTimestamp", description="Timestamp when userId is created")
- activated_timestamp: typing.Optional[float] = pydantic.Field(
- alias="activatedTimestamp", description="Timestamp when user was activated"
- )
- user_details: typing.Optional[UserDetails] = pydantic.Field(alias="userDetails")
- user_state_details: typing.Optional[UserStateDetails] = pydantic.Field(alias="userStateDetails")
- kyc_status_details: typing.Optional[KycStatusDetails] = pydantic.Field(alias="kycStatusDetails")
- eodd_date: typing.Optional[float] = pydantic.Field(alias="eoddDate")
- employment_status: typing.Optional[EmploymentStatus] = pydantic.Field(alias="employmentStatus")
- occupation: typing.Optional[str]
- legal_documents: typing.Optional[typing.List[LegalDocument]] = pydantic.Field(
- alias="legalDocuments", description="User's legal identity documents - See Document Model for details"
- )
- contact_details: typing.Optional[ContactDetails] = pydantic.Field(alias="contactDetails")
- employment_details: typing.Optional[EmploymentDetails] = pydantic.Field(alias="employmentDetails")
- transaction_limits: typing.Optional[TransactionLimits] = pydantic.Field(alias="transactionLimits")
- expected_income: typing.Optional[ExpectedIncome] = pydantic.Field(alias="expectedIncome")
- risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="riskLevel")
- kyc_risk_level: typing.Optional[RiskLevel] = pydantic.Field(alias="kycRiskLevel")
- acquisition_channel: typing.Optional[AcquisitionChannel] = pydantic.Field(alias="acquisitionChannel")
- reason_for_account_opening: typing.Optional[typing.List[str]] = pydantic.Field(alias="reasonForAccountOpening")
- source_of_funds: typing.Optional[typing.List[SourceOfFunds]] = pydantic.Field(alias="sourceOfFunds")
- user_segment: typing.Optional[ConsumerUserSegment] = pydantic.Field(alias="userSegment")
- pep_status: typing.Optional[typing.List[PepStatus]] = pydantic.Field(alias="pepStatus")
- last_transaction_timestamp: typing.Optional[float] = pydantic.Field(
- alias="lastTransactionTimestamp", description="Timestamp of the last successful transaction of the user"
- )
- linked_entities: typing.Optional[UserEntityLink] = pydantic.Field(alias="linkedEntities")
- saved_payment_details: typing.Optional[typing.List[UserWithRulesResultSavedPaymentDetailsItem]] = pydantic.Field(
- alias="savedPaymentDetails"
- )
- tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(
- description="Additional information that can be added via tags"
- )
- attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(
- description="Uploaded user's attachment"
- )
- executed_rules: typing.Optional[typing.List[ExecutedRulesResult]] = pydantic.Field(alias="executedRules")
- hit_rules: typing.Optional[typing.List[HitRulesDetails]] = pydantic.Field(alias="hitRules")
- risk_score_details: typing.Optional[UserRiskScoreDetails] = pydantic.Field(alias="riskScoreDetails")
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(default=None)
+ """
+ Uploaded user's attachment
+ """
- 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)
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+ hit_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[HitRulesDetails]], FieldMetadata(alias="hitRules")
+ ] = None
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[UserRiskScoreDetails], FieldMetadata(alias="riskScoreDetails")
+ ] = None
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
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 4d052b7..13db802 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
@@ -1,111 +1,272 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
+from ..core.pydantic_utilities import UniversalBaseModel
import typing
-
import typing_extensions
-
-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
-from .mpesa_details import MpesaDetails
-from .swift_details import SwiftDetails
-from .upi_details import UpiDetails
-from .wallet_details import WalletDetails
-
-
-class UserWithRulesResultSavedPaymentDetailsItem_Card(CardDetails):
- method: typing_extensions.Literal["CARD"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(GenericBankAccountDetails):
- method: typing_extensions.Literal["GENERIC_BANK_ACCOUNT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserWithRulesResultSavedPaymentDetailsItem_Iban(IbanDetails):
- method: typing_extensions.Literal["IBAN"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserWithRulesResultSavedPaymentDetailsItem_Ach(AchDetails):
- method: typing_extensions.Literal["ACH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserWithRulesResultSavedPaymentDetailsItem_Swift(SwiftDetails):
- method: typing_extensions.Literal["SWIFT"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserWithRulesResultSavedPaymentDetailsItem_Mpesa(MpesaDetails):
- method: typing_extensions.Literal["MPESA"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserWithRulesResultSavedPaymentDetailsItem_Upi(UpiDetails):
- method: typing_extensions.Literal["UPI"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserWithRulesResultSavedPaymentDetailsItem_Wallet(WalletDetails):
- method: typing_extensions.Literal["WALLET"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserWithRulesResultSavedPaymentDetailsItem_Check(CheckDetails):
- method: typing_extensions.Literal["CHECK"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
-
-
-class UserWithRulesResultSavedPaymentDetailsItem_Cash(CashDetails):
- method: typing_extensions.Literal["CASH"]
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .mpesa_transaction_type import MpesaTransactionType
+from .wallet_network import WalletNetwork
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class UserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBaseModel):
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseModel):
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserWithRulesResultSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserWithRulesResultSavedPaymentDetailsItem_Upi(UniversalBaseModel):
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class UserWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
UserWithRulesResultSavedPaymentDetailsItem = typing.Union[
diff --git a/src/flagright/types/wallet_details.py b/src/flagright/types/wallet_details.py
index db19422..d1bc7ab 100644
--- a/src/flagright/types/wallet_details.py
+++ b/src/flagright/types/wallet_details.py
@@ -1,54 +1,69 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
import typing
-
-from ..core.datetime_utils import serialize_datetime
-from .amount import Amount
+from ..core.serialization import FieldMetadata
+import pydantic
from .email_id import EmailId
from .tag import Tag
+from .amount import Amount
from .wallet_network import WalletNetwork
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
-
-class WalletDetails(pydantic.BaseModel):
+class WalletDetails(UniversalBaseModel):
"""
Standardized model for a Generic wallet transaction
"""
- wallet_type: typing.Optional[str] = pydantic.Field(
- alias="walletType",
- description="Wallet type if there are various types of wallets belonging to the same user. E.g. Checking, savings, vault, different currency wallets etc.",
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = pydantic.Field(
+ default=None
)
- wallet_id: typing.Optional[str] = pydantic.Field(alias="walletId", description="Unique ID of the wallet")
- payment_channel: typing.Optional[str] = pydantic.Field(
- alias="paymentChannel", description="Payment Channel used through wallet"
+ """
+ Wallet type if there are various types of wallets belonging to the same user. E.g. Checking, savings, vault, different currency wallets etc.
+ """
+
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = pydantic.Field(
+ default=None
)
- name: typing.Optional[str] = pydantic.Field(description="Name of the account holder for a specific wallet")
- email_id: typing.Optional[EmailId] = pydantic.Field(alias="emailId")
- tags: typing.Optional[typing.List[Tag]] = pydantic.Field(
- description="Additional information that can be added via tags"
+ """
+ Unique ID of the wallet
+ """
+
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = (
+ pydantic.Field(default=None)
)
- wallet_phone_number: typing.Optional[str] = pydantic.Field(
- alias="walletPhoneNumber", description="Phone number associated with the wallet, if any"
+ """
+ Payment Channel used through wallet
+ """
+
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Name of the account holder for a specific wallet
+ """
+
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ pydantic.Field(default=None)
)
- wallet_balance: typing.Optional[Amount] = pydantic.Field(alias="walletBalance")
- network: typing.Optional[WalletNetwork]
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Phone number associated with the wallet, if any
+ """
+
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/wallet_network.py b/src/flagright/types/wallet_network.py
index bd85d78..b40b119 100644
--- a/src/flagright/types/wallet_network.py
+++ b/src/flagright/types/wallet_network.py
@@ -1,121 +1,35 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class WalletNetwork(str, enum.Enum):
- """
- Network of the wallet
- """
-
- BITCOIN = "BITCOIN"
- ETHEREUM = "ETHEREUM"
- POLYGON = "POLYGON"
- BNB_SMART_CHAIN = "BNB_SMART_CHAIN"
- BNB_BEACON_CHAIN = "BNB_BEACON_CHAIN"
- ARBITRUM_L_2 = "ARBITRUM_L2"
- SOLANA = "SOLANA"
- AVALANCHE_C_CHAIN = "AVALANCHE_C_CHAIN"
- TEZOS = "TEZOS"
- VICTION = "VICTION"
- LITECOIN = "LITECOIN"
- BITCOIN_CASH = "BITCOIN_CASH"
- RIPPLE = "RIPPLE"
- STELLAR = "STELLAR"
- EOS_PUBLIC = "EOS_PUBLIC"
- TRON = "TRON"
- CARDANO = "CARDANO"
- POLKADOT = "POLKADOT"
- NEAR_PROTOCOL = "NEAR_PROTOCOL"
- COSMOS = "COSMOS"
- DOGECOIN = "DOGECOIN"
- OPTIMISM_MAINNET = "OPTIMISM_MAINNET"
- FANTOM = "FANTOM"
- HEDERA = "HEDERA"
- ALGORAND = "ALGORAND"
- CELESTIA = "CELESTIA"
-
- def visit(
- self,
- bitcoin: typing.Callable[[], T_Result],
- ethereum: typing.Callable[[], T_Result],
- polygon: typing.Callable[[], T_Result],
- bnb_smart_chain: typing.Callable[[], T_Result],
- bnb_beacon_chain: typing.Callable[[], T_Result],
- arbitrum_l_2: typing.Callable[[], T_Result],
- solana: typing.Callable[[], T_Result],
- avalanche_c_chain: typing.Callable[[], T_Result],
- tezos: typing.Callable[[], T_Result],
- viction: typing.Callable[[], T_Result],
- litecoin: typing.Callable[[], T_Result],
- bitcoin_cash: typing.Callable[[], T_Result],
- ripple: typing.Callable[[], T_Result],
- stellar: typing.Callable[[], T_Result],
- eos_public: typing.Callable[[], T_Result],
- tron: typing.Callable[[], T_Result],
- cardano: typing.Callable[[], T_Result],
- polkadot: typing.Callable[[], T_Result],
- near_protocol: typing.Callable[[], T_Result],
- cosmos: typing.Callable[[], T_Result],
- dogecoin: typing.Callable[[], T_Result],
- optimism_mainnet: typing.Callable[[], T_Result],
- fantom: typing.Callable[[], T_Result],
- hedera: typing.Callable[[], T_Result],
- algorand: typing.Callable[[], T_Result],
- celestia: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is WalletNetwork.BITCOIN:
- return bitcoin()
- if self is WalletNetwork.ETHEREUM:
- return ethereum()
- if self is WalletNetwork.POLYGON:
- return polygon()
- if self is WalletNetwork.BNB_SMART_CHAIN:
- return bnb_smart_chain()
- if self is WalletNetwork.BNB_BEACON_CHAIN:
- return bnb_beacon_chain()
- if self is WalletNetwork.ARBITRUM_L_2:
- return arbitrum_l_2()
- if self is WalletNetwork.SOLANA:
- return solana()
- if self is WalletNetwork.AVALANCHE_C_CHAIN:
- return avalanche_c_chain()
- if self is WalletNetwork.TEZOS:
- return tezos()
- if self is WalletNetwork.VICTION:
- return viction()
- if self is WalletNetwork.LITECOIN:
- return litecoin()
- if self is WalletNetwork.BITCOIN_CASH:
- return bitcoin_cash()
- if self is WalletNetwork.RIPPLE:
- return ripple()
- if self is WalletNetwork.STELLAR:
- return stellar()
- if self is WalletNetwork.EOS_PUBLIC:
- return eos_public()
- if self is WalletNetwork.TRON:
- return tron()
- if self is WalletNetwork.CARDANO:
- return cardano()
- if self is WalletNetwork.POLKADOT:
- return polkadot()
- if self is WalletNetwork.NEAR_PROTOCOL:
- return near_protocol()
- if self is WalletNetwork.COSMOS:
- return cosmos()
- if self is WalletNetwork.DOGECOIN:
- return dogecoin()
- if self is WalletNetwork.OPTIMISM_MAINNET:
- return optimism_mainnet()
- if self is WalletNetwork.FANTOM:
- return fantom()
- if self is WalletNetwork.HEDERA:
- return hedera()
- if self is WalletNetwork.ALGORAND:
- return algorand()
- if self is WalletNetwork.CELESTIA:
- return celestia()
+WalletNetwork = typing.Union[
+ typing.Literal[
+ "BITCOIN",
+ "ETHEREUM",
+ "POLYGON",
+ "BNB_SMART_CHAIN",
+ "BNB_BEACON_CHAIN",
+ "ARBITRUM_L2",
+ "SOLANA",
+ "AVALANCHE_C_CHAIN",
+ "TEZOS",
+ "VICTION",
+ "LITECOIN",
+ "BITCOIN_CASH",
+ "RIPPLE",
+ "STELLAR",
+ "EOS_PUBLIC",
+ "TRON",
+ "CARDANO",
+ "POLKADOT",
+ "NEAR_PROTOCOL",
+ "COSMOS",
+ "DOGECOIN",
+ "OPTIMISM_MAINNET",
+ "FANTOM",
+ "HEDERA",
+ "ALGORAND",
+ "CELESTIA",
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/types/wallet_payment_method.py b/src/flagright/types/wallet_payment_method.py
index cf47374..181cce1 100644
--- a/src/flagright/types/wallet_payment_method.py
+++ b/src/flagright/types/wallet_payment_method.py
@@ -1,5 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import typing_extensions
+import typing
-WalletPaymentMethod = typing_extensions.Literal["WALLET"]
+WalletPaymentMethod = typing.Literal["WALLET"]
diff --git a/src/flagright/types/webhook_event.py b/src/flagright/types/webhook_event.py
index 1c38cfe..dbb6d95 100644
--- a/src/flagright/types/webhook_event.py
+++ b/src/flagright/types/webhook_event.py
@@ -1,41 +1,42 @@
# 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 .webhook_event_data import WebhookEventData
+from ..core.pydantic_utilities import UniversalBaseModel
+import pydantic
+import typing_extensions
from .webhook_event_triggered_by import WebhookEventTriggeredBy
+from ..core.serialization import FieldMetadata
from .webhook_event_type import WebhookEventType
+from .webhook_event_data import WebhookEventData
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class WebhookEvent(UniversalBaseModel):
+ id: str = pydantic.Field()
+ """
+ Unique identifier for the event
+ """
-class WebhookEvent(pydantic.BaseModel):
- id: str = pydantic.Field(description="Unique identifier for the event")
- triggered_by: WebhookEventTriggeredBy = pydantic.Field(
- alias="triggeredBy", description="Event triggered by a user or system"
- )
- created_timestamp: float = pydantic.Field(
- alias="createdTimestamp",
- description="Time at which the event was created. Measured in ms since the Unix epoch.",
+ triggered_by: typing_extensions.Annotated[WebhookEventTriggeredBy, FieldMetadata(alias="triggeredBy")] = (
+ pydantic.Field()
)
+ """
+ Event triggered by a user or system
+ """
+
+ created_timestamp: typing_extensions.Annotated[float, FieldMetadata(alias="createdTimestamp")] = pydantic.Field()
+ """
+ Time at which the event was created. Measured in ms since the Unix epoch.
+ """
+
type: WebhookEventType
data: WebhookEventData
- 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)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/webhook_event_base.py b/src/flagright/types/webhook_event_base.py
index e07f6f5..6e82614 100644
--- a/src/flagright/types/webhook_event_base.py
+++ b/src/flagright/types/webhook_event_base.py
@@ -1,37 +1,37 @@
# 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 UniversalBaseModel
+import pydantic
+import typing_extensions
from .webhook_event_base_triggered_by import WebhookEventBaseTriggeredBy
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
-try:
- import pydantic.v1 as pydantic # type: ignore
-except ImportError:
- import pydantic # type: ignore
+class WebhookEventBase(UniversalBaseModel):
+ id: str = pydantic.Field()
+ """
+ Unique identifier for the event
+ """
-class WebhookEventBase(pydantic.BaseModel):
- id: str = pydantic.Field(description="Unique identifier for the event")
- triggered_by: WebhookEventBaseTriggeredBy = pydantic.Field(
- alias="triggeredBy", description="Event triggered by a user or system"
- )
- created_timestamp: float = pydantic.Field(
- alias="createdTimestamp",
- description="Time at which the event was created. Measured in ms since the Unix epoch.",
+ triggered_by: typing_extensions.Annotated[WebhookEventBaseTriggeredBy, FieldMetadata(alias="triggeredBy")] = (
+ pydantic.Field()
)
-
- 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
- json_encoders = {dt.datetime: serialize_datetime}
+ """
+ Event triggered by a user or system
+ """
+
+ created_timestamp: typing_extensions.Annotated[float, FieldMetadata(alias="createdTimestamp")] = pydantic.Field()
+ """
+ Time at which the event was created. Measured in ms since the Unix epoch.
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/webhook_event_base_triggered_by.py b/src/flagright/types/webhook_event_base_triggered_by.py
index 29a7b2e..9784c66 100644
--- a/src/flagright/types/webhook_event_base_triggered_by.py
+++ b/src/flagright/types/webhook_event_base_triggered_by.py
@@ -1,21 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class WebhookEventBaseTriggeredBy(str, enum.Enum):
- """
- Event triggered by a user or system
- """
-
- MANUAL = "MANUAL"
- SYSTEM = "SYSTEM"
-
- def visit(self, manual: typing.Callable[[], T_Result], system: typing.Callable[[], T_Result]) -> T_Result:
- if self is WebhookEventBaseTriggeredBy.MANUAL:
- return manual()
- if self is WebhookEventBaseTriggeredBy.SYSTEM:
- return system()
+WebhookEventBaseTriggeredBy = typing.Union[typing.Literal["MANUAL", "SYSTEM"], typing.Any]
diff --git a/src/flagright/types/webhook_event_data.py b/src/flagright/types/webhook_event_data.py
index a4650e5..d6bcace 100644
--- a/src/flagright/types/webhook_event_data.py
+++ b/src/flagright/types/webhook_event_data.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
-from .alert_closed_details import AlertClosedDetails
-from .alert_opened_details import AlertOpenedDetails
+from .user_state_details import UserStateDetails
from .case_closed_details import CaseClosedDetails
from .case_opened_details import CaseOpenedDetails
-from .cra_risk_level_updated_details import CraRiskLevelUpdatedDetails
-from .kyc_status_details import KycStatusDetails
+from .alert_closed_details import AlertClosedDetails
+from .alert_opened_details import AlertOpenedDetails
from .transaction_status_details import TransactionStatusDetails
-from .user_state_details import UserStateDetails
+from .kyc_status_details import KycStatusDetails
from .user_tags_update import UserTagsUpdate
+from .cra_risk_level_updated_details import CraRiskLevelUpdatedDetails
WebhookEventData = typing.Union[
UserStateDetails,
diff --git a/src/flagright/types/webhook_event_triggered_by.py b/src/flagright/types/webhook_event_triggered_by.py
index 1766c7a..4d04ddd 100644
--- a/src/flagright/types/webhook_event_triggered_by.py
+++ b/src/flagright/types/webhook_event_triggered_by.py
@@ -1,21 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class WebhookEventTriggeredBy(str, enum.Enum):
- """
- Event triggered by a user or system
- """
-
- MANUAL = "MANUAL"
- SYSTEM = "SYSTEM"
-
- def visit(self, manual: typing.Callable[[], T_Result], system: typing.Callable[[], T_Result]) -> T_Result:
- if self is WebhookEventTriggeredBy.MANUAL:
- return manual()
- if self is WebhookEventTriggeredBy.SYSTEM:
- return system()
+WebhookEventTriggeredBy = typing.Union[typing.Literal["MANUAL", "SYSTEM"], typing.Any]
diff --git a/src/flagright/types/webhook_event_type.py b/src/flagright/types/webhook_event_type.py
index 70e4ba9..abd0c5d 100644
--- a/src/flagright/types/webhook_event_type.py
+++ b/src/flagright/types/webhook_event_type.py
@@ -1,61 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class WebhookEventType(str, enum.Enum):
- CASE_CLOSED = "CASE_CLOSED"
- USER_STATE_UPDATED = "USER_STATE_UPDATED"
- ALERT_CLOSED = "ALERT_CLOSED"
- TRANSACTION_STATUS_UPDATED = "TRANSACTION_STATUS_UPDATED"
- KYC_STATUS_UPDATED = "KYC_STATUS_UPDATED"
- CASE_OPENED = "CASE_OPENED"
- ALERT_OPENED = "ALERT_OPENED"
- PEP_STATUS_UPDATED = "PEP_STATUS_UPDATED"
- USER_TAGS_UPDATED = "USER_TAGS_UPDATED"
- USER_TAGS_DELETED = "USER_TAGS_DELETED"
- CRA_RISK_LEVEL_UPDATED = "CRA_RISK_LEVEL_UPDATED"
- LIST_UPDATED = "LIST_UPDATED"
-
- def visit(
- self,
- case_closed: typing.Callable[[], T_Result],
- user_state_updated: typing.Callable[[], T_Result],
- alert_closed: typing.Callable[[], T_Result],
- transaction_status_updated: typing.Callable[[], T_Result],
- kyc_status_updated: typing.Callable[[], T_Result],
- case_opened: typing.Callable[[], T_Result],
- alert_opened: typing.Callable[[], T_Result],
- pep_status_updated: typing.Callable[[], T_Result],
- user_tags_updated: typing.Callable[[], T_Result],
- user_tags_deleted: typing.Callable[[], T_Result],
- cra_risk_level_updated: typing.Callable[[], T_Result],
- list_updated: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is WebhookEventType.CASE_CLOSED:
- return case_closed()
- if self is WebhookEventType.USER_STATE_UPDATED:
- return user_state_updated()
- if self is WebhookEventType.ALERT_CLOSED:
- return alert_closed()
- if self is WebhookEventType.TRANSACTION_STATUS_UPDATED:
- return transaction_status_updated()
- if self is WebhookEventType.KYC_STATUS_UPDATED:
- return kyc_status_updated()
- if self is WebhookEventType.CASE_OPENED:
- return case_opened()
- if self is WebhookEventType.ALERT_OPENED:
- return alert_opened()
- if self is WebhookEventType.PEP_STATUS_UPDATED:
- return pep_status_updated()
- if self is WebhookEventType.USER_TAGS_UPDATED:
- return user_tags_updated()
- if self is WebhookEventType.USER_TAGS_DELETED:
- return user_tags_deleted()
- if self is WebhookEventType.CRA_RISK_LEVEL_UPDATED:
- return cra_risk_level_updated()
- if self is WebhookEventType.LIST_UPDATED:
- return list_updated()
+WebhookEventType = typing.Union[
+ typing.Literal[
+ "CASE_CLOSED",
+ "USER_STATE_UPDATED",
+ "ALERT_CLOSED",
+ "TRANSACTION_STATUS_UPDATED",
+ "KYC_STATUS_UPDATED",
+ "CASE_OPENED",
+ "ALERT_OPENED",
+ "PEP_STATUS_UPDATED",
+ "USER_TAGS_UPDATED",
+ "USER_TAGS_DELETED",
+ "CRA_RISK_LEVEL_UPDATED",
+ "LIST_UPDATED",
+ ],
+ typing.Any,
+]
diff --git a/src/flagright/version.py b/src/flagright/version.py
new file mode 100644
index 0000000..91a79e3
--- /dev/null
+++ b/src/flagright/version.py
@@ -0,0 +1,3 @@
+from importlib import metadata
+
+__version__ = metadata.version("flagright")
diff --git a/tests/__init__.py b/tests/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/test_client.py b/tests/custom/test_client.py
similarity index 99%
rename from tests/test_client.py
rename to tests/custom/test_client.py
index 60a58e6..73f811f 100644
--- a/tests/test_client.py
+++ b/tests/custom/test_client.py
@@ -1,5 +1,6 @@
import pytest
+
# Get started with writing tests with pytest at https://docs.pytest.org
@pytest.mark.skip(reason="Unimplemented")
def test_client() -> None:
diff --git a/tests/utils/__init__.py b/tests/utils/__init__.py
new file mode 100644
index 0000000..f3ea265
--- /dev/null
+++ b/tests/utils/__init__.py
@@ -0,0 +1,2 @@
+# This file was auto-generated by Fern from our API Definition.
+
diff --git a/tests/utils/assets/models/__init__.py b/tests/utils/assets/models/__init__.py
new file mode 100644
index 0000000..3a1c852
--- /dev/null
+++ b/tests/utils/assets/models/__init__.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+from .circle import CircleParams
+from .object_with_defaults import ObjectWithDefaultsParams
+from .object_with_optional_field import ObjectWithOptionalFieldParams
+from .shape import ShapeParams, Shape_CircleParams, Shape_SquareParams
+from .square import SquareParams
+from .undiscriminated_shape import UndiscriminatedShapeParams
+
+__all__ = [
+ "CircleParams",
+ "ObjectWithDefaultsParams",
+ "ObjectWithOptionalFieldParams",
+ "ShapeParams",
+ "Shape_CircleParams",
+ "Shape_SquareParams",
+ "SquareParams",
+ "UndiscriminatedShapeParams",
+]
diff --git a/tests/utils/assets/models/circle.py b/tests/utils/assets/models/circle.py
new file mode 100644
index 0000000..d2869df
--- /dev/null
+++ b/tests/utils/assets/models/circle.py
@@ -0,0 +1,11 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+import typing_extensions
+import typing_extensions
+from flagright.core.serialization import FieldMetadata
+
+
+class CircleParams(typing_extensions.TypedDict):
+ radius_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="radiusMeasurement")]
diff --git a/tests/utils/assets/models/color.py b/tests/utils/assets/models/color.py
new file mode 100644
index 0000000..2aa2c4c
--- /dev/null
+++ b/tests/utils/assets/models/color.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+Color = typing.Union[typing.Literal["red", "blue"], typing.Any]
diff --git a/tests/utils/assets/models/object_with_defaults.py b/tests/utils/assets/models/object_with_defaults.py
new file mode 100644
index 0000000..ef14f7b
--- /dev/null
+++ b/tests/utils/assets/models/object_with_defaults.py
@@ -0,0 +1,16 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+import typing_extensions
+import typing_extensions
+
+
+class ObjectWithDefaultsParams(typing_extensions.TypedDict):
+ """
+ Defines properties with default values and validation rules.
+ """
+
+ decimal: typing_extensions.NotRequired[float]
+ string: typing_extensions.NotRequired[str]
+ required_string: str
diff --git a/tests/utils/assets/models/object_with_optional_field.py b/tests/utils/assets/models/object_with_optional_field.py
new file mode 100644
index 0000000..7fe55ae
--- /dev/null
+++ b/tests/utils/assets/models/object_with_optional_field.py
@@ -0,0 +1,34 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+import typing_extensions
+import typing
+import typing_extensions
+from flagright.core.serialization import FieldMetadata
+import datetime as dt
+import uuid
+from .color import Color
+from .shape import ShapeParams
+from .undiscriminated_shape import UndiscriminatedShapeParams
+
+
+class ObjectWithOptionalFieldParams(typing_extensions.TypedDict):
+ literal: typing.Literal["lit_one"]
+ string: typing_extensions.NotRequired[str]
+ integer: typing_extensions.NotRequired[int]
+ long_: typing_extensions.NotRequired[typing_extensions.Annotated[int, FieldMetadata(alias="long")]]
+ double: typing_extensions.NotRequired[float]
+ bool_: typing_extensions.NotRequired[typing_extensions.Annotated[bool, FieldMetadata(alias="bool")]]
+ datetime: typing_extensions.NotRequired[dt.datetime]
+ date: typing_extensions.NotRequired[dt.date]
+ uuid_: typing_extensions.NotRequired[typing_extensions.Annotated[uuid.UUID, FieldMetadata(alias="uuid")]]
+ base_64: typing_extensions.NotRequired[typing_extensions.Annotated[str, FieldMetadata(alias="base64")]]
+ list_: typing_extensions.NotRequired[typing_extensions.Annotated[typing.Sequence[str], FieldMetadata(alias="list")]]
+ set_: typing_extensions.NotRequired[typing_extensions.Annotated[typing.Set[str], FieldMetadata(alias="set")]]
+ map_: typing_extensions.NotRequired[typing_extensions.Annotated[typing.Dict[int, str], FieldMetadata(alias="map")]]
+ enum: typing_extensions.NotRequired[Color]
+ union: typing_extensions.NotRequired[ShapeParams]
+ second_union: typing_extensions.NotRequired[ShapeParams]
+ undiscriminated_union: typing_extensions.NotRequired[UndiscriminatedShapeParams]
+ any: typing.Optional[typing.Any]
diff --git a/tests/utils/assets/models/shape.py b/tests/utils/assets/models/shape.py
new file mode 100644
index 0000000..846f63c
--- /dev/null
+++ b/tests/utils/assets/models/shape.py
@@ -0,0 +1,26 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+from __future__ import annotations
+import typing_extensions
+import typing_extensions
+import typing
+from flagright.core.serialization import FieldMetadata
+
+
+class Base(typing_extensions.TypedDict):
+ id: str
+
+
+class Shape_CircleParams(Base):
+ shape_type: typing_extensions.Annotated[typing.Literal["circle"], FieldMetadata(alias="shapeType")]
+ radius_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="radiusMeasurement")]
+
+
+class Shape_SquareParams(Base):
+ shape_type: typing_extensions.Annotated[typing.Literal["square"], FieldMetadata(alias="shapeType")]
+ length_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="lengthMeasurement")]
+
+
+ShapeParams = typing.Union[Shape_CircleParams, Shape_SquareParams]
diff --git a/tests/utils/assets/models/square.py b/tests/utils/assets/models/square.py
new file mode 100644
index 0000000..2ea3768
--- /dev/null
+++ b/tests/utils/assets/models/square.py
@@ -0,0 +1,11 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+import typing_extensions
+import typing_extensions
+from flagright.core.serialization import FieldMetadata
+
+
+class SquareParams(typing_extensions.TypedDict):
+ length_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="lengthMeasurement")]
diff --git a/tests/utils/assets/models/undiscriminated_shape.py b/tests/utils/assets/models/undiscriminated_shape.py
new file mode 100644
index 0000000..68876a2
--- /dev/null
+++ b/tests/utils/assets/models/undiscriminated_shape.py
@@ -0,0 +1,9 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from .circle import CircleParams
+from .square import SquareParams
+
+UndiscriminatedShapeParams = typing.Union[CircleParams, SquareParams]
diff --git a/tests/utils/test_http_client.py b/tests/utils/test_http_client.py
new file mode 100644
index 0000000..4aeb22a
--- /dev/null
+++ b/tests/utils/test_http_client.py
@@ -0,0 +1,61 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from flagright.core.http_client import get_request_body
+from flagright.core.request_options import RequestOptions
+
+
+def get_request_options() -> RequestOptions:
+ return {"additional_body_parameters": {"see you": "later"}}
+
+
+def test_get_json_request_body() -> None:
+ json_body, data_body = get_request_body(json={"hello": "world"}, data=None, request_options=None, omit=None)
+ assert json_body == {"hello": "world"}
+ assert data_body is None
+
+ json_body_extras, data_body_extras = get_request_body(
+ json={"goodbye": "world"}, data=None, request_options=get_request_options(), omit=None
+ )
+
+ assert json_body_extras == {"goodbye": "world", "see you": "later"}
+ assert data_body_extras is None
+
+
+def test_get_files_request_body() -> None:
+ json_body, data_body = get_request_body(json=None, data={"hello": "world"}, request_options=None, omit=None)
+ assert data_body == {"hello": "world"}
+ assert json_body is None
+
+ json_body_extras, data_body_extras = get_request_body(
+ json=None, data={"goodbye": "world"}, request_options=get_request_options(), omit=None
+ )
+
+ assert data_body_extras == {"goodbye": "world", "see you": "later"}
+ assert json_body_extras is None
+
+
+def test_get_none_request_body() -> None:
+ json_body, data_body = get_request_body(json=None, data=None, request_options=None, omit=None)
+ assert data_body is None
+ assert json_body is None
+
+ json_body_extras, data_body_extras = get_request_body(
+ json=None, data=None, request_options=get_request_options(), omit=None
+ )
+
+ assert json_body_extras == {"see you": "later"}
+ assert data_body_extras is None
+
+
+def test_get_empty_json_request_body() -> None:
+ unrelated_request_options: RequestOptions = {"max_retries": 3}
+ json_body, data_body = get_request_body(json=None, data=None, request_options=unrelated_request_options, omit=None)
+ assert json_body is None
+ assert data_body is None
+
+ json_body_extras, data_body_extras = get_request_body(
+ json={}, data=None, request_options=unrelated_request_options, omit=None
+ )
+
+ assert json_body_extras is None
+ assert data_body_extras is None
diff --git a/tests/utils/test_query_encoding.py b/tests/utils/test_query_encoding.py
new file mode 100644
index 0000000..a250b9e
--- /dev/null
+++ b/tests/utils/test_query_encoding.py
@@ -0,0 +1,37 @@
+# This file was auto-generated by Fern from our API Definition.
+
+
+from flagright.core.query_encoder import encode_query
+
+
+def test_query_encoding_deep_objects() -> None:
+ assert encode_query({"hello world": "hello world"}) == [("hello world", "hello world")]
+ assert encode_query({"hello_world": {"hello": "world"}}) == [("hello_world[hello]", "world")]
+ assert encode_query({"hello_world": {"hello": {"world": "today"}, "test": "this"}, "hi": "there"}) == [
+ ("hello_world[hello][world]", "today"),
+ ("hello_world[test]", "this"),
+ ("hi", "there"),
+ ]
+
+
+def test_query_encoding_deep_object_arrays() -> None:
+ assert encode_query({"objects": [{"key": "hello", "value": "world"}, {"key": "foo", "value": "bar"}]}) == [
+ ("objects[key]", "hello"),
+ ("objects[value]", "world"),
+ ("objects[key]", "foo"),
+ ("objects[value]", "bar"),
+ ]
+ assert encode_query(
+ {"users": [{"name": "string", "tags": ["string"]}, {"name": "string2", "tags": ["string2", "string3"]}]}
+ ) == [
+ ("users[name]", "string"),
+ ("users[tags]", "string"),
+ ("users[name]", "string2"),
+ ("users[tags]", "string2"),
+ ("users[tags]", "string3"),
+ ]
+
+
+def test_encode_query_with_none() -> None:
+ encoded = encode_query(None)
+ assert encoded == None
diff --git a/tests/utils/test_serialization.py b/tests/utils/test_serialization.py
new file mode 100644
index 0000000..beb9440
--- /dev/null
+++ b/tests/utils/test_serialization.py
@@ -0,0 +1,72 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from typing import List, Any
+
+from flagright.core.serialization import convert_and_respect_annotation_metadata
+from .assets.models import ShapeParams, ObjectWithOptionalFieldParams
+
+
+UNION_TEST: ShapeParams = {"radius_measurement": 1.0, "shape_type": "circle", "id": "1"}
+UNION_TEST_CONVERTED = {"shapeType": "circle", "radiusMeasurement": 1.0, "id": "1"}
+
+
+def test_convert_and_respect_annotation_metadata() -> None:
+ data: ObjectWithOptionalFieldParams = {
+ "string": "string",
+ "long_": 12345,
+ "bool_": True,
+ "literal": "lit_one",
+ "any": "any",
+ }
+ converted = convert_and_respect_annotation_metadata(
+ object_=data, annotation=ObjectWithOptionalFieldParams, direction="write"
+ )
+ assert converted == {"string": "string", "long": 12345, "bool": True, "literal": "lit_one", "any": "any"}
+
+
+def test_convert_and_respect_annotation_metadata_in_list() -> None:
+ data: List[ObjectWithOptionalFieldParams] = [
+ {"string": "string", "long_": 12345, "bool_": True, "literal": "lit_one", "any": "any"},
+ {"string": "another string", "long_": 67890, "list_": [], "literal": "lit_one", "any": "any"},
+ ]
+ converted = convert_and_respect_annotation_metadata(
+ object_=data, annotation=List[ObjectWithOptionalFieldParams], direction="write"
+ )
+
+ assert converted == [
+ {"string": "string", "long": 12345, "bool": True, "literal": "lit_one", "any": "any"},
+ {"string": "another string", "long": 67890, "list": [], "literal": "lit_one", "any": "any"},
+ ]
+
+
+def test_convert_and_respect_annotation_metadata_in_nested_object() -> None:
+ data: ObjectWithOptionalFieldParams = {
+ "string": "string",
+ "long_": 12345,
+ "union": UNION_TEST,
+ "literal": "lit_one",
+ "any": "any",
+ }
+ converted = convert_and_respect_annotation_metadata(
+ object_=data, annotation=ObjectWithOptionalFieldParams, direction="write"
+ )
+
+ assert converted == {
+ "string": "string",
+ "long": 12345,
+ "union": UNION_TEST_CONVERTED,
+ "literal": "lit_one",
+ "any": "any",
+ }
+
+
+def test_convert_and_respect_annotation_metadata_in_union() -> None:
+ converted = convert_and_respect_annotation_metadata(object_=UNION_TEST, annotation=ShapeParams, direction="write")
+
+ assert converted == UNION_TEST_CONVERTED
+
+
+def test_convert_and_respect_annotation_metadata_with_empty_object() -> None:
+ data: Any = {}
+ converted = convert_and_respect_annotation_metadata(object_=data, annotation=ShapeParams, direction="write")
+ assert converted == data
From e8b7ca122a8f3038ac5ef789d683fe888864c5de Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Fri, 9 May 2025 07:35:01 +0000
Subject: [PATCH 21/81] Release v1.7.2
---
poetry.lock | 30 +++++++++----------
pyproject.toml | 2 +-
reference.md | 4 +--
src/flagright/__init__.py | 2 --
src/flagright/batch/client.py | 4 +--
src/flagright/core/client_wrapper.py | 4 +--
src/flagright/transactions/client.py | 11 +++----
src/flagright/transactions/raw_client.py | 11 +++----
src/flagright/types/__init__.py | 2 --
src/flagright/types/sanctions_hit_context.py | 2 ++
src/flagright/types/transaction.py | 9 ++++--
src/flagright/types/transaction_base.py | 9 ++++--
src/flagright/types/transaction_type.py | 7 -----
.../types/transaction_with_rules_result.py | 9 ++++--
14 files changed, 54 insertions(+), 52 deletions(-)
delete mode 100644 src/flagright/types/transaction_type.py
diff --git a/poetry.lock b/poetry.lock
index f76189d..451995a 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"]
[[package]]
name = "certifi"
-version = "2025.1.31"
+version = "2025.4.26"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.6"
files = [
- {file = "certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe"},
- {file = "certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651"},
+ {file = "certifi-2025.4.26-py3-none-any.whl", hash = "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3"},
+ {file = "certifi-2025.4.26.tar.gz", hash = "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6"},
]
[[package]]
@@ -74,29 +74,29 @@ test = ["pytest (>=6)"]
[[package]]
name = "h11"
-version = "0.14.0"
+version = "0.16.0"
description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"},
- {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"},
+ {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"},
+ {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"},
]
[[package]]
name = "httpcore"
-version = "1.0.8"
+version = "1.0.9"
description = "A minimal low-level HTTP client."
optional = false
python-versions = ">=3.8"
files = [
- {file = "httpcore-1.0.8-py3-none-any.whl", hash = "sha256:5254cf149bcb5f75e9d1b2b9f729ea4a4b883d1ad7379fc632b727cec23674be"},
- {file = "httpcore-1.0.8.tar.gz", hash = "sha256:86e94505ed24ea06514883fd44d2bc02d90e77e7979c8eb71b90f41d364a1bad"},
+ {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"},
+ {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"},
]
[package.dependencies]
certifi = "*"
-h11 = ">=0.13,<0.15"
+h11 = ">=0.16"
[package.extras]
asyncio = ["anyio (>=4.0,<5.0)"]
@@ -201,13 +201,13 @@ reports = ["lxml"]
[[package]]
name = "mypy-extensions"
-version = "1.0.0"
+version = "1.1.0"
description = "Type system extensions for programs checked with the mypy type checker."
optional = false
-python-versions = ">=3.5"
+python-versions = ">=3.8"
files = [
- {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"},
- {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"},
+ {file = "mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505"},
+ {file = "mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 72abcc3..05a9c64 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.1"
+version = "v1.7.2"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 22220da..86ac79f 100644
--- a/reference.md
+++ b/reference.md
@@ -137,7 +137,7 @@ client.transactions.verify(
-
-**type:** `TransactionType`
+**type:** `str` — Type of transaction (ex: DEPOSIT, WITHDRAWAL, TRANSFER, EXTERNAL_PAYMENT, REFUND, OTHER)
@@ -421,7 +421,7 @@ client = Flagright(
client.batch.verify_transaction(
data=[
Transaction(
- type="DEPOSIT",
+ type="type",
transaction_id="transactionId",
timestamp=1.1,
)
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 3988541..fd14b67 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -184,7 +184,6 @@
TransactionRiskScoringResult,
TransactionState,
TransactionStatusDetails,
- TransactionType,
TransactionUpdatable,
TransactionUpdatableDestinationPaymentDetails,
TransactionUpdatableDestinationPaymentDetails_Ach,
@@ -498,7 +497,6 @@
"TransactionRiskScoringResult",
"TransactionState",
"TransactionStatusDetails",
- "TransactionType",
"TransactionUpdatable",
"TransactionUpdatableDestinationPaymentDetails",
"TransactionUpdatableDestinationPaymentDetails_Ach",
diff --git a/src/flagright/batch/client.py b/src/flagright/batch/client.py
index 5d61df1..c415e07 100644
--- a/src/flagright/batch/client.py
+++ b/src/flagright/batch/client.py
@@ -74,7 +74,7 @@ def verify_transaction(
client.batch.verify_transaction(
data=[
Transaction(
- type="DEPOSIT",
+ type="type",
transaction_id="transactionId",
timestamp=1.1,
)
@@ -370,7 +370,7 @@ async def main() -> None:
await client.batch.verify_transaction(
data=[
Transaction(
- type="DEPOSIT",
+ type="type",
transaction_id="transactionId",
timestamp=1.1,
)
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index c72d04f..2bce0b1 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.1",
+ "User-Agent": "flagright/v1.7.2",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.1",
+ "X-Fern-SDK-Version": "v1.7.2",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index 9c12f1f..60e58c2 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -3,7 +3,6 @@
import typing
from ..core.client_wrapper import SyncClientWrapper
from .raw_client import RawTransactionsClient
-from ..types.transaction_type import TransactionType
from ..types.boolean_string import BooleanString
from ..types.transaction_state import TransactionState
from ..types.transaction_amount_details import TransactionAmountDetails
@@ -40,7 +39,7 @@ def with_raw_response(self) -> RawTransactionsClient:
def verify(
self,
*,
- type: TransactionType,
+ type: str,
transaction_id: str,
timestamp: float,
validate_origin_user_id: typing.Optional[BooleanString] = None,
@@ -89,7 +88,8 @@ def verify(
Parameters
----------
- type : TransactionType
+ type : str
+ Type of transaction (ex: DEPOSIT, WITHDRAWAL, TRANSFER, EXTERNAL_PAYMENT, REFUND, OTHER)
transaction_id : str
Unique transaction identifier
@@ -315,7 +315,7 @@ def with_raw_response(self) -> AsyncRawTransactionsClient:
async def verify(
self,
*,
- type: TransactionType,
+ type: str,
transaction_id: str,
timestamp: float,
validate_origin_user_id: typing.Optional[BooleanString] = None,
@@ -364,7 +364,8 @@ async def verify(
Parameters
----------
- type : TransactionType
+ type : str
+ Type of transaction (ex: DEPOSIT, WITHDRAWAL, TRANSFER, EXTERNAL_PAYMENT, REFUND, OTHER)
transaction_id : str
Unique transaction identifier
diff --git a/src/flagright/transactions/raw_client.py b/src/flagright/transactions/raw_client.py
index f3d398a..4bc11ad 100644
--- a/src/flagright/transactions/raw_client.py
+++ b/src/flagright/transactions/raw_client.py
@@ -2,7 +2,6 @@
import typing
from ..core.client_wrapper import SyncClientWrapper
-from ..types.transaction_type import TransactionType
from ..types.boolean_string import BooleanString
from ..types.transaction_state import TransactionState
from ..types.transaction_amount_details import TransactionAmountDetails
@@ -38,7 +37,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
def verify(
self,
*,
- type: TransactionType,
+ type: str,
transaction_id: str,
timestamp: float,
validate_origin_user_id: typing.Optional[BooleanString] = None,
@@ -87,7 +86,8 @@ def verify(
Parameters
----------
- type : TransactionType
+ type : str
+ Type of transaction (ex: DEPOSIT, WITHDRAWAL, TRANSFER, EXTERNAL_PAYMENT, REFUND, OTHER)
transaction_id : str
Unique transaction identifier
@@ -328,7 +328,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
async def verify(
self,
*,
- type: TransactionType,
+ type: str,
transaction_id: str,
timestamp: float,
validate_origin_user_id: typing.Optional[BooleanString] = None,
@@ -377,7 +377,8 @@ async def verify(
Parameters
----------
- type : TransactionType
+ type : str
+ Type of transaction (ex: DEPOSIT, WITHDRAWAL, TRANSFER, EXTERNAL_PAYMENT, REFUND, OTHER)
transaction_id : str
Unique transaction identifier
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index f58eb15..82242fe 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -193,7 +193,6 @@
from .transaction_risk_scoring_result import TransactionRiskScoringResult
from .transaction_state import TransactionState
from .transaction_status_details import TransactionStatusDetails
-from .transaction_type import TransactionType
from .transaction_updatable import TransactionUpdatable
from .transaction_updatable_destination_payment_details import (
TransactionUpdatableDestinationPaymentDetails,
@@ -496,7 +495,6 @@
"TransactionRiskScoringResult",
"TransactionState",
"TransactionStatusDetails",
- "TransactionType",
"TransactionUpdatable",
"TransactionUpdatableDestinationPaymentDetails",
"TransactionUpdatableDestinationPaymentDetails_Ach",
diff --git a/src/flagright/types/sanctions_hit_context.py b/src/flagright/types/sanctions_hit_context.py
index 8632606..1e316b4 100644
--- a/src/flagright/types/sanctions_hit_context.py
+++ b/src/flagright/types/sanctions_hit_context.py
@@ -18,9 +18,11 @@ class SanctionsHitContext(UniversalBaseModel):
user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userId")] = None
transaction_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionId")] = None
rule_instance_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleInstanceId")] = None
+ rule_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ruleId")] = None
iban: typing.Optional[str] = None
year_of_birth: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="yearOfBirth")] = None
search_term: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="searchTerm")] = None
+ payment_method_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentMethodId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction.py b/src/flagright/types/transaction.py
index 26e034e..d29d1d5 100644
--- a/src/flagright/types/transaction.py
+++ b/src/flagright/types/transaction.py
@@ -1,10 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
from ..core.pydantic_utilities import UniversalBaseModel
-from .transaction_type import TransactionType
+import pydantic
import typing_extensions
from ..core.serialization import FieldMetadata
-import pydantic
import typing
from .transaction_state import TransactionState
from .transaction_amount_details import TransactionAmountDetails
@@ -17,7 +16,11 @@
class Transaction(UniversalBaseModel):
- type: TransactionType
+ type: str = pydantic.Field()
+ """
+ Type of transaction (ex: DEPOSIT, WITHDRAWAL, TRANSFER, EXTERNAL_PAYMENT, REFUND, OTHER)
+ """
+
transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
"""
Unique transaction identifier
diff --git a/src/flagright/types/transaction_base.py b/src/flagright/types/transaction_base.py
index ba9397a..b3a3b9b 100644
--- a/src/flagright/types/transaction_base.py
+++ b/src/flagright/types/transaction_base.py
@@ -1,10 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
from ..core.pydantic_utilities import UniversalBaseModel
-from .transaction_type import TransactionType
+import pydantic
import typing_extensions
from ..core.serialization import FieldMetadata
-import pydantic
import typing
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -14,7 +13,11 @@ class TransactionBase(UniversalBaseModel):
Model for transaction base Payload
"""
- type: TransactionType
+ type: str = pydantic.Field()
+ """
+ Type of transaction (ex: DEPOSIT, WITHDRAWAL, TRANSFER, EXTERNAL_PAYMENT, REFUND, OTHER)
+ """
+
transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
"""
Unique transaction identifier
diff --git a/src/flagright/types/transaction_type.py b/src/flagright/types/transaction_type.py
deleted file mode 100644
index 5ad4f41..0000000
--- a/src/flagright/types/transaction_type.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-
-TransactionType = typing.Union[
- typing.Literal["DEPOSIT", "TRANSFER", "EXTERNAL_PAYMENT", "WITHDRAWAL", "REFUND", "OTHER"], typing.Any
-]
diff --git a/src/flagright/types/transaction_with_rules_result.py b/src/flagright/types/transaction_with_rules_result.py
index c57c6b3..7099c61 100644
--- a/src/flagright/types/transaction_with_rules_result.py
+++ b/src/flagright/types/transaction_with_rules_result.py
@@ -1,10 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
from ..core.pydantic_utilities import UniversalBaseModel
-from .transaction_type import TransactionType
+import pydantic
import typing_extensions
from ..core.serialization import FieldMetadata
-import pydantic
import typing
from .transaction_state import TransactionState
from .transaction_amount_details import TransactionAmountDetails
@@ -23,7 +22,11 @@
class TransactionWithRulesResult(UniversalBaseModel):
- type: TransactionType
+ type: str = pydantic.Field()
+ """
+ Type of transaction (ex: DEPOSIT, WITHDRAWAL, TRANSFER, EXTERNAL_PAYMENT, REFUND, OTHER)
+ """
+
transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
"""
Unique transaction identifier
From bdccb5df9e9ce9327a3ce2227db212f7cccee116 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 15 May 2025 08:15:59 +0000
Subject: [PATCH 22/81] Release v1.7.3
---
poetry.lock | 9 +-
pyproject.toml | 2 +-
reference.md | 36 +++--
src/flagright/__init__.py | 32 ++++
src/flagright/consumer_users/client.py | 18 +++
src/flagright/consumer_users/raw_client.py | 18 +++
src/flagright/core/client_wrapper.py | 4 +-
src/flagright/types/__init__.py | 32 ++++
src/flagright/types/adverse_media_status.py | 3 +
...ess_optional_saved_payment_details_item.py | 40 +++++
.../business_saved_payment_details_item.py | 40 +++++
...rules_result_saved_payment_details_item.py | 40 +++++
.../types/generic_bank_account_details.py | 14 ++
src/flagright/types/npp_details.py | 144 ++++++++++++++++++
src/flagright/types/npp_payment_method.py | 5 +
src/flagright/types/payment_method.py | 4 +-
src/flagright/types/sanctions_status.py | 3 +
...transaction_destination_payment_details.py | 40 +++++
.../transaction_origin_payment_details.py | 44 ++++++
...n_updatable_destination_payment_details.py | 40 +++++
...action_updatable_origin_payment_details.py | 44 ++++++
...ules_result_destination_payment_details.py | 40 +++++
...ith_rules_result_origin_payment_details.py | 44 ++++++
src/flagright/types/user.py | 8 +
src/flagright/types/user_optional.py | 8 +
...ser_optional_saved_payment_details_item.py | 40 +++++
.../types/user_saved_payment_details_item.py | 40 +++++
src/flagright/types/user_with_rules_result.py | 8 +
...rules_result_saved_payment_details_item.py | 40 +++++
src/flagright/types/webhook_event_type.py | 2 +
30 files changed, 825 insertions(+), 17 deletions(-)
create mode 100644 src/flagright/types/adverse_media_status.py
create mode 100644 src/flagright/types/npp_details.py
create mode 100644 src/flagright/types/npp_payment_method.py
create mode 100644 src/flagright/types/sanctions_status.py
diff --git a/poetry.lock b/poetry.lock
index 451995a..f13c117 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -60,15 +60,18 @@ files = [
[[package]]
name = "exceptiongroup"
-version = "1.2.2"
+version = "1.3.0"
description = "Backport of PEP 654 (exception groups)"
optional = false
python-versions = ">=3.7"
files = [
- {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"},
- {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"},
+ {file = "exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10"},
+ {file = "exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88"},
]
+[package.dependencies]
+typing-extensions = {version = ">=4.6.0", markers = "python_version < \"3.13\""}
+
[package.extras]
test = ["pytest (>=6)"]
diff --git a/pyproject.toml b/pyproject.toml
index 05a9c64..a341ed4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.2"
+version = "v1.7.3"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 86ac79f..d03d770 100644
--- a/reference.md
+++ b/reference.md
@@ -16,15 +16,15 @@
`/transactions` endpoint allows you to operate on the [Transaction entity.](/guides/overview/entities#transaction)
-In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
+In order to pass the payload of a transaction to Flagright and verify the transaction, you will need to call this endpoint with the transaction payload. Not all fields are mandatory, you will only need to pass in the fields that you have and are relevant for your compliance setup.
### Payload
Here are some of the most used payload fields explained (you can find the full payload [schema below](/api-reference/api-reference/transactions/verify#request) with 1 line descriptions):
-* `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
-* `transactionId` - Unique Identifier for the transaction.
+* `type`: Type of transaction (Ex: `WITHDRAWAL`, `DEPOSIT`, `TRANSFER` etc).
+* `transactionId` - Unique Identifier for the transaction.
* `timestamp` - UNIX timestamp in *milliseconds* of when the transaction took place
* `transactionState` - The state of the transaction, set to `CREATED` by default. [More details here](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
* `originUserId` - Unique identifier (if any) of the user who is sending the money. This user must be created within the Flagright system before using the [create a consumer user](/api-reference/api-reference/consumer-users/create) or [create a business user](/api-reference/api-reference/business-users/create) endpoint
@@ -861,7 +861,7 @@ Transaction events are created after the initial `POST /transactions` call (whic
* Update the STATE of the transaction, using the `transactionState` field and manage the [Transaction Lifecycle](/guides/overview/entities#transaction-lifecycle-through-transaction-events)
* Update the transaction details, using the `updatedTransactionAttributes` field.
-> If you have neither of the above two use cases, you do not need to use transaction events.
+> If you have neither of the above two use cases, you do not need to use transaction events.
### Payload
@@ -869,7 +869,7 @@ Each transaction event needs three mandatory fields:
* `transactionState` - STATE of the transaction -> value is set to `CREATED` after `POST /transactions` call
* `timestamp`- the timestamp of when the event was created or occured in your system
-* `transactionId` - The ID of the transaction for which this event is generated.
+* `transactionId` - The ID of the transaction for which this event is generated.
In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
@@ -1010,7 +1010,7 @@ client.transaction_events.create(
### GET Transaction Events
-`/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event).
+`/events/transaction` endpoint allows you to operate on the [Transaction Events entity.](/guides/overview/entities#transaction-event).
You can retrieve any transaction event you created using the [POST Transaction Events](/api-reference/api-reference/transaction-events/create) call.
@@ -1393,6 +1393,22 @@ client.consumer_users.create(
-
+**sanctions_status:** `typing.Optional[SanctionsStatus]`
+
+
+
+
+
+-
+
+**adverse_media_status:** `typing.Optional[AdverseMediaStatus]`
+
+
+
+
+
+-
+
**last_transaction_timestamp:** `typing.Optional[float]` — Timestamp of the last successful transaction of the user
@@ -1883,14 +1899,14 @@ User events are created after the initial `POST /consumer/users` call (which cre
* Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
* Update the user details, using the `updatedConsumerUserAttributes` field.
-> If you have neither of the above two use cases, you do not need to use user events.
+> If you have neither of the above two use cases, you do not need to use user events.
### Payload
Each user event needs three mandatory fields:
* `timestamp`- the timestamp of when the event was created or occured in your system
-* `userId` - The ID of the transaction for which this event is generated.
+* `userId` - The ID of the transaction for which this event is generated.
In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
@@ -2108,14 +2124,14 @@ User events are created after the initial `POST /business/users` call (which cre
* Update the STATE and KYC Status of the user, using the `userStateDetails` or `kycStatusDetails` field
* Update the user details, using the `updatedBusinessUserAttributes` field.
-> If you have neither of the above two use cases, you do not need to use user events.
+> If you have neither of the above two use cases, you do not need to use user events.
### Payload
Each user event needs three mandatory fields:
* `timestamp`- the timestamp of when the event was created or occured in your system
-* `userId` - The ID of the transaction for which this event is generated.
+* `userId` - The ID of the transaction for which this event is generated.
In order to make individual events retrievable, you also need to pass in a unique `eventId` to the request body.
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index fd14b67..ff6514e 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -5,6 +5,7 @@
AchPaymentMethod,
AcquisitionChannel,
Address,
+ AdverseMediaStatus,
AlertClosedDetails,
AlertOpenedDetails,
Amount,
@@ -24,6 +25,7 @@
BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount,
BusinessOptionalSavedPaymentDetailsItem_Iban,
BusinessOptionalSavedPaymentDetailsItem_Mpesa,
+ BusinessOptionalSavedPaymentDetailsItem_Npp,
BusinessOptionalSavedPaymentDetailsItem_Swift,
BusinessOptionalSavedPaymentDetailsItem_Upi,
BusinessOptionalSavedPaymentDetailsItem_Wallet,
@@ -35,6 +37,7 @@
BusinessSavedPaymentDetailsItem_GenericBankAccount,
BusinessSavedPaymentDetailsItem_Iban,
BusinessSavedPaymentDetailsItem_Mpesa,
+ BusinessSavedPaymentDetailsItem_Npp,
BusinessSavedPaymentDetailsItem_Swift,
BusinessSavedPaymentDetailsItem_Upi,
BusinessSavedPaymentDetailsItem_Wallet,
@@ -51,6 +54,7 @@
BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
BusinessWithRulesResultSavedPaymentDetailsItem_Iban,
BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Npp,
BusinessWithRulesResultSavedPaymentDetailsItem_Swift,
BusinessWithRulesResultSavedPaymentDetailsItem_Upi,
BusinessWithRulesResultSavedPaymentDetailsItem_Wallet,
@@ -122,6 +126,8 @@
MpesaDetails,
MpesaPaymentMethod,
MpesaTransactionType,
+ NppDetails,
+ NppPaymentMethod,
OriginFundsInfo,
PaymentMethod,
PepRank,
@@ -143,6 +149,7 @@
SanctionsDetailsEntityType,
SanctionsHitContext,
SanctionsScreeningEntity,
+ SanctionsStatus,
SourceOfFunds,
SwiftDetails,
SwiftPaymentMethod,
@@ -160,6 +167,7 @@
TransactionDestinationPaymentDetails_GenericBankAccount,
TransactionDestinationPaymentDetails_Iban,
TransactionDestinationPaymentDetails_Mpesa,
+ TransactionDestinationPaymentDetails_Npp,
TransactionDestinationPaymentDetails_Swift,
TransactionDestinationPaymentDetails_Upi,
TransactionDestinationPaymentDetails_Wallet,
@@ -178,6 +186,7 @@
TransactionOriginPaymentDetails_GenericBankAccount,
TransactionOriginPaymentDetails_Iban,
TransactionOriginPaymentDetails_Mpesa,
+ TransactionOriginPaymentDetails_Npp,
TransactionOriginPaymentDetails_Swift,
TransactionOriginPaymentDetails_Upi,
TransactionOriginPaymentDetails_Wallet,
@@ -193,6 +202,7 @@
TransactionUpdatableDestinationPaymentDetails_GenericBankAccount,
TransactionUpdatableDestinationPaymentDetails_Iban,
TransactionUpdatableDestinationPaymentDetails_Mpesa,
+ TransactionUpdatableDestinationPaymentDetails_Npp,
TransactionUpdatableDestinationPaymentDetails_Swift,
TransactionUpdatableDestinationPaymentDetails_Upi,
TransactionUpdatableDestinationPaymentDetails_Wallet,
@@ -204,6 +214,7 @@
TransactionUpdatableOriginPaymentDetails_GenericBankAccount,
TransactionUpdatableOriginPaymentDetails_Iban,
TransactionUpdatableOriginPaymentDetails_Mpesa,
+ TransactionUpdatableOriginPaymentDetails_Npp,
TransactionUpdatableOriginPaymentDetails_Swift,
TransactionUpdatableOriginPaymentDetails_Upi,
TransactionUpdatableOriginPaymentDetails_Wallet,
@@ -216,6 +227,7 @@
TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount,
TransactionWithRulesResultDestinationPaymentDetails_Iban,
TransactionWithRulesResultDestinationPaymentDetails_Mpesa,
+ TransactionWithRulesResultDestinationPaymentDetails_Npp,
TransactionWithRulesResultDestinationPaymentDetails_Swift,
TransactionWithRulesResultDestinationPaymentDetails_Upi,
TransactionWithRulesResultDestinationPaymentDetails_Wallet,
@@ -227,6 +239,7 @@
TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount,
TransactionWithRulesResultOriginPaymentDetails_Iban,
TransactionWithRulesResultOriginPaymentDetails_Mpesa,
+ TransactionWithRulesResultOriginPaymentDetails_Npp,
TransactionWithRulesResultOriginPaymentDetails_Swift,
TransactionWithRulesResultOriginPaymentDetails_Upi,
TransactionWithRulesResultOriginPaymentDetails_Wallet,
@@ -245,6 +258,7 @@
UserOptionalSavedPaymentDetailsItem_GenericBankAccount,
UserOptionalSavedPaymentDetailsItem_Iban,
UserOptionalSavedPaymentDetailsItem_Mpesa,
+ UserOptionalSavedPaymentDetailsItem_Npp,
UserOptionalSavedPaymentDetailsItem_Swift,
UserOptionalSavedPaymentDetailsItem_Upi,
UserOptionalSavedPaymentDetailsItem_Wallet,
@@ -259,6 +273,7 @@
UserSavedPaymentDetailsItem_GenericBankAccount,
UserSavedPaymentDetailsItem_Iban,
UserSavedPaymentDetailsItem_Mpesa,
+ UserSavedPaymentDetailsItem_Npp,
UserSavedPaymentDetailsItem_Swift,
UserSavedPaymentDetailsItem_Upi,
UserSavedPaymentDetailsItem_Wallet,
@@ -275,6 +290,7 @@
UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
UserWithRulesResultSavedPaymentDetailsItem_Iban,
UserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ UserWithRulesResultSavedPaymentDetailsItem_Npp,
UserWithRulesResultSavedPaymentDetailsItem_Swift,
UserWithRulesResultSavedPaymentDetailsItem_Upi,
UserWithRulesResultSavedPaymentDetailsItem_Wallet,
@@ -310,6 +326,7 @@
"AchPaymentMethod",
"AcquisitionChannel",
"Address",
+ "AdverseMediaStatus",
"AlertClosedDetails",
"AlertOpenedDetails",
"Amount",
@@ -331,6 +348,7 @@
"BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount",
"BusinessOptionalSavedPaymentDetailsItem_Iban",
"BusinessOptionalSavedPaymentDetailsItem_Mpesa",
+ "BusinessOptionalSavedPaymentDetailsItem_Npp",
"BusinessOptionalSavedPaymentDetailsItem_Swift",
"BusinessOptionalSavedPaymentDetailsItem_Upi",
"BusinessOptionalSavedPaymentDetailsItem_Wallet",
@@ -342,6 +360,7 @@
"BusinessSavedPaymentDetailsItem_GenericBankAccount",
"BusinessSavedPaymentDetailsItem_Iban",
"BusinessSavedPaymentDetailsItem_Mpesa",
+ "BusinessSavedPaymentDetailsItem_Npp",
"BusinessSavedPaymentDetailsItem_Swift",
"BusinessSavedPaymentDetailsItem_Upi",
"BusinessSavedPaymentDetailsItem_Wallet",
@@ -359,6 +378,7 @@
"BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount",
"BusinessWithRulesResultSavedPaymentDetailsItem_Iban",
"BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Npp",
"BusinessWithRulesResultSavedPaymentDetailsItem_Swift",
"BusinessWithRulesResultSavedPaymentDetailsItem_Upi",
"BusinessWithRulesResultSavedPaymentDetailsItem_Wallet",
@@ -434,6 +454,8 @@
"MpesaDetails",
"MpesaPaymentMethod",
"MpesaTransactionType",
+ "NppDetails",
+ "NppPaymentMethod",
"OriginFundsInfo",
"PaymentMethod",
"PepRank",
@@ -455,6 +477,7 @@
"SanctionsDetailsEntityType",
"SanctionsHitContext",
"SanctionsScreeningEntity",
+ "SanctionsStatus",
"SourceOfFunds",
"SwiftDetails",
"SwiftPaymentMethod",
@@ -473,6 +496,7 @@
"TransactionDestinationPaymentDetails_GenericBankAccount",
"TransactionDestinationPaymentDetails_Iban",
"TransactionDestinationPaymentDetails_Mpesa",
+ "TransactionDestinationPaymentDetails_Npp",
"TransactionDestinationPaymentDetails_Swift",
"TransactionDestinationPaymentDetails_Upi",
"TransactionDestinationPaymentDetails_Wallet",
@@ -491,6 +515,7 @@
"TransactionOriginPaymentDetails_GenericBankAccount",
"TransactionOriginPaymentDetails_Iban",
"TransactionOriginPaymentDetails_Mpesa",
+ "TransactionOriginPaymentDetails_Npp",
"TransactionOriginPaymentDetails_Swift",
"TransactionOriginPaymentDetails_Upi",
"TransactionOriginPaymentDetails_Wallet",
@@ -506,6 +531,7 @@
"TransactionUpdatableDestinationPaymentDetails_GenericBankAccount",
"TransactionUpdatableDestinationPaymentDetails_Iban",
"TransactionUpdatableDestinationPaymentDetails_Mpesa",
+ "TransactionUpdatableDestinationPaymentDetails_Npp",
"TransactionUpdatableDestinationPaymentDetails_Swift",
"TransactionUpdatableDestinationPaymentDetails_Upi",
"TransactionUpdatableDestinationPaymentDetails_Wallet",
@@ -517,6 +543,7 @@
"TransactionUpdatableOriginPaymentDetails_GenericBankAccount",
"TransactionUpdatableOriginPaymentDetails_Iban",
"TransactionUpdatableOriginPaymentDetails_Mpesa",
+ "TransactionUpdatableOriginPaymentDetails_Npp",
"TransactionUpdatableOriginPaymentDetails_Swift",
"TransactionUpdatableOriginPaymentDetails_Upi",
"TransactionUpdatableOriginPaymentDetails_Wallet",
@@ -529,6 +556,7 @@
"TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount",
"TransactionWithRulesResultDestinationPaymentDetails_Iban",
"TransactionWithRulesResultDestinationPaymentDetails_Mpesa",
+ "TransactionWithRulesResultDestinationPaymentDetails_Npp",
"TransactionWithRulesResultDestinationPaymentDetails_Swift",
"TransactionWithRulesResultDestinationPaymentDetails_Upi",
"TransactionWithRulesResultDestinationPaymentDetails_Wallet",
@@ -540,6 +568,7 @@
"TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount",
"TransactionWithRulesResultOriginPaymentDetails_Iban",
"TransactionWithRulesResultOriginPaymentDetails_Mpesa",
+ "TransactionWithRulesResultOriginPaymentDetails_Npp",
"TransactionWithRulesResultOriginPaymentDetails_Swift",
"TransactionWithRulesResultOriginPaymentDetails_Upi",
"TransactionWithRulesResultOriginPaymentDetails_Wallet",
@@ -560,6 +589,7 @@
"UserOptionalSavedPaymentDetailsItem_GenericBankAccount",
"UserOptionalSavedPaymentDetailsItem_Iban",
"UserOptionalSavedPaymentDetailsItem_Mpesa",
+ "UserOptionalSavedPaymentDetailsItem_Npp",
"UserOptionalSavedPaymentDetailsItem_Swift",
"UserOptionalSavedPaymentDetailsItem_Upi",
"UserOptionalSavedPaymentDetailsItem_Wallet",
@@ -574,6 +604,7 @@
"UserSavedPaymentDetailsItem_GenericBankAccount",
"UserSavedPaymentDetailsItem_Iban",
"UserSavedPaymentDetailsItem_Mpesa",
+ "UserSavedPaymentDetailsItem_Npp",
"UserSavedPaymentDetailsItem_Swift",
"UserSavedPaymentDetailsItem_Upi",
"UserSavedPaymentDetailsItem_Wallet",
@@ -590,6 +621,7 @@
"UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount",
"UserWithRulesResultSavedPaymentDetailsItem_Iban",
"UserWithRulesResultSavedPaymentDetailsItem_Mpesa",
+ "UserWithRulesResultSavedPaymentDetailsItem_Npp",
"UserWithRulesResultSavedPaymentDetailsItem_Swift",
"UserWithRulesResultSavedPaymentDetailsItem_Upi",
"UserWithRulesResultSavedPaymentDetailsItem_Wallet",
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
index a9b22e5..6e1b373 100644
--- a/src/flagright/consumer_users/client.py
+++ b/src/flagright/consumer_users/client.py
@@ -18,6 +18,8 @@
from ..types.source_of_funds import SourceOfFunds
from ..types.consumer_user_segment import ConsumerUserSegment
from ..types.pep_status import PepStatus
+from ..types.sanctions_status import SanctionsStatus
+from ..types.adverse_media_status import AdverseMediaStatus
from ..types.user_entity_link import UserEntityLink
from ..types.user_saved_payment_details_item import UserSavedPaymentDetailsItem
from ..types.user_tag import UserTag
@@ -75,6 +77,8 @@ def create(
source_of_funds: typing.Optional[typing.Sequence[SourceOfFunds]] = OMIT,
user_segment: typing.Optional[ConsumerUserSegment] = OMIT,
pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
+ sanctions_status: typing.Optional[SanctionsStatus] = OMIT,
+ adverse_media_status: typing.Optional[AdverseMediaStatus] = OMIT,
last_transaction_timestamp: typing.Optional[float] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
@@ -155,6 +159,10 @@ def create(
pep_status : typing.Optional[typing.Sequence[PepStatus]]
+ sanctions_status : typing.Optional[SanctionsStatus]
+
+ adverse_media_status : typing.Optional[AdverseMediaStatus]
+
last_transaction_timestamp : typing.Optional[float]
Timestamp of the last successful transaction of the user
@@ -274,6 +282,8 @@ def create(
source_of_funds=source_of_funds,
user_segment=user_segment,
pep_status=pep_status,
+ sanctions_status=sanctions_status,
+ adverse_media_status=adverse_media_status,
last_transaction_timestamp=last_transaction_timestamp,
linked_entities=linked_entities,
saved_payment_details=saved_payment_details,
@@ -362,6 +372,8 @@ async def create(
source_of_funds: typing.Optional[typing.Sequence[SourceOfFunds]] = OMIT,
user_segment: typing.Optional[ConsumerUserSegment] = OMIT,
pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
+ sanctions_status: typing.Optional[SanctionsStatus] = OMIT,
+ adverse_media_status: typing.Optional[AdverseMediaStatus] = OMIT,
last_transaction_timestamp: typing.Optional[float] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
@@ -442,6 +454,10 @@ async def create(
pep_status : typing.Optional[typing.Sequence[PepStatus]]
+ sanctions_status : typing.Optional[SanctionsStatus]
+
+ adverse_media_status : typing.Optional[AdverseMediaStatus]
+
last_transaction_timestamp : typing.Optional[float]
Timestamp of the last successful transaction of the user
@@ -569,6 +585,8 @@ async def main() -> None:
source_of_funds=source_of_funds,
user_segment=user_segment,
pep_status=pep_status,
+ sanctions_status=sanctions_status,
+ adverse_media_status=adverse_media_status,
last_transaction_timestamp=last_transaction_timestamp,
linked_entities=linked_entities,
saved_payment_details=saved_payment_details,
diff --git a/src/flagright/consumer_users/raw_client.py b/src/flagright/consumer_users/raw_client.py
index 5f15617..38e7a8e 100644
--- a/src/flagright/consumer_users/raw_client.py
+++ b/src/flagright/consumer_users/raw_client.py
@@ -17,6 +17,8 @@
from ..types.source_of_funds import SourceOfFunds
from ..types.consumer_user_segment import ConsumerUserSegment
from ..types.pep_status import PepStatus
+from ..types.sanctions_status import SanctionsStatus
+from ..types.adverse_media_status import AdverseMediaStatus
from ..types.user_entity_link import UserEntityLink
from ..types.user_saved_payment_details_item import UserSavedPaymentDetailsItem
from ..types.user_tag import UserTag
@@ -73,6 +75,8 @@ def create(
source_of_funds: typing.Optional[typing.Sequence[SourceOfFunds]] = OMIT,
user_segment: typing.Optional[ConsumerUserSegment] = OMIT,
pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
+ sanctions_status: typing.Optional[SanctionsStatus] = OMIT,
+ adverse_media_status: typing.Optional[AdverseMediaStatus] = OMIT,
last_transaction_timestamp: typing.Optional[float] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
@@ -153,6 +157,10 @@ def create(
pep_status : typing.Optional[typing.Sequence[PepStatus]]
+ sanctions_status : typing.Optional[SanctionsStatus]
+
+ adverse_media_status : typing.Optional[AdverseMediaStatus]
+
last_transaction_timestamp : typing.Optional[float]
Timestamp of the last successful transaction of the user
@@ -223,6 +231,8 @@ def create(
"pepStatus": convert_and_respect_annotation_metadata(
object_=pep_status, annotation=typing.Sequence[PepStatus], direction="write"
),
+ "sanctionsStatus": sanctions_status,
+ "adverseMediaStatus": adverse_media_status,
"lastTransactionTimestamp": last_transaction_timestamp,
"linkedEntities": convert_and_respect_annotation_metadata(
object_=linked_entities, annotation=UserEntityLink, direction="write"
@@ -393,6 +403,8 @@ async def create(
source_of_funds: typing.Optional[typing.Sequence[SourceOfFunds]] = OMIT,
user_segment: typing.Optional[ConsumerUserSegment] = OMIT,
pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
+ sanctions_status: typing.Optional[SanctionsStatus] = OMIT,
+ adverse_media_status: typing.Optional[AdverseMediaStatus] = OMIT,
last_transaction_timestamp: typing.Optional[float] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
@@ -473,6 +485,10 @@ async def create(
pep_status : typing.Optional[typing.Sequence[PepStatus]]
+ sanctions_status : typing.Optional[SanctionsStatus]
+
+ adverse_media_status : typing.Optional[AdverseMediaStatus]
+
last_transaction_timestamp : typing.Optional[float]
Timestamp of the last successful transaction of the user
@@ -543,6 +559,8 @@ async def create(
"pepStatus": convert_and_respect_annotation_metadata(
object_=pep_status, annotation=typing.Sequence[PepStatus], direction="write"
),
+ "sanctionsStatus": sanctions_status,
+ "adverseMediaStatus": adverse_media_status,
"lastTransactionTimestamp": last_transaction_timestamp,
"linkedEntities": convert_and_respect_annotation_metadata(
object_=linked_entities, annotation=UserEntityLink, direction="write"
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 2bce0b1..da39eea 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.2",
+ "User-Agent": "flagright/v1.7.3",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.2",
+ "X-Fern-SDK-Version": "v1.7.3",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 82242fe..81760f4 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -4,6 +4,7 @@
from .ach_payment_method import AchPaymentMethod
from .acquisition_channel import AcquisitionChannel
from .address import Address
+from .adverse_media_status import AdverseMediaStatus
from .alert_closed_details import AlertClosedDetails
from .alert_opened_details import AlertOpenedDetails
from .amount import Amount
@@ -24,6 +25,7 @@
BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount,
BusinessOptionalSavedPaymentDetailsItem_Iban,
BusinessOptionalSavedPaymentDetailsItem_Mpesa,
+ BusinessOptionalSavedPaymentDetailsItem_Npp,
BusinessOptionalSavedPaymentDetailsItem_Swift,
BusinessOptionalSavedPaymentDetailsItem_Upi,
BusinessOptionalSavedPaymentDetailsItem_Wallet,
@@ -37,6 +39,7 @@
BusinessSavedPaymentDetailsItem_GenericBankAccount,
BusinessSavedPaymentDetailsItem_Iban,
BusinessSavedPaymentDetailsItem_Mpesa,
+ BusinessSavedPaymentDetailsItem_Npp,
BusinessSavedPaymentDetailsItem_Swift,
BusinessSavedPaymentDetailsItem_Upi,
BusinessSavedPaymentDetailsItem_Wallet,
@@ -55,6 +58,7 @@
BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
BusinessWithRulesResultSavedPaymentDetailsItem_Iban,
BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Npp,
BusinessWithRulesResultSavedPaymentDetailsItem_Swift,
BusinessWithRulesResultSavedPaymentDetailsItem_Upi,
BusinessWithRulesResultSavedPaymentDetailsItem_Wallet,
@@ -127,6 +131,8 @@
from .mpesa_details import MpesaDetails
from .mpesa_payment_method import MpesaPaymentMethod
from .mpesa_transaction_type import MpesaTransactionType
+from .npp_details import NppDetails
+from .npp_payment_method import NppPaymentMethod
from .origin_funds_info import OriginFundsInfo
from .payment_method import PaymentMethod
from .pep_rank import PepRank
@@ -148,6 +154,7 @@
from .sanctions_details_entity_type import SanctionsDetailsEntityType
from .sanctions_hit_context import SanctionsHitContext
from .sanctions_screening_entity import SanctionsScreeningEntity
+from .sanctions_status import SanctionsStatus
from .source_of_funds import SourceOfFunds
from .swift_details import SwiftDetails
from .swift_payment_method import SwiftPaymentMethod
@@ -166,6 +173,7 @@
TransactionDestinationPaymentDetails_GenericBankAccount,
TransactionDestinationPaymentDetails_Iban,
TransactionDestinationPaymentDetails_Mpesa,
+ TransactionDestinationPaymentDetails_Npp,
TransactionDestinationPaymentDetails_Swift,
TransactionDestinationPaymentDetails_Upi,
TransactionDestinationPaymentDetails_Wallet,
@@ -186,6 +194,7 @@
TransactionOriginPaymentDetails_GenericBankAccount,
TransactionOriginPaymentDetails_Iban,
TransactionOriginPaymentDetails_Mpesa,
+ TransactionOriginPaymentDetails_Npp,
TransactionOriginPaymentDetails_Swift,
TransactionOriginPaymentDetails_Upi,
TransactionOriginPaymentDetails_Wallet,
@@ -203,6 +212,7 @@
TransactionUpdatableDestinationPaymentDetails_GenericBankAccount,
TransactionUpdatableDestinationPaymentDetails_Iban,
TransactionUpdatableDestinationPaymentDetails_Mpesa,
+ TransactionUpdatableDestinationPaymentDetails_Npp,
TransactionUpdatableDestinationPaymentDetails_Swift,
TransactionUpdatableDestinationPaymentDetails_Upi,
TransactionUpdatableDestinationPaymentDetails_Wallet,
@@ -216,6 +226,7 @@
TransactionUpdatableOriginPaymentDetails_GenericBankAccount,
TransactionUpdatableOriginPaymentDetails_Iban,
TransactionUpdatableOriginPaymentDetails_Mpesa,
+ TransactionUpdatableOriginPaymentDetails_Npp,
TransactionUpdatableOriginPaymentDetails_Swift,
TransactionUpdatableOriginPaymentDetails_Upi,
TransactionUpdatableOriginPaymentDetails_Wallet,
@@ -230,6 +241,7 @@
TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount,
TransactionWithRulesResultDestinationPaymentDetails_Iban,
TransactionWithRulesResultDestinationPaymentDetails_Mpesa,
+ TransactionWithRulesResultDestinationPaymentDetails_Npp,
TransactionWithRulesResultDestinationPaymentDetails_Swift,
TransactionWithRulesResultDestinationPaymentDetails_Upi,
TransactionWithRulesResultDestinationPaymentDetails_Wallet,
@@ -243,6 +255,7 @@
TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount,
TransactionWithRulesResultOriginPaymentDetails_Iban,
TransactionWithRulesResultOriginPaymentDetails_Mpesa,
+ TransactionWithRulesResultOriginPaymentDetails_Npp,
TransactionWithRulesResultOriginPaymentDetails_Swift,
TransactionWithRulesResultOriginPaymentDetails_Upi,
TransactionWithRulesResultOriginPaymentDetails_Wallet,
@@ -263,6 +276,7 @@
UserOptionalSavedPaymentDetailsItem_GenericBankAccount,
UserOptionalSavedPaymentDetailsItem_Iban,
UserOptionalSavedPaymentDetailsItem_Mpesa,
+ UserOptionalSavedPaymentDetailsItem_Npp,
UserOptionalSavedPaymentDetailsItem_Swift,
UserOptionalSavedPaymentDetailsItem_Upi,
UserOptionalSavedPaymentDetailsItem_Wallet,
@@ -279,6 +293,7 @@
UserSavedPaymentDetailsItem_GenericBankAccount,
UserSavedPaymentDetailsItem_Iban,
UserSavedPaymentDetailsItem_Mpesa,
+ UserSavedPaymentDetailsItem_Npp,
UserSavedPaymentDetailsItem_Swift,
UserSavedPaymentDetailsItem_Upi,
UserSavedPaymentDetailsItem_Wallet,
@@ -297,6 +312,7 @@
UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
UserWithRulesResultSavedPaymentDetailsItem_Iban,
UserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ UserWithRulesResultSavedPaymentDetailsItem_Npp,
UserWithRulesResultSavedPaymentDetailsItem_Swift,
UserWithRulesResultSavedPaymentDetailsItem_Upi,
UserWithRulesResultSavedPaymentDetailsItem_Wallet,
@@ -316,6 +332,7 @@
"AchPaymentMethod",
"AcquisitionChannel",
"Address",
+ "AdverseMediaStatus",
"AlertClosedDetails",
"AlertOpenedDetails",
"Amount",
@@ -335,6 +352,7 @@
"BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount",
"BusinessOptionalSavedPaymentDetailsItem_Iban",
"BusinessOptionalSavedPaymentDetailsItem_Mpesa",
+ "BusinessOptionalSavedPaymentDetailsItem_Npp",
"BusinessOptionalSavedPaymentDetailsItem_Swift",
"BusinessOptionalSavedPaymentDetailsItem_Upi",
"BusinessOptionalSavedPaymentDetailsItem_Wallet",
@@ -346,6 +364,7 @@
"BusinessSavedPaymentDetailsItem_GenericBankAccount",
"BusinessSavedPaymentDetailsItem_Iban",
"BusinessSavedPaymentDetailsItem_Mpesa",
+ "BusinessSavedPaymentDetailsItem_Npp",
"BusinessSavedPaymentDetailsItem_Swift",
"BusinessSavedPaymentDetailsItem_Upi",
"BusinessSavedPaymentDetailsItem_Wallet",
@@ -362,6 +381,7 @@
"BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount",
"BusinessWithRulesResultSavedPaymentDetailsItem_Iban",
"BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Npp",
"BusinessWithRulesResultSavedPaymentDetailsItem_Swift",
"BusinessWithRulesResultSavedPaymentDetailsItem_Upi",
"BusinessWithRulesResultSavedPaymentDetailsItem_Wallet",
@@ -433,6 +453,8 @@
"MpesaDetails",
"MpesaPaymentMethod",
"MpesaTransactionType",
+ "NppDetails",
+ "NppPaymentMethod",
"OriginFundsInfo",
"PaymentMethod",
"PepRank",
@@ -454,6 +476,7 @@
"SanctionsDetailsEntityType",
"SanctionsHitContext",
"SanctionsScreeningEntity",
+ "SanctionsStatus",
"SourceOfFunds",
"SwiftDetails",
"SwiftPaymentMethod",
@@ -471,6 +494,7 @@
"TransactionDestinationPaymentDetails_GenericBankAccount",
"TransactionDestinationPaymentDetails_Iban",
"TransactionDestinationPaymentDetails_Mpesa",
+ "TransactionDestinationPaymentDetails_Npp",
"TransactionDestinationPaymentDetails_Swift",
"TransactionDestinationPaymentDetails_Upi",
"TransactionDestinationPaymentDetails_Wallet",
@@ -489,6 +513,7 @@
"TransactionOriginPaymentDetails_GenericBankAccount",
"TransactionOriginPaymentDetails_Iban",
"TransactionOriginPaymentDetails_Mpesa",
+ "TransactionOriginPaymentDetails_Npp",
"TransactionOriginPaymentDetails_Swift",
"TransactionOriginPaymentDetails_Upi",
"TransactionOriginPaymentDetails_Wallet",
@@ -504,6 +529,7 @@
"TransactionUpdatableDestinationPaymentDetails_GenericBankAccount",
"TransactionUpdatableDestinationPaymentDetails_Iban",
"TransactionUpdatableDestinationPaymentDetails_Mpesa",
+ "TransactionUpdatableDestinationPaymentDetails_Npp",
"TransactionUpdatableDestinationPaymentDetails_Swift",
"TransactionUpdatableDestinationPaymentDetails_Upi",
"TransactionUpdatableDestinationPaymentDetails_Wallet",
@@ -515,6 +541,7 @@
"TransactionUpdatableOriginPaymentDetails_GenericBankAccount",
"TransactionUpdatableOriginPaymentDetails_Iban",
"TransactionUpdatableOriginPaymentDetails_Mpesa",
+ "TransactionUpdatableOriginPaymentDetails_Npp",
"TransactionUpdatableOriginPaymentDetails_Swift",
"TransactionUpdatableOriginPaymentDetails_Upi",
"TransactionUpdatableOriginPaymentDetails_Wallet",
@@ -527,6 +554,7 @@
"TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount",
"TransactionWithRulesResultDestinationPaymentDetails_Iban",
"TransactionWithRulesResultDestinationPaymentDetails_Mpesa",
+ "TransactionWithRulesResultDestinationPaymentDetails_Npp",
"TransactionWithRulesResultDestinationPaymentDetails_Swift",
"TransactionWithRulesResultDestinationPaymentDetails_Upi",
"TransactionWithRulesResultDestinationPaymentDetails_Wallet",
@@ -538,6 +566,7 @@
"TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount",
"TransactionWithRulesResultOriginPaymentDetails_Iban",
"TransactionWithRulesResultOriginPaymentDetails_Mpesa",
+ "TransactionWithRulesResultOriginPaymentDetails_Npp",
"TransactionWithRulesResultOriginPaymentDetails_Swift",
"TransactionWithRulesResultOriginPaymentDetails_Upi",
"TransactionWithRulesResultOriginPaymentDetails_Wallet",
@@ -556,6 +585,7 @@
"UserOptionalSavedPaymentDetailsItem_GenericBankAccount",
"UserOptionalSavedPaymentDetailsItem_Iban",
"UserOptionalSavedPaymentDetailsItem_Mpesa",
+ "UserOptionalSavedPaymentDetailsItem_Npp",
"UserOptionalSavedPaymentDetailsItem_Swift",
"UserOptionalSavedPaymentDetailsItem_Upi",
"UserOptionalSavedPaymentDetailsItem_Wallet",
@@ -570,6 +600,7 @@
"UserSavedPaymentDetailsItem_GenericBankAccount",
"UserSavedPaymentDetailsItem_Iban",
"UserSavedPaymentDetailsItem_Mpesa",
+ "UserSavedPaymentDetailsItem_Npp",
"UserSavedPaymentDetailsItem_Swift",
"UserSavedPaymentDetailsItem_Upi",
"UserSavedPaymentDetailsItem_Wallet",
@@ -586,6 +617,7 @@
"UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount",
"UserWithRulesResultSavedPaymentDetailsItem_Iban",
"UserWithRulesResultSavedPaymentDetailsItem_Mpesa",
+ "UserWithRulesResultSavedPaymentDetailsItem_Npp",
"UserWithRulesResultSavedPaymentDetailsItem_Swift",
"UserWithRulesResultSavedPaymentDetailsItem_Upi",
"UserWithRulesResultSavedPaymentDetailsItem_Wallet",
diff --git a/src/flagright/types/adverse_media_status.py b/src/flagright/types/adverse_media_status.py
new file mode 100644
index 0000000..07e9ee9
--- /dev/null
+++ b/src/flagright/types/adverse_media_status.py
@@ -0,0 +1,3 @@
+# This file was auto-generated by Fern from our API Definition.
+
+AdverseMediaStatus = bool
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 4e71735..7de8445 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -78,6 +78,10 @@ class BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseMo
bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
country: typing.Optional[CountryCode] = None
name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
@@ -269,6 +273,41 @@ class Config:
extra = pydantic.Extra.allow
+class BusinessOptionalSavedPaymentDetailsItem_Npp(UniversalBaseModel):
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
BusinessOptionalSavedPaymentDetailsItem = typing.Union[
BusinessOptionalSavedPaymentDetailsItem_Card,
BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount,
@@ -280,4 +319,5 @@ class Config:
BusinessOptionalSavedPaymentDetailsItem_Wallet,
BusinessOptionalSavedPaymentDetailsItem_Check,
BusinessOptionalSavedPaymentDetailsItem_Cash,
+ BusinessOptionalSavedPaymentDetailsItem_Npp,
]
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index 3f8aa59..830fce7 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -78,6 +78,10 @@ class BusinessSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
country: typing.Optional[CountryCode] = None
name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
@@ -269,6 +273,41 @@ class Config:
extra = pydantic.Extra.allow
+class BusinessSavedPaymentDetailsItem_Npp(UniversalBaseModel):
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
BusinessSavedPaymentDetailsItem = typing.Union[
BusinessSavedPaymentDetailsItem_Card,
BusinessSavedPaymentDetailsItem_GenericBankAccount,
@@ -280,4 +319,5 @@ class Config:
BusinessSavedPaymentDetailsItem_Wallet,
BusinessSavedPaymentDetailsItem_Check,
BusinessSavedPaymentDetailsItem_Cash,
+ BusinessSavedPaymentDetailsItem_Npp,
]
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 4094350..d63e892 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
@@ -78,6 +78,10 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(Universa
bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
country: typing.Optional[CountryCode] = None
name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
@@ -269,6 +273,41 @@ class Config:
extra = pydantic.Extra.allow
+class BusinessWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseModel):
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
BusinessWithRulesResultSavedPaymentDetailsItem = typing.Union[
BusinessWithRulesResultSavedPaymentDetailsItem_Card,
BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
@@ -280,4 +319,5 @@ class Config:
BusinessWithRulesResultSavedPaymentDetailsItem_Wallet,
BusinessWithRulesResultSavedPaymentDetailsItem_Check,
BusinessWithRulesResultSavedPaymentDetailsItem_Cash,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Npp,
]
diff --git a/src/flagright/types/generic_bank_account_details.py b/src/flagright/types/generic_bank_account_details.py
index 9a21e02..98ff2ee 100644
--- a/src/flagright/types/generic_bank_account_details.py
+++ b/src/flagright/types/generic_bank_account_details.py
@@ -53,6 +53,20 @@ class GenericBankAccountDetails(UniversalBaseModel):
Name of the account holder
"""
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = pydantic.Field(default=None)
+ """
+ Country of nationality of the account holder
+ """
+
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Date of birth of the account holder (YYYY-MM-DD)
+ """
+
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
diff --git a/src/flagright/types/npp_details.py b/src/flagright/types/npp_details.py
new file mode 100644
index 0000000..c2f674e
--- /dev/null
+++ b/src/flagright/types/npp_details.py
@@ -0,0 +1,144 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+import typing
+from ..core.serialization import FieldMetadata
+import pydantic
+from .consumer_name import ConsumerName
+from .email_id import EmailId
+from .tag import Tag
+from .address import Address
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class NppDetails(UniversalBaseModel):
+ """
+ New Payment Platform Details for Australia
+ """
+
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Account number
+ """
+
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Contact number
+ """
+
+ bsb: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ BSB number
+ """
+
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = pydantic.Field(
+ default=None
+ )
+ """
+ PayID
+ """
+
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")] = pydantic.Field()
+ """
+ End to End ID
+ """
+
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ OSKO reference
+ """
+
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ PayID reference
+ """
+
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = pydantic.Field(
+ default=None
+ )
+ """
+ Whether the payment is instant
+ """
+
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = pydantic.Field(default=None)
+ """
+ Remittance information
+ """
+
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Remittance advice
+ """
+
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Timestamp of the event
+ """
+
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Timestamp of the event
+ """
+
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Unique reference number for transaction reconciliation
+ """
+
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Trace number for tracking the payment through the NPP system
+ """
+
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Format of the NPP message (e.g., JSON, XML)
+ """
+
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = pydantic.Field(
+ default=None
+ )
+ """
+ Name of the bank associated with the account
+ """
+
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/npp_payment_method.py b/src/flagright/types/npp_payment_method.py
new file mode 100644
index 0000000..d3f2206
--- /dev/null
+++ b/src/flagright/types/npp_payment_method.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+NppPaymentMethod = typing.Literal["NPP"]
diff --git a/src/flagright/types/payment_method.py b/src/flagright/types/payment_method.py
index 43f9a52..a066449 100644
--- a/src/flagright/types/payment_method.py
+++ b/src/flagright/types/payment_method.py
@@ -3,6 +3,8 @@
import typing
PaymentMethod = typing.Union[
- typing.Literal["ACH", "CARD", "IBAN", "UPI", "GENERIC_BANK_ACCOUNT", "MPESA", "SWIFT", "WALLET", "CHECK", "CASH"],
+ typing.Literal[
+ "ACH", "CARD", "IBAN", "UPI", "GENERIC_BANK_ACCOUNT", "MPESA", "SWIFT", "WALLET", "CHECK", "CASH", "NPP"
+ ],
typing.Any,
]
diff --git a/src/flagright/types/sanctions_status.py b/src/flagright/types/sanctions_status.py
new file mode 100644
index 0000000..ec650ce
--- /dev/null
+++ b/src/flagright/types/sanctions_status.py
@@ -0,0 +1,3 @@
+# This file was auto-generated by Fern from our API Definition.
+
+SanctionsStatus = bool
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index 78e060a..e430921 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -78,6 +78,10 @@ class TransactionDestinationPaymentDetails_GenericBankAccount(UniversalBaseModel
bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
country: typing.Optional[CountryCode] = None
name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
@@ -269,6 +273,41 @@ class Config:
extra = pydantic.Extra.allow
+class TransactionDestinationPaymentDetails_Npp(UniversalBaseModel):
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
TransactionDestinationPaymentDetails = typing.Union[
TransactionDestinationPaymentDetails_Card,
TransactionDestinationPaymentDetails_GenericBankAccount,
@@ -280,4 +319,5 @@ class Config:
TransactionDestinationPaymentDetails_Mpesa,
TransactionDestinationPaymentDetails_Check,
TransactionDestinationPaymentDetails_Cash,
+ TransactionDestinationPaymentDetails_Npp,
]
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index 5353c91..f36fd70 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -86,6 +86,10 @@ class TransactionOriginPaymentDetails_GenericBankAccount(UniversalBaseModel):
bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
country: typing.Optional[CountryCode] = None
name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
@@ -309,6 +313,45 @@ class Config:
extra = pydantic.Extra.allow
+class TransactionOriginPaymentDetails_Npp(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
TransactionOriginPaymentDetails = typing.Union[
TransactionOriginPaymentDetails_Card,
TransactionOriginPaymentDetails_GenericBankAccount,
@@ -320,4 +363,5 @@ class Config:
TransactionOriginPaymentDetails_Wallet,
TransactionOriginPaymentDetails_Check,
TransactionOriginPaymentDetails_Cash,
+ TransactionOriginPaymentDetails_Npp,
]
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index 5d514c4..4de6ee8 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -78,6 +78,10 @@ class TransactionUpdatableDestinationPaymentDetails_GenericBankAccount(Universal
bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
country: typing.Optional[CountryCode] = None
name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
@@ -269,6 +273,41 @@ class Config:
extra = pydantic.Extra.allow
+class TransactionUpdatableDestinationPaymentDetails_Npp(UniversalBaseModel):
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
TransactionUpdatableDestinationPaymentDetails = typing.Union[
TransactionUpdatableDestinationPaymentDetails_Card,
TransactionUpdatableDestinationPaymentDetails_GenericBankAccount,
@@ -280,4 +319,5 @@ class Config:
TransactionUpdatableDestinationPaymentDetails_Mpesa,
TransactionUpdatableDestinationPaymentDetails_Check,
TransactionUpdatableDestinationPaymentDetails_Cash,
+ TransactionUpdatableDestinationPaymentDetails_Npp,
]
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 377d2d1..6586d81 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -86,6 +86,10 @@ class TransactionUpdatableOriginPaymentDetails_GenericBankAccount(UniversalBaseM
bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
country: typing.Optional[CountryCode] = None
name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
@@ -309,6 +313,45 @@ class Config:
extra = pydantic.Extra.allow
+class TransactionUpdatableOriginPaymentDetails_Npp(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
TransactionUpdatableOriginPaymentDetails = typing.Union[
TransactionUpdatableOriginPaymentDetails_Card,
TransactionUpdatableOriginPaymentDetails_GenericBankAccount,
@@ -320,4 +363,5 @@ class Config:
TransactionUpdatableOriginPaymentDetails_Wallet,
TransactionUpdatableOriginPaymentDetails_Check,
TransactionUpdatableOriginPaymentDetails_Cash,
+ TransactionUpdatableOriginPaymentDetails_Npp,
]
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 e77df8a..45397ae 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
@@ -78,6 +78,10 @@ class TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount(Uni
bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
country: typing.Optional[CountryCode] = None
name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
@@ -269,6 +273,41 @@ class Config:
extra = pydantic.Extra.allow
+class TransactionWithRulesResultDestinationPaymentDetails_Npp(UniversalBaseModel):
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
TransactionWithRulesResultDestinationPaymentDetails = typing.Union[
TransactionWithRulesResultDestinationPaymentDetails_Card,
TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount,
@@ -280,4 +319,5 @@ class Config:
TransactionWithRulesResultDestinationPaymentDetails_Mpesa,
TransactionWithRulesResultDestinationPaymentDetails_Check,
TransactionWithRulesResultDestinationPaymentDetails_Cash,
+ TransactionWithRulesResultDestinationPaymentDetails_Npp,
]
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 328513f..f9ae9cb 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
@@ -86,6 +86,10 @@ class TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount(Universa
bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
country: typing.Optional[CountryCode] = None
name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
@@ -309,6 +313,45 @@ class Config:
extra = pydantic.Extra.allow
+class TransactionWithRulesResultOriginPaymentDetails_Npp(UniversalBaseModel):
+ """
+ Payment details of the origin. It can be a bank account number, wallet ID, card fingerprint etc.
+ """
+
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
TransactionWithRulesResultOriginPaymentDetails = typing.Union[
TransactionWithRulesResultOriginPaymentDetails_Card,
TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount,
@@ -320,4 +363,5 @@ class Config:
TransactionWithRulesResultOriginPaymentDetails_Wallet,
TransactionWithRulesResultOriginPaymentDetails_Check,
TransactionWithRulesResultOriginPaymentDetails_Cash,
+ TransactionWithRulesResultOriginPaymentDetails_Npp,
]
diff --git a/src/flagright/types/user.py b/src/flagright/types/user.py
index 8ce5bdb..a2b3440 100644
--- a/src/flagright/types/user.py
+++ b/src/flagright/types/user.py
@@ -19,6 +19,8 @@
from .source_of_funds import SourceOfFunds
from .consumer_user_segment import ConsumerUserSegment
from .pep_status import PepStatus
+from .sanctions_status import SanctionsStatus
+from .adverse_media_status import AdverseMediaStatus
from .user_entity_link import UserEntityLink
from .user_saved_payment_details_item import UserSavedPaymentDetailsItem
from .user_tag import UserTag
@@ -92,6 +94,12 @@ class User(UniversalBaseModel):
pep_status: typing_extensions.Annotated[
typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
] = None
+ sanctions_status: typing_extensions.Annotated[
+ typing.Optional[SanctionsStatus], FieldMetadata(alias="sanctionsStatus")
+ ] = None
+ adverse_media_status: typing_extensions.Annotated[
+ typing.Optional[AdverseMediaStatus], FieldMetadata(alias="adverseMediaStatus")
+ ] = None
last_transaction_timestamp: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/user_optional.py b/src/flagright/types/user_optional.py
index 15e74d4..1ea8fc7 100644
--- a/src/flagright/types/user_optional.py
+++ b/src/flagright/types/user_optional.py
@@ -19,6 +19,8 @@
from .source_of_funds import SourceOfFunds
from .consumer_user_segment import ConsumerUserSegment
from .pep_status import PepStatus
+from .sanctions_status import SanctionsStatus
+from .adverse_media_status import AdverseMediaStatus
from .user_entity_link import UserEntityLink
from .user_optional_saved_payment_details_item import UserOptionalSavedPaymentDetailsItem
from .user_tag import UserTag
@@ -86,6 +88,12 @@ class UserOptional(UniversalBaseModel):
pep_status: typing_extensions.Annotated[
typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
] = None
+ sanctions_status: typing_extensions.Annotated[
+ typing.Optional[SanctionsStatus], FieldMetadata(alias="sanctionsStatus")
+ ] = None
+ adverse_media_status: typing_extensions.Annotated[
+ typing.Optional[AdverseMediaStatus], FieldMetadata(alias="adverseMediaStatus")
+ ] = None
last_transaction_timestamp: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
] = pydantic.Field(default=None)
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 71c3336..f0c7a51 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -78,6 +78,10 @@ class UserOptionalSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel)
bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
country: typing.Optional[CountryCode] = None
name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
@@ -269,6 +273,41 @@ class Config:
extra = pydantic.Extra.allow
+class UserOptionalSavedPaymentDetailsItem_Npp(UniversalBaseModel):
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
UserOptionalSavedPaymentDetailsItem = typing.Union[
UserOptionalSavedPaymentDetailsItem_Card,
UserOptionalSavedPaymentDetailsItem_GenericBankAccount,
@@ -280,4 +319,5 @@ class Config:
UserOptionalSavedPaymentDetailsItem_Wallet,
UserOptionalSavedPaymentDetailsItem_Check,
UserOptionalSavedPaymentDetailsItem_Cash,
+ UserOptionalSavedPaymentDetailsItem_Npp,
]
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 256198a..5a32a98 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -78,6 +78,10 @@ class UserSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
country: typing.Optional[CountryCode] = None
name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
@@ -269,6 +273,41 @@ class Config:
extra = pydantic.Extra.allow
+class UserSavedPaymentDetailsItem_Npp(UniversalBaseModel):
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
UserSavedPaymentDetailsItem = typing.Union[
UserSavedPaymentDetailsItem_Card,
UserSavedPaymentDetailsItem_GenericBankAccount,
@@ -280,4 +319,5 @@ class Config:
UserSavedPaymentDetailsItem_Wallet,
UserSavedPaymentDetailsItem_Check,
UserSavedPaymentDetailsItem_Cash,
+ UserSavedPaymentDetailsItem_Npp,
]
diff --git a/src/flagright/types/user_with_rules_result.py b/src/flagright/types/user_with_rules_result.py
index 72ff660..603169a 100644
--- a/src/flagright/types/user_with_rules_result.py
+++ b/src/flagright/types/user_with_rules_result.py
@@ -19,6 +19,8 @@
from .source_of_funds import SourceOfFunds
from .consumer_user_segment import ConsumerUserSegment
from .pep_status import PepStatus
+from .sanctions_status import SanctionsStatus
+from .adverse_media_status import AdverseMediaStatus
from .user_entity_link import UserEntityLink
from .user_with_rules_result_saved_payment_details_item import UserWithRulesResultSavedPaymentDetailsItem
from .user_tag import UserTag
@@ -95,6 +97,12 @@ class UserWithRulesResult(UniversalBaseModel):
pep_status: typing_extensions.Annotated[
typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
] = None
+ sanctions_status: typing_extensions.Annotated[
+ typing.Optional[SanctionsStatus], FieldMetadata(alias="sanctionsStatus")
+ ] = None
+ adverse_media_status: typing_extensions.Annotated[
+ typing.Optional[AdverseMediaStatus], FieldMetadata(alias="adverseMediaStatus")
+ ] = None
last_transaction_timestamp: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
] = pydantic.Field(default=None)
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 13db802..88cacb8 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
@@ -78,6 +78,10 @@ class UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(UniversalBas
bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
country: typing.Optional[CountryCode] = None
name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
@@ -269,6 +273,41 @@ class Config:
extra = pydantic.Extra.allow
+class UserWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseModel):
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
UserWithRulesResultSavedPaymentDetailsItem = typing.Union[
UserWithRulesResultSavedPaymentDetailsItem_Card,
UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
@@ -280,4 +319,5 @@ class Config:
UserWithRulesResultSavedPaymentDetailsItem_Wallet,
UserWithRulesResultSavedPaymentDetailsItem_Check,
UserWithRulesResultSavedPaymentDetailsItem_Cash,
+ UserWithRulesResultSavedPaymentDetailsItem_Npp,
]
diff --git a/src/flagright/types/webhook_event_type.py b/src/flagright/types/webhook_event_type.py
index abd0c5d..dcf698e 100644
--- a/src/flagright/types/webhook_event_type.py
+++ b/src/flagright/types/webhook_event_type.py
@@ -16,6 +16,8 @@
"USER_TAGS_DELETED",
"CRA_RISK_LEVEL_UPDATED",
"LIST_UPDATED",
+ "SANCTIONS_STATUS_UPDATED",
+ "ADVERSE_MEDIA_STATUS_UPDATED",
],
typing.Any,
]
From dc029f6dedc653b544def68e3dd4d557f91b6c6c Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 21 May 2025 04:30:51 +0000
Subject: [PATCH 23/81] Release v1.7.4
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
.../types/business_optional_saved_payment_details_item.py | 2 +-
src/flagright/types/business_saved_payment_details_item.py | 2 +-
.../business_with_rules_result_saved_payment_details_item.py | 2 +-
src/flagright/types/npp_details.py | 4 +---
.../types/transaction_destination_payment_details.py | 2 +-
src/flagright/types/transaction_origin_payment_details.py | 2 +-
.../transaction_updatable_destination_payment_details.py | 2 +-
.../types/transaction_updatable_origin_payment_details.py | 2 +-
...ansaction_with_rules_result_destination_payment_details.py | 2 +-
.../transaction_with_rules_result_origin_payment_details.py | 2 +-
.../types/user_optional_saved_payment_details_item.py | 2 +-
src/flagright/types/user_saved_payment_details_item.py | 2 +-
.../user_with_rules_result_saved_payment_details_item.py | 2 +-
15 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index a341ed4..f57f307 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.3"
+version = "v1.7.4"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index da39eea..a745eca 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.3",
+ "User-Agent": "flagright/v1.7.4",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.3",
+ "X-Fern-SDK-Version": "v1.7.4",
}
headers["x-api-key"] = self.api_key
return headers
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 7de8445..a074021 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -280,7 +280,7 @@ class BusinessOptionalSavedPaymentDetailsItem_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index 830fce7..ff87875 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -280,7 +280,7 @@ class BusinessSavedPaymentDetailsItem_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
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 d63e892..d635f97 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
@@ -280,7 +280,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
diff --git a/src/flagright/types/npp_details.py b/src/flagright/types/npp_details.py
index c2f674e..3d0d912 100644
--- a/src/flagright/types/npp_details.py
+++ b/src/flagright/types/npp_details.py
@@ -38,9 +38,7 @@ class NppDetails(UniversalBaseModel):
BSB number
"""
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = pydantic.Field(
- default=None
- )
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")] = pydantic.Field()
"""
PayID
"""
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index e430921..6b5a829 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -280,7 +280,7 @@ class TransactionDestinationPaymentDetails_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index f36fd70..8607d72 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -324,7 +324,7 @@ class TransactionOriginPaymentDetails_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index 4de6ee8..87779ce 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -280,7 +280,7 @@ class TransactionUpdatableDestinationPaymentDetails_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 6586d81..83692a0 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -324,7 +324,7 @@ class TransactionUpdatableOriginPaymentDetails_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
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 45397ae..b1344e5 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
@@ -280,7 +280,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_Npp(UniversalBaseModel
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
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 f9ae9cb..79ac9e0 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
@@ -324,7 +324,7 @@ class TransactionWithRulesResultOriginPaymentDetails_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
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 f0c7a51..507ea7e 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -280,7 +280,7 @@ class UserOptionalSavedPaymentDetailsItem_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 5a32a98..ba60c1f 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -280,7 +280,7 @@ class UserSavedPaymentDetailsItem_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
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 88cacb8..0f1b93e 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
@@ -280,7 +280,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
From 56676115455f1f462938a6e3edd0f00481f7d8fd Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 10 Jun 2025 12:50:09 +0000
Subject: [PATCH 24/81] Release v1.7.5
---
pyproject.toml | 2 +-
reference.md | 104 ++++--
src/flagright/__init__.py | 83 ++++-
src/flagright/batch/client.py | 95 ++++++
src/flagright/batch/raw_client.py | 169 +++++++++
src/flagright/business_users/client.py | 8 -
src/flagright/business_users/raw_client.py | 8 -
src/flagright/consumer_users/client.py | 8 -
src/flagright/consumer_users/raw_client.py | 8 -
src/flagright/core/client_wrapper.py | 4 +-
src/flagright/errors/__init__.py | 3 +-
src/flagright/errors/not_found_error.py | 9 +
src/flagright/transactions/client.py | 18 -
src/flagright/transactions/raw_client.py | 18 -
src/flagright/types/__init__.py | 84 +++++
...h_business_user_event_with_rules_result.py | 61 ++++
..._business_user_events_with_rules_result.py | 25 ++
.../batch_business_user_with_rules_result.py | 115 +++++++
...rules_result_saved_payment_details_item.py | 323 ++++++++++++++++++
...batch_business_users_with_rules_results.py | 25 ++
...h_consumer_user_event_with_rules_result.py | 61 ++++
...batch_consumer_user_events_rules_result.py | 25 ++
.../batch_consumer_user_with_rules_result.py | 145 ++++++++
...rules_result_saved_payment_details_item.py | 323 ++++++++++++++++++
.../batch_consumer_users_with_rules_result.py | 25 ++
...tch_transaction_event_monitoring_result.py | 67 ++++
...ch_transaction_event_monitoring_results.py | 25 ++
.../batch_transaction_monitoring_result.py | 38 +++
.../batch_transaction_monitoring_results.py | 23 ++
.../types/batch_user_rules_result.py | 28 ++
src/flagright/types/hit_rules_results.py | 27 ++
src/flagright/types/page.py | 3 +
src/flagright/types/page_size.py | 3 +
33 files changed, 1858 insertions(+), 105 deletions(-)
create mode 100644 src/flagright/errors/not_found_error.py
create mode 100644 src/flagright/types/batch_business_user_event_with_rules_result.py
create mode 100644 src/flagright/types/batch_business_user_events_with_rules_result.py
create mode 100644 src/flagright/types/batch_business_user_with_rules_result.py
create mode 100644 src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
create mode 100644 src/flagright/types/batch_business_users_with_rules_results.py
create mode 100644 src/flagright/types/batch_consumer_user_event_with_rules_result.py
create mode 100644 src/flagright/types/batch_consumer_user_events_rules_result.py
create mode 100644 src/flagright/types/batch_consumer_user_with_rules_result.py
create mode 100644 src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
create mode 100644 src/flagright/types/batch_consumer_users_with_rules_result.py
create mode 100644 src/flagright/types/batch_transaction_event_monitoring_result.py
create mode 100644 src/flagright/types/batch_transaction_event_monitoring_results.py
create mode 100644 src/flagright/types/batch_transaction_monitoring_result.py
create mode 100644 src/flagright/types/batch_transaction_monitoring_results.py
create mode 100644 src/flagright/types/batch_user_rules_result.py
create mode 100644 src/flagright/types/hit_rules_results.py
create mode 100644 src/flagright/types/page.py
create mode 100644 src/flagright/types/page_size.py
diff --git a/pyproject.toml b/pyproject.toml
index f57f307..323c1b9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.4"
+version = "v1.7.5"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index d03d770..13f9612 100644
--- a/reference.md
+++ b/reference.md
@@ -177,22 +177,6 @@ client.transactions.verify(
-
-**validate_transaction_id:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should validate if provided transactionId exist. True by default
-
-
-
-
-
--
-
-**trs_only:** `typing.Optional[BooleanString]`
-
-
-
-
-
--
-
**origin_user_id:** `typing.Optional[str]` — UserId for where the transaction originates from
@@ -482,6 +466,78 @@ client.batch.verify_transaction(
+
+
+
+
+client.batch.get(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.batch.get(
+ batch_id="batchId",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**batch_id:** `str` — Unique Batch Identifier
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[PageSize]` — Page size (default 20)
+
+
+
+
+
+-
+
+**page:** `typing.Optional[Page]` — Page
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -1233,14 +1289,6 @@ client.consumer_users.create(
-
-**krs_only:** `typing.Optional[BooleanString]`
-
-
-
-
-
--
-
**activated_timestamp:** `typing.Optional[float]` — Timestamp when user was activated
@@ -1655,14 +1703,6 @@ client.business_users.create(
-
-**krs_only:** `typing.Optional[BooleanString]`
-
-
-
-
-
--
-
**activated_timestamp:** `typing.Optional[float]` — Timestamp when the user was activated
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index ff6514e..99a7ed9 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -10,9 +10,46 @@
AlertOpenedDetails,
Amount,
ApiErrorResponse,
+ BatchBusinessUserEventWithRulesResult,
+ BatchBusinessUserEventsWithRulesResult,
+ BatchBusinessUserWithRulesResult,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet,
+ BatchBusinessUsersWithRulesResults,
+ BatchConsumerUserEventWithRulesResult,
+ BatchConsumerUserEventsRulesResult,
+ BatchConsumerUserWithRulesResult,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet,
+ BatchConsumerUsersWithRulesResult,
BatchResponse,
BatchResponseFailedRecord,
BatchResponseStatus,
+ BatchTransactionEventMonitoringResult,
+ BatchTransactionEventMonitoringResults,
+ BatchTransactionMonitoringResult,
+ BatchTransactionMonitoringResults,
+ BatchUserRulesResult,
BooleanString,
Business,
BusinessBase,
@@ -103,6 +140,7 @@
GeneralBankAccountPaymentMethod,
GenericBankAccountDetails,
HitRulesDetails,
+ HitRulesResults,
IbanDetails,
IbanPaymentMethod,
KycStatus,
@@ -129,6 +167,8 @@
NppDetails,
NppPaymentMethod,
OriginFundsInfo,
+ Page,
+ PageSize,
PaymentMethod,
PepRank,
PepStatus,
@@ -304,7 +344,7 @@
WebhookEventTriggeredBy,
WebhookEventType,
)
-from .errors import BadRequestError, ConflictError, TooManyRequestsError, UnauthorizedError
+from .errors import BadRequestError, ConflictError, NotFoundError, TooManyRequestsError, UnauthorizedError
from . import (
batch,
business_user_events,
@@ -333,9 +373,46 @@
"ApiErrorResponse",
"AsyncFlagright",
"BadRequestError",
+ "BatchBusinessUserEventWithRulesResult",
+ "BatchBusinessUserEventsWithRulesResult",
+ "BatchBusinessUserWithRulesResult",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet",
+ "BatchBusinessUsersWithRulesResults",
+ "BatchConsumerUserEventWithRulesResult",
+ "BatchConsumerUserEventsRulesResult",
+ "BatchConsumerUserWithRulesResult",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet",
+ "BatchConsumerUsersWithRulesResult",
"BatchResponse",
"BatchResponseFailedRecord",
"BatchResponseStatus",
+ "BatchTransactionEventMonitoringResult",
+ "BatchTransactionEventMonitoringResults",
+ "BatchTransactionMonitoringResult",
+ "BatchTransactionMonitoringResults",
+ "BatchUserRulesResult",
"BooleanString",
"Business",
"BusinessBase",
@@ -431,6 +508,7 @@
"GeneralBankAccountPaymentMethod",
"GenericBankAccountDetails",
"HitRulesDetails",
+ "HitRulesResults",
"IbanDetails",
"IbanPaymentMethod",
"KycStatus",
@@ -454,9 +532,12 @@
"MpesaDetails",
"MpesaPaymentMethod",
"MpesaTransactionType",
+ "NotFoundError",
"NppDetails",
"NppPaymentMethod",
"OriginFundsInfo",
+ "Page",
+ "PageSize",
"PaymentMethod",
"PepRank",
"PepStatus",
diff --git a/src/flagright/batch/client.py b/src/flagright/batch/client.py
index c415e07..ac61e57 100644
--- a/src/flagright/batch/client.py
+++ b/src/flagright/batch/client.py
@@ -7,6 +7,9 @@
from ..types.boolean_string import BooleanString
from ..core.request_options import RequestOptions
from ..types.batch_response import BatchResponse
+from ..types.page_size import PageSize
+from ..types.page import Page
+from ..types.batch_business_user_events_with_rules_result import BatchBusinessUserEventsWithRulesResult
from ..types.transaction_event import TransactionEvent
from ..types.user import User
from ..types.business import Business
@@ -90,6 +93,48 @@ def verify_transaction(
)
return response.data
+ def get(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchBusinessUserEventsWithRulesResult:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchBusinessUserEventsWithRulesResult
+ OK
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.get(
+ batch_id="batchId",
+ )
+ """
+ response = self._raw_client.get(batch_id, page_size=page_size, page=page, request_options=request_options)
+ return response.data
+
def create_transaction_events(
self,
*,
@@ -389,6 +434,56 @@ async def main() -> None:
)
return response.data
+ async def get(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchBusinessUserEventsWithRulesResult:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchBusinessUserEventsWithRulesResult
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.get(
+ batch_id="batchId",
+ )
+
+
+ asyncio.run(main())
+ """
+ response = await self._raw_client.get(batch_id, page_size=page_size, page=page, request_options=request_options)
+ return response.data
+
async def create_transaction_events(
self,
*,
diff --git a/src/flagright/batch/raw_client.py b/src/flagright/batch/raw_client.py
index 638e1ee..7cb748b 100644
--- a/src/flagright/batch/raw_client.py
+++ b/src/flagright/batch/raw_client.py
@@ -15,6 +15,11 @@
from ..errors.too_many_requests_error import TooManyRequestsError
from json.decoder import JSONDecodeError
from ..core.api_error import ApiError
+from ..types.page_size import PageSize
+from ..types.page import Page
+from ..types.batch_business_user_events_with_rules_result import BatchBusinessUserEventsWithRulesResult
+from ..core.jsonable_encoder import jsonable_encoder
+from ..errors.not_found_error import NotFoundError
from ..types.transaction_event import TransactionEvent
from ..errors.conflict_error import ConflictError
from ..types.user import User
@@ -126,6 +131,88 @@ def verify_transaction(
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)
+ def get(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[BatchBusinessUserEventsWithRulesResult]:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[BatchBusinessUserEventsWithRulesResult]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"batch/events/business/user/{jsonable_encoder(batch_id)}",
+ method="GET",
+ params={
+ "pageSize": page_size,
+ "page": page,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchBusinessUserEventsWithRulesResult,
+ parse_obj_as(
+ type_=BatchBusinessUserEventsWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
def create_transaction_events(
self,
*,
@@ -645,6 +732,88 @@ async def verify_transaction(
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)
+ async def get(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchBusinessUserEventsWithRulesResult]:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchBusinessUserEventsWithRulesResult]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"batch/events/business/user/{jsonable_encoder(batch_id)}",
+ method="GET",
+ params={
+ "pageSize": page_size,
+ "page": page,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchBusinessUserEventsWithRulesResult,
+ parse_obj_as(
+ type_=BatchBusinessUserEventsWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
async def create_transaction_events(
self,
*,
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index 45a7f08..c1d8b26 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -51,7 +51,6 @@ def create(
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
validate_user_id: typing.Optional[BooleanString] = None,
- krs_only: typing.Optional[BooleanString] = None,
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
@@ -105,8 +104,6 @@ def create(
validate_user_id : typing.Optional[BooleanString]
Boolean string whether Flagright should validate the userId
- krs_only : typing.Optional[BooleanString]
-
activated_timestamp : typing.Optional[float]
Timestamp when the user was activated
@@ -179,7 +176,6 @@ def create(
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
validate_user_id=validate_user_id,
- krs_only=krs_only,
activated_timestamp=activated_timestamp,
user_state_details=user_state_details,
kyc_status_details=kyc_status_details,
@@ -260,7 +256,6 @@ async def create(
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
validate_user_id: typing.Optional[BooleanString] = None,
- krs_only: typing.Optional[BooleanString] = None,
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
@@ -314,8 +309,6 @@ async def create(
validate_user_id : typing.Optional[BooleanString]
Boolean string whether Flagright should validate the userId
- krs_only : typing.Optional[BooleanString]
-
activated_timestamp : typing.Optional[float]
Timestamp when the user was activated
@@ -396,7 +389,6 @@ async def main() -> None:
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
validate_user_id=validate_user_id,
- krs_only=krs_only,
activated_timestamp=activated_timestamp,
user_state_details=user_state_details,
kyc_status_details=kyc_status_details,
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index 445456d..ed21d0b 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -49,7 +49,6 @@ def create(
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
validate_user_id: typing.Optional[BooleanString] = None,
- krs_only: typing.Optional[BooleanString] = None,
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
@@ -103,8 +102,6 @@ def create(
validate_user_id : typing.Optional[BooleanString]
Boolean string whether Flagright should validate the userId
- krs_only : typing.Optional[BooleanString]
-
activated_timestamp : typing.Optional[float]
Timestamp when the user was activated
@@ -158,7 +155,6 @@ def create(
"lockCraRiskLevel": lock_cra_risk_level,
"lockKycRiskLevel": lock_kyc_risk_level,
"validateUserId": validate_user_id,
- "_krsOnly": krs_only,
},
json={
"userId": user_id,
@@ -340,7 +336,6 @@ async def create(
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
validate_user_id: typing.Optional[BooleanString] = None,
- krs_only: typing.Optional[BooleanString] = None,
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
@@ -394,8 +389,6 @@ async def create(
validate_user_id : typing.Optional[BooleanString]
Boolean string whether Flagright should validate the userId
- krs_only : typing.Optional[BooleanString]
-
activated_timestamp : typing.Optional[float]
Timestamp when the user was activated
@@ -449,7 +442,6 @@ async def create(
"lockCraRiskLevel": lock_cra_risk_level,
"lockKycRiskLevel": lock_kyc_risk_level,
"validateUserId": validate_user_id,
- "_krsOnly": krs_only,
},
json={
"userId": user_id,
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
index 6e1b373..2bb855e 100644
--- a/src/flagright/consumer_users/client.py
+++ b/src/flagright/consumer_users/client.py
@@ -57,7 +57,6 @@ def create(
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
validate_user_id: typing.Optional[BooleanString] = None,
- krs_only: typing.Optional[BooleanString] = None,
activated_timestamp: typing.Optional[float] = OMIT,
user_details: typing.Optional[UserDetails] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
@@ -117,8 +116,6 @@ def create(
validate_user_id : typing.Optional[BooleanString]
Boolean string whether Flagright should validate the userId
- krs_only : typing.Optional[BooleanString]
-
activated_timestamp : typing.Optional[float]
Timestamp when user was activated
@@ -262,7 +259,6 @@ def create(
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
validate_user_id=validate_user_id,
- krs_only=krs_only,
activated_timestamp=activated_timestamp,
user_details=user_details,
user_state_details=user_state_details,
@@ -352,7 +348,6 @@ async def create(
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
validate_user_id: typing.Optional[BooleanString] = None,
- krs_only: typing.Optional[BooleanString] = None,
activated_timestamp: typing.Optional[float] = OMIT,
user_details: typing.Optional[UserDetails] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
@@ -412,8 +407,6 @@ async def create(
validate_user_id : typing.Optional[BooleanString]
Boolean string whether Flagright should validate the userId
- krs_only : typing.Optional[BooleanString]
-
activated_timestamp : typing.Optional[float]
Timestamp when user was activated
@@ -565,7 +558,6 @@ async def main() -> None:
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
validate_user_id=validate_user_id,
- krs_only=krs_only,
activated_timestamp=activated_timestamp,
user_details=user_details,
user_state_details=user_state_details,
diff --git a/src/flagright/consumer_users/raw_client.py b/src/flagright/consumer_users/raw_client.py
index 38e7a8e..3d6b824 100644
--- a/src/flagright/consumer_users/raw_client.py
+++ b/src/flagright/consumer_users/raw_client.py
@@ -55,7 +55,6 @@ def create(
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
validate_user_id: typing.Optional[BooleanString] = None,
- krs_only: typing.Optional[BooleanString] = None,
activated_timestamp: typing.Optional[float] = OMIT,
user_details: typing.Optional[UserDetails] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
@@ -115,8 +114,6 @@ def create(
validate_user_id : typing.Optional[BooleanString]
Boolean string whether Flagright should validate the userId
- krs_only : typing.Optional[BooleanString]
-
activated_timestamp : typing.Optional[float]
Timestamp when user was activated
@@ -189,7 +186,6 @@ def create(
"lockCraRiskLevel": lock_cra_risk_level,
"lockKycRiskLevel": lock_kyc_risk_level,
"validateUserId": validate_user_id,
- "_krsOnly": krs_only,
},
json={
"userId": user_id,
@@ -383,7 +379,6 @@ async def create(
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
validate_user_id: typing.Optional[BooleanString] = None,
- krs_only: typing.Optional[BooleanString] = None,
activated_timestamp: typing.Optional[float] = OMIT,
user_details: typing.Optional[UserDetails] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
@@ -443,8 +438,6 @@ async def create(
validate_user_id : typing.Optional[BooleanString]
Boolean string whether Flagright should validate the userId
- krs_only : typing.Optional[BooleanString]
-
activated_timestamp : typing.Optional[float]
Timestamp when user was activated
@@ -517,7 +510,6 @@ async def create(
"lockCraRiskLevel": lock_cra_risk_level,
"lockKycRiskLevel": lock_kyc_risk_level,
"validateUserId": validate_user_id,
- "_krsOnly": krs_only,
},
json={
"userId": user_id,
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index a745eca..ff93ab6 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.4",
+ "User-Agent": "flagright/v1.7.5",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.4",
+ "X-Fern-SDK-Version": "v1.7.5",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/errors/__init__.py b/src/flagright/errors/__init__.py
index 3e1e225..927bc44 100644
--- a/src/flagright/errors/__init__.py
+++ b/src/flagright/errors/__init__.py
@@ -2,7 +2,8 @@
from .bad_request_error import BadRequestError
from .conflict_error import ConflictError
+from .not_found_error import NotFoundError
from .too_many_requests_error import TooManyRequestsError
from .unauthorized_error import UnauthorizedError
-__all__ = ["BadRequestError", "ConflictError", "TooManyRequestsError", "UnauthorizedError"]
+__all__ = ["BadRequestError", "ConflictError", "NotFoundError", "TooManyRequestsError", "UnauthorizedError"]
diff --git a/src/flagright/errors/not_found_error.py b/src/flagright/errors/not_found_error.py
new file mode 100644
index 0000000..b71a67a
--- /dev/null
+++ b/src/flagright/errors/not_found_error.py
@@ -0,0 +1,9 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.api_error import ApiError
+from ..types.api_error_response import ApiErrorResponse
+
+
+class NotFoundError(ApiError):
+ def __init__(self, body: ApiErrorResponse):
+ super().__init__(status_code=404, body=body)
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index 60e58c2..643eedd 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -44,8 +44,6 @@ def verify(
timestamp: float,
validate_origin_user_id: typing.Optional[BooleanString] = None,
validate_destination_user_id: typing.Optional[BooleanString] = None,
- validate_transaction_id: typing.Optional[BooleanString] = None,
- trs_only: typing.Optional[BooleanString] = None,
origin_user_id: typing.Optional[str] = OMIT,
destination_user_id: typing.Optional[str] = OMIT,
transaction_state: typing.Optional[TransactionState] = OMIT,
@@ -103,11 +101,6 @@ def verify(
validate_destination_user_id : typing.Optional[BooleanString]
Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
- validate_transaction_id : typing.Optional[BooleanString]
- Boolean string whether Flagright should validate if provided transactionId exist. True by default
-
- trs_only : typing.Optional[BooleanString]
-
origin_user_id : typing.Optional[str]
UserId for where the transaction originates from
@@ -238,8 +231,6 @@ def verify(
timestamp=timestamp,
validate_origin_user_id=validate_origin_user_id,
validate_destination_user_id=validate_destination_user_id,
- validate_transaction_id=validate_transaction_id,
- trs_only=trs_only,
origin_user_id=origin_user_id,
destination_user_id=destination_user_id,
transaction_state=transaction_state,
@@ -320,8 +311,6 @@ async def verify(
timestamp: float,
validate_origin_user_id: typing.Optional[BooleanString] = None,
validate_destination_user_id: typing.Optional[BooleanString] = None,
- validate_transaction_id: typing.Optional[BooleanString] = None,
- trs_only: typing.Optional[BooleanString] = None,
origin_user_id: typing.Optional[str] = OMIT,
destination_user_id: typing.Optional[str] = OMIT,
transaction_state: typing.Optional[TransactionState] = OMIT,
@@ -379,11 +368,6 @@ async def verify(
validate_destination_user_id : typing.Optional[BooleanString]
Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
- validate_transaction_id : typing.Optional[BooleanString]
- Boolean string whether Flagright should validate if provided transactionId exist. True by default
-
- trs_only : typing.Optional[BooleanString]
-
origin_user_id : typing.Optional[str]
UserId for where the transaction originates from
@@ -522,8 +506,6 @@ async def main() -> None:
timestamp=timestamp,
validate_origin_user_id=validate_origin_user_id,
validate_destination_user_id=validate_destination_user_id,
- validate_transaction_id=validate_transaction_id,
- trs_only=trs_only,
origin_user_id=origin_user_id,
destination_user_id=destination_user_id,
transaction_state=transaction_state,
diff --git a/src/flagright/transactions/raw_client.py b/src/flagright/transactions/raw_client.py
index 4bc11ad..f4313f3 100644
--- a/src/flagright/transactions/raw_client.py
+++ b/src/flagright/transactions/raw_client.py
@@ -42,8 +42,6 @@ def verify(
timestamp: float,
validate_origin_user_id: typing.Optional[BooleanString] = None,
validate_destination_user_id: typing.Optional[BooleanString] = None,
- validate_transaction_id: typing.Optional[BooleanString] = None,
- trs_only: typing.Optional[BooleanString] = None,
origin_user_id: typing.Optional[str] = OMIT,
destination_user_id: typing.Optional[str] = OMIT,
transaction_state: typing.Optional[TransactionState] = OMIT,
@@ -101,11 +99,6 @@ def verify(
validate_destination_user_id : typing.Optional[BooleanString]
Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
- validate_transaction_id : typing.Optional[BooleanString]
- Boolean string whether Flagright should validate if provided transactionId exist. True by default
-
- trs_only : typing.Optional[BooleanString]
-
origin_user_id : typing.Optional[str]
UserId for where the transaction originates from
@@ -158,8 +151,6 @@ def verify(
params={
"validateOriginUserId": validate_origin_user_id,
"validateDestinationUserId": validate_destination_user_id,
- "validateTransactionId": validate_transaction_id,
- "_trsOnly": trs_only,
},
json={
"type": type,
@@ -333,8 +324,6 @@ async def verify(
timestamp: float,
validate_origin_user_id: typing.Optional[BooleanString] = None,
validate_destination_user_id: typing.Optional[BooleanString] = None,
- validate_transaction_id: typing.Optional[BooleanString] = None,
- trs_only: typing.Optional[BooleanString] = None,
origin_user_id: typing.Optional[str] = OMIT,
destination_user_id: typing.Optional[str] = OMIT,
transaction_state: typing.Optional[TransactionState] = OMIT,
@@ -392,11 +381,6 @@ async def verify(
validate_destination_user_id : typing.Optional[BooleanString]
Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
- validate_transaction_id : typing.Optional[BooleanString]
- Boolean string whether Flagright should validate if provided transactionId exist. True by default
-
- trs_only : typing.Optional[BooleanString]
-
origin_user_id : typing.Optional[str]
UserId for where the transaction originates from
@@ -449,8 +433,6 @@ async def verify(
params={
"validateOriginUserId": validate_origin_user_id,
"validateDestinationUserId": validate_destination_user_id,
- "validateTransactionId": validate_transaction_id,
- "_trsOnly": trs_only,
},
json={
"type": type,
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 81760f4..6a000b8 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -9,9 +9,50 @@
from .alert_opened_details import AlertOpenedDetails
from .amount import Amount
from .api_error_response import ApiErrorResponse
+from .batch_business_user_event_with_rules_result import BatchBusinessUserEventWithRulesResult
+from .batch_business_user_events_with_rules_result import BatchBusinessUserEventsWithRulesResult
+from .batch_business_user_with_rules_result import BatchBusinessUserWithRulesResult
+from .batch_business_user_with_rules_result_saved_payment_details_item import (
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet,
+)
+from .batch_business_users_with_rules_results import BatchBusinessUsersWithRulesResults
+from .batch_consumer_user_event_with_rules_result import BatchConsumerUserEventWithRulesResult
+from .batch_consumer_user_events_rules_result import BatchConsumerUserEventsRulesResult
+from .batch_consumer_user_with_rules_result import BatchConsumerUserWithRulesResult
+from .batch_consumer_user_with_rules_result_saved_payment_details_item import (
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet,
+)
+from .batch_consumer_users_with_rules_result import BatchConsumerUsersWithRulesResult
from .batch_response import BatchResponse
from .batch_response_failed_record import BatchResponseFailedRecord
from .batch_response_status import BatchResponseStatus
+from .batch_transaction_event_monitoring_result import BatchTransactionEventMonitoringResult
+from .batch_transaction_event_monitoring_results import BatchTransactionEventMonitoringResults
+from .batch_transaction_monitoring_result import BatchTransactionMonitoringResult
+from .batch_transaction_monitoring_results import BatchTransactionMonitoringResults
+from .batch_user_rules_result import BatchUserRulesResult
from .boolean_string import BooleanString
from .business import Business
from .business_base import BusinessBase
@@ -108,6 +149,7 @@
from .general_bank_account_payment_method import GeneralBankAccountPaymentMethod
from .generic_bank_account_details import GenericBankAccountDetails
from .hit_rules_details import HitRulesDetails
+from .hit_rules_results import HitRulesResults
from .iban_details import IbanDetails
from .iban_payment_method import IbanPaymentMethod
from .kyc_status import KycStatus
@@ -134,6 +176,8 @@
from .npp_details import NppDetails
from .npp_payment_method import NppPaymentMethod
from .origin_funds_info import OriginFundsInfo
+from .page import Page
+from .page_size import PageSize
from .payment_method import PaymentMethod
from .pep_rank import PepRank
from .pep_status import PepStatus
@@ -337,9 +381,46 @@
"AlertOpenedDetails",
"Amount",
"ApiErrorResponse",
+ "BatchBusinessUserEventWithRulesResult",
+ "BatchBusinessUserEventsWithRulesResult",
+ "BatchBusinessUserWithRulesResult",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet",
+ "BatchBusinessUsersWithRulesResults",
+ "BatchConsumerUserEventWithRulesResult",
+ "BatchConsumerUserEventsRulesResult",
+ "BatchConsumerUserWithRulesResult",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet",
+ "BatchConsumerUsersWithRulesResult",
"BatchResponse",
"BatchResponseFailedRecord",
"BatchResponseStatus",
+ "BatchTransactionEventMonitoringResult",
+ "BatchTransactionEventMonitoringResults",
+ "BatchTransactionMonitoringResult",
+ "BatchTransactionMonitoringResults",
+ "BatchUserRulesResult",
"BooleanString",
"Business",
"BusinessBase",
@@ -430,6 +511,7 @@
"GeneralBankAccountPaymentMethod",
"GenericBankAccountDetails",
"HitRulesDetails",
+ "HitRulesResults",
"IbanDetails",
"IbanPaymentMethod",
"KycStatus",
@@ -456,6 +538,8 @@
"NppDetails",
"NppPaymentMethod",
"OriginFundsInfo",
+ "Page",
+ "PageSize",
"PaymentMethod",
"PepRank",
"PepStatus",
diff --git a/src/flagright/types/batch_business_user_event_with_rules_result.py b/src/flagright/types/batch_business_user_event_with_rules_result.py
new file mode 100644
index 0000000..3f03c18
--- /dev/null
+++ b/src/flagright/types/batch_business_user_event_with_rules_result.py
@@ -0,0 +1,61 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import pydantic
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import typing
+from .business_optional import BusinessOptional
+from .executed_rules_result import ExecutedRulesResult
+from .user_risk_score_details import UserRiskScoreDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class BatchBusinessUserEventWithRulesResult(UniversalBaseModel):
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of the event
+ """
+
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Transaction ID the event pertains to
+ """
+
+ event_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventId")] = pydantic.Field(
+ default=None
+ )
+ """
+ Unique event ID
+ """
+
+ reason: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Reason for the event or a state change
+ """
+
+ event_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventDescription")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Event description
+ """
+
+ updated_business_user_attributes: typing_extensions.Annotated[
+ typing.Optional[BusinessOptional], FieldMetadata(alias="updatedBusinessUserAttributes")
+ ] = None
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[UserRiskScoreDetails], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_business_user_events_with_rules_result.py b/src/flagright/types/batch_business_user_events_with_rules_result.py
new file mode 100644
index 0000000..2af9faf
--- /dev/null
+++ b/src/flagright/types/batch_business_user_events_with_rules_result.py
@@ -0,0 +1,25 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+import typing
+from .batch_business_user_event_with_rules_result import BatchBusinessUserEventWithRulesResult
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class BatchBusinessUserEventsWithRulesResult(UniversalBaseModel):
+ business_user_events: typing_extensions.Annotated[
+ typing.List[BatchBusinessUserEventWithRulesResult], FieldMetadata(alias="businessUserEvents")
+ ]
+ total_count: typing_extensions.Annotated[float, FieldMetadata(alias="totalCount")]
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
new file mode 100644
index 0000000..f9c84ee
--- /dev/null
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -0,0 +1,115 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+from .legal_entity import LegalEntity
+import typing
+from .user_state_details import UserStateDetails
+from .kyc_status_details import KycStatusDetails
+from .person import Person
+from .transaction_limits import TransactionLimits
+from .risk_level import RiskLevel
+from .payment_method import PaymentMethod
+from .user_entity_link import UserEntityLink
+from .acquisition_channel import AcquisitionChannel
+from .batch_business_user_with_rules_result_saved_payment_details_item import (
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
+)
+from .mcc_details import MccDetails
+from .user_tag import UserTag
+from .person_attachment import PersonAttachment
+from .executed_rules_result import ExecutedRulesResult
+from .user_risk_score_details import UserRiskScoreDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class BatchBusinessUserWithRulesResult(UniversalBaseModel):
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Unique user ID for the user
+ """
+
+ created_timestamp: typing_extensions.Annotated[float, FieldMetadata(alias="createdTimestamp")] = pydantic.Field()
+ """
+ Timestamp when the user was created
+ """
+
+ legal_entity: typing_extensions.Annotated[LegalEntity, FieldMetadata(alias="legalEntity")]
+ activated_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="activatedTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp when the user was activated
+ """
+
+ user_state_details: typing_extensions.Annotated[
+ typing.Optional[UserStateDetails], FieldMetadata(alias="userStateDetails")
+ ] = None
+ kyc_status_details: typing_extensions.Annotated[
+ typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
+ ] = None
+ share_holders: typing_extensions.Annotated[
+ typing.Optional[typing.List[Person]], FieldMetadata(alias="shareHolders")
+ ] = pydantic.Field(default=None)
+ """
+ Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
+ """
+
+ directors: typing.Optional[typing.List[Person]] = pydantic.Field(default=None)
+ """
+ Director(s) of the company. Must be at least one
+ """
+
+ transaction_limits: typing_extensions.Annotated[
+ typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
+ ] = None
+ risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
+ kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
+ allowed_payment_methods: typing_extensions.Annotated[
+ typing.Optional[typing.List[PaymentMethod]], FieldMetadata(alias="allowedPaymentMethods")
+ ] = None
+ last_transaction_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp of the last successful transaction of the user
+ """
+
+ linked_entities: typing_extensions.Annotated[
+ typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
+ ] = None
+ acquisition_channel: typing_extensions.Annotated[
+ typing.Optional[AcquisitionChannel], FieldMetadata(alias="acquisitionChannel")
+ ] = None
+ saved_payment_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[BatchBusinessUserWithRulesResultSavedPaymentDetailsItem]],
+ FieldMetadata(alias="savedPaymentDetails"),
+ ] = None
+ mcc_details: typing_extensions.Annotated[typing.Optional[MccDetails], FieldMetadata(alias="mccDetails")] = None
+ tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(default=None)
+ """
+ User's attachments uploaded by business user
+ """
+
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[UserRiskScoreDetails], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
new file mode 100644
index 0000000..1228e16
--- /dev/null
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -0,0 +1,323 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from __future__ import annotations
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+import typing_extensions
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .mpesa_transaction_type import MpesaTransactionType
+from .wallet_network import WalletNetwork
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBaseModel):
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseModel):
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi(UniversalBaseModel):
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseModel):
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+BatchBusinessUserWithRulesResultSavedPaymentDetailsItem = typing.Union[
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp,
+]
diff --git a/src/flagright/types/batch_business_users_with_rules_results.py b/src/flagright/types/batch_business_users_with_rules_results.py
new file mode 100644
index 0000000..6fe40de
--- /dev/null
+++ b/src/flagright/types/batch_business_users_with_rules_results.py
@@ -0,0 +1,25 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+import typing
+from .batch_business_user_with_rules_result import BatchBusinessUserWithRulesResult
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class BatchBusinessUsersWithRulesResults(UniversalBaseModel):
+ business_users: typing_extensions.Annotated[
+ typing.List[BatchBusinessUserWithRulesResult], FieldMetadata(alias="businessUsers")
+ ]
+ total_count: typing_extensions.Annotated[float, FieldMetadata(alias="totalCount")]
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_consumer_user_event_with_rules_result.py b/src/flagright/types/batch_consumer_user_event_with_rules_result.py
new file mode 100644
index 0000000..525ff39
--- /dev/null
+++ b/src/flagright/types/batch_consumer_user_event_with_rules_result.py
@@ -0,0 +1,61 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import pydantic
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import typing
+from .user_optional import UserOptional
+from .executed_rules_result import ExecutedRulesResult
+from .user_risk_score_details import UserRiskScoreDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class BatchConsumerUserEventWithRulesResult(UniversalBaseModel):
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of the event
+ """
+
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Transaction ID the event pertains to
+ """
+
+ event_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventId")] = pydantic.Field(
+ default=None
+ )
+ """
+ Unique event ID
+ """
+
+ reason: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Reason for the event or a state change
+ """
+
+ event_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventDescription")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Event description
+ """
+
+ updated_consumer_user_attributes: typing_extensions.Annotated[
+ typing.Optional[UserOptional], FieldMetadata(alias="updatedConsumerUserAttributes")
+ ] = None
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[UserRiskScoreDetails], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_consumer_user_events_rules_result.py b/src/flagright/types/batch_consumer_user_events_rules_result.py
new file mode 100644
index 0000000..b7fc718
--- /dev/null
+++ b/src/flagright/types/batch_consumer_user_events_rules_result.py
@@ -0,0 +1,25 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+import typing
+from .batch_consumer_user_event_with_rules_result import BatchConsumerUserEventWithRulesResult
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class BatchConsumerUserEventsRulesResult(UniversalBaseModel):
+ consumer_user_events: typing_extensions.Annotated[
+ typing.List[BatchConsumerUserEventWithRulesResult], FieldMetadata(alias="consumerUserEvents")
+ ]
+ total_count: typing_extensions.Annotated[float, FieldMetadata(alias="totalCount")]
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result.py b/src/flagright/types/batch_consumer_user_with_rules_result.py
new file mode 100644
index 0000000..95142ff
--- /dev/null
+++ b/src/flagright/types/batch_consumer_user_with_rules_result.py
@@ -0,0 +1,145 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+import typing
+from .user_details import UserDetails
+from .user_state_details import UserStateDetails
+from .kyc_status_details import KycStatusDetails
+from .employment_status import EmploymentStatus
+from .legal_document import LegalDocument
+from .contact_details import ContactDetails
+from .employment_details import EmploymentDetails
+from .transaction_limits import TransactionLimits
+from .expected_income import ExpectedIncome
+from .risk_level import RiskLevel
+from .acquisition_channel import AcquisitionChannel
+from .source_of_funds import SourceOfFunds
+from .consumer_user_segment import ConsumerUserSegment
+from .pep_status import PepStatus
+from .sanctions_status import SanctionsStatus
+from .adverse_media_status import AdverseMediaStatus
+from .user_entity_link import UserEntityLink
+from .batch_consumer_user_with_rules_result_saved_payment_details_item import (
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem,
+)
+from .user_tag import UserTag
+from .person_attachment import PersonAttachment
+from .executed_rules_result import ExecutedRulesResult
+from .user_risk_score_details import UserRiskScoreDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class BatchConsumerUserWithRulesResult(UniversalBaseModel):
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")] = pydantic.Field()
+ """
+ Unique user ID
+ """
+
+ created_timestamp: typing_extensions.Annotated[float, FieldMetadata(alias="createdTimestamp")] = pydantic.Field()
+ """
+ Timestamp when userId is created
+ """
+
+ activated_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="activatedTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp when user was activated
+ """
+
+ user_details: typing_extensions.Annotated[typing.Optional[UserDetails], FieldMetadata(alias="userDetails")] = None
+ user_state_details: typing_extensions.Annotated[
+ typing.Optional[UserStateDetails], FieldMetadata(alias="userStateDetails")
+ ] = None
+ kyc_status_details: typing_extensions.Annotated[
+ typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
+ ] = None
+ eodd_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="eoddDate")] = None
+ employment_status: typing_extensions.Annotated[
+ typing.Optional[EmploymentStatus], FieldMetadata(alias="employmentStatus")
+ ] = None
+ occupation: typing.Optional[str] = None
+ legal_documents: typing_extensions.Annotated[
+ typing.Optional[typing.List[LegalDocument]], FieldMetadata(alias="legalDocuments")
+ ] = pydantic.Field(default=None)
+ """
+ User's legal identity documents - See Document Model for details
+ """
+
+ contact_details: typing_extensions.Annotated[
+ typing.Optional[ContactDetails], FieldMetadata(alias="contactDetails")
+ ] = None
+ employment_details: typing_extensions.Annotated[
+ typing.Optional[EmploymentDetails], FieldMetadata(alias="employmentDetails")
+ ] = None
+ transaction_limits: typing_extensions.Annotated[
+ typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
+ ] = None
+ expected_income: typing_extensions.Annotated[
+ typing.Optional[ExpectedIncome], FieldMetadata(alias="expectedIncome")
+ ] = None
+ risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
+ kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
+ acquisition_channel: typing_extensions.Annotated[
+ typing.Optional[AcquisitionChannel], FieldMetadata(alias="acquisitionChannel")
+ ] = None
+ reason_for_account_opening: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="reasonForAccountOpening")
+ ] = None
+ source_of_funds: typing_extensions.Annotated[
+ typing.Optional[typing.List[SourceOfFunds]], FieldMetadata(alias="sourceOfFunds")
+ ] = None
+ user_segment: typing_extensions.Annotated[
+ typing.Optional[ConsumerUserSegment], FieldMetadata(alias="userSegment")
+ ] = None
+ pep_status: typing_extensions.Annotated[
+ typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
+ ] = None
+ sanctions_status: typing_extensions.Annotated[
+ typing.Optional[SanctionsStatus], FieldMetadata(alias="sanctionsStatus")
+ ] = None
+ adverse_media_status: typing_extensions.Annotated[
+ typing.Optional[AdverseMediaStatus], FieldMetadata(alias="adverseMediaStatus")
+ ] = None
+ last_transaction_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
+ ] = pydantic.Field(default=None)
+ """
+ Timestamp of the last successful transaction of the user
+ """
+
+ linked_entities: typing_extensions.Annotated[
+ typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
+ ] = None
+ saved_payment_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[BatchConsumerUserWithRulesResultSavedPaymentDetailsItem]],
+ FieldMetadata(alias="savedPaymentDetails"),
+ ] = None
+ tags: typing.Optional[typing.List[UserTag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(default=None)
+ """
+ Uploaded user's attachment
+ """
+
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[UserRiskScoreDetails], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
new file mode 100644
index 0000000..88aaf15
--- /dev/null
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -0,0 +1,323 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from __future__ import annotations
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+import typing_extensions
+from ..core.serialization import FieldMetadata
+from .email_id import EmailId
+from .card_status import CardStatus
+from .country_code import CountryCode
+from .consumer_name import ConsumerName
+from .card_expiry import CardExpiry
+from .pos_details import PosDetails
+from .card_brand import CardBrand
+from .card_funding import CardFunding
+from .card_type import CardType
+from .amount import Amount
+from .card_merchant_details import CardMerchantDetails
+from .tag import Tag
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from .address import Address
+from .mpesa_transaction_type import MpesaTransactionType
+from .wallet_network import WalletNetwork
+from .check_delivery_status import CheckDeliveryStatus
+
+
+class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
+ method: typing.Literal["CARD"] = "CARD"
+ card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
+ card_issued_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="cardIssuedCountry")
+ ] = None
+ transaction_reference_field: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="transactionReferenceField")
+ ] = None
+ f_3_ds_done: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="3dsDone")] = None
+ name_on_card: typing_extensions.Annotated[typing.Optional[ConsumerName], FieldMetadata(alias="nameOnCard")] = None
+ card_expiry: typing_extensions.Annotated[typing.Optional[CardExpiry], FieldMetadata(alias="cardExpiry")] = None
+ pos_details: typing_extensions.Annotated[typing.Optional[PosDetails], FieldMetadata(alias="posDetails")] = None
+ card_last_4_digits: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardLast4Digits")] = None
+ card_brand: typing_extensions.Annotated[typing.Optional[CardBrand], FieldMetadata(alias="cardBrand")] = None
+ card_funding: typing_extensions.Annotated[typing.Optional[CardFunding], FieldMetadata(alias="cardFunding")] = None
+ card_authenticated: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardAuthenticated")] = (
+ None
+ )
+ card_tokenized: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardTokenized")] = None
+ card_present: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="cardPresent")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ card_type: typing_extensions.Annotated[typing.Optional[CardType], FieldMetadata(alias="cardType")] = None
+ card_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="cardBalance")] = None
+ merchant_details: typing_extensions.Annotated[
+ typing.Optional[CardMerchantDetails], FieldMetadata(alias="merchantDetails")
+ ] = None
+ network_provider_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
+ method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankCode")] = None
+ country: typing.Optional[CountryCode] = None
+ name: typing.Optional[str] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBaseModel):
+ method: typing.Literal["IBAN"] = "IBAN"
+ bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country: typing.Optional[CountryCode] = None
+ iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseModel):
+ method: typing.Literal["ACH"] = "ACH"
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
+ method: typing.Literal["SWIFT"] = "SWIFT"
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
+ account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ name: typing.Optional[str] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ special_instructions: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="specialInstructions")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
+ method: typing.Literal["MPESA"] = "MPESA"
+ business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
+ transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
+ phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi(UniversalBaseModel):
+ method: typing.Literal["UPI"] = "UPI"
+ upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
+ bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
+ interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
+ None
+ )
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
+ method: typing.Literal["WALLET"] = "WALLET"
+ wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
+ wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
+ payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ wallet_phone_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletPhoneNumber")] = (
+ None
+ )
+ wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
+ network: typing.Optional[WalletNetwork] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
+ method: typing.Literal["CHECK"] = "CHECK"
+ check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
+ check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ name: typing.Optional[str] = None
+ delivery_status: typing_extensions.Annotated[
+ typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
+ ] = None
+ eta_timestamp: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="etaTimestamp")] = None
+ shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
+ None
+ )
+ tags: typing.Optional[typing.List[Tag]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
+ method: typing.Literal["CASH"] = "CASH"
+ identifier: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseModel):
+ method: typing.Literal["NPP"] = "NPP"
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ name: typing.Optional[ConsumerName] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
+ bsb: typing.Optional[str] = None
+ pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
+ end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
+ pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
+ is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
+ remittance_information: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="remittanceInformation")
+ ] = None
+ remittance_advice: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="remittanceAdvice")] = None
+ tags: typing.Optional[typing.List[Tag]] = None
+ processing_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="processingDate")] = None
+ settlement_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="settlementDate")] = None
+ reference_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="referenceNumber")] = None
+ trace_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="traceNumber")] = None
+ message_format: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageFormat")] = None
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
+ address: typing.Optional[Address] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+BatchConsumerUserWithRulesResultSavedPaymentDetailsItem = typing.Union[
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp,
+]
diff --git a/src/flagright/types/batch_consumer_users_with_rules_result.py b/src/flagright/types/batch_consumer_users_with_rules_result.py
new file mode 100644
index 0000000..7f74732
--- /dev/null
+++ b/src/flagright/types/batch_consumer_users_with_rules_result.py
@@ -0,0 +1,25 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+import typing
+from .batch_consumer_user_with_rules_result import BatchConsumerUserWithRulesResult
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class BatchConsumerUsersWithRulesResult(UniversalBaseModel):
+ consumer_users: typing_extensions.Annotated[
+ typing.List[BatchConsumerUserWithRulesResult], FieldMetadata(alias="consumerUsers")
+ ]
+ total_count: typing_extensions.Annotated[float, FieldMetadata(alias="totalCount")]
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_transaction_event_monitoring_result.py b/src/flagright/types/batch_transaction_event_monitoring_result.py
new file mode 100644
index 0000000..a17d13c
--- /dev/null
+++ b/src/flagright/types/batch_transaction_event_monitoring_result.py
@@ -0,0 +1,67 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from .transaction_state import TransactionState
+from ..core.serialization import FieldMetadata
+import pydantic
+import typing
+from .transaction_updatable import TransactionUpdatable
+from .device_data import DeviceData
+from .hit_rules_details import HitRulesDetails
+from .rule_action import RuleAction
+from .transaction_risk_scoring_result import TransactionRiskScoringResult
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class BatchTransactionEventMonitoringResult(UniversalBaseModel):
+ transaction_state: typing_extensions.Annotated[TransactionState, FieldMetadata(alias="transactionState")]
+ timestamp: float = pydantic.Field()
+ """
+ Timestamp of the event
+ """
+
+ transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
+ """
+ Transaction ID the event pertains to
+ """
+
+ event_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventId")] = pydantic.Field(
+ default=None
+ )
+ """
+ Unique event ID
+ """
+
+ reason: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Reason for the event or a state change
+ """
+
+ event_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventDescription")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Event description
+ """
+
+ updated_transaction_attributes: typing_extensions.Annotated[
+ typing.Optional[TransactionUpdatable], FieldMetadata(alias="updatedTransactionAttributes")
+ ] = None
+ meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ hit_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[HitRulesDetails]], FieldMetadata(alias="hitRules")
+ ] = None
+ status: typing.Optional[RuleAction] = None
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[TransactionRiskScoringResult], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_transaction_event_monitoring_results.py b/src/flagright/types/batch_transaction_event_monitoring_results.py
new file mode 100644
index 0000000..b34e44e
--- /dev/null
+++ b/src/flagright/types/batch_transaction_event_monitoring_results.py
@@ -0,0 +1,25 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+import typing
+from .batch_transaction_event_monitoring_result import BatchTransactionEventMonitoringResult
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class BatchTransactionEventMonitoringResults(UniversalBaseModel):
+ transaction_events: typing_extensions.Annotated[
+ typing.List[BatchTransactionEventMonitoringResult], FieldMetadata(alias="transactionEvents")
+ ]
+ total_count: typing_extensions.Annotated[float, FieldMetadata(alias="totalCount")]
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_transaction_monitoring_result.py b/src/flagright/types/batch_transaction_monitoring_result.py
new file mode 100644
index 0000000..9b8d0b7
--- /dev/null
+++ b/src/flagright/types/batch_transaction_monitoring_result.py
@@ -0,0 +1,38 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+from ..core.serialization import FieldMetadata
+import pydantic
+from .rule_action import RuleAction
+import typing
+from .transaction_risk_scoring_result import TransactionRiskScoringResult
+from .hit_rules_details import HitRulesDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class BatchTransactionMonitoringResult(UniversalBaseModel):
+ transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")] = pydantic.Field()
+ """
+ Transaction ID that the results pertain to
+ """
+
+ status: RuleAction
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[TransactionRiskScoringResult], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+ hit_rules: typing_extensions.Annotated[typing.List[HitRulesDetails], FieldMetadata(alias="hitRules")] = (
+ pydantic.Field()
+ )
+ """
+ Uniquue transaction identifier
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_transaction_monitoring_results.py b/src/flagright/types/batch_transaction_monitoring_results.py
new file mode 100644
index 0000000..812c182
--- /dev/null
+++ b/src/flagright/types/batch_transaction_monitoring_results.py
@@ -0,0 +1,23 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+from .batch_transaction_monitoring_result import BatchTransactionMonitoringResult
+import typing_extensions
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class BatchTransactionMonitoringResults(UniversalBaseModel):
+ transactions: typing.List[BatchTransactionMonitoringResult]
+ total_count: typing_extensions.Annotated[float, FieldMetadata(alias="totalCount")]
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_user_rules_result.py b/src/flagright/types/batch_user_rules_result.py
new file mode 100644
index 0000000..3058323
--- /dev/null
+++ b/src/flagright/types/batch_user_rules_result.py
@@ -0,0 +1,28 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+import typing
+from .executed_rules_result import ExecutedRulesResult
+from ..core.serialization import FieldMetadata
+from .user_risk_score_details import UserRiskScoreDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class BatchUserRulesResult(UniversalBaseModel):
+ executed_rules: typing_extensions.Annotated[
+ typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
+ ] = None
+ risk_score_details: typing_extensions.Annotated[
+ typing.Optional[UserRiskScoreDetails], FieldMetadata(alias="riskScoreDetails")
+ ] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/hit_rules_results.py b/src/flagright/types/hit_rules_results.py
new file mode 100644
index 0000000..3e0ad08
--- /dev/null
+++ b/src/flagright/types/hit_rules_results.py
@@ -0,0 +1,27 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing_extensions
+import typing
+from .hit_rules_details import HitRulesDetails
+from ..core.serialization import FieldMetadata
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class HitRulesResults(UniversalBaseModel):
+ hit_rules: typing_extensions.Annotated[typing.List[HitRulesDetails], FieldMetadata(alias="hitRules")] = (
+ pydantic.Field()
+ )
+ """
+ Uniquue transaction identifier
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/page.py b/src/flagright/types/page.py
new file mode 100644
index 0000000..e1151ef
--- /dev/null
+++ b/src/flagright/types/page.py
@@ -0,0 +1,3 @@
+# This file was auto-generated by Fern from our API Definition.
+
+Page = float
diff --git a/src/flagright/types/page_size.py b/src/flagright/types/page_size.py
new file mode 100644
index 0000000..c2a563e
--- /dev/null
+++ b/src/flagright/types/page_size.py
@@ -0,0 +1,3 @@
+# This file was auto-generated by Fern from our API Definition.
+
+PageSize = float
From 5faf60acf434f18b3485bce2fc7a769ffc796243 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 19 Jun 2025 18:51:15 +0000
Subject: [PATCH 25/81] Release v1.7.6
---
poetry.lock | 8 ++++----
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/contact_details.py | 3 +++
4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/poetry.lock b/poetry.lock
index f13c117..cea859e 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"]
[[package]]
name = "certifi"
-version = "2025.4.26"
+version = "2025.6.15"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
-python-versions = ">=3.6"
+python-versions = ">=3.7"
files = [
- {file = "certifi-2025.4.26-py3-none-any.whl", hash = "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3"},
- {file = "certifi-2025.4.26.tar.gz", hash = "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6"},
+ {file = "certifi-2025.6.15-py3-none-any.whl", hash = "sha256:2e0c7ce7cb5d8f8634ca55d2ba7e6ec2689a2fd6537d8dec1296a477a4910057"},
+ {file = "certifi-2025.6.15.tar.gz", hash = "sha256:d747aa5a8b9bbbb1bb8c22bb13e22bd1f18e9796defa16bab421f7f7a317323b"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 323c1b9..308bc5c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.5"
+version = "v1.7.6"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index ff93ab6..f6a8e1e 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.5",
+ "User-Agent": "flagright/v1.7.6",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.5",
+ "X-Fern-SDK-Version": "v1.7.6",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/contact_details.py b/src/flagright/types/contact_details.py
index c00019f..2751b23 100644
--- a/src/flagright/types/contact_details.py
+++ b/src/flagright/types/contact_details.py
@@ -6,6 +6,7 @@
from ..core.serialization import FieldMetadata
import pydantic
from .address import Address
+from .consumer_name import ConsumerName
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -45,6 +46,8 @@ class ContactDetails(UniversalBaseModel):
Address(es) of the company
"""
+ name: typing.Optional[ConsumerName] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
From 564e25d577411ab52c1f05bdbf56673743146cfe Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 19:18:17 +0000
Subject: [PATCH 26/81] Release v1.7.7
---
pyproject.toml | 2 +-
src/flagright/__init__.py | 4 ++++
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/__init__.py | 4 ++++
src/flagright/types/column_type.py | 5 +++++
src/flagright/types/custom_column.py | 21 +++++++++++++++++++++
src/flagright/types/list_metadata.py | 2 ++
src/flagright/types/list_subtype.py | 1 +
8 files changed, 40 insertions(+), 3 deletions(-)
create mode 100644 src/flagright/types/column_type.py
create mode 100644 src/flagright/types/custom_column.py
diff --git a/pyproject.toml b/pyproject.toml
index 308bc5c..77136ad 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.6"
+version = "v1.7.7"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 99a7ed9..313a49a 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -113,6 +113,7 @@
CheckDeliveryStatus,
CheckDetails,
CheckPaymentMethod,
+ ColumnType,
CompanyFinancialDetails,
CompanyGeneralDetails,
CompanyRegistrationDetails,
@@ -125,6 +126,7 @@
CountryCode,
CraRiskLevelUpdatedDetails,
CurrencyCode,
+ CustomColumn,
Date,
DeviceData,
EmailId,
@@ -477,6 +479,7 @@
"CheckDeliveryStatus",
"CheckDetails",
"CheckPaymentMethod",
+ "ColumnType",
"CompanyFinancialDetails",
"CompanyGeneralDetails",
"CompanyRegistrationDetails",
@@ -491,6 +494,7 @@
"CountryCode",
"CraRiskLevelUpdatedDetails",
"CurrencyCode",
+ "CustomColumn",
"Date",
"DeviceData",
"EmailId",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index f6a8e1e..a39ce69 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.6",
+ "User-Agent": "flagright/v1.7.7",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.6",
+ "X-Fern-SDK-Version": "v1.7.7",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 6a000b8..04fe64b 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -122,6 +122,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .check_details import CheckDetails
from .check_payment_method import CheckPaymentMethod
+from .column_type import ColumnType
from .company_financial_details import CompanyFinancialDetails
from .company_general_details import CompanyGeneralDetails
from .company_registration_details import CompanyRegistrationDetails
@@ -134,6 +135,7 @@
from .country_code import CountryCode
from .cra_risk_level_updated_details import CraRiskLevelUpdatedDetails
from .currency_code import CurrencyCode
+from .custom_column import CustomColumn
from .date import Date
from .device_data import DeviceData
from .email_id import EmailId
@@ -484,6 +486,7 @@
"CheckDeliveryStatus",
"CheckDetails",
"CheckPaymentMethod",
+ "ColumnType",
"CompanyFinancialDetails",
"CompanyGeneralDetails",
"CompanyRegistrationDetails",
@@ -496,6 +499,7 @@
"CountryCode",
"CraRiskLevelUpdatedDetails",
"CurrencyCode",
+ "CustomColumn",
"Date",
"DeviceData",
"EmailId",
diff --git a/src/flagright/types/column_type.py b/src/flagright/types/column_type.py
new file mode 100644
index 0000000..ae5a16e
--- /dev/null
+++ b/src/flagright/types/column_type.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+ColumnType = typing.Union[typing.Literal["STRING", "NUMBER", "DATE"], typing.Any]
diff --git a/src/flagright/types/custom_column.py b/src/flagright/types/custom_column.py
new file mode 100644
index 0000000..4a66d45
--- /dev/null
+++ b/src/flagright/types/custom_column.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+from .column_type import ColumnType
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
+
+
+class CustomColumn(UniversalBaseModel):
+ key: str
+ type: ColumnType
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/list_metadata.py b/src/flagright/types/list_metadata.py
index 057be37..20ae80e 100644
--- a/src/flagright/types/list_metadata.py
+++ b/src/flagright/types/list_metadata.py
@@ -3,6 +3,7 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
+from .custom_column import CustomColumn
from .list_metadata_ttl import ListMetadataTtl
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -20,6 +21,7 @@ class ListMetadata(UniversalBaseModel):
status: typing.Optional[bool] = None
checksum: typing.Optional[str] = None
+ columns: typing.Optional[typing.List[CustomColumn]] = None
ttl: typing.Optional[ListMetadataTtl] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/list_subtype.py b/src/flagright/types/list_subtype.py
index d93a66e..84f80e4 100644
--- a/src/flagright/types/list_subtype.py
+++ b/src/flagright/types/list_subtype.py
@@ -17,6 +17,7 @@
"DEVICE_IDENTIFIER",
"STRING",
"COUNTRY",
+ "CUSTOM",
],
typing.Any,
]
From 2e8a67ecc30a070aae1e0c1a950920ae95243429 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Sat, 5 Jul 2025 19:53:36 +0000
Subject: [PATCH 27/81] Release v1.7.8
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/contact_details.py | 5 +++++
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 77136ad..aed50c2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.7"
+version = "v1.7.8"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index a39ce69..0422e0b 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.7",
+ "User-Agent": "flagright/v1.7.8",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.7",
+ "X-Fern-SDK-Version": "v1.7.8",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/contact_details.py b/src/flagright/types/contact_details.py
index 2751b23..c969b4f 100644
--- a/src/flagright/types/contact_details.py
+++ b/src/flagright/types/contact_details.py
@@ -7,6 +7,7 @@
import pydantic
from .address import Address
from .consumer_name import ConsumerName
+from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -47,6 +48,10 @@ class ContactDetails(UniversalBaseModel):
"""
name: typing.Optional[ConsumerName] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
From 09d48f21b85ea9628b24ea070353919082c46d82 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 16 Jul 2025 14:59:15 +0000
Subject: [PATCH 28/81] Release v1.7.9
---
poetry.lock | 6 +--
pyproject.toml | 2 +-
reference.md | 48 +++++++++++++++++++
src/flagright/business_user_events/client.py | 8 ++++
.../business_user_events/raw_client.py | 8 ++++
src/flagright/business_users/client.py | 8 ++++
src/flagright/business_users/raw_client.py | 8 ++++
src/flagright/consumer_user_events/client.py | 8 ++++
.../consumer_user_events/raw_client.py | 8 ++++
src/flagright/consumer_users/client.py | 8 ++++
src/flagright/consumer_users/raw_client.py | 8 ++++
src/flagright/core/client_wrapper.py | 4 +-
src/flagright/transaction_events/client.py | 8 ++++
.../transaction_events/raw_client.py | 8 ++++
src/flagright/transactions/client.py | 8 ++++
src/flagright/transactions/raw_client.py | 8 ++++
...h_business_user_event_with_rules_result.py | 1 +
.../batch_business_user_with_rules_result.py | 1 +
...h_consumer_user_event_with_rules_result.py | 1 +
.../batch_consumer_user_with_rules_result.py | 1 +
...tch_transaction_event_monitoring_result.py | 1 +
src/flagright/types/business.py | 2 +
src/flagright/types/business_optional.py | 2 +
src/flagright/types/business_user_event.py | 1 +
.../business_user_event_with_rules_result.py | 1 +
.../types/business_with_rules_result.py | 1 +
src/flagright/types/consumer_user_event.py | 1 +
.../consumer_user_event_with_rules_result.py | 1 +
src/flagright/types/currency_code.py | 6 +++
src/flagright/types/transaction.py | 2 +
src/flagright/types/transaction_event.py | 1 +
.../transaction_event_with_rules_result.py | 1 +
src/flagright/types/transaction_updatable.py | 2 +
.../types/transaction_with_rules_result.py | 1 +
src/flagright/types/user.py | 2 +
src/flagright/types/user_optional.py | 2 +
src/flagright/types/user_with_rules_result.py | 1 +
37 files changed, 182 insertions(+), 6 deletions(-)
diff --git a/poetry.lock b/poetry.lock
index cea859e..1318539 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"]
[[package]]
name = "certifi"
-version = "2025.6.15"
+version = "2025.7.14"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.7"
files = [
- {file = "certifi-2025.6.15-py3-none-any.whl", hash = "sha256:2e0c7ce7cb5d8f8634ca55d2ba7e6ec2689a2fd6537d8dec1296a477a4910057"},
- {file = "certifi-2025.6.15.tar.gz", hash = "sha256:d747aa5a8b9bbbb1bb8c22bb13e22bd1f18e9796defa16bab421f7f7a317323b"},
+ {file = "certifi-2025.7.14-py3-none-any.whl", hash = "sha256:6b31f564a415d79ee77df69d757bb49a5bb53bd9f756cbbe24394ffd6fc1f4b2"},
+ {file = "certifi-2025.7.14.tar.gz", hash = "sha256:8ea99dbdfaaf2ba2f9bac77b9249ef62ec5218e7c2b2e903378ed5fccf765995"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index aed50c2..4983f25 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.8"
+version = "v1.7.9"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 13f9612..44f73f9 100644
--- a/reference.md
+++ b/reference.md
@@ -297,6 +297,14 @@ client.transactions.verify(
-
+**update_count:** `typing.Optional[float]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1040,6 +1048,14 @@ client.transaction_events.create(
-
+**update_count:** `typing.Optional[float]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1497,6 +1513,14 @@ client.consumer_users.create(
-
+**update_count:** `typing.Optional[float]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1831,6 +1855,14 @@ client.business_users.create(
-
+**update_count:** `typing.Optional[float]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -2059,6 +2091,14 @@ client.consumer_user_events.create(
-
+**update_count:** `typing.Optional[float]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -2284,6 +2324,14 @@ client.business_user_events.create(
-
+**update_count:** `typing.Optional[float]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
diff --git a/src/flagright/business_user_events/client.py b/src/flagright/business_user_events/client.py
index 7c7f1a4..1abe7c7 100644
--- a/src/flagright/business_user_events/client.py
+++ b/src/flagright/business_user_events/client.py
@@ -42,6 +42,7 @@ def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_business_user_attributes: typing.Optional[BusinessOptional] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessWithRulesResult:
"""
@@ -93,6 +94,8 @@ def create(
updated_business_user_attributes : typing.Optional[BusinessOptional]
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -123,6 +126,7 @@ def create(
reason=reason,
event_description=event_description,
updated_business_user_attributes=updated_business_user_attributes,
+ update_count=update_count,
request_options=request_options,
)
return response.data
@@ -189,6 +193,7 @@ async def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_business_user_attributes: typing.Optional[BusinessOptional] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessWithRulesResult:
"""
@@ -240,6 +245,8 @@ async def create(
updated_business_user_attributes : typing.Optional[BusinessOptional]
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -278,6 +285,7 @@ async def main() -> None:
reason=reason,
event_description=event_description,
updated_business_user_attributes=updated_business_user_attributes,
+ update_count=update_count,
request_options=request_options,
)
return response.data
diff --git a/src/flagright/business_user_events/raw_client.py b/src/flagright/business_user_events/raw_client.py
index 9348a86..9398615 100644
--- a/src/flagright/business_user_events/raw_client.py
+++ b/src/flagright/business_user_events/raw_client.py
@@ -41,6 +41,7 @@ def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_business_user_attributes: typing.Optional[BusinessOptional] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BusinessWithRulesResult]:
"""
@@ -92,6 +93,8 @@ def create(
updated_business_user_attributes : typing.Optional[BusinessOptional]
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -117,6 +120,7 @@ def create(
"updatedBusinessUserAttributes": convert_and_respect_annotation_metadata(
object_=updated_business_user_attributes, annotation=BusinessOptional, direction="write"
),
+ "updateCount": update_count,
},
request_options=request_options,
omit=OMIT,
@@ -263,6 +267,7 @@ async def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_business_user_attributes: typing.Optional[BusinessOptional] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BusinessWithRulesResult]:
"""
@@ -314,6 +319,8 @@ async def create(
updated_business_user_attributes : typing.Optional[BusinessOptional]
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -339,6 +346,7 @@ async def create(
"updatedBusinessUserAttributes": convert_and_respect_annotation_metadata(
object_=updated_business_user_attributes, annotation=BusinessOptional, direction="write"
),
+ "updateCount": update_count,
},
request_options=request_options,
omit=OMIT,
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index c1d8b26..fa84b3a 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -67,6 +67,7 @@ def create(
mcc_details: typing.Optional[MccDetails] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessUsersCreateResponse:
"""
@@ -142,6 +143,8 @@ def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
User's attachments uploaded by business user
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -192,6 +195,7 @@ def create(
mcc_details=mcc_details,
tags=tags,
attachments=attachments,
+ update_count=update_count,
request_options=request_options,
)
return response.data
@@ -272,6 +276,7 @@ async def create(
mcc_details: typing.Optional[MccDetails] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessUsersCreateResponse:
"""
@@ -347,6 +352,8 @@ async def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
User's attachments uploaded by business user
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -405,6 +412,7 @@ async def main() -> None:
mcc_details=mcc_details,
tags=tags,
attachments=attachments,
+ update_count=update_count,
request_options=request_options,
)
return response.data
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index ed21d0b..c693fe2 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -65,6 +65,7 @@ def create(
mcc_details: typing.Optional[MccDetails] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BusinessUsersCreateResponse]:
"""
@@ -140,6 +141,8 @@ def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
User's attachments uploaded by business user
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -200,6 +203,7 @@ def create(
"attachments": convert_and_respect_annotation_metadata(
object_=attachments, annotation=typing.Sequence[PersonAttachment], direction="write"
),
+ "updateCount": update_count,
},
request_options=request_options,
omit=OMIT,
@@ -352,6 +356,7 @@ async def create(
mcc_details: typing.Optional[MccDetails] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BusinessUsersCreateResponse]:
"""
@@ -427,6 +432,8 @@ async def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
User's attachments uploaded by business user
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -487,6 +494,7 @@ async def create(
"attachments": convert_and_respect_annotation_metadata(
object_=attachments, annotation=typing.Sequence[PersonAttachment], direction="write"
),
+ "updateCount": update_count,
},
request_options=request_options,
omit=OMIT,
diff --git a/src/flagright/consumer_user_events/client.py b/src/flagright/consumer_user_events/client.py
index 12a5320..78f4b08 100644
--- a/src/flagright/consumer_user_events/client.py
+++ b/src/flagright/consumer_user_events/client.py
@@ -42,6 +42,7 @@ def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_consumer_user_attributes: typing.Optional[UserOptional] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UserWithRulesResult:
"""
@@ -93,6 +94,8 @@ def create(
updated_consumer_user_attributes : typing.Optional[UserOptional]
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -123,6 +126,7 @@ def create(
reason=reason,
event_description=event_description,
updated_consumer_user_attributes=updated_consumer_user_attributes,
+ update_count=update_count,
request_options=request_options,
)
return response.data
@@ -189,6 +193,7 @@ async def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_consumer_user_attributes: typing.Optional[UserOptional] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UserWithRulesResult:
"""
@@ -240,6 +245,8 @@ async def create(
updated_consumer_user_attributes : typing.Optional[UserOptional]
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -278,6 +285,7 @@ async def main() -> None:
reason=reason,
event_description=event_description,
updated_consumer_user_attributes=updated_consumer_user_attributes,
+ update_count=update_count,
request_options=request_options,
)
return response.data
diff --git a/src/flagright/consumer_user_events/raw_client.py b/src/flagright/consumer_user_events/raw_client.py
index c0b4c80..df53256 100644
--- a/src/flagright/consumer_user_events/raw_client.py
+++ b/src/flagright/consumer_user_events/raw_client.py
@@ -41,6 +41,7 @@ def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_consumer_user_attributes: typing.Optional[UserOptional] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[UserWithRulesResult]:
"""
@@ -92,6 +93,8 @@ def create(
updated_consumer_user_attributes : typing.Optional[UserOptional]
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -117,6 +120,7 @@ def create(
"updatedConsumerUserAttributes": convert_and_respect_annotation_metadata(
object_=updated_consumer_user_attributes, annotation=UserOptional, direction="write"
),
+ "updateCount": update_count,
},
request_options=request_options,
omit=OMIT,
@@ -263,6 +267,7 @@ async def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_consumer_user_attributes: typing.Optional[UserOptional] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[UserWithRulesResult]:
"""
@@ -314,6 +319,8 @@ async def create(
updated_consumer_user_attributes : typing.Optional[UserOptional]
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -339,6 +346,7 @@ async def create(
"updatedConsumerUserAttributes": convert_and_respect_annotation_metadata(
object_=updated_consumer_user_attributes, annotation=UserOptional, direction="write"
),
+ "updateCount": update_count,
},
request_options=request_options,
omit=OMIT,
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
index 2bb855e..f8b2a24 100644
--- a/src/flagright/consumer_users/client.py
+++ b/src/flagright/consumer_users/client.py
@@ -83,6 +83,7 @@ def create(
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ConsumerUsersCreateResponse:
"""
@@ -173,6 +174,8 @@ def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
Uploaded user's attachment
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -285,6 +288,7 @@ def create(
saved_payment_details=saved_payment_details,
tags=tags,
attachments=attachments,
+ update_count=update_count,
request_options=request_options,
)
return response.data
@@ -374,6 +378,7 @@ async def create(
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ConsumerUsersCreateResponse:
"""
@@ -464,6 +469,8 @@ async def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
Uploaded user's attachment
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -584,6 +591,7 @@ async def main() -> None:
saved_payment_details=saved_payment_details,
tags=tags,
attachments=attachments,
+ update_count=update_count,
request_options=request_options,
)
return response.data
diff --git a/src/flagright/consumer_users/raw_client.py b/src/flagright/consumer_users/raw_client.py
index 3d6b824..4f19bea 100644
--- a/src/flagright/consumer_users/raw_client.py
+++ b/src/flagright/consumer_users/raw_client.py
@@ -81,6 +81,7 @@ def create(
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[ConsumerUsersCreateResponse]:
"""
@@ -171,6 +172,8 @@ def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
Uploaded user's attachment
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -244,6 +247,7 @@ def create(
"attachments": convert_and_respect_annotation_metadata(
object_=attachments, annotation=typing.Sequence[PersonAttachment], direction="write"
),
+ "updateCount": update_count,
},
request_options=request_options,
omit=OMIT,
@@ -405,6 +409,7 @@ async def create(
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[ConsumerUsersCreateResponse]:
"""
@@ -495,6 +500,8 @@ async def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
Uploaded user's attachment
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -568,6 +575,7 @@ async def create(
"attachments": convert_and_respect_annotation_metadata(
object_=attachments, annotation=typing.Sequence[PersonAttachment], direction="write"
),
+ "updateCount": update_count,
},
request_options=request_options,
omit=OMIT,
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 0422e0b..0506039 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.8",
+ "User-Agent": "flagright/v1.7.9",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.8",
+ "X-Fern-SDK-Version": "v1.7.9",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/transaction_events/client.py b/src/flagright/transaction_events/client.py
index 9c17342..579a48c 100644
--- a/src/flagright/transaction_events/client.py
+++ b/src/flagright/transaction_events/client.py
@@ -42,6 +42,7 @@ def create(
event_description: typing.Optional[str] = OMIT,
updated_transaction_attributes: typing.Optional[TransactionUpdatable] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TransactionEventMonitoringResult:
"""
@@ -89,6 +90,8 @@ def create(
meta_data : typing.Optional[DeviceData]
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -128,6 +131,7 @@ def create(
event_description=event_description,
updated_transaction_attributes=updated_transaction_attributes,
meta_data=meta_data,
+ update_count=update_count,
request_options=request_options,
)
return response.data
@@ -196,6 +200,7 @@ async def create(
event_description: typing.Optional[str] = OMIT,
updated_transaction_attributes: typing.Optional[TransactionUpdatable] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TransactionEventMonitoringResult:
"""
@@ -243,6 +248,8 @@ async def create(
meta_data : typing.Optional[DeviceData]
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -290,6 +297,7 @@ async def main() -> None:
event_description=event_description,
updated_transaction_attributes=updated_transaction_attributes,
meta_data=meta_data,
+ update_count=update_count,
request_options=request_options,
)
return response.data
diff --git a/src/flagright/transaction_events/raw_client.py b/src/flagright/transaction_events/raw_client.py
index ff80b16..0069354 100644
--- a/src/flagright/transaction_events/raw_client.py
+++ b/src/flagright/transaction_events/raw_client.py
@@ -40,6 +40,7 @@ def create(
event_description: typing.Optional[str] = OMIT,
updated_transaction_attributes: typing.Optional[TransactionUpdatable] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[TransactionEventMonitoringResult]:
"""
@@ -87,6 +88,8 @@ def create(
meta_data : typing.Optional[DeviceData]
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -111,6 +114,7 @@ def create(
"metaData": convert_and_respect_annotation_metadata(
object_=meta_data, annotation=DeviceData, direction="write"
),
+ "updateCount": update_count,
},
request_options=request_options,
omit=OMIT,
@@ -249,6 +253,7 @@ async def create(
event_description: typing.Optional[str] = OMIT,
updated_transaction_attributes: typing.Optional[TransactionUpdatable] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[TransactionEventMonitoringResult]:
"""
@@ -296,6 +301,8 @@ async def create(
meta_data : typing.Optional[DeviceData]
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -320,6 +327,7 @@ async def create(
"metaData": convert_and_respect_annotation_metadata(
object_=meta_data, annotation=DeviceData, direction="write"
),
+ "updateCount": update_count,
},
request_options=request_options,
omit=OMIT,
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index 643eedd..396152d 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -59,6 +59,7 @@ def verify(
origin_device_data: typing.Optional[DeviceData] = OMIT,
destination_device_data: typing.Optional[DeviceData] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TransactionsVerifyResponse:
"""
@@ -139,6 +140,8 @@ def verify(
tags : typing.Optional[typing.Sequence[Tag]]
Additional information that can be added via tags
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -246,6 +249,7 @@ def verify(
origin_device_data=origin_device_data,
destination_device_data=destination_device_data,
tags=tags,
+ update_count=update_count,
request_options=request_options,
)
return response.data
@@ -326,6 +330,7 @@ async def verify(
origin_device_data: typing.Optional[DeviceData] = OMIT,
destination_device_data: typing.Optional[DeviceData] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TransactionsVerifyResponse:
"""
@@ -406,6 +411,8 @@ async def verify(
tags : typing.Optional[typing.Sequence[Tag]]
Additional information that can be added via tags
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -521,6 +528,7 @@ async def main() -> None:
origin_device_data=origin_device_data,
destination_device_data=destination_device_data,
tags=tags,
+ update_count=update_count,
request_options=request_options,
)
return response.data
diff --git a/src/flagright/transactions/raw_client.py b/src/flagright/transactions/raw_client.py
index f4313f3..4668fd7 100644
--- a/src/flagright/transactions/raw_client.py
+++ b/src/flagright/transactions/raw_client.py
@@ -57,6 +57,7 @@ def verify(
origin_device_data: typing.Optional[DeviceData] = OMIT,
destination_device_data: typing.Optional[DeviceData] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[TransactionsVerifyResponse]:
"""
@@ -137,6 +138,8 @@ def verify(
tags : typing.Optional[typing.Sequence[Tag]]
Additional information that can be added via tags
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -189,6 +192,7 @@ def verify(
"tags": convert_and_respect_annotation_metadata(
object_=tags, annotation=typing.Sequence[Tag], direction="write"
),
+ "updateCount": update_count,
},
request_options=request_options,
omit=OMIT,
@@ -339,6 +343,7 @@ async def verify(
origin_device_data: typing.Optional[DeviceData] = OMIT,
destination_device_data: typing.Optional[DeviceData] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
+ update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[TransactionsVerifyResponse]:
"""
@@ -419,6 +424,8 @@ async def verify(
tags : typing.Optional[typing.Sequence[Tag]]
Additional information that can be added via tags
+ update_count : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -471,6 +478,7 @@ async def verify(
"tags": convert_and_respect_annotation_metadata(
object_=tags, annotation=typing.Sequence[Tag], direction="write"
),
+ "updateCount": update_count,
},
request_options=request_options,
omit=OMIT,
diff --git a/src/flagright/types/batch_business_user_event_with_rules_result.py b/src/flagright/types/batch_business_user_event_with_rules_result.py
index 3f03c18..2a5c7d8 100644
--- a/src/flagright/types/batch_business_user_event_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_event_with_rules_result.py
@@ -44,6 +44,7 @@ class BatchBusinessUserEventWithRulesResult(UniversalBaseModel):
updated_business_user_attributes: typing_extensions.Annotated[
typing.Optional[BusinessOptional], FieldMetadata(alias="updatedBusinessUserAttributes")
] = None
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index f9c84ee..d64eaef 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -98,6 +98,7 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
User's attachments uploaded by business user
"""
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/batch_consumer_user_event_with_rules_result.py b/src/flagright/types/batch_consumer_user_event_with_rules_result.py
index 525ff39..752d229 100644
--- a/src/flagright/types/batch_consumer_user_event_with_rules_result.py
+++ b/src/flagright/types/batch_consumer_user_event_with_rules_result.py
@@ -44,6 +44,7 @@ class BatchConsumerUserEventWithRulesResult(UniversalBaseModel):
updated_consumer_user_attributes: typing_extensions.Annotated[
typing.Optional[UserOptional], FieldMetadata(alias="updatedConsumerUserAttributes")
] = None
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result.py b/src/flagright/types/batch_consumer_user_with_rules_result.py
index 95142ff..2d3b0b3 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result.py
@@ -128,6 +128,7 @@ class BatchConsumerUserWithRulesResult(UniversalBaseModel):
Uploaded user's attachment
"""
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/batch_transaction_event_monitoring_result.py b/src/flagright/types/batch_transaction_event_monitoring_result.py
index a17d13c..ac61369 100644
--- a/src/flagright/types/batch_transaction_event_monitoring_result.py
+++ b/src/flagright/types/batch_transaction_event_monitoring_result.py
@@ -49,6 +49,7 @@ class BatchTransactionEventMonitoringResult(UniversalBaseModel):
typing.Optional[TransactionUpdatable], FieldMetadata(alias="updatedTransactionAttributes")
] = None
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
hit_rules: typing_extensions.Annotated[
typing.Optional[typing.List[HitRulesDetails]], FieldMetadata(alias="hitRules")
] = None
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index 4df39d4..fdf9f1e 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -93,6 +93,8 @@ class Business(UniversalBaseModel):
User's attachments uploaded by business user
"""
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index 415b793..09eb002 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -88,6 +88,8 @@ class BusinessOptional(UniversalBaseModel):
User's attachments uploaded by business user
"""
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/business_user_event.py b/src/flagright/types/business_user_event.py
index 60160a0..62d0cf9 100644
--- a/src/flagright/types/business_user_event.py
+++ b/src/flagright/types/business_user_event.py
@@ -46,6 +46,7 @@ class BusinessUserEvent(UniversalBaseModel):
updated_business_user_attributes: typing_extensions.Annotated[
typing.Optional[BusinessOptional], FieldMetadata(alias="updatedBusinessUserAttributes")
] = None
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/business_user_event_with_rules_result.py b/src/flagright/types/business_user_event_with_rules_result.py
index ea80675..f058f38 100644
--- a/src/flagright/types/business_user_event_with_rules_result.py
+++ b/src/flagright/types/business_user_event_with_rules_result.py
@@ -45,6 +45,7 @@ class BusinessUserEventWithRulesResult(UniversalBaseModel):
updated_business_user_attributes: typing_extensions.Annotated[
typing.Optional[BusinessOptional], FieldMetadata(alias="updatedBusinessUserAttributes")
] = None
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 2c07507..2059bc9 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -97,6 +97,7 @@ class BusinessWithRulesResult(UniversalBaseModel):
User's attachments uploaded by business user
"""
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/consumer_user_event.py b/src/flagright/types/consumer_user_event.py
index ec20342..c340e50 100644
--- a/src/flagright/types/consumer_user_event.py
+++ b/src/flagright/types/consumer_user_event.py
@@ -46,6 +46,7 @@ class ConsumerUserEvent(UniversalBaseModel):
updated_consumer_user_attributes: typing_extensions.Annotated[
typing.Optional[UserOptional], FieldMetadata(alias="updatedConsumerUserAttributes")
] = None
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/consumer_user_event_with_rules_result.py b/src/flagright/types/consumer_user_event_with_rules_result.py
index 6eda5f0..6773669 100644
--- a/src/flagright/types/consumer_user_event_with_rules_result.py
+++ b/src/flagright/types/consumer_user_event_with_rules_result.py
@@ -45,6 +45,7 @@ class ConsumerUserEventWithRulesResult(UniversalBaseModel):
updated_consumer_user_attributes: typing_extensions.Annotated[
typing.Optional[UserOptional], FieldMetadata(alias="updatedConsumerUserAttributes")
] = None
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/currency_code.py b/src/flagright/types/currency_code.py
index 8d97bae..dfa1b23 100644
--- a/src/flagright/types/currency_code.py
+++ b/src/flagright/types/currency_code.py
@@ -141,6 +141,7 @@
"ETH2",
"EUR",
"EUROC",
+ "ETHFI",
"FARM",
"FET",
"FIDA",
@@ -154,6 +155,7 @@
"FORTH",
"FOX",
"FX",
+ "FTM",
"GAL",
"GALA",
"GBP",
@@ -306,6 +308,7 @@
"PAB",
"PAX",
"PEN",
+ "PENGU",
"PERP",
"PGK",
"PHP",
@@ -314,6 +317,7 @@
"PLN",
"PLU",
"PNG",
+ "POL",
"POLS",
"POLY",
"POND",
@@ -349,6 +353,7 @@
"RPL",
"RSD",
"RUB",
+ "RUNE",
"RWF",
"SAND",
"SAR",
@@ -390,6 +395,7 @@
"SZL",
"T",
"THB",
+ "THETA",
"TIA",
"TIME",
"TJS",
diff --git a/src/flagright/types/transaction.py b/src/flagright/types/transaction.py
index d29d1d5..32d0f28 100644
--- a/src/flagright/types/transaction.py
+++ b/src/flagright/types/transaction.py
@@ -104,6 +104,8 @@ class Transaction(UniversalBaseModel):
Additional information that can be added via tags
"""
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/transaction_event.py b/src/flagright/types/transaction_event.py
index 872b84c..57ebb85 100644
--- a/src/flagright/types/transaction_event.py
+++ b/src/flagright/types/transaction_event.py
@@ -50,6 +50,7 @@ class TransactionEvent(UniversalBaseModel):
typing.Optional[TransactionUpdatable], FieldMetadata(alias="updatedTransactionAttributes")
] = None
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_event_with_rules_result.py b/src/flagright/types/transaction_event_with_rules_result.py
index 5bc991d..ad48d11 100644
--- a/src/flagright/types/transaction_event_with_rules_result.py
+++ b/src/flagright/types/transaction_event_with_rules_result.py
@@ -50,6 +50,7 @@ class TransactionEventWithRulesResult(UniversalBaseModel):
typing.Optional[TransactionUpdatable], FieldMetadata(alias="updatedTransactionAttributes")
] = None
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/transaction_updatable.py b/src/flagright/types/transaction_updatable.py
index 1854284..13e25c7 100644
--- a/src/flagright/types/transaction_updatable.py
+++ b/src/flagright/types/transaction_updatable.py
@@ -79,6 +79,8 @@ class TransactionUpdatable(UniversalBaseModel):
Additional information that can be added via tags
"""
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/transaction_with_rules_result.py b/src/flagright/types/transaction_with_rules_result.py
index 7099c61..7dbc9d7 100644
--- a/src/flagright/types/transaction_with_rules_result.py
+++ b/src/flagright/types/transaction_with_rules_result.py
@@ -111,6 +111,7 @@ class TransactionWithRulesResult(UniversalBaseModel):
Additional information that can be added via tags
"""
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[typing.List[ExecutedRulesResult], FieldMetadata(alias="executedRules")]
hit_rules: typing_extensions.Annotated[typing.List[HitRulesDetails], FieldMetadata(alias="hitRules")]
status: RuleAction
diff --git a/src/flagright/types/user.py b/src/flagright/types/user.py
index a2b3440..dd2d569 100644
--- a/src/flagright/types/user.py
+++ b/src/flagright/types/user.py
@@ -123,6 +123,8 @@ class User(UniversalBaseModel):
Uploaded user's attachment
"""
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/user_optional.py b/src/flagright/types/user_optional.py
index 1ea8fc7..ab86c99 100644
--- a/src/flagright/types/user_optional.py
+++ b/src/flagright/types/user_optional.py
@@ -117,6 +117,8 @@ class UserOptional(UniversalBaseModel):
Uploaded user's attachment
"""
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/user_with_rules_result.py b/src/flagright/types/user_with_rules_result.py
index 603169a..6567826 100644
--- a/src/flagright/types/user_with_rules_result.py
+++ b/src/flagright/types/user_with_rules_result.py
@@ -127,6 +127,7 @@ class UserWithRulesResult(UniversalBaseModel):
Uploaded user's attachment
"""
+ update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
From bfcc07bb49594570f8f8bb0ec2565ab2d16097d2 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 21 Jul 2025 20:04:20 +0000
Subject: [PATCH 29/81] Release v1.7.10
---
pyproject.toml | 2 +-
reference.md | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/transaction_events/client.py | 4 ++--
src/flagright/types/transaction_event_monitoring_result.py | 2 ++
5 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 4983f25..ff16430 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.9"
+version = "v1.7.10"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 44f73f9..c399b35 100644
--- a/reference.md
+++ b/reference.md
@@ -957,7 +957,7 @@ client = Flagright(
)
client.transaction_events.create(
transaction_state="SUCCESSFUL",
- timestamp=1431231244001.0,
+ timestamp=1752526580000.0,
transaction_id="443dea26147a406b957d9ee3a1247b11",
event_id="aaeeb166147a406b957dd9147a406b957",
event_description="Transaction created",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 0506039..514cba5 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.9",
+ "User-Agent": "flagright/v1.7.10",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.9",
+ "X-Fern-SDK-Version": "v1.7.10",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/transaction_events/client.py b/src/flagright/transaction_events/client.py
index 579a48c..23db661 100644
--- a/src/flagright/transaction_events/client.py
+++ b/src/flagright/transaction_events/client.py
@@ -109,7 +109,7 @@ def create(
)
client.transaction_events.create(
transaction_state="SUCCESSFUL",
- timestamp=1431231244001.0,
+ timestamp=1752526580000.0,
transaction_id="443dea26147a406b957d9ee3a1247b11",
event_id="aaeeb166147a406b957dd9147a406b957",
event_description="Transaction created",
@@ -272,7 +272,7 @@ async def create(
async def main() -> None:
await client.transaction_events.create(
transaction_state="SUCCESSFUL",
- timestamp=1431231244001.0,
+ timestamp=1752526580000.0,
transaction_id="443dea26147a406b957d9ee3a1247b11",
event_id="aaeeb166147a406b957dd9147a406b957",
event_description="Transaction created",
diff --git a/src/flagright/types/transaction_event_monitoring_result.py b/src/flagright/types/transaction_event_monitoring_result.py
index eaf5a3d..a6aeea8 100644
--- a/src/flagright/types/transaction_event_monitoring_result.py
+++ b/src/flagright/types/transaction_event_monitoring_result.py
@@ -5,6 +5,7 @@
from ..core.serialization import FieldMetadata
from .transaction import Transaction
import typing
+from .rule_action import RuleAction
from .transaction_risk_scoring_result import TransactionRiskScoringResult
from .executed_rules_result import ExecutedRulesResult
import pydantic
@@ -15,6 +16,7 @@
class TransactionEventMonitoringResult(UniversalBaseModel):
event_id: typing_extensions.Annotated[str, FieldMetadata(alias="eventId")]
transaction: Transaction
+ status: typing.Optional[RuleAction] = None
risk_score_details: typing_extensions.Annotated[
typing.Optional[TransactionRiskScoringResult], FieldMetadata(alias="riskScoreDetails")
] = None
From 565846a9725bc154965de616c5529fa0a27e4bf4 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 23 Jul 2025 11:30:14 +0000
Subject: [PATCH 30/81] Release v1.7.11
---
pyproject.toml | 2 +-
src/flagright/__init__.py | 4 ++++
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/__init__.py | 4 ++++
.../types/webhook_kyc_status_details.py | 24 +++++++++++++++++++
.../types/webhook_user_state_details.py | 24 +++++++++++++++++++
6 files changed, 59 insertions(+), 3 deletions(-)
create mode 100644 src/flagright/types/webhook_kyc_status_details.py
create mode 100644 src/flagright/types/webhook_user_state_details.py
diff --git a/pyproject.toml b/pyproject.toml
index ff16430..94a22cd 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.10"
+version = "v1.7.11"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 313a49a..7d85c6b 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -345,6 +345,8 @@
WebhookEventData,
WebhookEventTriggeredBy,
WebhookEventType,
+ WebhookKycStatusDetails,
+ WebhookUserStateDetails,
)
from .errors import BadRequestError, ConflictError, NotFoundError, TooManyRequestsError, UnauthorizedError
from . import (
@@ -719,6 +721,8 @@
"WebhookEventData",
"WebhookEventTriggeredBy",
"WebhookEventType",
+ "WebhookKycStatusDetails",
+ "WebhookUserStateDetails",
"__version__",
"batch",
"business_user_events",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 514cba5..429960c 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.10",
+ "User-Agent": "flagright/v1.7.11",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.10",
+ "X-Fern-SDK-Version": "v1.7.11",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 04fe64b..6ab2f64 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -372,6 +372,8 @@
from .webhook_event_data import WebhookEventData
from .webhook_event_triggered_by import WebhookEventTriggeredBy
from .webhook_event_type import WebhookEventType
+from .webhook_kyc_status_details import WebhookKycStatusDetails
+from .webhook_user_state_details import WebhookUserStateDetails
__all__ = [
"AchDetails",
@@ -718,4 +720,6 @@
"WebhookEventData",
"WebhookEventTriggeredBy",
"WebhookEventType",
+ "WebhookKycStatusDetails",
+ "WebhookUserStateDetails",
]
diff --git a/src/flagright/types/webhook_kyc_status_details.py b/src/flagright/types/webhook_kyc_status_details.py
new file mode 100644
index 0000000..fcb4412
--- /dev/null
+++ b/src/flagright/types/webhook_kyc_status_details.py
@@ -0,0 +1,24 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+from .kyc_status import KycStatus
+import typing_extensions
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class WebhookKycStatusDetails(UniversalBaseModel):
+ reason: typing.Optional[str] = None
+ status: typing.Optional[KycStatus] = None
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")]
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/webhook_user_state_details.py b/src/flagright/types/webhook_user_state_details.py
new file mode 100644
index 0000000..c750fbe
--- /dev/null
+++ b/src/flagright/types/webhook_user_state_details.py
@@ -0,0 +1,24 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+from .user_state import UserState
+import typing_extensions
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class WebhookUserStateDetails(UniversalBaseModel):
+ reason: typing.Optional[str] = None
+ state: UserState
+ user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")]
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
From 85fcf1591da756e271b76a370d26624987672e25 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 29 Jul 2025 08:03:34 +0000
Subject: [PATCH 31/81] Release v1.7.12
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/custom_column.py | 5 ++++-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 94a22cd..c26bd07 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.11"
+version = "v1.7.12"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 429960c..ebddfbc 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.11",
+ "User-Agent": "flagright/v1.7.12",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.11",
+ "X-Fern-SDK-Version": "v1.7.12",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/custom_column.py b/src/flagright/types/custom_column.py
index 4a66d45..67c58c0 100644
--- a/src/flagright/types/custom_column.py
+++ b/src/flagright/types/custom_column.py
@@ -2,14 +2,17 @@
from ..core.pydantic_utilities import UniversalBaseModel
from .column_type import ColumnType
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import typing_extensions
import typing
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
class CustomColumn(UniversalBaseModel):
key: str
type: ColumnType
+ primary_key: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="primaryKey")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
From e9a8c5c10d5f2063c3c4b92710f4b0eb3c56027a Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 29 Jul 2025 08:20:06 +0000
Subject: [PATCH 32/81] Release v1.7.13
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
...iness_user_with_rules_result_saved_payment_details_item.py | 1 +
...sumer_user_with_rules_result_saved_payment_details_item.py | 1 +
.../types/business_optional_saved_payment_details_item.py | 1 +
src/flagright/types/business_saved_payment_details_item.py | 1 +
.../business_with_rules_result_saved_payment_details_item.py | 1 +
src/flagright/types/generic_bank_account_details.py | 2 ++
.../types/transaction_destination_payment_details.py | 1 +
src/flagright/types/transaction_origin_payment_details.py | 1 +
.../transaction_updatable_destination_payment_details.py | 1 +
.../types/transaction_updatable_origin_payment_details.py | 1 +
...ansaction_with_rules_result_destination_payment_details.py | 1 +
.../transaction_with_rules_result_origin_payment_details.py | 1 +
.../types/user_optional_saved_payment_details_item.py | 1 +
src/flagright/types/user_saved_payment_details_item.py | 1 +
.../user_with_rules_result_saved_payment_details_item.py | 1 +
17 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index c26bd07..3afdc5d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.12"
+version = "v1.7.13"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index ebddfbc..a79a1e3 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.12",
+ "User-Agent": "flagright/v1.7.13",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.12",
+ "X-Fern-SDK-Version": "v1.7.13",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index 1228e16..11e94b1 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -90,6 +90,7 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index 88aaf15..8f19204 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -90,6 +90,7 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 a074021..85e985b 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -90,6 +90,7 @@ class BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseMo
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index ff87875..b0d2fb8 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -90,6 +90,7 @@ class BusinessSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 d635f97..afc24c8 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
@@ -90,6 +90,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(Universa
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/generic_bank_account_details.py b/src/flagright/types/generic_bank_account_details.py
index 98ff2ee..35a4cbc 100644
--- a/src/flagright/types/generic_bank_account_details.py
+++ b/src/flagright/types/generic_bank_account_details.py
@@ -89,6 +89,8 @@ class GenericBankAccountDetails(UniversalBaseModel):
Transit number of the bank account
"""
+ address: typing.Optional[Address] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index 6b5a829..da862d9 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -90,6 +90,7 @@ class TransactionDestinationPaymentDetails_GenericBankAccount(UniversalBaseModel
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index 8607d72..5b67ecf 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -98,6 +98,7 @@ class TransactionOriginPaymentDetails_GenericBankAccount(UniversalBaseModel):
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index 87779ce..5fe8a63 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -90,6 +90,7 @@ class TransactionUpdatableDestinationPaymentDetails_GenericBankAccount(Universal
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 83692a0..724319a 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -98,6 +98,7 @@ class TransactionUpdatableOriginPaymentDetails_GenericBankAccount(UniversalBaseM
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 b1344e5..6c5dcda 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
@@ -90,6 +90,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount(Uni
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 79ac9e0..c95da9c 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
@@ -98,6 +98,7 @@ class TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount(Universa
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 507ea7e..14c3f3b 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -90,6 +90,7 @@ class UserOptionalSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel)
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index ba60c1f..8567877 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -90,6 +90,7 @@ class UserSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 0f1b93e..6cb1f52 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
@@ -90,6 +90,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(UniversalBas
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
+ address: typing.Optional[Address] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
From 39bb5205257f67d35155bcec031a063390e5a488 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 19 Aug 2025 07:06:26 +0000
Subject: [PATCH 33/81] Release v1.7.14
---
poetry.lock | 6 +++---
pyproject.toml | 2 +-
reference.md | 16 ++++++++++++++++
src/flagright/business_users/client.py | 9 +++++++++
src/flagright/business_users/raw_client.py | 13 +++++++++++++
src/flagright/consumer_users/client.py | 9 +++++++++
src/flagright/consumer_users/raw_client.py | 13 +++++++++++++
src/flagright/core/client_wrapper.py | 4 ++--
.../batch_business_user_with_rules_result.py | 2 ++
.../batch_consumer_user_with_rules_result.py | 2 ++
src/flagright/types/business.py | 2 ++
src/flagright/types/business_optional.py | 2 ++
.../types/business_with_rules_result.py | 2 ++
src/flagright/types/user.py | 2 ++
src/flagright/types/user_optional.py | 2 ++
src/flagright/types/user_with_rules_result.py | 2 ++
16 files changed, 82 insertions(+), 6 deletions(-)
diff --git a/poetry.lock b/poetry.lock
index 1318539..dfe67d2 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"]
[[package]]
name = "certifi"
-version = "2025.7.14"
+version = "2025.8.3"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.7"
files = [
- {file = "certifi-2025.7.14-py3-none-any.whl", hash = "sha256:6b31f564a415d79ee77df69d757bb49a5bb53bd9f756cbbe24394ffd6fc1f4b2"},
- {file = "certifi-2025.7.14.tar.gz", hash = "sha256:8ea99dbdfaaf2ba2f9bac77b9249ef62ec5218e7c2b2e903378ed5fccf765995"},
+ {file = "certifi-2025.8.3-py3-none-any.whl", hash = "sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5"},
+ {file = "certifi-2025.8.3.tar.gz", hash = "sha256:e564105f78ded564e3ae7c923924435e1daa7463faeab5bb932bc53ffae63407"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 3afdc5d..65de3d0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.13"
+version = "v1.7.14"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index c399b35..f7126b2 100644
--- a/reference.md
+++ b/reference.md
@@ -1513,6 +1513,14 @@ client.consumer_users.create(
-
+**meta_data:** `typing.Optional[DeviceData]`
+
+
+
+
+
+-
+
**update_count:** `typing.Optional[float]`
@@ -1855,6 +1863,14 @@ client.business_users.create(
-
+**meta_data:** `typing.Optional[DeviceData]`
+
+
+
+
+
+-
+
**update_count:** `typing.Optional[float]`
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index fa84b3a..3e06493 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -17,6 +17,7 @@
from ..types.mcc_details import MccDetails
from ..types.user_tag import UserTag
from ..types.person_attachment import PersonAttachment
+from ..types.device_data import DeviceData
from ..core.request_options import RequestOptions
from .types.business_users_create_response import BusinessUsersCreateResponse
from ..types.business_with_rules_result import BusinessWithRulesResult
@@ -67,6 +68,7 @@ def create(
mcc_details: typing.Optional[MccDetails] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ meta_data: typing.Optional[DeviceData] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessUsersCreateResponse:
@@ -143,6 +145,8 @@ def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
User's attachments uploaded by business user
+ meta_data : typing.Optional[DeviceData]
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -195,6 +199,7 @@ def create(
mcc_details=mcc_details,
tags=tags,
attachments=attachments,
+ meta_data=meta_data,
update_count=update_count,
request_options=request_options,
)
@@ -276,6 +281,7 @@ async def create(
mcc_details: typing.Optional[MccDetails] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ meta_data: typing.Optional[DeviceData] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessUsersCreateResponse:
@@ -352,6 +358,8 @@ async def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
User's attachments uploaded by business user
+ meta_data : typing.Optional[DeviceData]
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -412,6 +420,7 @@ async def main() -> None:
mcc_details=mcc_details,
tags=tags,
attachments=attachments,
+ meta_data=meta_data,
update_count=update_count,
request_options=request_options,
)
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index c693fe2..828db27 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -16,6 +16,7 @@
from ..types.mcc_details import MccDetails
from ..types.user_tag import UserTag
from ..types.person_attachment import PersonAttachment
+from ..types.device_data import DeviceData
from ..core.request_options import RequestOptions
from ..core.http_response import HttpResponse
from .types.business_users_create_response import BusinessUsersCreateResponse
@@ -65,6 +66,7 @@ def create(
mcc_details: typing.Optional[MccDetails] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ meta_data: typing.Optional[DeviceData] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BusinessUsersCreateResponse]:
@@ -141,6 +143,8 @@ def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
User's attachments uploaded by business user
+ meta_data : typing.Optional[DeviceData]
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -203,6 +207,9 @@ def create(
"attachments": convert_and_respect_annotation_metadata(
object_=attachments, annotation=typing.Sequence[PersonAttachment], direction="write"
),
+ "metaData": convert_and_respect_annotation_metadata(
+ object_=meta_data, annotation=DeviceData, direction="write"
+ ),
"updateCount": update_count,
},
request_options=request_options,
@@ -356,6 +363,7 @@ async def create(
mcc_details: typing.Optional[MccDetails] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ meta_data: typing.Optional[DeviceData] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BusinessUsersCreateResponse]:
@@ -432,6 +440,8 @@ async def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
User's attachments uploaded by business user
+ meta_data : typing.Optional[DeviceData]
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -494,6 +504,9 @@ async def create(
"attachments": convert_and_respect_annotation_metadata(
object_=attachments, annotation=typing.Sequence[PersonAttachment], direction="write"
),
+ "metaData": convert_and_respect_annotation_metadata(
+ object_=meta_data, annotation=DeviceData, direction="write"
+ ),
"updateCount": update_count,
},
request_options=request_options,
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
index f8b2a24..daebae4 100644
--- a/src/flagright/consumer_users/client.py
+++ b/src/flagright/consumer_users/client.py
@@ -24,6 +24,7 @@
from ..types.user_saved_payment_details_item import UserSavedPaymentDetailsItem
from ..types.user_tag import UserTag
from ..types.person_attachment import PersonAttachment
+from ..types.device_data import DeviceData
from ..core.request_options import RequestOptions
from .types.consumer_users_create_response import ConsumerUsersCreateResponse
from ..types.user_with_rules_result import UserWithRulesResult
@@ -83,6 +84,7 @@ def create(
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ meta_data: typing.Optional[DeviceData] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ConsumerUsersCreateResponse:
@@ -174,6 +176,8 @@ def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
Uploaded user's attachment
+ meta_data : typing.Optional[DeviceData]
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -288,6 +292,7 @@ def create(
saved_payment_details=saved_payment_details,
tags=tags,
attachments=attachments,
+ meta_data=meta_data,
update_count=update_count,
request_options=request_options,
)
@@ -378,6 +383,7 @@ async def create(
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ meta_data: typing.Optional[DeviceData] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ConsumerUsersCreateResponse:
@@ -469,6 +475,8 @@ async def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
Uploaded user's attachment
+ meta_data : typing.Optional[DeviceData]
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -591,6 +599,7 @@ async def main() -> None:
saved_payment_details=saved_payment_details,
tags=tags,
attachments=attachments,
+ meta_data=meta_data,
update_count=update_count,
request_options=request_options,
)
diff --git a/src/flagright/consumer_users/raw_client.py b/src/flagright/consumer_users/raw_client.py
index 4f19bea..0a0238c 100644
--- a/src/flagright/consumer_users/raw_client.py
+++ b/src/flagright/consumer_users/raw_client.py
@@ -23,6 +23,7 @@
from ..types.user_saved_payment_details_item import UserSavedPaymentDetailsItem
from ..types.user_tag import UserTag
from ..types.person_attachment import PersonAttachment
+from ..types.device_data import DeviceData
from ..core.request_options import RequestOptions
from ..core.http_response import HttpResponse
from .types.consumer_users_create_response import ConsumerUsersCreateResponse
@@ -81,6 +82,7 @@ def create(
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ meta_data: typing.Optional[DeviceData] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[ConsumerUsersCreateResponse]:
@@ -172,6 +174,8 @@ def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
Uploaded user's attachment
+ meta_data : typing.Optional[DeviceData]
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -247,6 +251,9 @@ def create(
"attachments": convert_and_respect_annotation_metadata(
object_=attachments, annotation=typing.Sequence[PersonAttachment], direction="write"
),
+ "metaData": convert_and_respect_annotation_metadata(
+ object_=meta_data, annotation=DeviceData, direction="write"
+ ),
"updateCount": update_count,
},
request_options=request_options,
@@ -409,6 +416,7 @@ async def create(
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
+ meta_data: typing.Optional[DeviceData] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[ConsumerUsersCreateResponse]:
@@ -500,6 +508,8 @@ async def create(
attachments : typing.Optional[typing.Sequence[PersonAttachment]]
Uploaded user's attachment
+ meta_data : typing.Optional[DeviceData]
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -575,6 +585,9 @@ async def create(
"attachments": convert_and_respect_annotation_metadata(
object_=attachments, annotation=typing.Sequence[PersonAttachment], direction="write"
),
+ "metaData": convert_and_respect_annotation_metadata(
+ object_=meta_data, annotation=DeviceData, direction="write"
+ ),
"updateCount": update_count,
},
request_options=request_options,
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index a79a1e3..2af6f1b 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.13",
+ "User-Agent": "flagright/v1.7.14",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.13",
+ "X-Fern-SDK-Version": "v1.7.14",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index d64eaef..e0fb2a7 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -20,6 +20,7 @@
from .mcc_details import MccDetails
from .user_tag import UserTag
from .person_attachment import PersonAttachment
+from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
from .user_risk_score_details import UserRiskScoreDetails
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -98,6 +99,7 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
User's attachments uploaded by business user
"""
+ meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result.py b/src/flagright/types/batch_consumer_user_with_rules_result.py
index 2d3b0b3..5ba1360 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result.py
@@ -27,6 +27,7 @@
)
from .user_tag import UserTag
from .person_attachment import PersonAttachment
+from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
from .user_risk_score_details import UserRiskScoreDetails
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -128,6 +129,7 @@ class BatchConsumerUserWithRulesResult(UniversalBaseModel):
Uploaded user's attachment
"""
+ meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index fdf9f1e..d16aaa0 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -18,6 +18,7 @@
from .mcc_details import MccDetails
from .user_tag import UserTag
from .person_attachment import PersonAttachment
+from .device_data import DeviceData
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -93,6 +94,7 @@ class Business(UniversalBaseModel):
User's attachments uploaded by business user
"""
+ meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index 09eb002..28755df 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -18,6 +18,7 @@
from .mcc_details import MccDetails
from .user_tag import UserTag
from .person_attachment import PersonAttachment
+from .device_data import DeviceData
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -88,6 +89,7 @@ class BusinessOptional(UniversalBaseModel):
User's attachments uploaded by business user
"""
+ meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 2059bc9..7a17e22 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -18,6 +18,7 @@
from .mcc_details import MccDetails
from .user_tag import UserTag
from .person_attachment import PersonAttachment
+from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
from .user_risk_score_details import UserRiskScoreDetails
@@ -97,6 +98,7 @@ class BusinessWithRulesResult(UniversalBaseModel):
User's attachments uploaded by business user
"""
+ meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
diff --git a/src/flagright/types/user.py b/src/flagright/types/user.py
index dd2d569..86d4a68 100644
--- a/src/flagright/types/user.py
+++ b/src/flagright/types/user.py
@@ -25,6 +25,7 @@
from .user_saved_payment_details_item import UserSavedPaymentDetailsItem
from .user_tag import UserTag
from .person_attachment import PersonAttachment
+from .device_data import DeviceData
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -123,6 +124,7 @@ class User(UniversalBaseModel):
Uploaded user's attachment
"""
+ meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/user_optional.py b/src/flagright/types/user_optional.py
index ab86c99..f277d06 100644
--- a/src/flagright/types/user_optional.py
+++ b/src/flagright/types/user_optional.py
@@ -25,6 +25,7 @@
from .user_optional_saved_payment_details_item import UserOptionalSavedPaymentDetailsItem
from .user_tag import UserTag
from .person_attachment import PersonAttachment
+from .device_data import DeviceData
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -117,6 +118,7 @@ class UserOptional(UniversalBaseModel):
Uploaded user's attachment
"""
+ meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/user_with_rules_result.py b/src/flagright/types/user_with_rules_result.py
index 6567826..b956c05 100644
--- a/src/flagright/types/user_with_rules_result.py
+++ b/src/flagright/types/user_with_rules_result.py
@@ -25,6 +25,7 @@
from .user_with_rules_result_saved_payment_details_item import UserWithRulesResultSavedPaymentDetailsItem
from .user_tag import UserTag
from .person_attachment import PersonAttachment
+from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
from .user_risk_score_details import UserRiskScoreDetails
@@ -127,6 +128,7 @@ class UserWithRulesResult(UniversalBaseModel):
Uploaded user's attachment
"""
+ meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
From 829d3cd639f447e8cdea5bbbdeac8de4f1aa001c Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 28 Aug 2025 14:37:05 +0000
Subject: [PATCH 34/81] Release v1.7.15
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/person_attachment.py | 1 +
src/flagright/types/sanctions_details.py | 4 ++++
.../types/transaction_limits_payment_method_limits.py | 2 ++
5 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 65de3d0..d74792d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.14"
+version = "v1.7.15"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 2af6f1b..5156b10 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.14",
+ "User-Agent": "flagright/v1.7.15",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.14",
+ "X-Fern-SDK-Version": "v1.7.15",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/person_attachment.py b/src/flagright/types/person_attachment.py
index a2da73d..e184244 100644
--- a/src/flagright/types/person_attachment.py
+++ b/src/flagright/types/person_attachment.py
@@ -24,6 +24,7 @@ class PersonAttachment(UniversalBaseModel):
user_id: typing_extensions.Annotated[str, FieldMetadata(alias="userId")]
created_at: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="createdAt")] = None
deleted_at: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="deletedAt")] = None
+ tags: typing.Optional[typing.List[str]] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/sanctions_details.py b/src/flagright/types/sanctions_details.py
index 820e36f..43eeb0d 100644
--- a/src/flagright/types/sanctions_details.py
+++ b/src/flagright/types/sanctions_details.py
@@ -6,6 +6,7 @@
import typing
from .sanctions_details_entity_type import SanctionsDetailsEntityType
from .sanctions_hit_context import SanctionsHitContext
+from .rule_hit_direction import RuleHitDirection
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
@@ -23,6 +24,9 @@ class SanctionsDetails(UniversalBaseModel):
hit_context: typing_extensions.Annotated[
typing.Optional[SanctionsHitContext], FieldMetadata(alias="hitContext")
] = None
+ hit_direction: typing_extensions.Annotated[
+ typing.Optional[RuleHitDirection], FieldMetadata(alias="hitDirection")
+ ] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_limits_payment_method_limits.py b/src/flagright/types/transaction_limits_payment_method_limits.py
index d7f712b..6c66097 100644
--- a/src/flagright/types/transaction_limits_payment_method_limits.py
+++ b/src/flagright/types/transaction_limits_payment_method_limits.py
@@ -21,6 +21,8 @@ class TransactionLimitsPaymentMethodLimits(UniversalBaseModel):
swift: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="SWIFT")] = None
wallet: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="WALLET")] = None
check: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="CHECK")] = None
+ cash: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="CASH")] = None
+ npp: typing_extensions.Annotated[typing.Optional[TransactionLimit], FieldMetadata(alias="NPP")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
From d2613918fe0f571fee8c5b90c1a6db9a1eaa5cd7 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 1 Sep 2025 08:14:11 +0000
Subject: [PATCH 35/81] Release v1.7.16
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/currency_code.py | 4 ++++
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index d74792d..b3e34ee 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.15"
+version = "v1.7.16"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 5156b10..47e5d95 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.15",
+ "User-Agent": "flagright/v1.7.16",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.15",
+ "X-Fern-SDK-Version": "v1.7.16",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/currency_code.py b/src/flagright/types/currency_code.py
index dfa1b23..fdd0ecd 100644
--- a/src/flagright/types/currency_code.py
+++ b/src/flagright/types/currency_code.py
@@ -140,6 +140,7 @@
"ETH",
"ETH2",
"EUR",
+ "EURC",
"EUROC",
"ETHFI",
"FARM",
@@ -309,6 +310,7 @@
"PAX",
"PEN",
"PENGU",
+ "PEPE",
"PERP",
"PGK",
"PHP",
@@ -403,11 +405,13 @@
"TMT",
"TND",
"TONE",
+ "TON",
"TOP",
"TRAC",
"TRB",
"TRIBE",
"TRU",
+ "TRUMP",
"TRY",
"TTD",
"TVK",
From 413a0069310781748a3025a170dd3896f30da61d Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 2 Sep 2025 15:35:55 +0000
Subject: [PATCH 36/81] Release 1.8.0
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index b3e34ee..c3ffe26 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "v1.7.16"
+version = "1.8.0"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 47e5d95..9474a08 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/v1.7.16",
+ "User-Agent": "flagright/1.8.0",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "v1.7.16",
+ "X-Fern-SDK-Version": "1.8.0",
}
headers["x-api-key"] = self.api_key
return headers
From 96e58d929d994b48e6233c7c4b55566d027e4c42 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Fri, 5 Sep 2025 00:29:17 +0000
Subject: [PATCH 37/81] Release 1.8.1
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
...ess_user_with_rules_result_saved_payment_details_item.py | 3 +++
...mer_user_with_rules_result_saved_payment_details_item.py | 3 +++
.../types/business_optional_saved_payment_details_item.py | 3 +++
src/flagright/types/business_saved_payment_details_item.py | 3 +++
...business_with_rules_result_saved_payment_details_item.py | 3 +++
src/flagright/types/check_details.py | 1 +
src/flagright/types/currency_code.py | 4 ++++
src/flagright/types/generic_bank_account_details.py | 6 ++++++
src/flagright/types/swift_details.py | 1 +
.../types/transaction_destination_payment_details.py | 3 +++
src/flagright/types/transaction_origin_payment_details.py | 3 +++
.../transaction_updatable_destination_payment_details.py | 3 +++
.../types/transaction_updatable_origin_payment_details.py | 3 +++
...saction_with_rules_result_destination_payment_details.py | 3 +++
.../transaction_with_rules_result_origin_payment_details.py | 3 +++
.../types/user_optional_saved_payment_details_item.py | 3 +++
src/flagright/types/user_saved_payment_details_item.py | 3 +++
.../user_with_rules_result_saved_payment_details_item.py | 3 +++
20 files changed, 57 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index c3ffe26..1aa9c66 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.0"
+version = "1.8.1"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 9474a08..cf03c6c 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.0",
+ "User-Agent": "flagright/1.8.1",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.0",
+ "X-Fern-SDK-Version": "1.8.1",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index 11e94b1..fa4973d 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -91,6 +91,7 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -161,6 +162,7 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBas
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -248,6 +250,7 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBas
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index 8f19204..27a2623 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -91,6 +91,7 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -161,6 +162,7 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBas
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -248,6 +250,7 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBas
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 85e985b..04ab4ba 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -91,6 +91,7 @@ class BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseMo
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -161,6 +162,7 @@ class BusinessOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -248,6 +250,7 @@ class BusinessOptionalSavedPaymentDetailsItem_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index b0d2fb8..ddd11a8 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -91,6 +91,7 @@ class BusinessSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -161,6 +162,7 @@ class BusinessSavedPaymentDetailsItem_Swift(UniversalBaseModel):
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -248,6 +250,7 @@ class BusinessSavedPaymentDetailsItem_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 afc24c8..2dda5ed 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
@@ -91,6 +91,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(Universa
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -161,6 +162,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -248,6 +250,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/check_details.py b/src/flagright/types/check_details.py
index 8dd6047..f89223a 100644
--- a/src/flagright/types/check_details.py
+++ b/src/flagright/types/check_details.py
@@ -22,6 +22,7 @@ class CheckDetails(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
Additional information that can be added via tags
diff --git a/src/flagright/types/currency_code.py b/src/flagright/types/currency_code.py
index fdd0ecd..f06c20a 100644
--- a/src/flagright/types/currency_code.py
+++ b/src/flagright/types/currency_code.py
@@ -140,7 +140,9 @@
"ETH",
"ETH2",
"EUR",
+ "EURA",
"EURC",
+ "EURT",
"EUROC",
"ETHFI",
"FARM",
@@ -203,6 +205,7 @@
"INR",
"INV",
"IOTX",
+ "ISLM",
"IQD",
"IRR",
"ISK",
@@ -292,6 +295,7 @@
"NKN",
"NMR",
"NOK",
+ "NPC",
"NPR",
"NU",
"NZD",
diff --git a/src/flagright/types/generic_bank_account_details.py b/src/flagright/types/generic_bank_account_details.py
index 35a4cbc..057a651 100644
--- a/src/flagright/types/generic_bank_account_details.py
+++ b/src/flagright/types/generic_bank_account_details.py
@@ -90,6 +90,12 @@ class GenericBankAccountDetails(UniversalBaseModel):
"""
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Routing number of the bank
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/swift_details.py b/src/flagright/types/swift_details.py
index c984f3d..d82e278 100644
--- a/src/flagright/types/swift_details.py
+++ b/src/flagright/types/swift_details.py
@@ -60,6 +60,7 @@ class SwiftDetails(UniversalBaseModel):
Special instructions if any
"""
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
Additional information that can be added via tags
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index da862d9..a359e5b 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -91,6 +91,7 @@ class TransactionDestinationPaymentDetails_GenericBankAccount(UniversalBaseModel
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -206,6 +207,7 @@ class TransactionDestinationPaymentDetails_Swift(UniversalBaseModel):
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -248,6 +250,7 @@ class TransactionDestinationPaymentDetails_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index 5b67ecf..ebfb3ab 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -99,6 +99,7 @@ class TransactionOriginPaymentDetails_GenericBankAccount(UniversalBaseModel):
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -181,6 +182,7 @@ class TransactionOriginPaymentDetails_Swift(UniversalBaseModel):
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -284,6 +286,7 @@ class TransactionOriginPaymentDetails_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index 5fe8a63..1918b89 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -91,6 +91,7 @@ class TransactionUpdatableDestinationPaymentDetails_GenericBankAccount(Universal
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -206,6 +207,7 @@ class TransactionUpdatableDestinationPaymentDetails_Swift(UniversalBaseModel):
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -248,6 +250,7 @@ class TransactionUpdatableDestinationPaymentDetails_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 724319a..5b9fe18 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -99,6 +99,7 @@ class TransactionUpdatableOriginPaymentDetails_GenericBankAccount(UniversalBaseM
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -181,6 +182,7 @@ class TransactionUpdatableOriginPaymentDetails_Swift(UniversalBaseModel):
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -284,6 +286,7 @@ class TransactionUpdatableOriginPaymentDetails_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 6c5dcda..d42f82d 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
@@ -91,6 +91,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount(Uni
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -206,6 +207,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_Swift(UniversalBaseMod
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -248,6 +250,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_Check(UniversalBaseMod
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 c95da9c..578a61b 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
@@ -99,6 +99,7 @@ class TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount(Universa
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -181,6 +182,7 @@ class TransactionWithRulesResultOriginPaymentDetails_Swift(UniversalBaseModel):
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -284,6 +286,7 @@ class TransactionWithRulesResultOriginPaymentDetails_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 14c3f3b..d76cc41 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -91,6 +91,7 @@ class UserOptionalSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel)
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -161,6 +162,7 @@ class UserOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -248,6 +250,7 @@ class UserOptionalSavedPaymentDetailsItem_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 8567877..8e2f250 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -91,6 +91,7 @@ class UserSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -161,6 +162,7 @@ class UserSavedPaymentDetailsItem_Swift(UniversalBaseModel):
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -248,6 +250,7 @@ class UserSavedPaymentDetailsItem_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 6cb1f52..520d07c 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
@@ -91,6 +91,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(UniversalBas
tags: typing.Optional[typing.List[Tag]] = None
transit_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transitNumber")] = None
address: typing.Optional[Address] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -161,6 +162,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -248,6 +250,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
From 30bbc0360478d80e3b798d2cb27312b2801b35bb Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 10 Sep 2025 19:15:39 +0000
Subject: [PATCH 38/81] Release 1.8.2
---
pyproject.toml | 2 +-
reference.md | 64 ++++++++++
src/flagright/batch/client.py | 116 ++++++++++++++++--
src/flagright/batch/raw_client.py | 96 +++++++++++++++
src/flagright/core/client_wrapper.py | 4 +-
...rules_result_saved_payment_details_item.py | 9 +-
...rules_result_saved_payment_details_item.py | 9 +-
...ess_optional_saved_payment_details_item.py | 9 +-
.../business_saved_payment_details_item.py | 9 +-
...rules_result_saved_payment_details_item.py | 9 +-
src/flagright/types/check_details.py | 9 +-
src/flagright/types/npp_details.py | 8 +-
src/flagright/types/swift_details.py | 7 ++
...transaction_destination_payment_details.py | 9 +-
.../transaction_origin_payment_details.py | 9 +-
...n_updatable_destination_payment_details.py | 9 +-
...action_updatable_origin_payment_details.py | 9 +-
...ules_result_destination_payment_details.py | 9 +-
...ith_rules_result_origin_payment_details.py | 9 +-
...ser_optional_saved_payment_details_item.py | 9 +-
.../types/user_saved_payment_details_item.py | 9 +-
...rules_result_saved_payment_details_item.py | 9 +-
src/flagright/types/wallet_details.py | 10 ++
23 files changed, 400 insertions(+), 42 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 1aa9c66..0ebff17 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.1"
+version = "1.8.2"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index f7126b2..f2c1694 100644
--- a/reference.md
+++ b/reference.md
@@ -669,6 +669,22 @@ client.batch.create_consumer_users(
-
+**lock_cra_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the CRA risk level for the user.
+
+
+
+
+
+-
+
+**lock_kyc_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the KYC risk level for the user.
+
+
+
+
+
+-
+
**batch_id:** `typing.Optional[str]`
@@ -745,6 +761,22 @@ client.batch.create_business_users(
-
+**lock_cra_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the CRA risk level for the user.
+
+
+
+
+
+-
+
+**lock_kyc_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the KYC risk level for the user.
+
+
+
+
+
+-
+
**batch_id:** `typing.Optional[str]`
@@ -814,6 +846,22 @@ client.batch.create_consumer_user_events(
-
+**lock_cra_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the CRA risk level for the user.
+
+
+
+
+
+-
+
+**lock_kyc_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the KYC risk level for the user.
+
+
+
+
+
+-
+
**batch_id:** `typing.Optional[str]`
@@ -883,6 +931,22 @@ client.batch.create_business_user_events(
-
+**lock_cra_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the CRA risk level for the user.
+
+
+
+
+
+-
+
+**lock_kyc_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the KYC risk level for the user.
+
+
+
+
+
+-
+
**batch_id:** `typing.Optional[str]`
diff --git a/src/flagright/batch/client.py b/src/flagright/batch/client.py
index ac61e57..98c9aba 100644
--- a/src/flagright/batch/client.py
+++ b/src/flagright/batch/client.py
@@ -183,6 +183,8 @@ def create_consumer_users(
self,
*,
data: typing.Sequence[User],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BatchResponse:
@@ -191,6 +193,12 @@ def create_consumer_users(
----------
data : typing.Sequence[User]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -217,13 +225,21 @@ def create_consumer_users(
],
)
"""
- response = self._raw_client.create_consumer_users(data=data, batch_id=batch_id, request_options=request_options)
+ response = self._raw_client.create_consumer_users(
+ data=data,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ batch_id=batch_id,
+ request_options=request_options,
+ )
return response.data
def create_business_users(
self,
*,
data: typing.Sequence[Business],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BatchResponse:
@@ -232,6 +248,12 @@ def create_business_users(
----------
data : typing.Sequence[Business]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -265,13 +287,21 @@ def create_business_users(
],
)
"""
- response = self._raw_client.create_business_users(data=data, batch_id=batch_id, request_options=request_options)
+ response = self._raw_client.create_business_users(
+ data=data,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ batch_id=batch_id,
+ request_options=request_options,
+ )
return response.data
def create_consumer_user_events(
self,
*,
data: typing.Sequence[ConsumerUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BatchResponse:
@@ -280,6 +310,12 @@ def create_consumer_user_events(
----------
data : typing.Sequence[ConsumerUserEvent]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -307,7 +343,11 @@ def create_consumer_user_events(
)
"""
response = self._raw_client.create_consumer_user_events(
- data=data, batch_id=batch_id, request_options=request_options
+ data=data,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ batch_id=batch_id,
+ request_options=request_options,
)
return response.data
@@ -315,6 +355,8 @@ def create_business_user_events(
self,
*,
data: typing.Sequence[BusinessUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BatchResponse:
@@ -323,6 +365,12 @@ def create_business_user_events(
----------
data : typing.Sequence[BusinessUserEvent]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -350,7 +398,11 @@ def create_business_user_events(
)
"""
response = self._raw_client.create_business_user_events(
- data=data, batch_id=batch_id, request_options=request_options
+ data=data,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ batch_id=batch_id,
+ request_options=request_options,
)
return response.data
@@ -540,6 +592,8 @@ async def create_consumer_users(
self,
*,
data: typing.Sequence[User],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BatchResponse:
@@ -548,6 +602,12 @@ async def create_consumer_users(
----------
data : typing.Sequence[User]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -583,7 +643,11 @@ async def main() -> None:
asyncio.run(main())
"""
response = await self._raw_client.create_consumer_users(
- data=data, batch_id=batch_id, request_options=request_options
+ data=data,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ batch_id=batch_id,
+ request_options=request_options,
)
return response.data
@@ -591,6 +655,8 @@ async def create_business_users(
self,
*,
data: typing.Sequence[Business],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BatchResponse:
@@ -599,6 +665,12 @@ async def create_business_users(
----------
data : typing.Sequence[Business]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -646,7 +718,11 @@ async def main() -> None:
asyncio.run(main())
"""
response = await self._raw_client.create_business_users(
- data=data, batch_id=batch_id, request_options=request_options
+ data=data,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ batch_id=batch_id,
+ request_options=request_options,
)
return response.data
@@ -654,6 +730,8 @@ async def create_consumer_user_events(
self,
*,
data: typing.Sequence[ConsumerUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BatchResponse:
@@ -662,6 +740,12 @@ async def create_consumer_user_events(
----------
data : typing.Sequence[ConsumerUserEvent]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -697,7 +781,11 @@ async def main() -> None:
asyncio.run(main())
"""
response = await self._raw_client.create_consumer_user_events(
- data=data, batch_id=batch_id, request_options=request_options
+ data=data,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ batch_id=batch_id,
+ request_options=request_options,
)
return response.data
@@ -705,6 +793,8 @@ async def create_business_user_events(
self,
*,
data: typing.Sequence[BusinessUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BatchResponse:
@@ -713,6 +803,12 @@ async def create_business_user_events(
----------
data : typing.Sequence[BusinessUserEvent]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -748,6 +844,10 @@ async def main() -> None:
asyncio.run(main())
"""
response = await self._raw_client.create_business_user_events(
- data=data, batch_id=batch_id, request_options=request_options
+ data=data,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ batch_id=batch_id,
+ request_options=request_options,
)
return response.data
diff --git a/src/flagright/batch/raw_client.py b/src/flagright/batch/raw_client.py
index 7cb748b..3229f81 100644
--- a/src/flagright/batch/raw_client.py
+++ b/src/flagright/batch/raw_client.py
@@ -309,6 +309,8 @@ def create_consumer_users(
self,
*,
data: typing.Sequence[User],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BatchResponse]:
@@ -317,6 +319,12 @@ def create_consumer_users(
----------
data : typing.Sequence[User]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -330,6 +338,10 @@ def create_consumer_users(
_response = self._client_wrapper.httpx_client.request(
"batch/consumer/users",
method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
@@ -391,6 +403,8 @@ def create_business_users(
self,
*,
data: typing.Sequence[Business],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BatchResponse]:
@@ -399,6 +413,12 @@ def create_business_users(
----------
data : typing.Sequence[Business]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -412,6 +432,10 @@ def create_business_users(
_response = self._client_wrapper.httpx_client.request(
"batch/business/users",
method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
@@ -473,6 +497,8 @@ def create_consumer_user_events(
self,
*,
data: typing.Sequence[ConsumerUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BatchResponse]:
@@ -481,6 +507,12 @@ def create_consumer_user_events(
----------
data : typing.Sequence[ConsumerUserEvent]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -494,6 +526,10 @@ def create_consumer_user_events(
_response = self._client_wrapper.httpx_client.request(
"batch/events/consumer/user",
method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
@@ -555,6 +591,8 @@ def create_business_user_events(
self,
*,
data: typing.Sequence[BusinessUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BatchResponse]:
@@ -563,6 +601,12 @@ def create_business_user_events(
----------
data : typing.Sequence[BusinessUserEvent]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -576,6 +620,10 @@ def create_business_user_events(
_response = self._client_wrapper.httpx_client.request(
"batch/events/business/user",
method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
@@ -910,6 +958,8 @@ async def create_consumer_users(
self,
*,
data: typing.Sequence[User],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BatchResponse]:
@@ -918,6 +968,12 @@ async def create_consumer_users(
----------
data : typing.Sequence[User]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -931,6 +987,10 @@ async def create_consumer_users(
_response = await self._client_wrapper.httpx_client.request(
"batch/consumer/users",
method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
@@ -992,6 +1052,8 @@ async def create_business_users(
self,
*,
data: typing.Sequence[Business],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BatchResponse]:
@@ -1000,6 +1062,12 @@ async def create_business_users(
----------
data : typing.Sequence[Business]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -1013,6 +1081,10 @@ async def create_business_users(
_response = await self._client_wrapper.httpx_client.request(
"batch/business/users",
method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
@@ -1074,6 +1146,8 @@ async def create_consumer_user_events(
self,
*,
data: typing.Sequence[ConsumerUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BatchResponse]:
@@ -1082,6 +1156,12 @@ async def create_consumer_user_events(
----------
data : typing.Sequence[ConsumerUserEvent]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -1095,6 +1175,10 @@ async def create_consumer_user_events(
_response = await self._client_wrapper.httpx_client.request(
"batch/events/consumer/user",
method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
@@ -1156,6 +1240,8 @@ async def create_business_user_events(
self,
*,
data: typing.Sequence[BusinessUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BatchResponse]:
@@ -1164,6 +1250,12 @@ async def create_business_user_events(
----------
data : typing.Sequence[BusinessUserEvent]
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -1177,6 +1269,10 @@ async def create_business_user_events(
_response = await self._client_wrapper.httpx_client.request(
"batch/events/business/user",
method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index cf03c6c..d99c102 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.1",
+ "User-Agent": "flagright/1.8.2",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.1",
+ "X-Fern-SDK-Version": "1.8.2",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index fa4973d..b38df95 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -153,6 +153,7 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBas
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -227,6 +228,9 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBa
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -242,6 +246,7 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBas
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -284,8 +289,8 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseM
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index 27a2623..bd5884c 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -153,6 +153,7 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBas
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -227,6 +228,9 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBa
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -242,6 +246,7 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBas
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -284,8 +289,8 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseM
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
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 04ab4ba..fdb814f 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -153,6 +153,7 @@ class BusinessOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -227,6 +228,9 @@ class BusinessOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -242,6 +246,7 @@ class BusinessOptionalSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -284,8 +289,8 @@ class BusinessOptionalSavedPaymentDetailsItem_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index ddd11a8..822b31b 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -153,6 +153,7 @@ class BusinessSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -227,6 +228,9 @@ class BusinessSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -242,6 +246,7 @@ class BusinessSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -284,8 +289,8 @@ class BusinessSavedPaymentDetailsItem_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
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 2dda5ed..0652c42 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
@@ -153,6 +153,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -227,6 +228,9 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -242,6 +246,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -284,8 +289,8 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
diff --git a/src/flagright/types/check_details.py b/src/flagright/types/check_details.py
index f89223a..65c4f33 100644
--- a/src/flagright/types/check_details.py
+++ b/src/flagright/types/check_details.py
@@ -4,16 +4,23 @@
import typing_extensions
import typing
from ..core.serialization import FieldMetadata
+import pydantic
from .check_delivery_status import CheckDeliveryStatus
from .address import Address
from .tag import Tag
-import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
class CheckDetails(UniversalBaseModel):
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Routing number of the bank
+ """
+
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
diff --git a/src/flagright/types/npp_details.py b/src/flagright/types/npp_details.py
index 3d0d912..4fdca60 100644
--- a/src/flagright/types/npp_details.py
+++ b/src/flagright/types/npp_details.py
@@ -38,12 +38,16 @@ class NppDetails(UniversalBaseModel):
BSB number
"""
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")] = pydantic.Field()
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = pydantic.Field(
+ default=None
+ )
"""
PayID
"""
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")] = pydantic.Field()
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = (
+ pydantic.Field(default=None)
+ )
"""
End to End ID
"""
diff --git a/src/flagright/types/swift_details.py b/src/flagright/types/swift_details.py
index d82e278..6f4ca15 100644
--- a/src/flagright/types/swift_details.py
+++ b/src/flagright/types/swift_details.py
@@ -31,6 +31,13 @@ class SwiftDetails(UniversalBaseModel):
Account number
"""
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Routing number of the bank
+ """
+
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = (
pydantic.Field(default=None)
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index a359e5b..19f437e 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -183,6 +183,9 @@ class TransactionDestinationPaymentDetails_Wallet(UniversalBaseModel):
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -198,6 +201,7 @@ class TransactionDestinationPaymentDetails_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -242,6 +246,7 @@ class TransactionDestinationPaymentDetails_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -284,8 +289,8 @@ class TransactionDestinationPaymentDetails_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index ebfb3ab..2515948 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -173,6 +173,7 @@ class TransactionOriginPaymentDetails_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -259,6 +260,9 @@ class TransactionOriginPaymentDetails_Wallet(UniversalBaseModel):
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -278,6 +282,7 @@ class TransactionOriginPaymentDetails_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -328,8 +333,8 @@ class TransactionOriginPaymentDetails_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index 1918b89..37d8bed 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -183,6 +183,9 @@ class TransactionUpdatableDestinationPaymentDetails_Wallet(UniversalBaseModel):
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -198,6 +201,7 @@ class TransactionUpdatableDestinationPaymentDetails_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -242,6 +246,7 @@ class TransactionUpdatableDestinationPaymentDetails_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -284,8 +289,8 @@ class TransactionUpdatableDestinationPaymentDetails_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 5b9fe18..23cbe07 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -173,6 +173,7 @@ class TransactionUpdatableOriginPaymentDetails_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -259,6 +260,9 @@ class TransactionUpdatableOriginPaymentDetails_Wallet(UniversalBaseModel):
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -278,6 +282,7 @@ class TransactionUpdatableOriginPaymentDetails_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -328,8 +333,8 @@ class TransactionUpdatableOriginPaymentDetails_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
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 d42f82d..d824668 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
@@ -183,6 +183,9 @@ class TransactionWithRulesResultDestinationPaymentDetails_Wallet(UniversalBaseMo
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -198,6 +201,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_Swift(UniversalBaseMod
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -242,6 +246,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_Check(UniversalBaseMod
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -284,8 +289,8 @@ class TransactionWithRulesResultDestinationPaymentDetails_Npp(UniversalBaseModel
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
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 578a61b..29c0f12 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
@@ -173,6 +173,7 @@ class TransactionWithRulesResultOriginPaymentDetails_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -259,6 +260,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Wallet(UniversalBaseModel):
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -278,6 +282,7 @@ class TransactionWithRulesResultOriginPaymentDetails_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -328,8 +333,8 @@ class TransactionWithRulesResultOriginPaymentDetails_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
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 d76cc41..d4b8795 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -153,6 +153,7 @@ class UserOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -227,6 +228,9 @@ class UserOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -242,6 +246,7 @@ class UserOptionalSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -284,8 +289,8 @@ class UserOptionalSavedPaymentDetailsItem_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 8e2f250..9baa6c7 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -153,6 +153,7 @@ class UserSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -227,6 +228,9 @@ class UserSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -242,6 +246,7 @@ class UserSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -284,8 +289,8 @@ class UserSavedPaymentDetailsItem_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
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 520d07c..80ab2c8 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
@@ -153,6 +153,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
@@ -227,6 +228,9 @@ class UserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
)
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -242,6 +246,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
+ routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
name: typing.Optional[str] = None
delivery_status: typing_extensions.Annotated[
typing.Optional[CheckDeliveryStatus], FieldMetadata(alias="deliveryStatus")
@@ -284,8 +289,8 @@ class UserWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
contact_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contactNumber")] = None
bsb: typing.Optional[str] = None
- pay_id: typing_extensions.Annotated[str, FieldMetadata(alias="payId")]
- end_to_end_id: typing_extensions.Annotated[str, FieldMetadata(alias="endToEndId")]
+ pay_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payId")] = None
+ end_to_end_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endToEndId")] = None
osko_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="oskoReference")] = None
pay_id_reference: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payIdReference")] = None
is_instant: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isInstant")] = None
diff --git a/src/flagright/types/wallet_details.py b/src/flagright/types/wallet_details.py
index d1bc7ab..b5ed938 100644
--- a/src/flagright/types/wallet_details.py
+++ b/src/flagright/types/wallet_details.py
@@ -9,6 +9,8 @@
from .tag import Tag
from .amount import Amount
from .wallet_network import WalletNetwork
+from .address import Address
+from .country_code import CountryCode
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -58,6 +60,14 @@ class WalletDetails(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
+ address: typing.Optional[Address] = None
+ nationality: typing.Optional[CountryCode] = None
+ date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Date of birth of the account holder (YYYY-MM-DD)
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
From e5d6098a969dff481d4b68ad9424df6b0eae7193 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 15 Sep 2025 07:15:55 +0000
Subject: [PATCH 39/81] Release 1.8.3
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
...ss_user_with_rules_result_saved_payment_details_item.py | 7 ++++++-
...er_user_with_rules_result_saved_payment_details_item.py | 7 ++++++-
.../types/business_optional_saved_payment_details_item.py | 7 ++++++-
src/flagright/types/business_saved_payment_details_item.py | 7 ++++++-
...usiness_with_rules_result_saved_payment_details_item.py | 7 ++++++-
src/flagright/types/card_details.py | 2 ++
src/flagright/types/cash_details.py | 4 ++++
src/flagright/types/mpesa_details.py | 7 +++++++
.../types/transaction_destination_payment_details.py | 7 ++++++-
src/flagright/types/transaction_origin_payment_details.py | 7 ++++++-
.../transaction_updatable_destination_payment_details.py | 7 ++++++-
.../types/transaction_updatable_origin_payment_details.py | 7 ++++++-
...action_with_rules_result_destination_payment_details.py | 7 ++++++-
...transaction_with_rules_result_origin_payment_details.py | 7 ++++++-
.../types/user_optional_saved_payment_details_item.py | 7 ++++++-
src/flagright/types/user_saved_payment_details_item.py | 7 ++++++-
.../user_with_rules_result_saved_payment_details_item.py | 7 ++++++-
19 files changed, 100 insertions(+), 17 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 0ebff17..9b5c565 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.2"
+version = "1.8.3"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index d99c102..406914f 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.2",
+ "User-Agent": "flagright/1.8.3",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.2",
+ "X-Fern-SDK-Version": "1.8.3",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index b38df95..d7943d5 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .mpesa_transaction_type import MpesaTransactionType
from .wallet_network import WalletNetwork
from .check_delivery_status import CheckDeliveryStatus
@@ -57,6 +57,7 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBase
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -182,6 +183,8 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa(UniversalBas
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -271,6 +274,8 @@ class Config:
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index bd5884c..785eab6 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .mpesa_transaction_type import MpesaTransactionType
from .wallet_network import WalletNetwork
from .check_delivery_status import CheckDeliveryStatus
@@ -57,6 +57,7 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBase
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -182,6 +183,8 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa(UniversalBas
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -271,6 +274,8 @@ class Config:
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 fdb814f..8a684ab 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .mpesa_transaction_type import MpesaTransactionType
from .wallet_network import WalletNetwork
from .check_delivery_status import CheckDeliveryStatus
@@ -57,6 +57,7 @@ class BusinessOptionalSavedPaymentDetailsItem_Card(UniversalBaseModel):
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -182,6 +183,8 @@ class BusinessOptionalSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -271,6 +274,8 @@ class Config:
class BusinessOptionalSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index 822b31b..6646375 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .mpesa_transaction_type import MpesaTransactionType
from .wallet_network import WalletNetwork
from .check_delivery_status import CheckDeliveryStatus
@@ -57,6 +57,7 @@ class BusinessSavedPaymentDetailsItem_Card(UniversalBaseModel):
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -182,6 +183,8 @@ class BusinessSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -271,6 +274,8 @@ class Config:
class BusinessSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 0652c42..7ae76c1 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
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .mpesa_transaction_type import MpesaTransactionType
from .wallet_network import WalletNetwork
from .check_delivery_status import CheckDeliveryStatus
@@ -57,6 +57,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -182,6 +183,8 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -271,6 +274,8 @@ class Config:
class BusinessWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/card_details.py b/src/flagright/types/card_details.py
index 6a3b5df..6d3db7a 100644
--- a/src/flagright/types/card_details.py
+++ b/src/flagright/types/card_details.py
@@ -16,6 +16,7 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -97,6 +98,7 @@ class CardDetails(UniversalBaseModel):
Risk score of the card from your network provider
"""
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
Additional information that can be added via tags
diff --git a/src/flagright/types/cash_details.py b/src/flagright/types/cash_details.py
index 53fd148..95e82bd 100644
--- a/src/flagright/types/cash_details.py
+++ b/src/flagright/types/cash_details.py
@@ -3,6 +3,7 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
+from .address import Address
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -12,6 +13,9 @@ class CashDetails(UniversalBaseModel):
Identifier for the cash transaction
"""
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/mpesa_details.py b/src/flagright/types/mpesa_details.py
index 73f569d..33cd168 100644
--- a/src/flagright/types/mpesa_details.py
+++ b/src/flagright/types/mpesa_details.py
@@ -7,6 +7,7 @@
from .mpesa_transaction_type import MpesaTransactionType
import typing
from .email_id import EmailId
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -28,6 +29,12 @@ class MpesaDetails(UniversalBaseModel):
"""
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Name of the account holder
+ """
+
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
Additional information that can be added via tags
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index 19f437e..b3d462e 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .wallet_network import WalletNetwork
from .mpesa_transaction_type import MpesaTransactionType
from .check_delivery_status import CheckDeliveryStatus
@@ -57,6 +57,7 @@ class TransactionDestinationPaymentDetails_Card(UniversalBaseModel):
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -230,6 +231,8 @@ class TransactionDestinationPaymentDetails_Mpesa(UniversalBaseModel):
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -271,6 +274,8 @@ class Config:
class TransactionDestinationPaymentDetails_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index 2515948..c3c8373 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .mpesa_transaction_type import MpesaTransactionType
from .wallet_network import WalletNetwork
from .check_delivery_status import CheckDeliveryStatus
@@ -61,6 +61,7 @@ class TransactionOriginPaymentDetails_Card(UniversalBaseModel):
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -206,6 +207,8 @@ class TransactionOriginPaymentDetails_Mpesa(UniversalBaseModel):
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -311,6 +314,8 @@ class TransactionOriginPaymentDetails_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index 37d8bed..742563b 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .wallet_network import WalletNetwork
from .mpesa_transaction_type import MpesaTransactionType
from .check_delivery_status import CheckDeliveryStatus
@@ -57,6 +57,7 @@ class TransactionUpdatableDestinationPaymentDetails_Card(UniversalBaseModel):
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -230,6 +231,8 @@ class TransactionUpdatableDestinationPaymentDetails_Mpesa(UniversalBaseModel):
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -271,6 +274,8 @@ class Config:
class TransactionUpdatableDestinationPaymentDetails_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 23cbe07..3bcc856 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .mpesa_transaction_type import MpesaTransactionType
from .wallet_network import WalletNetwork
from .check_delivery_status import CheckDeliveryStatus
@@ -61,6 +61,7 @@ class TransactionUpdatableOriginPaymentDetails_Card(UniversalBaseModel):
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -206,6 +207,8 @@ class TransactionUpdatableOriginPaymentDetails_Mpesa(UniversalBaseModel):
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -311,6 +314,8 @@ class TransactionUpdatableOriginPaymentDetails_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 d824668..3e9155d 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
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .wallet_network import WalletNetwork
from .mpesa_transaction_type import MpesaTransactionType
from .check_delivery_status import CheckDeliveryStatus
@@ -57,6 +57,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_Card(UniversalBaseMode
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -230,6 +231,8 @@ class TransactionWithRulesResultDestinationPaymentDetails_Mpesa(UniversalBaseMod
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -271,6 +274,8 @@ class Config:
class TransactionWithRulesResultDestinationPaymentDetails_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 29c0f12..f7f072b 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
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .mpesa_transaction_type import MpesaTransactionType
from .wallet_network import WalletNetwork
from .check_delivery_status import CheckDeliveryStatus
@@ -61,6 +61,7 @@ class TransactionWithRulesResultOriginPaymentDetails_Card(UniversalBaseModel):
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -206,6 +207,8 @@ class TransactionWithRulesResultOriginPaymentDetails_Mpesa(UniversalBaseModel):
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -311,6 +314,8 @@ class TransactionWithRulesResultOriginPaymentDetails_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 d4b8795..6e6b0c1 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .mpesa_transaction_type import MpesaTransactionType
from .wallet_network import WalletNetwork
from .check_delivery_status import CheckDeliveryStatus
@@ -57,6 +57,7 @@ class UserOptionalSavedPaymentDetailsItem_Card(UniversalBaseModel):
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -182,6 +183,8 @@ class UserOptionalSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -271,6 +274,8 @@ class Config:
class UserOptionalSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 9baa6c7..d7d90ae 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .mpesa_transaction_type import MpesaTransactionType
from .wallet_network import WalletNetwork
from .check_delivery_status import CheckDeliveryStatus
@@ -57,6 +57,7 @@ class UserSavedPaymentDetailsItem_Card(UniversalBaseModel):
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -182,6 +183,8 @@ class UserSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -271,6 +274,8 @@ class Config:
class UserSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 80ab2c8..e5d1b15 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
@@ -16,10 +16,10 @@
from .card_type import CardType
from .amount import Amount
from .card_merchant_details import CardMerchantDetails
+from .address import Address
from .tag import Tag
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-from .address import Address
from .mpesa_transaction_type import MpesaTransactionType
from .wallet_network import WalletNetwork
from .check_delivery_status import CheckDeliveryStatus
@@ -57,6 +57,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
network_provider_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -182,6 +183,8 @@ class UserWithRulesResultSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
+ name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -271,6 +274,8 @@ class Config:
class UserWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
identifier: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
+ name: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
From 6f7290c6b3e818b1cac272d407ed351efb22f3be Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 15 Sep 2025 07:53:51 +0000
Subject: [PATCH 40/81] Release 1.8.4
---
pyproject.toml | 2 +-
src/flagright/__init__.py | 8 ++++----
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/__init__.py | 8 ++++----
.../{alert_closed_details.py => alert_status_details.py} | 2 +-
.../{case_closed_details.py => case_status_details.py} | 2 +-
src/flagright/types/webhook_event_data.py | 8 ++++----
src/flagright/types/webhook_event_type.py | 2 ++
8 files changed, 19 insertions(+), 17 deletions(-)
rename src/flagright/types/{alert_closed_details.py => alert_status_details.py} (97%)
rename src/flagright/types/{case_closed_details.py => case_status_details.py} (96%)
diff --git a/pyproject.toml b/pyproject.toml
index 9b5c565..9ed00c9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.3"
+version = "1.8.4"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 7d85c6b..6999ae8 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -6,8 +6,8 @@
AcquisitionChannel,
Address,
AdverseMediaStatus,
- AlertClosedDetails,
AlertOpenedDetails,
+ AlertStatusDetails,
Amount,
ApiErrorResponse,
BatchBusinessUserEventWithRulesResult,
@@ -103,11 +103,11 @@
CardPaymentMethod,
CardStatus,
CardType,
- CaseClosedDetails,
CaseManagementEvent,
CaseManagementEventCaseStatus,
CaseManagementEventCaseStatusReason,
CaseOpenedDetails,
+ CaseStatusDetails,
CashDetails,
CashPaymentMethod,
CheckDeliveryStatus,
@@ -371,8 +371,8 @@
"AcquisitionChannel",
"Address",
"AdverseMediaStatus",
- "AlertClosedDetails",
"AlertOpenedDetails",
+ "AlertStatusDetails",
"Amount",
"ApiErrorResponse",
"AsyncFlagright",
@@ -471,11 +471,11 @@
"CardPaymentMethod",
"CardStatus",
"CardType",
- "CaseClosedDetails",
"CaseManagementEvent",
"CaseManagementEventCaseStatus",
"CaseManagementEventCaseStatusReason",
"CaseOpenedDetails",
+ "CaseStatusDetails",
"CashDetails",
"CashPaymentMethod",
"CheckDeliveryStatus",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 406914f..2f0d3af 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.3",
+ "User-Agent": "flagright/1.8.4",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.3",
+ "X-Fern-SDK-Version": "1.8.4",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 6ab2f64..3642116 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -5,8 +5,8 @@
from .acquisition_channel import AcquisitionChannel
from .address import Address
from .adverse_media_status import AdverseMediaStatus
-from .alert_closed_details import AlertClosedDetails
from .alert_opened_details import AlertOpenedDetails
+from .alert_status_details import AlertStatusDetails
from .amount import Amount
from .api_error_response import ApiErrorResponse
from .batch_business_user_event_with_rules_result import BatchBusinessUserEventWithRulesResult
@@ -112,11 +112,11 @@
from .card_payment_method import CardPaymentMethod
from .card_status import CardStatus
from .card_type import CardType
-from .case_closed_details import CaseClosedDetails
from .case_management_event import CaseManagementEvent
from .case_management_event_case_status import CaseManagementEventCaseStatus
from .case_management_event_case_status_reason import CaseManagementEventCaseStatusReason
from .case_opened_details import CaseOpenedDetails
+from .case_status_details import CaseStatusDetails
from .cash_details import CashDetails
from .cash_payment_method import CashPaymentMethod
from .check_delivery_status import CheckDeliveryStatus
@@ -381,8 +381,8 @@
"AcquisitionChannel",
"Address",
"AdverseMediaStatus",
- "AlertClosedDetails",
"AlertOpenedDetails",
+ "AlertStatusDetails",
"Amount",
"ApiErrorResponse",
"BatchBusinessUserEventWithRulesResult",
@@ -478,11 +478,11 @@
"CardPaymentMethod",
"CardStatus",
"CardType",
- "CaseClosedDetails",
"CaseManagementEvent",
"CaseManagementEventCaseStatus",
"CaseManagementEventCaseStatusReason",
"CaseOpenedDetails",
+ "CaseStatusDetails",
"CashDetails",
"CashPaymentMethod",
"CheckDeliveryStatus",
diff --git a/src/flagright/types/alert_closed_details.py b/src/flagright/types/alert_status_details.py
similarity index 97%
rename from src/flagright/types/alert_closed_details.py
rename to src/flagright/types/alert_status_details.py
index b63758a..b19b0c9 100644
--- a/src/flagright/types/alert_closed_details.py
+++ b/src/flagright/types/alert_status_details.py
@@ -8,7 +8,7 @@
import pydantic
-class AlertClosedDetails(UniversalBaseModel):
+class AlertStatusDetails(UniversalBaseModel):
alert_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="alertId")] = None
status: typing.Optional[str] = None
reasons: typing.Optional[typing.List[str]] = None
diff --git a/src/flagright/types/case_closed_details.py b/src/flagright/types/case_status_details.py
similarity index 96%
rename from src/flagright/types/case_closed_details.py
rename to src/flagright/types/case_status_details.py
index 93331af..87cf6b3 100644
--- a/src/flagright/types/case_closed_details.py
+++ b/src/flagright/types/case_status_details.py
@@ -8,7 +8,7 @@
import pydantic
-class CaseClosedDetails(UniversalBaseModel):
+class CaseStatusDetails(UniversalBaseModel):
case_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="caseId")] = None
status: typing.Optional[str] = None
reasons: typing.Optional[typing.List[str]] = None
diff --git a/src/flagright/types/webhook_event_data.py b/src/flagright/types/webhook_event_data.py
index d6bcace..a2e70a1 100644
--- a/src/flagright/types/webhook_event_data.py
+++ b/src/flagright/types/webhook_event_data.py
@@ -2,9 +2,9 @@
import typing
from .user_state_details import UserStateDetails
-from .case_closed_details import CaseClosedDetails
+from .case_status_details import CaseStatusDetails
from .case_opened_details import CaseOpenedDetails
-from .alert_closed_details import AlertClosedDetails
+from .alert_status_details import AlertStatusDetails
from .alert_opened_details import AlertOpenedDetails
from .transaction_status_details import TransactionStatusDetails
from .kyc_status_details import KycStatusDetails
@@ -13,9 +13,9 @@
WebhookEventData = typing.Union[
UserStateDetails,
- CaseClosedDetails,
+ CaseStatusDetails,
CaseOpenedDetails,
- AlertClosedDetails,
+ AlertStatusDetails,
AlertOpenedDetails,
TransactionStatusDetails,
KycStatusDetails,
diff --git a/src/flagright/types/webhook_event_type.py b/src/flagright/types/webhook_event_type.py
index dcf698e..dc7f2bd 100644
--- a/src/flagright/types/webhook_event_type.py
+++ b/src/flagright/types/webhook_event_type.py
@@ -18,6 +18,8 @@
"LIST_UPDATED",
"SANCTIONS_STATUS_UPDATED",
"ADVERSE_MEDIA_STATUS_UPDATED",
+ "CASE_ESCALATED",
+ "ALERT_ESCALATED",
],
typing.Any,
]
From beb72a1d7594edb02fdd4cd1b68335d0002b0733 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 15 Sep 2025 15:19:37 +0000
Subject: [PATCH 41/81] Release 1.8.5
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/transaction_base.py | 5 +++++
src/flagright/types/transaction_updatable.py | 6 +-----
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 9ed00c9..afcfcaf 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.4"
+version = "1.8.5"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 2f0d3af..3236b46 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.4",
+ "User-Agent": "flagright/1.8.5",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.4",
+ "X-Fern-SDK-Version": "1.8.5",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/transaction_base.py b/src/flagright/types/transaction_base.py
index b3a3b9b..00fa646 100644
--- a/src/flagright/types/transaction_base.py
+++ b/src/flagright/types/transaction_base.py
@@ -5,6 +5,7 @@
import typing_extensions
from ..core.serialization import FieldMetadata
import typing
+from .transaction_state import TransactionState
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -42,6 +43,10 @@ class TransactionBase(UniversalBaseModel):
UserId for transaction's destination. In other words, where the value is being transferred to.
"""
+ transaction_state: typing_extensions.Annotated[
+ typing.Optional[TransactionState], FieldMetadata(alias="transactionState")
+ ] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/transaction_updatable.py b/src/flagright/types/transaction_updatable.py
index 13e25c7..9cacca6 100644
--- a/src/flagright/types/transaction_updatable.py
+++ b/src/flagright/types/transaction_updatable.py
@@ -3,9 +3,8 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing_extensions
import typing
-from .transaction_state import TransactionState
-from ..core.serialization import FieldMetadata
from .transaction_amount_details import TransactionAmountDetails
+from ..core.serialization import FieldMetadata
from .transaction_updatable_origin_payment_details import TransactionUpdatableOriginPaymentDetails
import pydantic
from .transaction_updatable_destination_payment_details import TransactionUpdatableDestinationPaymentDetails
@@ -20,9 +19,6 @@ class TransactionUpdatable(UniversalBaseModel):
Model for transaction additional payload
"""
- transaction_state: typing_extensions.Annotated[
- typing.Optional[TransactionState], FieldMetadata(alias="transactionState")
- ] = None
origin_amount_details: typing_extensions.Annotated[
typing.Optional[TransactionAmountDetails], FieldMetadata(alias="originAmountDetails")
] = None
From e56d61665d7722d02ad775213de52d2ac1f60490 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 16 Sep 2025 09:41:43 +0000
Subject: [PATCH 42/81] Release 1.8.6
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
...iness_user_with_rules_result_saved_payment_details_item.py | 4 +++-
...sumer_user_with_rules_result_saved_payment_details_item.py | 4 +++-
.../types/business_optional_saved_payment_details_item.py | 4 +++-
src/flagright/types/business_saved_payment_details_item.py | 4 +++-
.../business_with_rules_result_saved_payment_details_item.py | 4 +++-
.../types/transaction_destination_payment_details.py | 4 +++-
src/flagright/types/transaction_origin_payment_details.py | 4 +++-
.../transaction_updatable_destination_payment_details.py | 4 +++-
.../types/transaction_updatable_origin_payment_details.py | 4 +++-
...ansaction_with_rules_result_destination_payment_details.py | 4 +++-
.../transaction_with_rules_result_origin_payment_details.py | 4 +++-
.../types/user_optional_saved_payment_details_item.py | 4 +++-
src/flagright/types/user_saved_payment_details_item.py | 4 +++-
.../user_with_rules_result_saved_payment_details_item.py | 4 +++-
src/flagright/types/wallet_details.py | 4 +++-
17 files changed, 48 insertions(+), 18 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index afcfcaf..54e1558 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.5"
+version = "1.8.6"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 3236b46..2905825 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.5",
+ "User-Agent": "flagright/1.8.6",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.5",
+ "X-Fern-SDK-Version": "1.8.6",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index d7943d5..5924563 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -232,7 +232,9 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBa
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index 785eab6..c59c186 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -232,7 +232,9 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBa
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
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 8a684ab..193c0f0 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -232,7 +232,9 @@ class BusinessOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index 6646375..f6d0a92 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -232,7 +232,9 @@ class BusinessSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
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 7ae76c1..7896b47 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
@@ -232,7 +232,9 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index b3d462e..ced88f6 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -185,7 +185,9 @@ class TransactionDestinationPaymentDetails_Wallet(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index c3c8373..bac0456 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -264,7 +264,9 @@ class TransactionOriginPaymentDetails_Wallet(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index 742563b..dc7c2f7 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -185,7 +185,9 @@ class TransactionUpdatableDestinationPaymentDetails_Wallet(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 3bcc856..27d1ebd 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -264,7 +264,9 @@ class TransactionUpdatableOriginPaymentDetails_Wallet(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
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 3e9155d..04c3a9c 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
@@ -185,7 +185,9 @@ class TransactionWithRulesResultDestinationPaymentDetails_Wallet(UniversalBaseMo
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
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 f7f072b..7d1e972 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
@@ -264,7 +264,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Wallet(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
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 6e6b0c1..2b21439 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -232,7 +232,9 @@ class UserOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index d7d90ae..7124162 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -232,7 +232,9 @@ class UserSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
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 e5d1b15..0046473 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
@@ -232,7 +232,9 @@ class UserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/wallet_details.py b/src/flagright/types/wallet_details.py
index b5ed938..3eb11a5 100644
--- a/src/flagright/types/wallet_details.py
+++ b/src/flagright/types/wallet_details.py
@@ -61,7 +61,9 @@ class WalletDetails(UniversalBaseModel):
wallet_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="walletBalance")] = None
network: typing.Optional[WalletNetwork] = None
address: typing.Optional[Address] = None
- nationality: typing.Optional[CountryCode] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = (
pydantic.Field(default=None)
)
From c23595ed0a9039a5bc97920c856a97a55d65dbe2 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 22 Sep 2025 15:01:07 +0000
Subject: [PATCH 43/81] Release 1.8.7
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/tag.py | 11 ++++++++++-
src/flagright/types/user_tag.py | 7 +++++++
4 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 54e1558..00a7351 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.6"
+version = "1.8.7"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 2905825..6ff89ac 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.6",
+ "User-Agent": "flagright/1.8.7",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.6",
+ "X-Fern-SDK-Version": "1.8.7",
}
headers["x-api-key"] = self.api_key
return headers
diff --git a/src/flagright/types/tag.py b/src/flagright/types/tag.py
index c310e09..ab0ecac 100644
--- a/src/flagright/types/tag.py
+++ b/src/flagright/types/tag.py
@@ -2,8 +2,10 @@
from ..core.pydantic_utilities import UniversalBaseModel
import pydantic
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import typing_extensions
import typing
+from ..core.serialization import FieldMetadata
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
class Tag(UniversalBaseModel):
@@ -21,6 +23,13 @@ class Tag(UniversalBaseModel):
Value for a given key when you are creating a custom variable
"""
+ is_timestamp: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isTimestamp")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Flag to indicate if the tag value is a timestamp
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/user_tag.py b/src/flagright/types/user_tag.py
index 3def601..52cb08d 100644
--- a/src/flagright/types/user_tag.py
+++ b/src/flagright/types/user_tag.py
@@ -19,6 +19,13 @@ class UserTag(UniversalBaseModel):
Value for a given key when you are creating a custom variable
"""
+ is_timestamp: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isTimestamp")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Flag to indicate if the tag value is a timestamp
+ """
+
is_editable: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isEditable")] = pydantic.Field(
default=None
)
From 570c4f39fbd46cb6d818aec611b259db4b16772a Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Fri, 26 Sep 2025 08:37:52 +0000
Subject: [PATCH 44/81] Release 1.8.8
---
.github/workflows/ci.yml | 6 +-
.gitignore | 4 +-
poetry.lock | 109 +-
pyproject.toml | 30 +-
reference.md | 26 +
requirements.txt | 2 +-
src/flagright/__init__.py | 1123 ++++++++++------
src/flagright/batch/__init__.py | 2 +
src/flagright/batch/client.py | 103 +-
src/flagright/batch/raw_client.py | 315 +++--
.../business_user_events/__init__.py | 2 +
src/flagright/business_user_events/client.py | 33 +-
.../business_user_events/raw_client.py | 117 +-
src/flagright/business_users/__init__.py | 31 +-
src/flagright/business_users/client.py | 51 +-
src/flagright/business_users/raw_client.py | 129 +-
.../business_users/types/__init__.py | 31 +-
.../types/business_users_create_response.py | 5 +-
src/flagright/client.py | 181 ++-
.../consumer_user_events/__init__.py | 2 +
src/flagright/consumer_user_events/client.py | 33 +-
.../consumer_user_events/raw_client.py | 117 +-
src/flagright/consumer_users/__init__.py | 31 +-
src/flagright/consumer_users/client.py | 59 +-
src/flagright/consumer_users/raw_client.py | 137 +-
.../consumer_users/types/__init__.py | 31 +-
.../types/consumer_users_create_response.py | 5 +-
src/flagright/core/__init__.py | 95 +-
src/flagright/core/api_error.py | 18 +-
src/flagright/core/client_wrapper.py | 42 +-
src/flagright/core/force_multipart.py | 18 +
src/flagright/core/http_client.py | 94 +-
src/flagright/core/http_response.py | 30 +-
src/flagright/core/pydantic_utilities.py | 184 ++-
src/flagright/errors/__init__.py | 45 +-
src/flagright/errors/bad_request_error.py | 6 +-
src/flagright/errors/conflict_error.py | 6 +-
src/flagright/errors/not_found_error.py | 6 +-
.../errors/too_many_requests_error.py | 6 +-
src/flagright/errors/unauthorized_error.py | 6 +-
src/flagright/transaction_events/__init__.py | 2 +
src/flagright/transaction_events/client.py | 29 +-
.../transaction_events/raw_client.py | 109 +-
src/flagright/transactions/__init__.py | 31 +-
src/flagright/transactions/client.py | 41 +-
src/flagright/transactions/raw_client.py | 119 +-
src/flagright/transactions/types/__init__.py | 31 +-
.../types/transactions_verify_response.py | 5 +-
src/flagright/types/__init__.py | 1124 +++++++++++------
src/flagright/types/ach_details.py | 10 +-
src/flagright/types/address.py | 8 +-
src/flagright/types/alert_opened_details.py | 8 +-
src/flagright/types/alert_status_details.py | 8 +-
src/flagright/types/amount.py | 8 +-
src/flagright/types/api_error_response.py | 8 +-
...h_business_user_event_with_rules_result.py | 6 +-
..._business_user_events_with_rules_result.py | 10 +-
.../batch_business_user_with_rules_result.py | 30 +-
...rules_result_saved_payment_details_item.py | 29 +-
...batch_business_users_with_rules_results.py | 10 +-
...h_consumer_user_event_with_rules_result.py | 8 +-
...batch_consumer_user_events_rules_result.py | 10 +-
.../batch_consumer_user_with_rules_result.py | 42 +-
...rules_result_saved_payment_details_item.py | 29 +-
.../batch_consumer_users_with_rules_result.py | 10 +-
src/flagright/types/batch_response.py | 10 +-
.../types/batch_response_failed_record.py | 6 +-
...tch_transaction_event_monitoring_result.py | 12 +-
...ch_transaction_event_monitoring_results.py | 10 +-
.../batch_transaction_monitoring_result.py | 10 +-
.../batch_transaction_monitoring_results.py | 8 +-
.../types/batch_user_rules_result.py | 10 +-
src/flagright/types/business.py | 26 +-
src/flagright/types/business_base.py | 8 +-
src/flagright/types/business_optional.py | 24 +-
...ess_optional_saved_payment_details_item.py | 29 +-
.../business_saved_payment_details_item.py | 29 +-
src/flagright/types/business_user_event.py | 6 +-
.../business_user_event_with_rules_result.py | 6 +-
.../types/business_user_monitoring_result.py | 12 +-
.../types/business_with_rules_result.py | 30 +-
...rules_result_saved_payment_details_item.py | 29 +-
src/flagright/types/card_details.py | 26 +-
src/flagright/types/card_expiry.py | 4 +-
src/flagright/types/card_merchant_details.py | 6 +-
src/flagright/types/case_management_event.py | 10 +-
src/flagright/types/case_opened_details.py | 8 +-
src/flagright/types/case_status_details.py | 8 +-
src/flagright/types/cash_details.py | 4 +-
src/flagright/types/check_details.py | 10 +-
.../types/company_financial_details.py | 10 +-
.../types/company_general_details.py | 10 +-
.../types/company_registration_details.py | 8 +-
src/flagright/types/consumer_name.py | 8 +-
src/flagright/types/consumer_user_event.py | 6 +-
.../consumer_user_event_with_rules_result.py | 8 +-
.../types/consumer_user_monitoring_result.py | 12 +-
src/flagright/types/contact_details.py | 8 +-
.../types/cra_risk_level_updated_details.py | 8 +-
src/flagright/types/custom_column.py | 10 +-
src/flagright/types/date.py | 6 +-
src/flagright/types/device_data.py | 8 +-
src/flagright/types/employment_details.py | 8 +-
src/flagright/types/executed_logic_vars.py | 6 +-
src/flagright/types/executed_rules_result.py | 10 +-
src/flagright/types/expected_income.py | 10 +-
src/flagright/types/failed_rules_result.py | 8 +-
src/flagright/types/false_positive_details.py | 8 +-
src/flagright/types/file_info.py | 8 +-
.../types/generic_bank_account_details.py | 10 +-
src/flagright/types/hit_rules_details.py | 8 +-
src/flagright/types/hit_rules_results.py | 10 +-
src/flagright/types/iban_details.py | 10 +-
src/flagright/types/kyc_status_details.py | 6 +-
src/flagright/types/legal_document.py | 10 +-
src/flagright/types/legal_entity.py | 12 +-
src/flagright/types/list_data.py | 8 +-
src/flagright/types/list_existed.py | 8 +-
src/flagright/types/list_header.py | 12 +-
src/flagright/types/list_item.py | 6 +-
src/flagright/types/list_metadata.py | 4 +-
src/flagright/types/list_metadata_ttl.py | 6 +-
src/flagright/types/list_updated_details.py | 10 +-
src/flagright/types/mcc_details.py | 6 +-
src/flagright/types/mpesa_details.py | 12 +-
src/flagright/types/npp_details.py | 10 +-
src/flagright/types/origin_funds_info.py | 8 +-
src/flagright/types/pep_status.py | 8 +-
src/flagright/types/person.py | 14 +-
src/flagright/types/person_attachment.py | 6 +-
src/flagright/types/place_of_birth.py | 6 +-
src/flagright/types/pos_details.py | 10 +-
src/flagright/types/rule_failure_exception.py | 8 +-
src/flagright/types/rule_hit_meta.py | 10 +-
src/flagright/types/rules_results.py | 10 +-
src/flagright/types/sanctions_details.py | 10 +-
src/flagright/types/sanctions_hit_context.py | 12 +-
src/flagright/types/swift_details.py | 10 +-
src/flagright/types/tag.py | 6 +-
src/flagright/types/transaction.py | 16 +-
.../types/transaction_amount_details.py | 10 +-
.../types/transaction_amount_limit.py | 6 +-
src/flagright/types/transaction_base.py | 6 +-
.../types/transaction_count_limit.py | 4 +-
...transaction_destination_payment_details.py | 29 +-
src/flagright/types/transaction_event.py | 12 +-
.../transaction_event_monitoring_result.py | 14 +-
.../transaction_event_with_rules_result.py | 12 +-
src/flagright/types/transaction_limit.py | 10 +-
src/flagright/types/transaction_limits.py | 10 +-
...ransaction_limits_payment_method_limits.py | 10 +-
.../types/transaction_monitoring_result.py | 12 +-
.../transaction_origin_payment_details.py | 29 +-
.../types/transaction_risk_scoring_result.py | 8 +-
.../types/transaction_status_details.py | 8 +-
src/flagright/types/transaction_updatable.py | 16 +-
...n_updatable_destination_payment_details.py | 29 +-
...action_updatable_origin_payment_details.py | 29 +-
.../types/transaction_with_rules_result.py | 22 +-
...ules_result_destination_payment_details.py | 29 +-
...ith_rules_result_origin_payment_details.py | 29 +-
src/flagright/types/upi_details.py | 8 +-
src/flagright/types/user.py | 34 +-
src/flagright/types/user_base.py | 8 +-
src/flagright/types/user_details.py | 8 +-
src/flagright/types/user_entity_link.py | 8 +-
src/flagright/types/user_optional.py | 34 +-
...ser_optional_saved_payment_details_item.py | 29 +-
.../types/user_risk_score_details.py | 8 +-
src/flagright/types/user_rules_result.py | 10 +-
.../types/user_saved_payment_details_item.py | 29 +-
src/flagright/types/user_state_details.py | 6 +-
src/flagright/types/user_tag.py | 6 +-
src/flagright/types/user_tags_update.py | 8 +-
src/flagright/types/user_with_rules_result.py | 42 +-
...rules_result_saved_payment_details_item.py | 29 +-
src/flagright/types/wallet_details.py | 14 +-
src/flagright/types/webhook_event.py | 10 +-
src/flagright/types/webhook_event_base.py | 8 +-
src/flagright/types/webhook_event_data.py | 13 +-
.../types/webhook_kyc_status_details.py | 8 +-
.../types/webhook_user_state_details.py | 8 +-
tests/custom/test_client.py | 2 +-
tests/utils/assets/models/__init__.py | 2 +-
tests/utils/assets/models/circle.py | 2 +-
.../assets/models/object_with_defaults.py | 1 -
.../models/object_with_optional_field.py | 9 +-
tests/utils/assets/models/shape.py | 6 +-
tests/utils/assets/models/square.py | 2 +-
.../assets/models/undiscriminated_shape.py | 1 +
tests/utils/test_query_encoding.py | 3 +-
tests/utils/test_serialization.py | 6 +-
192 files changed, 3992 insertions(+), 2483 deletions(-)
create mode 100644 src/flagright/core/force_multipart.py
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5c708fe..9818c03 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
@@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
diff --git a/.gitignore b/.gitignore
index 0da665f..d2e4ca8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
-dist/
.mypy_cache/
+.ruff_cache/
__pycache__/
+dist/
poetry.toml
-.ruff_cache/
diff --git a/poetry.lock b/poetry.lock
index dfe67d2..c2ddd86 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -158,48 +158,55 @@ files = [
[[package]]
name = "mypy"
-version = "1.0.1"
+version = "1.13.0"
description = "Optional static typing for Python"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "mypy-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:71a808334d3f41ef011faa5a5cd8153606df5fc0b56de5b2e89566c8093a0c9a"},
- {file = "mypy-1.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:920169f0184215eef19294fa86ea49ffd4635dedfdea2b57e45cb4ee85d5ccaf"},
- {file = "mypy-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:27a0f74a298769d9fdc8498fcb4f2beb86f0564bcdb1a37b58cbbe78e55cf8c0"},
- {file = "mypy-1.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:65b122a993d9c81ea0bfde7689b3365318a88bde952e4dfa1b3a8b4ac05d168b"},
- {file = "mypy-1.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:5deb252fd42a77add936b463033a59b8e48eb2eaec2976d76b6878d031933fe4"},
- {file = "mypy-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2013226d17f20468f34feddd6aae4635a55f79626549099354ce641bc7d40262"},
- {file = "mypy-1.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:48525aec92b47baed9b3380371ab8ab6e63a5aab317347dfe9e55e02aaad22e8"},
- {file = "mypy-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c96b8a0c019fe29040d520d9257d8c8f122a7343a8307bf8d6d4a43f5c5bfcc8"},
- {file = "mypy-1.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:448de661536d270ce04f2d7dddaa49b2fdba6e3bd8a83212164d4174ff43aa65"},
- {file = "mypy-1.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:d42a98e76070a365a1d1c220fcac8aa4ada12ae0db679cb4d910fabefc88b994"},
- {file = "mypy-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e64f48c6176e243ad015e995de05af7f22bbe370dbb5b32bd6988438ec873919"},
- {file = "mypy-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fdd63e4f50e3538617887e9aee91855368d9fc1dea30da743837b0df7373bc4"},
- {file = "mypy-1.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:dbeb24514c4acbc78d205f85dd0e800f34062efcc1f4a4857c57e4b4b8712bff"},
- {file = "mypy-1.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a2948c40a7dd46c1c33765718936669dc1f628f134013b02ff5ac6c7ef6942bf"},
- {file = "mypy-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5bc8d6bd3b274dd3846597855d96d38d947aedba18776aa998a8d46fabdaed76"},
- {file = "mypy-1.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:17455cda53eeee0a4adb6371a21dd3dbf465897de82843751cf822605d152c8c"},
- {file = "mypy-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e831662208055b006eef68392a768ff83596035ffd6d846786578ba1714ba8f6"},
- {file = "mypy-1.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e60d0b09f62ae97a94605c3f73fd952395286cf3e3b9e7b97f60b01ddfbbda88"},
- {file = "mypy-1.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:0af4f0e20706aadf4e6f8f8dc5ab739089146b83fd53cb4a7e0e850ef3de0bb6"},
- {file = "mypy-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:24189f23dc66f83b839bd1cce2dfc356020dfc9a8bae03978477b15be61b062e"},
- {file = "mypy-1.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:93a85495fb13dc484251b4c1fd7a5ac370cd0d812bbfc3b39c1bafefe95275d5"},
- {file = "mypy-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f546ac34093c6ce33f6278f7c88f0f147a4849386d3bf3ae193702f4fe31407"},
- {file = "mypy-1.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c6c2ccb7af7154673c591189c3687b013122c5a891bb5651eca3db8e6c6c55bd"},
- {file = "mypy-1.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:15b5a824b58c7c822c51bc66308e759243c32631896743f030daf449fe3677f3"},
- {file = "mypy-1.0.1-py3-none-any.whl", hash = "sha256:eda5c8b9949ed411ff752b9a01adda31afe7eae1e53e946dbdf9db23865e66c4"},
- {file = "mypy-1.0.1.tar.gz", hash = "sha256:28cea5a6392bb43d266782983b5a4216c25544cd7d80be681a155ddcdafd152d"},
+ {file = "mypy-1.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6607e0f1dd1fb7f0aca14d936d13fd19eba5e17e1cd2a14f808fa5f8f6d8f60a"},
+ {file = "mypy-1.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8a21be69bd26fa81b1f80a61ee7ab05b076c674d9b18fb56239d72e21d9f4c80"},
+ {file = "mypy-1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7b2353a44d2179846a096e25691d54d59904559f4232519d420d64da6828a3a7"},
+ {file = "mypy-1.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0730d1c6a2739d4511dc4253f8274cdd140c55c32dfb0a4cf8b7a43f40abfa6f"},
+ {file = "mypy-1.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:c5fc54dbb712ff5e5a0fca797e6e0aa25726c7e72c6a5850cfd2adbc1eb0a372"},
+ {file = "mypy-1.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:581665e6f3a8a9078f28d5502f4c334c0c8d802ef55ea0e7276a6e409bc0d82d"},
+ {file = "mypy-1.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3ddb5b9bf82e05cc9a627e84707b528e5c7caaa1c55c69e175abb15a761cec2d"},
+ {file = "mypy-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20c7ee0bc0d5a9595c46f38beb04201f2620065a93755704e141fcac9f59db2b"},
+ {file = "mypy-1.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3790ded76f0b34bc9c8ba4def8f919dd6a46db0f5a6610fb994fe8efdd447f73"},
+ {file = "mypy-1.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:51f869f4b6b538229c1d1bcc1dd7d119817206e2bc54e8e374b3dfa202defcca"},
+ {file = "mypy-1.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5c7051a3461ae84dfb5dd15eff5094640c61c5f22257c8b766794e6dd85e72d5"},
+ {file = "mypy-1.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:39bb21c69a5d6342f4ce526e4584bc5c197fd20a60d14a8624d8743fffb9472e"},
+ {file = "mypy-1.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:164f28cb9d6367439031f4c81e84d3ccaa1e19232d9d05d37cb0bd880d3f93c2"},
+ {file = "mypy-1.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a4c1bfcdbce96ff5d96fc9b08e3831acb30dc44ab02671eca5953eadad07d6d0"},
+ {file = "mypy-1.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:a0affb3a79a256b4183ba09811e3577c5163ed06685e4d4b46429a271ba174d2"},
+ {file = "mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a7b44178c9760ce1a43f544e595d35ed61ac2c3de306599fa59b38a6048e1aa7"},
+ {file = "mypy-1.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d5092efb8516d08440e36626f0153b5006d4088c1d663d88bf79625af3d1d62"},
+ {file = "mypy-1.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2904956dac40ced10931ac967ae63c5089bd498542194b436eb097a9f77bc8"},
+ {file = "mypy-1.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:7bfd8836970d33c2105562650656b6846149374dc8ed77d98424b40b09340ba7"},
+ {file = "mypy-1.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:9f73dba9ec77acb86457a8fc04b5239822df0c14a082564737833d2963677dbc"},
+ {file = "mypy-1.13.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:100fac22ce82925f676a734af0db922ecfea991e1d7ec0ceb1e115ebe501301a"},
+ {file = "mypy-1.13.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7bcb0bb7f42a978bb323a7c88f1081d1b5dee77ca86f4100735a6f541299d8fb"},
+ {file = "mypy-1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bde31fc887c213e223bbfc34328070996061b0833b0a4cfec53745ed61f3519b"},
+ {file = "mypy-1.13.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:07de989f89786f62b937851295ed62e51774722e5444a27cecca993fc3f9cd74"},
+ {file = "mypy-1.13.0-cp38-cp38-win_amd64.whl", hash = "sha256:4bde84334fbe19bad704b3f5b78c4abd35ff1026f8ba72b29de70dda0916beb6"},
+ {file = "mypy-1.13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0246bcb1b5de7f08f2826451abd947bf656945209b140d16ed317f65a17dc7dc"},
+ {file = "mypy-1.13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7f5b7deae912cf8b77e990b9280f170381fdfbddf61b4ef80927edd813163732"},
+ {file = "mypy-1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7029881ec6ffb8bc233a4fa364736789582c738217b133f1b55967115288a2bc"},
+ {file = "mypy-1.13.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3e38b980e5681f28f033f3be86b099a247b13c491f14bb8b1e1e134d23bb599d"},
+ {file = "mypy-1.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:a6789be98a2017c912ae6ccb77ea553bbaf13d27605d2ca20a76dfbced631b24"},
+ {file = "mypy-1.13.0-py3-none-any.whl", hash = "sha256:9c250883f9fd81d212e0952c92dbfcc96fc237f4b7c92f56ac81fd48460b3e5a"},
+ {file = "mypy-1.13.0.tar.gz", hash = "sha256:0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e"},
]
[package.dependencies]
-mypy-extensions = ">=0.4.3"
+mypy-extensions = ">=1.0.0"
tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
-typing-extensions = ">=3.10"
+typing-extensions = ">=4.6.0"
[package.extras]
dmypy = ["psutil (>=4.0)"]
+faster-cache = ["orjson"]
install-types = ["pip"]
-python2 = ["typed-ast (>=1.4.0,<2)"]
+mypyc = ["setuptools (>=50)"]
reports = ["lxml"]
[[package]]
@@ -427,29 +434,29 @@ six = ">=1.5"
[[package]]
name = "ruff"
-version = "0.5.7"
+version = "0.11.5"
description = "An extremely fast Python linter and code formatter, written in Rust."
optional = false
python-versions = ">=3.7"
files = [
- {file = "ruff-0.5.7-py3-none-linux_armv6l.whl", hash = "sha256:548992d342fc404ee2e15a242cdbea4f8e39a52f2e7752d0e4cbe88d2d2f416a"},
- {file = "ruff-0.5.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:00cc8872331055ee017c4f1071a8a31ca0809ccc0657da1d154a1d2abac5c0be"},
- {file = "ruff-0.5.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:eaf3d86a1fdac1aec8a3417a63587d93f906c678bb9ed0b796da7b59c1114a1e"},
- {file = "ruff-0.5.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a01c34400097b06cf8a6e61b35d6d456d5bd1ae6961542de18ec81eaf33b4cb8"},
- {file = "ruff-0.5.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fcc8054f1a717e2213500edaddcf1dbb0abad40d98e1bd9d0ad364f75c763eea"},
- {file = "ruff-0.5.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f70284e73f36558ef51602254451e50dd6cc479f8b6f8413a95fcb5db4a55fc"},
- {file = "ruff-0.5.7-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:a78ad870ae3c460394fc95437d43deb5c04b5c29297815a2a1de028903f19692"},
- {file = "ruff-0.5.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9ccd078c66a8e419475174bfe60a69adb36ce04f8d4e91b006f1329d5cd44bcf"},
- {file = "ruff-0.5.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7e31c9bad4ebf8fdb77b59cae75814440731060a09a0e0077d559a556453acbb"},
- {file = "ruff-0.5.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d796327eed8e168164346b769dd9a27a70e0298d667b4ecee6877ce8095ec8e"},
- {file = "ruff-0.5.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4a09ea2c3f7778cc635e7f6edf57d566a8ee8f485f3c4454db7771efb692c499"},
- {file = "ruff-0.5.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a36d8dcf55b3a3bc353270d544fb170d75d2dff41eba5df57b4e0b67a95bb64e"},
- {file = "ruff-0.5.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9369c218f789eefbd1b8d82a8cf25017b523ac47d96b2f531eba73770971c9e5"},
- {file = "ruff-0.5.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b88ca3db7eb377eb24fb7c82840546fb7acef75af4a74bd36e9ceb37a890257e"},
- {file = "ruff-0.5.7-py3-none-win32.whl", hash = "sha256:33d61fc0e902198a3e55719f4be6b375b28f860b09c281e4bdbf783c0566576a"},
- {file = "ruff-0.5.7-py3-none-win_amd64.whl", hash = "sha256:083bbcbe6fadb93cd86709037acc510f86eed5a314203079df174c40bbbca6b3"},
- {file = "ruff-0.5.7-py3-none-win_arm64.whl", hash = "sha256:2dca26154ff9571995107221d0aeaad0e75a77b5a682d6236cf89a58c70b76f4"},
- {file = "ruff-0.5.7.tar.gz", hash = "sha256:8dfc0a458797f5d9fb622dd0efc52d796f23f0a1493a9527f4e49a550ae9a7e5"},
+ {file = "ruff-0.11.5-py3-none-linux_armv6l.whl", hash = "sha256:2561294e108eb648e50f210671cc56aee590fb6167b594144401532138c66c7b"},
+ {file = "ruff-0.11.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ac12884b9e005c12d0bd121f56ccf8033e1614f736f766c118ad60780882a077"},
+ {file = "ruff-0.11.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:4bfd80a6ec559a5eeb96c33f832418bf0fb96752de0539905cf7b0cc1d31d779"},
+ {file = "ruff-0.11.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0947c0a1afa75dcb5db4b34b070ec2bccee869d40e6cc8ab25aca11a7d527794"},
+ {file = "ruff-0.11.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ad871ff74b5ec9caa66cb725b85d4ef89b53f8170f47c3406e32ef040400b038"},
+ {file = "ruff-0.11.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e6cf918390cfe46d240732d4d72fa6e18e528ca1f60e318a10835cf2fa3dc19f"},
+ {file = "ruff-0.11.5-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:56145ee1478582f61c08f21076dc59153310d606ad663acc00ea3ab5b2125f82"},
+ {file = "ruff-0.11.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e5f66f8f1e8c9fc594cbd66fbc5f246a8d91f916cb9667e80208663ec3728304"},
+ {file = "ruff-0.11.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80b4df4d335a80315ab9afc81ed1cff62be112bd165e162b5eed8ac55bfc8470"},
+ {file = "ruff-0.11.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3068befab73620b8a0cc2431bd46b3cd619bc17d6f7695a3e1bb166b652c382a"},
+ {file = "ruff-0.11.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f5da2e710a9641828e09aa98b92c9ebbc60518fdf3921241326ca3e8f8e55b8b"},
+ {file = "ruff-0.11.5-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:ef39f19cb8ec98cbc762344921e216f3857a06c47412030374fffd413fb8fd3a"},
+ {file = "ruff-0.11.5-py3-none-musllinux_1_2_i686.whl", hash = "sha256:b2a7cedf47244f431fd11aa5a7e2806dda2e0c365873bda7834e8f7d785ae159"},
+ {file = "ruff-0.11.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:81be52e7519f3d1a0beadcf8e974715b2dfc808ae8ec729ecfc79bddf8dbb783"},
+ {file = "ruff-0.11.5-py3-none-win32.whl", hash = "sha256:e268da7b40f56e3eca571508a7e567e794f9bfcc0f412c4b607931d3af9c4afe"},
+ {file = "ruff-0.11.5-py3-none-win_amd64.whl", hash = "sha256:6c6dc38af3cfe2863213ea25b6dc616d679205732dc0fb673356c2d69608f800"},
+ {file = "ruff-0.11.5-py3-none-win_arm64.whl", hash = "sha256:67e241b4314f4eacf14a601d586026a962f4002a475aa702c69980a38087aa4e"},
+ {file = "ruff-0.11.5.tar.gz", hash = "sha256:cae2e2439cb88853e421901ec040a758960b576126dab520fa08e9de431d1bef"},
]
[[package]]
@@ -540,4 +547,4 @@ files = [
[metadata]
lock-version = "2.0"
python-versions = "^3.8"
-content-hash = "6f6c191c1028d17a97fdfa84cedfd3cef94b5d63d98b8c1d333b3398eeea9055"
+content-hash = "8551b871abee465e23fb0966d51f2c155fd257b55bdcb0c02d095de19f92f358"
diff --git a/pyproject.toml b/pyproject.toml
index 00a7351..cc0ce3c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.7"
+version = "1.8.8"
description = ""
readme = "README.md"
authors = []
@@ -37,16 +37,16 @@ Repository = 'https://github.com/flagright/flagright-python'
python = "^3.8"
httpx = ">=0.21.2"
pydantic = ">= 1.9.2"
-pydantic-core = "^2.18.2"
+pydantic-core = ">=2.18.2"
typing_extensions = ">= 4.0.0"
-[tool.poetry.dev-dependencies]
-mypy = "1.0.1"
+[tool.poetry.group.dev.dependencies]
+mypy = "==1.13.0"
pytest = "^7.4.0"
pytest-asyncio = "^0.23.5"
python-dateutil = "^2.9.0"
types-python-dateutil = "^2.9.0.20240316"
-ruff = "^0.5.6"
+ruff = "==0.11.5"
[tool.pytest.ini_options]
testpaths = [ "tests" ]
@@ -58,6 +58,26 @@ plugins = ["pydantic.mypy"]
[tool.ruff]
line-length = 120
+[tool.ruff.lint]
+select = [
+ "E", # pycodestyle errors
+ "F", # pyflakes
+ "I", # isort
+]
+ignore = [
+ "E402", # Module level import not at top of file
+ "E501", # Line too long
+ "E711", # Comparison to `None` should be `cond is not None`
+ "E712", # Avoid equality comparisons to `True`; use `if ...:` checks
+ "E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for insinstance checks
+ "E722", # Do not use bare `except`
+ "E731", # Do not assign a `lambda` expression, use a `def`
+ "F821", # Undefined name
+ "F841" # Local variable ... is assigned to but never used
+]
+
+[tool.ruff.lint.isort]
+section-order = ["future", "standard-library", "third-party", "first-party"]
[build-system]
requires = ["poetry-core"]
diff --git a/reference.md b/reference.md
index f2c1694..f2ca804 100644
--- a/reference.md
+++ b/reference.md
@@ -60,6 +60,8 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.transactions.verify(
+ validate_origin_user_id="true",
+ validate_destination_user_id="true",
type="DEPOSIT",
transaction_id="7b80a539eea6e78acbd6d458e5971482",
timestamp=1641654664000.0,
@@ -411,6 +413,8 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.batch.verify_transaction(
+ validate_origin_user_id="true",
+ validate_destination_user_id="true",
data=[
Transaction(
type="type",
@@ -498,6 +502,8 @@ client = Flagright(
)
client.batch.get(
batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
)
```
@@ -639,6 +645,8 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.batch.create_consumer_users(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
data=[
User(
user_id="userId",
@@ -724,6 +732,8 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.batch.create_business_users(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
data=[
Business(
user_id="userId",
@@ -816,6 +826,8 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.batch.create_consumer_user_events(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
data=[
ConsumerUserEvent(
timestamp=1.1,
@@ -901,6 +913,8 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.batch.create_business_user_events(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
data=[
BusinessUserEvent(
timestamp=1.1,
@@ -1260,6 +1274,9 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.consumer_users.create(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
+ validate_user_id="true",
user_id="96647cfd9e8fe66ee0f3362e011e34e8",
created_timestamp=1641654664000.0,
user_details=UserDetails(
@@ -1726,6 +1743,9 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.business_users.create(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
+ validate_user_id="true",
user_id="userId",
created_timestamp=1.1,
legal_entity=LegalEntity(
@@ -2081,6 +2101,9 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.consumer_user_events.create(
+ allow_user_type_conversion="true",
+ lock_kyc_risk_level="true",
+ lock_cra_risk_level="true",
timestamp=1.1,
user_id="userId",
)
@@ -2314,6 +2337,9 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.business_user_events.create(
+ allow_user_type_conversion="true",
+ lock_kyc_risk_level="true",
+ lock_cra_risk_level="true",
timestamp=1.1,
user_id="userId",
)
diff --git a/requirements.txt b/requirements.txt
index f502f1b..e80f640 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
httpx>=0.21.2
pydantic>= 1.9.2
-pydantic-core==^2.18.2
+pydantic-core>=2.18.2
typing_extensions>= 4.0.0
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 6999ae8..44513d8 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -1,369 +1,764 @@
# This file was auto-generated by Fern from our API Definition.
-from .types import (
- AchDetails,
- AchPaymentMethod,
- AcquisitionChannel,
- Address,
- AdverseMediaStatus,
- AlertOpenedDetails,
- AlertStatusDetails,
- Amount,
- ApiErrorResponse,
- BatchBusinessUserEventWithRulesResult,
- BatchBusinessUserEventsWithRulesResult,
- BatchBusinessUserWithRulesResult,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet,
- BatchBusinessUsersWithRulesResults,
- BatchConsumerUserEventWithRulesResult,
- BatchConsumerUserEventsRulesResult,
- BatchConsumerUserWithRulesResult,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet,
- BatchConsumerUsersWithRulesResult,
- BatchResponse,
- BatchResponseFailedRecord,
- BatchResponseStatus,
- BatchTransactionEventMonitoringResult,
- BatchTransactionEventMonitoringResults,
- BatchTransactionMonitoringResult,
- BatchTransactionMonitoringResults,
- BatchUserRulesResult,
- BooleanString,
- Business,
- BusinessBase,
- BusinessOptional,
- BusinessOptionalSavedPaymentDetailsItem,
- BusinessOptionalSavedPaymentDetailsItem_Ach,
- BusinessOptionalSavedPaymentDetailsItem_Card,
- BusinessOptionalSavedPaymentDetailsItem_Cash,
- BusinessOptionalSavedPaymentDetailsItem_Check,
- BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount,
- BusinessOptionalSavedPaymentDetailsItem_Iban,
- BusinessOptionalSavedPaymentDetailsItem_Mpesa,
- BusinessOptionalSavedPaymentDetailsItem_Npp,
- BusinessOptionalSavedPaymentDetailsItem_Swift,
- BusinessOptionalSavedPaymentDetailsItem_Upi,
- BusinessOptionalSavedPaymentDetailsItem_Wallet,
- BusinessSavedPaymentDetailsItem,
- BusinessSavedPaymentDetailsItem_Ach,
- BusinessSavedPaymentDetailsItem_Card,
- BusinessSavedPaymentDetailsItem_Cash,
- BusinessSavedPaymentDetailsItem_Check,
- BusinessSavedPaymentDetailsItem_GenericBankAccount,
- BusinessSavedPaymentDetailsItem_Iban,
- BusinessSavedPaymentDetailsItem_Mpesa,
- BusinessSavedPaymentDetailsItem_Npp,
- BusinessSavedPaymentDetailsItem_Swift,
- BusinessSavedPaymentDetailsItem_Upi,
- BusinessSavedPaymentDetailsItem_Wallet,
- BusinessUserEvent,
- BusinessUserEventWithRulesResult,
- BusinessUserMonitoringResult,
- BusinessUserSegment,
- BusinessWithRulesResult,
- BusinessWithRulesResultSavedPaymentDetailsItem,
- BusinessWithRulesResultSavedPaymentDetailsItem_Ach,
- BusinessWithRulesResultSavedPaymentDetailsItem_Card,
- BusinessWithRulesResultSavedPaymentDetailsItem_Cash,
- BusinessWithRulesResultSavedPaymentDetailsItem_Check,
- BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
- BusinessWithRulesResultSavedPaymentDetailsItem_Iban,
- BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa,
- BusinessWithRulesResultSavedPaymentDetailsItem_Npp,
- BusinessWithRulesResultSavedPaymentDetailsItem_Swift,
- BusinessWithRulesResultSavedPaymentDetailsItem_Upi,
- BusinessWithRulesResultSavedPaymentDetailsItem_Wallet,
- CardBrand,
- CardDetails,
- CardExpiry,
- CardFunding,
- CardMerchantDetails,
- CardPaymentMethod,
- CardStatus,
- CardType,
- CaseManagementEvent,
- CaseManagementEventCaseStatus,
- CaseManagementEventCaseStatusReason,
- CaseOpenedDetails,
- CaseStatusDetails,
- CashDetails,
- CashPaymentMethod,
- CheckDeliveryStatus,
- CheckDetails,
- CheckPaymentMethod,
- ColumnType,
- CompanyFinancialDetails,
- CompanyGeneralDetails,
- CompanyRegistrationDetails,
- ConsumerName,
- ConsumerUserEvent,
- ConsumerUserEventWithRulesResult,
- ConsumerUserMonitoringResult,
- ConsumerUserSegment,
- ContactDetails,
- CountryCode,
- CraRiskLevelUpdatedDetails,
- CurrencyCode,
- CustomColumn,
- Date,
- DeviceData,
- EmailId,
- EmploymentDetails,
- EmploymentStatus,
- ExecutedLogicVars,
- ExecutedRulesResult,
- ExpectedIncome,
- FailedRulesResult,
- FalsePositiveDetails,
- FileInfo,
- Gender,
- GeneralBankAccountPaymentMethod,
- GenericBankAccountDetails,
- HitRulesDetails,
- HitRulesResults,
- IbanDetails,
- IbanPaymentMethod,
- KycStatus,
- KycStatusDetails,
- LegalDocument,
- LegalEntity,
- ListData,
- ListExisted,
- ListHeader,
- ListItem,
- ListKeyMetadata,
- ListMetadata,
- ListMetadataTtl,
- ListMetadataTtlUnit,
- ListSubtype,
- ListType,
- ListUpdatedDetails,
- ListUpdatedDetailsAction,
- MaritalStatus,
- MccDetails,
- MpesaDetails,
- MpesaPaymentMethod,
- MpesaTransactionType,
- NppDetails,
- NppPaymentMethod,
- OriginFundsInfo,
- Page,
- PageSize,
- PaymentMethod,
- PepRank,
- PepStatus,
- Person,
- PersonAttachment,
- PlaceOfBirth,
- PosDetails,
- PosEntryMode,
- RiskLevel,
- RuleAction,
- RuleFailureException,
- RuleHitDirection,
- RuleHitMeta,
- RuleLabels,
- RuleNature,
- RulesResults,
- SanctionsDetails,
- SanctionsDetailsEntityType,
- SanctionsHitContext,
- SanctionsScreeningEntity,
- SanctionsStatus,
- SourceOfFunds,
- SwiftDetails,
- SwiftPaymentMethod,
- Tag,
- Transaction,
- TransactionAmountDetails,
- TransactionAmountLimit,
- TransactionBase,
- TransactionCountLimit,
- TransactionDestinationPaymentDetails,
- TransactionDestinationPaymentDetails_Ach,
- TransactionDestinationPaymentDetails_Card,
- TransactionDestinationPaymentDetails_Cash,
- TransactionDestinationPaymentDetails_Check,
- TransactionDestinationPaymentDetails_GenericBankAccount,
- TransactionDestinationPaymentDetails_Iban,
- TransactionDestinationPaymentDetails_Mpesa,
- TransactionDestinationPaymentDetails_Npp,
- TransactionDestinationPaymentDetails_Swift,
- TransactionDestinationPaymentDetails_Upi,
- TransactionDestinationPaymentDetails_Wallet,
- TransactionEvent,
- TransactionEventMonitoringResult,
- TransactionEventWithRulesResult,
- TransactionLimit,
- TransactionLimits,
- TransactionLimitsPaymentMethodLimits,
- TransactionMonitoringResult,
- TransactionOriginPaymentDetails,
- TransactionOriginPaymentDetails_Ach,
- TransactionOriginPaymentDetails_Card,
- TransactionOriginPaymentDetails_Cash,
- TransactionOriginPaymentDetails_Check,
- TransactionOriginPaymentDetails_GenericBankAccount,
- TransactionOriginPaymentDetails_Iban,
- TransactionOriginPaymentDetails_Mpesa,
- TransactionOriginPaymentDetails_Npp,
- TransactionOriginPaymentDetails_Swift,
- TransactionOriginPaymentDetails_Upi,
- TransactionOriginPaymentDetails_Wallet,
- TransactionRiskScoringResult,
- TransactionState,
- TransactionStatusDetails,
- TransactionUpdatable,
- TransactionUpdatableDestinationPaymentDetails,
- TransactionUpdatableDestinationPaymentDetails_Ach,
- TransactionUpdatableDestinationPaymentDetails_Card,
- TransactionUpdatableDestinationPaymentDetails_Cash,
- TransactionUpdatableDestinationPaymentDetails_Check,
- TransactionUpdatableDestinationPaymentDetails_GenericBankAccount,
- TransactionUpdatableDestinationPaymentDetails_Iban,
- TransactionUpdatableDestinationPaymentDetails_Mpesa,
- TransactionUpdatableDestinationPaymentDetails_Npp,
- TransactionUpdatableDestinationPaymentDetails_Swift,
- TransactionUpdatableDestinationPaymentDetails_Upi,
- TransactionUpdatableDestinationPaymentDetails_Wallet,
- TransactionUpdatableOriginPaymentDetails,
- TransactionUpdatableOriginPaymentDetails_Ach,
- TransactionUpdatableOriginPaymentDetails_Card,
- TransactionUpdatableOriginPaymentDetails_Cash,
- TransactionUpdatableOriginPaymentDetails_Check,
- TransactionUpdatableOriginPaymentDetails_GenericBankAccount,
- TransactionUpdatableOriginPaymentDetails_Iban,
- TransactionUpdatableOriginPaymentDetails_Mpesa,
- TransactionUpdatableOriginPaymentDetails_Npp,
- TransactionUpdatableOriginPaymentDetails_Swift,
- TransactionUpdatableOriginPaymentDetails_Upi,
- TransactionUpdatableOriginPaymentDetails_Wallet,
- TransactionWithRulesResult,
- TransactionWithRulesResultDestinationPaymentDetails,
- TransactionWithRulesResultDestinationPaymentDetails_Ach,
- TransactionWithRulesResultDestinationPaymentDetails_Card,
- TransactionWithRulesResultDestinationPaymentDetails_Cash,
- TransactionWithRulesResultDestinationPaymentDetails_Check,
- TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount,
- TransactionWithRulesResultDestinationPaymentDetails_Iban,
- TransactionWithRulesResultDestinationPaymentDetails_Mpesa,
- TransactionWithRulesResultDestinationPaymentDetails_Npp,
- TransactionWithRulesResultDestinationPaymentDetails_Swift,
- TransactionWithRulesResultDestinationPaymentDetails_Upi,
- TransactionWithRulesResultDestinationPaymentDetails_Wallet,
- TransactionWithRulesResultOriginPaymentDetails,
- TransactionWithRulesResultOriginPaymentDetails_Ach,
- TransactionWithRulesResultOriginPaymentDetails_Card,
- TransactionWithRulesResultOriginPaymentDetails_Cash,
- TransactionWithRulesResultOriginPaymentDetails_Check,
- TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount,
- TransactionWithRulesResultOriginPaymentDetails_Iban,
- TransactionWithRulesResultOriginPaymentDetails_Mpesa,
- TransactionWithRulesResultOriginPaymentDetails_Npp,
- TransactionWithRulesResultOriginPaymentDetails_Swift,
- TransactionWithRulesResultOriginPaymentDetails_Upi,
- TransactionWithRulesResultOriginPaymentDetails_Wallet,
- UpiDetails,
- UpiPaymentMethod,
- User,
- UserBase,
- UserDetails,
- UserEntityLink,
- UserOptional,
- UserOptionalSavedPaymentDetailsItem,
- UserOptionalSavedPaymentDetailsItem_Ach,
- UserOptionalSavedPaymentDetailsItem_Card,
- UserOptionalSavedPaymentDetailsItem_Cash,
- UserOptionalSavedPaymentDetailsItem_Check,
- UserOptionalSavedPaymentDetailsItem_GenericBankAccount,
- UserOptionalSavedPaymentDetailsItem_Iban,
- UserOptionalSavedPaymentDetailsItem_Mpesa,
- UserOptionalSavedPaymentDetailsItem_Npp,
- UserOptionalSavedPaymentDetailsItem_Swift,
- UserOptionalSavedPaymentDetailsItem_Upi,
- UserOptionalSavedPaymentDetailsItem_Wallet,
- UserRegistrationStatus,
- UserRiskScoreDetails,
- UserRulesResult,
- UserSavedPaymentDetailsItem,
- UserSavedPaymentDetailsItem_Ach,
- UserSavedPaymentDetailsItem_Card,
- UserSavedPaymentDetailsItem_Cash,
- UserSavedPaymentDetailsItem_Check,
- UserSavedPaymentDetailsItem_GenericBankAccount,
- UserSavedPaymentDetailsItem_Iban,
- UserSavedPaymentDetailsItem_Mpesa,
- UserSavedPaymentDetailsItem_Npp,
- UserSavedPaymentDetailsItem_Swift,
- UserSavedPaymentDetailsItem_Upi,
- UserSavedPaymentDetailsItem_Wallet,
- UserState,
- UserStateDetails,
- UserTag,
- UserTagsUpdate,
- UserWithRulesResult,
- UserWithRulesResultSavedPaymentDetailsItem,
- UserWithRulesResultSavedPaymentDetailsItem_Ach,
- UserWithRulesResultSavedPaymentDetailsItem_Card,
- UserWithRulesResultSavedPaymentDetailsItem_Cash,
- UserWithRulesResultSavedPaymentDetailsItem_Check,
- UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
- UserWithRulesResultSavedPaymentDetailsItem_Iban,
- UserWithRulesResultSavedPaymentDetailsItem_Mpesa,
- UserWithRulesResultSavedPaymentDetailsItem_Npp,
- UserWithRulesResultSavedPaymentDetailsItem_Swift,
- UserWithRulesResultSavedPaymentDetailsItem_Upi,
- UserWithRulesResultSavedPaymentDetailsItem_Wallet,
- WalletDetails,
- WalletNetwork,
- WalletPaymentMethod,
- WebhookEvent,
- WebhookEventBase,
- WebhookEventBaseTriggeredBy,
- WebhookEventData,
- WebhookEventTriggeredBy,
- WebhookEventType,
- WebhookKycStatusDetails,
- WebhookUserStateDetails,
-)
-from .errors import BadRequestError, ConflictError, NotFoundError, TooManyRequestsError, UnauthorizedError
-from . import (
- batch,
- business_user_events,
- business_users,
- consumer_user_events,
- consumer_users,
- transaction_events,
- transactions,
-)
-from .business_users import BusinessUsersCreateResponse
-from .client import AsyncFlagright, Flagright
-from .consumer_users import ConsumerUsersCreateResponse
-from .environment import FlagrightEnvironment
-from .transactions import TransactionsVerifyResponse
-from .version import __version__
+# isort: skip_file
+
+import typing
+from importlib import import_module
+
+if typing.TYPE_CHECKING:
+ from .types import (
+ AchDetails,
+ AchPaymentMethod,
+ AcquisitionChannel,
+ Address,
+ AdverseMediaStatus,
+ AlertOpenedDetails,
+ AlertStatusDetails,
+ Amount,
+ ApiErrorResponse,
+ BatchBusinessUserEventWithRulesResult,
+ BatchBusinessUserEventsWithRulesResult,
+ BatchBusinessUserWithRulesResult,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet,
+ BatchBusinessUsersWithRulesResults,
+ BatchConsumerUserEventWithRulesResult,
+ BatchConsumerUserEventsRulesResult,
+ BatchConsumerUserWithRulesResult,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet,
+ BatchConsumerUsersWithRulesResult,
+ BatchResponse,
+ BatchResponseFailedRecord,
+ BatchResponseStatus,
+ BatchTransactionEventMonitoringResult,
+ BatchTransactionEventMonitoringResults,
+ BatchTransactionMonitoringResult,
+ BatchTransactionMonitoringResults,
+ BatchUserRulesResult,
+ BooleanString,
+ Business,
+ BusinessBase,
+ BusinessOptional,
+ BusinessOptionalSavedPaymentDetailsItem,
+ BusinessOptionalSavedPaymentDetailsItem_Ach,
+ BusinessOptionalSavedPaymentDetailsItem_Card,
+ BusinessOptionalSavedPaymentDetailsItem_Cash,
+ BusinessOptionalSavedPaymentDetailsItem_Check,
+ BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount,
+ BusinessOptionalSavedPaymentDetailsItem_Iban,
+ BusinessOptionalSavedPaymentDetailsItem_Mpesa,
+ BusinessOptionalSavedPaymentDetailsItem_Npp,
+ BusinessOptionalSavedPaymentDetailsItem_Swift,
+ BusinessOptionalSavedPaymentDetailsItem_Upi,
+ BusinessOptionalSavedPaymentDetailsItem_Wallet,
+ BusinessSavedPaymentDetailsItem,
+ BusinessSavedPaymentDetailsItem_Ach,
+ BusinessSavedPaymentDetailsItem_Card,
+ BusinessSavedPaymentDetailsItem_Cash,
+ BusinessSavedPaymentDetailsItem_Check,
+ BusinessSavedPaymentDetailsItem_GenericBankAccount,
+ BusinessSavedPaymentDetailsItem_Iban,
+ BusinessSavedPaymentDetailsItem_Mpesa,
+ BusinessSavedPaymentDetailsItem_Npp,
+ BusinessSavedPaymentDetailsItem_Swift,
+ BusinessSavedPaymentDetailsItem_Upi,
+ BusinessSavedPaymentDetailsItem_Wallet,
+ BusinessUserEvent,
+ BusinessUserEventWithRulesResult,
+ BusinessUserMonitoringResult,
+ BusinessUserSegment,
+ BusinessWithRulesResult,
+ BusinessWithRulesResultSavedPaymentDetailsItem,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Ach,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Card,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Cash,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Check,
+ BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Iban,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Npp,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Swift,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Upi,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Wallet,
+ CardBrand,
+ CardDetails,
+ CardExpiry,
+ CardFunding,
+ CardMerchantDetails,
+ CardPaymentMethod,
+ CardStatus,
+ CardType,
+ CaseManagementEvent,
+ CaseManagementEventCaseStatus,
+ CaseManagementEventCaseStatusReason,
+ CaseOpenedDetails,
+ CaseStatusDetails,
+ CashDetails,
+ CashPaymentMethod,
+ CheckDeliveryStatus,
+ CheckDetails,
+ CheckPaymentMethod,
+ ColumnType,
+ CompanyFinancialDetails,
+ CompanyGeneralDetails,
+ CompanyRegistrationDetails,
+ ConsumerName,
+ ConsumerUserEvent,
+ ConsumerUserEventWithRulesResult,
+ ConsumerUserMonitoringResult,
+ ConsumerUserSegment,
+ ContactDetails,
+ CountryCode,
+ CraRiskLevelUpdatedDetails,
+ CurrencyCode,
+ CustomColumn,
+ Date,
+ DeviceData,
+ EmailId,
+ EmploymentDetails,
+ EmploymentStatus,
+ ExecutedLogicVars,
+ ExecutedRulesResult,
+ ExpectedIncome,
+ FailedRulesResult,
+ FalsePositiveDetails,
+ FileInfo,
+ Gender,
+ GeneralBankAccountPaymentMethod,
+ GenericBankAccountDetails,
+ HitRulesDetails,
+ HitRulesResults,
+ IbanDetails,
+ IbanPaymentMethod,
+ KycStatus,
+ KycStatusDetails,
+ LegalDocument,
+ LegalEntity,
+ ListData,
+ ListExisted,
+ ListHeader,
+ ListItem,
+ ListKeyMetadata,
+ ListMetadata,
+ ListMetadataTtl,
+ ListMetadataTtlUnit,
+ ListSubtype,
+ ListType,
+ ListUpdatedDetails,
+ ListUpdatedDetailsAction,
+ MaritalStatus,
+ MccDetails,
+ MpesaDetails,
+ MpesaPaymentMethod,
+ MpesaTransactionType,
+ NppDetails,
+ NppPaymentMethod,
+ OriginFundsInfo,
+ Page,
+ PageSize,
+ PaymentMethod,
+ PepRank,
+ PepStatus,
+ Person,
+ PersonAttachment,
+ PlaceOfBirth,
+ PosDetails,
+ PosEntryMode,
+ RiskLevel,
+ RuleAction,
+ RuleFailureException,
+ RuleHitDirection,
+ RuleHitMeta,
+ RuleLabels,
+ RuleNature,
+ RulesResults,
+ SanctionsDetails,
+ SanctionsDetailsEntityType,
+ SanctionsHitContext,
+ SanctionsScreeningEntity,
+ SanctionsStatus,
+ SourceOfFunds,
+ SwiftDetails,
+ SwiftPaymentMethod,
+ Tag,
+ Transaction,
+ TransactionAmountDetails,
+ TransactionAmountLimit,
+ TransactionBase,
+ TransactionCountLimit,
+ TransactionDestinationPaymentDetails,
+ TransactionDestinationPaymentDetails_Ach,
+ TransactionDestinationPaymentDetails_Card,
+ TransactionDestinationPaymentDetails_Cash,
+ TransactionDestinationPaymentDetails_Check,
+ TransactionDestinationPaymentDetails_GenericBankAccount,
+ TransactionDestinationPaymentDetails_Iban,
+ TransactionDestinationPaymentDetails_Mpesa,
+ TransactionDestinationPaymentDetails_Npp,
+ TransactionDestinationPaymentDetails_Swift,
+ TransactionDestinationPaymentDetails_Upi,
+ TransactionDestinationPaymentDetails_Wallet,
+ TransactionEvent,
+ TransactionEventMonitoringResult,
+ TransactionEventWithRulesResult,
+ TransactionLimit,
+ TransactionLimits,
+ TransactionLimitsPaymentMethodLimits,
+ TransactionMonitoringResult,
+ TransactionOriginPaymentDetails,
+ TransactionOriginPaymentDetails_Ach,
+ TransactionOriginPaymentDetails_Card,
+ TransactionOriginPaymentDetails_Cash,
+ TransactionOriginPaymentDetails_Check,
+ TransactionOriginPaymentDetails_GenericBankAccount,
+ TransactionOriginPaymentDetails_Iban,
+ TransactionOriginPaymentDetails_Mpesa,
+ TransactionOriginPaymentDetails_Npp,
+ TransactionOriginPaymentDetails_Swift,
+ TransactionOriginPaymentDetails_Upi,
+ TransactionOriginPaymentDetails_Wallet,
+ TransactionRiskScoringResult,
+ TransactionState,
+ TransactionStatusDetails,
+ TransactionUpdatable,
+ TransactionUpdatableDestinationPaymentDetails,
+ TransactionUpdatableDestinationPaymentDetails_Ach,
+ TransactionUpdatableDestinationPaymentDetails_Card,
+ TransactionUpdatableDestinationPaymentDetails_Cash,
+ TransactionUpdatableDestinationPaymentDetails_Check,
+ TransactionUpdatableDestinationPaymentDetails_GenericBankAccount,
+ TransactionUpdatableDestinationPaymentDetails_Iban,
+ TransactionUpdatableDestinationPaymentDetails_Mpesa,
+ TransactionUpdatableDestinationPaymentDetails_Npp,
+ TransactionUpdatableDestinationPaymentDetails_Swift,
+ TransactionUpdatableDestinationPaymentDetails_Upi,
+ TransactionUpdatableDestinationPaymentDetails_Wallet,
+ TransactionUpdatableOriginPaymentDetails,
+ TransactionUpdatableOriginPaymentDetails_Ach,
+ TransactionUpdatableOriginPaymentDetails_Card,
+ TransactionUpdatableOriginPaymentDetails_Cash,
+ TransactionUpdatableOriginPaymentDetails_Check,
+ TransactionUpdatableOriginPaymentDetails_GenericBankAccount,
+ TransactionUpdatableOriginPaymentDetails_Iban,
+ TransactionUpdatableOriginPaymentDetails_Mpesa,
+ TransactionUpdatableOriginPaymentDetails_Npp,
+ TransactionUpdatableOriginPaymentDetails_Swift,
+ TransactionUpdatableOriginPaymentDetails_Upi,
+ TransactionUpdatableOriginPaymentDetails_Wallet,
+ TransactionWithRulesResult,
+ TransactionWithRulesResultDestinationPaymentDetails,
+ TransactionWithRulesResultDestinationPaymentDetails_Ach,
+ TransactionWithRulesResultDestinationPaymentDetails_Card,
+ TransactionWithRulesResultDestinationPaymentDetails_Cash,
+ TransactionWithRulesResultDestinationPaymentDetails_Check,
+ TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount,
+ TransactionWithRulesResultDestinationPaymentDetails_Iban,
+ TransactionWithRulesResultDestinationPaymentDetails_Mpesa,
+ TransactionWithRulesResultDestinationPaymentDetails_Npp,
+ TransactionWithRulesResultDestinationPaymentDetails_Swift,
+ TransactionWithRulesResultDestinationPaymentDetails_Upi,
+ TransactionWithRulesResultDestinationPaymentDetails_Wallet,
+ TransactionWithRulesResultOriginPaymentDetails,
+ TransactionWithRulesResultOriginPaymentDetails_Ach,
+ TransactionWithRulesResultOriginPaymentDetails_Card,
+ TransactionWithRulesResultOriginPaymentDetails_Cash,
+ TransactionWithRulesResultOriginPaymentDetails_Check,
+ TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount,
+ TransactionWithRulesResultOriginPaymentDetails_Iban,
+ TransactionWithRulesResultOriginPaymentDetails_Mpesa,
+ TransactionWithRulesResultOriginPaymentDetails_Npp,
+ TransactionWithRulesResultOriginPaymentDetails_Swift,
+ TransactionWithRulesResultOriginPaymentDetails_Upi,
+ TransactionWithRulesResultOriginPaymentDetails_Wallet,
+ UpiDetails,
+ UpiPaymentMethod,
+ User,
+ UserBase,
+ UserDetails,
+ UserEntityLink,
+ UserOptional,
+ UserOptionalSavedPaymentDetailsItem,
+ UserOptionalSavedPaymentDetailsItem_Ach,
+ UserOptionalSavedPaymentDetailsItem_Card,
+ UserOptionalSavedPaymentDetailsItem_Cash,
+ UserOptionalSavedPaymentDetailsItem_Check,
+ UserOptionalSavedPaymentDetailsItem_GenericBankAccount,
+ UserOptionalSavedPaymentDetailsItem_Iban,
+ UserOptionalSavedPaymentDetailsItem_Mpesa,
+ UserOptionalSavedPaymentDetailsItem_Npp,
+ UserOptionalSavedPaymentDetailsItem_Swift,
+ UserOptionalSavedPaymentDetailsItem_Upi,
+ UserOptionalSavedPaymentDetailsItem_Wallet,
+ UserRegistrationStatus,
+ UserRiskScoreDetails,
+ UserRulesResult,
+ UserSavedPaymentDetailsItem,
+ UserSavedPaymentDetailsItem_Ach,
+ UserSavedPaymentDetailsItem_Card,
+ UserSavedPaymentDetailsItem_Cash,
+ UserSavedPaymentDetailsItem_Check,
+ UserSavedPaymentDetailsItem_GenericBankAccount,
+ UserSavedPaymentDetailsItem_Iban,
+ UserSavedPaymentDetailsItem_Mpesa,
+ UserSavedPaymentDetailsItem_Npp,
+ UserSavedPaymentDetailsItem_Swift,
+ UserSavedPaymentDetailsItem_Upi,
+ UserSavedPaymentDetailsItem_Wallet,
+ UserState,
+ UserStateDetails,
+ UserTag,
+ UserTagsUpdate,
+ UserWithRulesResult,
+ UserWithRulesResultSavedPaymentDetailsItem,
+ UserWithRulesResultSavedPaymentDetailsItem_Ach,
+ UserWithRulesResultSavedPaymentDetailsItem_Card,
+ UserWithRulesResultSavedPaymentDetailsItem_Cash,
+ UserWithRulesResultSavedPaymentDetailsItem_Check,
+ UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ UserWithRulesResultSavedPaymentDetailsItem_Iban,
+ UserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ UserWithRulesResultSavedPaymentDetailsItem_Npp,
+ UserWithRulesResultSavedPaymentDetailsItem_Swift,
+ UserWithRulesResultSavedPaymentDetailsItem_Upi,
+ UserWithRulesResultSavedPaymentDetailsItem_Wallet,
+ WalletDetails,
+ WalletNetwork,
+ WalletPaymentMethod,
+ WebhookEvent,
+ WebhookEventBase,
+ WebhookEventBaseTriggeredBy,
+ WebhookEventData,
+ WebhookEventTriggeredBy,
+ WebhookEventType,
+ WebhookKycStatusDetails,
+ WebhookUserStateDetails,
+ )
+ from .errors import BadRequestError, ConflictError, NotFoundError, TooManyRequestsError, UnauthorizedError
+ from . import (
+ batch,
+ business_user_events,
+ business_users,
+ consumer_user_events,
+ consumer_users,
+ transaction_events,
+ transactions,
+ )
+ from .business_users import BusinessUsersCreateResponse
+ from .client import AsyncFlagright, Flagright
+ from .consumer_users import ConsumerUsersCreateResponse
+ from .environment import FlagrightEnvironment
+ from .transactions import TransactionsVerifyResponse
+ from .version import __version__
+_dynamic_imports: typing.Dict[str, str] = {
+ "AchDetails": ".types",
+ "AchPaymentMethod": ".types",
+ "AcquisitionChannel": ".types",
+ "Address": ".types",
+ "AdverseMediaStatus": ".types",
+ "AlertOpenedDetails": ".types",
+ "AlertStatusDetails": ".types",
+ "Amount": ".types",
+ "ApiErrorResponse": ".types",
+ "AsyncFlagright": ".client",
+ "BadRequestError": ".errors",
+ "BatchBusinessUserEventWithRulesResult": ".types",
+ "BatchBusinessUserEventsWithRulesResult": ".types",
+ "BatchBusinessUserWithRulesResult": ".types",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem": ".types",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach": ".types",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card": ".types",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash": ".types",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check": ".types",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount": ".types",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban": ".types",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa": ".types",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp": ".types",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift": ".types",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi": ".types",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet": ".types",
+ "BatchBusinessUsersWithRulesResults": ".types",
+ "BatchConsumerUserEventWithRulesResult": ".types",
+ "BatchConsumerUserEventsRulesResult": ".types",
+ "BatchConsumerUserWithRulesResult": ".types",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem": ".types",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach": ".types",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card": ".types",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash": ".types",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check": ".types",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount": ".types",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban": ".types",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa": ".types",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp": ".types",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift": ".types",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi": ".types",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet": ".types",
+ "BatchConsumerUsersWithRulesResult": ".types",
+ "BatchResponse": ".types",
+ "BatchResponseFailedRecord": ".types",
+ "BatchResponseStatus": ".types",
+ "BatchTransactionEventMonitoringResult": ".types",
+ "BatchTransactionEventMonitoringResults": ".types",
+ "BatchTransactionMonitoringResult": ".types",
+ "BatchTransactionMonitoringResults": ".types",
+ "BatchUserRulesResult": ".types",
+ "BooleanString": ".types",
+ "Business": ".types",
+ "BusinessBase": ".types",
+ "BusinessOptional": ".types",
+ "BusinessOptionalSavedPaymentDetailsItem": ".types",
+ "BusinessOptionalSavedPaymentDetailsItem_Ach": ".types",
+ "BusinessOptionalSavedPaymentDetailsItem_Card": ".types",
+ "BusinessOptionalSavedPaymentDetailsItem_Cash": ".types",
+ "BusinessOptionalSavedPaymentDetailsItem_Check": ".types",
+ "BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount": ".types",
+ "BusinessOptionalSavedPaymentDetailsItem_Iban": ".types",
+ "BusinessOptionalSavedPaymentDetailsItem_Mpesa": ".types",
+ "BusinessOptionalSavedPaymentDetailsItem_Npp": ".types",
+ "BusinessOptionalSavedPaymentDetailsItem_Swift": ".types",
+ "BusinessOptionalSavedPaymentDetailsItem_Upi": ".types",
+ "BusinessOptionalSavedPaymentDetailsItem_Wallet": ".types",
+ "BusinessSavedPaymentDetailsItem": ".types",
+ "BusinessSavedPaymentDetailsItem_Ach": ".types",
+ "BusinessSavedPaymentDetailsItem_Card": ".types",
+ "BusinessSavedPaymentDetailsItem_Cash": ".types",
+ "BusinessSavedPaymentDetailsItem_Check": ".types",
+ "BusinessSavedPaymentDetailsItem_GenericBankAccount": ".types",
+ "BusinessSavedPaymentDetailsItem_Iban": ".types",
+ "BusinessSavedPaymentDetailsItem_Mpesa": ".types",
+ "BusinessSavedPaymentDetailsItem_Npp": ".types",
+ "BusinessSavedPaymentDetailsItem_Swift": ".types",
+ "BusinessSavedPaymentDetailsItem_Upi": ".types",
+ "BusinessSavedPaymentDetailsItem_Wallet": ".types",
+ "BusinessUserEvent": ".types",
+ "BusinessUserEventWithRulesResult": ".types",
+ "BusinessUserMonitoringResult": ".types",
+ "BusinessUserSegment": ".types",
+ "BusinessUsersCreateResponse": ".business_users",
+ "BusinessWithRulesResult": ".types",
+ "BusinessWithRulesResultSavedPaymentDetailsItem": ".types",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Ach": ".types",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Card": ".types",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Cash": ".types",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Check": ".types",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount": ".types",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Iban": ".types",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa": ".types",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Npp": ".types",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Swift": ".types",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Upi": ".types",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Wallet": ".types",
+ "CardBrand": ".types",
+ "CardDetails": ".types",
+ "CardExpiry": ".types",
+ "CardFunding": ".types",
+ "CardMerchantDetails": ".types",
+ "CardPaymentMethod": ".types",
+ "CardStatus": ".types",
+ "CardType": ".types",
+ "CaseManagementEvent": ".types",
+ "CaseManagementEventCaseStatus": ".types",
+ "CaseManagementEventCaseStatusReason": ".types",
+ "CaseOpenedDetails": ".types",
+ "CaseStatusDetails": ".types",
+ "CashDetails": ".types",
+ "CashPaymentMethod": ".types",
+ "CheckDeliveryStatus": ".types",
+ "CheckDetails": ".types",
+ "CheckPaymentMethod": ".types",
+ "ColumnType": ".types",
+ "CompanyFinancialDetails": ".types",
+ "CompanyGeneralDetails": ".types",
+ "CompanyRegistrationDetails": ".types",
+ "ConflictError": ".errors",
+ "ConsumerName": ".types",
+ "ConsumerUserEvent": ".types",
+ "ConsumerUserEventWithRulesResult": ".types",
+ "ConsumerUserMonitoringResult": ".types",
+ "ConsumerUserSegment": ".types",
+ "ConsumerUsersCreateResponse": ".consumer_users",
+ "ContactDetails": ".types",
+ "CountryCode": ".types",
+ "CraRiskLevelUpdatedDetails": ".types",
+ "CurrencyCode": ".types",
+ "CustomColumn": ".types",
+ "Date": ".types",
+ "DeviceData": ".types",
+ "EmailId": ".types",
+ "EmploymentDetails": ".types",
+ "EmploymentStatus": ".types",
+ "ExecutedLogicVars": ".types",
+ "ExecutedRulesResult": ".types",
+ "ExpectedIncome": ".types",
+ "FailedRulesResult": ".types",
+ "FalsePositiveDetails": ".types",
+ "FileInfo": ".types",
+ "Flagright": ".client",
+ "FlagrightEnvironment": ".environment",
+ "Gender": ".types",
+ "GeneralBankAccountPaymentMethod": ".types",
+ "GenericBankAccountDetails": ".types",
+ "HitRulesDetails": ".types",
+ "HitRulesResults": ".types",
+ "IbanDetails": ".types",
+ "IbanPaymentMethod": ".types",
+ "KycStatus": ".types",
+ "KycStatusDetails": ".types",
+ "LegalDocument": ".types",
+ "LegalEntity": ".types",
+ "ListData": ".types",
+ "ListExisted": ".types",
+ "ListHeader": ".types",
+ "ListItem": ".types",
+ "ListKeyMetadata": ".types",
+ "ListMetadata": ".types",
+ "ListMetadataTtl": ".types",
+ "ListMetadataTtlUnit": ".types",
+ "ListSubtype": ".types",
+ "ListType": ".types",
+ "ListUpdatedDetails": ".types",
+ "ListUpdatedDetailsAction": ".types",
+ "MaritalStatus": ".types",
+ "MccDetails": ".types",
+ "MpesaDetails": ".types",
+ "MpesaPaymentMethod": ".types",
+ "MpesaTransactionType": ".types",
+ "NotFoundError": ".errors",
+ "NppDetails": ".types",
+ "NppPaymentMethod": ".types",
+ "OriginFundsInfo": ".types",
+ "Page": ".types",
+ "PageSize": ".types",
+ "PaymentMethod": ".types",
+ "PepRank": ".types",
+ "PepStatus": ".types",
+ "Person": ".types",
+ "PersonAttachment": ".types",
+ "PlaceOfBirth": ".types",
+ "PosDetails": ".types",
+ "PosEntryMode": ".types",
+ "RiskLevel": ".types",
+ "RuleAction": ".types",
+ "RuleFailureException": ".types",
+ "RuleHitDirection": ".types",
+ "RuleHitMeta": ".types",
+ "RuleLabels": ".types",
+ "RuleNature": ".types",
+ "RulesResults": ".types",
+ "SanctionsDetails": ".types",
+ "SanctionsDetailsEntityType": ".types",
+ "SanctionsHitContext": ".types",
+ "SanctionsScreeningEntity": ".types",
+ "SanctionsStatus": ".types",
+ "SourceOfFunds": ".types",
+ "SwiftDetails": ".types",
+ "SwiftPaymentMethod": ".types",
+ "Tag": ".types",
+ "TooManyRequestsError": ".errors",
+ "Transaction": ".types",
+ "TransactionAmountDetails": ".types",
+ "TransactionAmountLimit": ".types",
+ "TransactionBase": ".types",
+ "TransactionCountLimit": ".types",
+ "TransactionDestinationPaymentDetails": ".types",
+ "TransactionDestinationPaymentDetails_Ach": ".types",
+ "TransactionDestinationPaymentDetails_Card": ".types",
+ "TransactionDestinationPaymentDetails_Cash": ".types",
+ "TransactionDestinationPaymentDetails_Check": ".types",
+ "TransactionDestinationPaymentDetails_GenericBankAccount": ".types",
+ "TransactionDestinationPaymentDetails_Iban": ".types",
+ "TransactionDestinationPaymentDetails_Mpesa": ".types",
+ "TransactionDestinationPaymentDetails_Npp": ".types",
+ "TransactionDestinationPaymentDetails_Swift": ".types",
+ "TransactionDestinationPaymentDetails_Upi": ".types",
+ "TransactionDestinationPaymentDetails_Wallet": ".types",
+ "TransactionEvent": ".types",
+ "TransactionEventMonitoringResult": ".types",
+ "TransactionEventWithRulesResult": ".types",
+ "TransactionLimit": ".types",
+ "TransactionLimits": ".types",
+ "TransactionLimitsPaymentMethodLimits": ".types",
+ "TransactionMonitoringResult": ".types",
+ "TransactionOriginPaymentDetails": ".types",
+ "TransactionOriginPaymentDetails_Ach": ".types",
+ "TransactionOriginPaymentDetails_Card": ".types",
+ "TransactionOriginPaymentDetails_Cash": ".types",
+ "TransactionOriginPaymentDetails_Check": ".types",
+ "TransactionOriginPaymentDetails_GenericBankAccount": ".types",
+ "TransactionOriginPaymentDetails_Iban": ".types",
+ "TransactionOriginPaymentDetails_Mpesa": ".types",
+ "TransactionOriginPaymentDetails_Npp": ".types",
+ "TransactionOriginPaymentDetails_Swift": ".types",
+ "TransactionOriginPaymentDetails_Upi": ".types",
+ "TransactionOriginPaymentDetails_Wallet": ".types",
+ "TransactionRiskScoringResult": ".types",
+ "TransactionState": ".types",
+ "TransactionStatusDetails": ".types",
+ "TransactionUpdatable": ".types",
+ "TransactionUpdatableDestinationPaymentDetails": ".types",
+ "TransactionUpdatableDestinationPaymentDetails_Ach": ".types",
+ "TransactionUpdatableDestinationPaymentDetails_Card": ".types",
+ "TransactionUpdatableDestinationPaymentDetails_Cash": ".types",
+ "TransactionUpdatableDestinationPaymentDetails_Check": ".types",
+ "TransactionUpdatableDestinationPaymentDetails_GenericBankAccount": ".types",
+ "TransactionUpdatableDestinationPaymentDetails_Iban": ".types",
+ "TransactionUpdatableDestinationPaymentDetails_Mpesa": ".types",
+ "TransactionUpdatableDestinationPaymentDetails_Npp": ".types",
+ "TransactionUpdatableDestinationPaymentDetails_Swift": ".types",
+ "TransactionUpdatableDestinationPaymentDetails_Upi": ".types",
+ "TransactionUpdatableDestinationPaymentDetails_Wallet": ".types",
+ "TransactionUpdatableOriginPaymentDetails": ".types",
+ "TransactionUpdatableOriginPaymentDetails_Ach": ".types",
+ "TransactionUpdatableOriginPaymentDetails_Card": ".types",
+ "TransactionUpdatableOriginPaymentDetails_Cash": ".types",
+ "TransactionUpdatableOriginPaymentDetails_Check": ".types",
+ "TransactionUpdatableOriginPaymentDetails_GenericBankAccount": ".types",
+ "TransactionUpdatableOriginPaymentDetails_Iban": ".types",
+ "TransactionUpdatableOriginPaymentDetails_Mpesa": ".types",
+ "TransactionUpdatableOriginPaymentDetails_Npp": ".types",
+ "TransactionUpdatableOriginPaymentDetails_Swift": ".types",
+ "TransactionUpdatableOriginPaymentDetails_Upi": ".types",
+ "TransactionUpdatableOriginPaymentDetails_Wallet": ".types",
+ "TransactionWithRulesResult": ".types",
+ "TransactionWithRulesResultDestinationPaymentDetails": ".types",
+ "TransactionWithRulesResultDestinationPaymentDetails_Ach": ".types",
+ "TransactionWithRulesResultDestinationPaymentDetails_Card": ".types",
+ "TransactionWithRulesResultDestinationPaymentDetails_Cash": ".types",
+ "TransactionWithRulesResultDestinationPaymentDetails_Check": ".types",
+ "TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount": ".types",
+ "TransactionWithRulesResultDestinationPaymentDetails_Iban": ".types",
+ "TransactionWithRulesResultDestinationPaymentDetails_Mpesa": ".types",
+ "TransactionWithRulesResultDestinationPaymentDetails_Npp": ".types",
+ "TransactionWithRulesResultDestinationPaymentDetails_Swift": ".types",
+ "TransactionWithRulesResultDestinationPaymentDetails_Upi": ".types",
+ "TransactionWithRulesResultDestinationPaymentDetails_Wallet": ".types",
+ "TransactionWithRulesResultOriginPaymentDetails": ".types",
+ "TransactionWithRulesResultOriginPaymentDetails_Ach": ".types",
+ "TransactionWithRulesResultOriginPaymentDetails_Card": ".types",
+ "TransactionWithRulesResultOriginPaymentDetails_Cash": ".types",
+ "TransactionWithRulesResultOriginPaymentDetails_Check": ".types",
+ "TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount": ".types",
+ "TransactionWithRulesResultOriginPaymentDetails_Iban": ".types",
+ "TransactionWithRulesResultOriginPaymentDetails_Mpesa": ".types",
+ "TransactionWithRulesResultOriginPaymentDetails_Npp": ".types",
+ "TransactionWithRulesResultOriginPaymentDetails_Swift": ".types",
+ "TransactionWithRulesResultOriginPaymentDetails_Upi": ".types",
+ "TransactionWithRulesResultOriginPaymentDetails_Wallet": ".types",
+ "TransactionsVerifyResponse": ".transactions",
+ "UnauthorizedError": ".errors",
+ "UpiDetails": ".types",
+ "UpiPaymentMethod": ".types",
+ "User": ".types",
+ "UserBase": ".types",
+ "UserDetails": ".types",
+ "UserEntityLink": ".types",
+ "UserOptional": ".types",
+ "UserOptionalSavedPaymentDetailsItem": ".types",
+ "UserOptionalSavedPaymentDetailsItem_Ach": ".types",
+ "UserOptionalSavedPaymentDetailsItem_Card": ".types",
+ "UserOptionalSavedPaymentDetailsItem_Cash": ".types",
+ "UserOptionalSavedPaymentDetailsItem_Check": ".types",
+ "UserOptionalSavedPaymentDetailsItem_GenericBankAccount": ".types",
+ "UserOptionalSavedPaymentDetailsItem_Iban": ".types",
+ "UserOptionalSavedPaymentDetailsItem_Mpesa": ".types",
+ "UserOptionalSavedPaymentDetailsItem_Npp": ".types",
+ "UserOptionalSavedPaymentDetailsItem_Swift": ".types",
+ "UserOptionalSavedPaymentDetailsItem_Upi": ".types",
+ "UserOptionalSavedPaymentDetailsItem_Wallet": ".types",
+ "UserRegistrationStatus": ".types",
+ "UserRiskScoreDetails": ".types",
+ "UserRulesResult": ".types",
+ "UserSavedPaymentDetailsItem": ".types",
+ "UserSavedPaymentDetailsItem_Ach": ".types",
+ "UserSavedPaymentDetailsItem_Card": ".types",
+ "UserSavedPaymentDetailsItem_Cash": ".types",
+ "UserSavedPaymentDetailsItem_Check": ".types",
+ "UserSavedPaymentDetailsItem_GenericBankAccount": ".types",
+ "UserSavedPaymentDetailsItem_Iban": ".types",
+ "UserSavedPaymentDetailsItem_Mpesa": ".types",
+ "UserSavedPaymentDetailsItem_Npp": ".types",
+ "UserSavedPaymentDetailsItem_Swift": ".types",
+ "UserSavedPaymentDetailsItem_Upi": ".types",
+ "UserSavedPaymentDetailsItem_Wallet": ".types",
+ "UserState": ".types",
+ "UserStateDetails": ".types",
+ "UserTag": ".types",
+ "UserTagsUpdate": ".types",
+ "UserWithRulesResult": ".types",
+ "UserWithRulesResultSavedPaymentDetailsItem": ".types",
+ "UserWithRulesResultSavedPaymentDetailsItem_Ach": ".types",
+ "UserWithRulesResultSavedPaymentDetailsItem_Card": ".types",
+ "UserWithRulesResultSavedPaymentDetailsItem_Cash": ".types",
+ "UserWithRulesResultSavedPaymentDetailsItem_Check": ".types",
+ "UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount": ".types",
+ "UserWithRulesResultSavedPaymentDetailsItem_Iban": ".types",
+ "UserWithRulesResultSavedPaymentDetailsItem_Mpesa": ".types",
+ "UserWithRulesResultSavedPaymentDetailsItem_Npp": ".types",
+ "UserWithRulesResultSavedPaymentDetailsItem_Swift": ".types",
+ "UserWithRulesResultSavedPaymentDetailsItem_Upi": ".types",
+ "UserWithRulesResultSavedPaymentDetailsItem_Wallet": ".types",
+ "WalletDetails": ".types",
+ "WalletNetwork": ".types",
+ "WalletPaymentMethod": ".types",
+ "WebhookEvent": ".types",
+ "WebhookEventBase": ".types",
+ "WebhookEventBaseTriggeredBy": ".types",
+ "WebhookEventData": ".types",
+ "WebhookEventTriggeredBy": ".types",
+ "WebhookEventType": ".types",
+ "WebhookKycStatusDetails": ".types",
+ "WebhookUserStateDetails": ".types",
+ "__version__": ".version",
+ "batch": ".batch",
+ "business_user_events": ".business_user_events",
+ "business_users": ".business_users",
+ "consumer_user_events": ".consumer_user_events",
+ "consumer_users": ".consumer_users",
+ "transaction_events": ".transaction_events",
+ "transactions": ".transactions",
+}
+
+
+def __getattr__(attr_name: str) -> typing.Any:
+ module_name = _dynamic_imports.get(attr_name)
+ if module_name is None:
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
+ try:
+ module = import_module(module_name, __package__)
+ if module_name == f".{attr_name}":
+ return module
+ else:
+ return getattr(module, attr_name)
+ except ImportError as e:
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
+ except AttributeError as e:
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
+
+
+def __dir__():
+ lazy_attrs = list(_dynamic_imports.keys())
+ return sorted(lazy_attrs)
+
__all__ = [
"AchDetails",
diff --git a/src/flagright/batch/__init__.py b/src/flagright/batch/__init__.py
index f3ea265..5cde020 100644
--- a/src/flagright/batch/__init__.py
+++ b/src/flagright/batch/__init__.py
@@ -1,2 +1,4 @@
# This file was auto-generated by Fern from our API Definition.
+# isort: skip_file
+
diff --git a/src/flagright/batch/client.py b/src/flagright/batch/client.py
index 98c9aba..9c622db 100644
--- a/src/flagright/batch/client.py
+++ b/src/flagright/batch/client.py
@@ -1,22 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from .raw_client import RawBatchClient
-from ..types.transaction import Transaction
-from ..types.boolean_string import BooleanString
+
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
+from ..types.batch_business_user_events_with_rules_result import BatchBusinessUserEventsWithRulesResult
from ..types.batch_response import BatchResponse
-from ..types.page_size import PageSize
+from ..types.boolean_string import BooleanString
+from ..types.business import Business
+from ..types.business_user_event import BusinessUserEvent
+from ..types.consumer_user_event import ConsumerUserEvent
from ..types.page import Page
-from ..types.batch_business_user_events_with_rules_result import BatchBusinessUserEventsWithRulesResult
+from ..types.page_size import PageSize
+from ..types.transaction import Transaction
from ..types.transaction_event import TransactionEvent
from ..types.user import User
-from ..types.business import Business
-from ..types.consumer_user_event import ConsumerUserEvent
-from ..types.business_user_event import BusinessUserEvent
-from ..core.client_wrapper import AsyncClientWrapper
-from .raw_client import AsyncRawBatchClient
+from .raw_client import AsyncRawBatchClient, RawBatchClient
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -75,6 +74,8 @@ def verify_transaction(
api_key="YOUR_API_KEY",
)
client.batch.verify_transaction(
+ validate_origin_user_id="true",
+ validate_destination_user_id="true",
data=[
Transaction(
type="type",
@@ -84,14 +85,14 @@ def verify_transaction(
],
)
"""
- response = self._raw_client.verify_transaction(
+ _response = self._raw_client.verify_transaction(
data=data,
validate_origin_user_id=validate_origin_user_id,
validate_destination_user_id=validate_destination_user_id,
batch_id=batch_id,
request_options=request_options,
)
- return response.data
+ return _response.data
def get(
self,
@@ -130,10 +131,12 @@ def get(
)
client.batch.get(
batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
)
"""
- response = self._raw_client.get(batch_id, page_size=page_size, page=page, request_options=request_options)
- return response.data
+ _response = self._raw_client.get(batch_id, page_size=page_size, page=page, request_options=request_options)
+ return _response.data
def create_transaction_events(
self,
@@ -174,10 +177,10 @@ def create_transaction_events(
],
)
"""
- response = self._raw_client.create_transaction_events(
+ _response = self._raw_client.create_transaction_events(
data=data, batch_id=batch_id, request_options=request_options
)
- return response.data
+ return _response.data
def create_consumer_users(
self,
@@ -217,6 +220,8 @@ def create_consumer_users(
api_key="YOUR_API_KEY",
)
client.batch.create_consumer_users(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
data=[
User(
user_id="userId",
@@ -225,14 +230,14 @@ def create_consumer_users(
],
)
"""
- response = self._raw_client.create_consumer_users(
+ _response = self._raw_client.create_consumer_users(
data=data,
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
batch_id=batch_id,
request_options=request_options,
)
- return response.data
+ return _response.data
def create_business_users(
self,
@@ -272,6 +277,8 @@ def create_business_users(
api_key="YOUR_API_KEY",
)
client.batch.create_business_users(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
data=[
Business(
user_id="userId",
@@ -287,14 +294,14 @@ def create_business_users(
],
)
"""
- response = self._raw_client.create_business_users(
+ _response = self._raw_client.create_business_users(
data=data,
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
batch_id=batch_id,
request_options=request_options,
)
- return response.data
+ return _response.data
def create_consumer_user_events(
self,
@@ -334,6 +341,8 @@ def create_consumer_user_events(
api_key="YOUR_API_KEY",
)
client.batch.create_consumer_user_events(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
data=[
ConsumerUserEvent(
timestamp=1.1,
@@ -342,14 +351,14 @@ def create_consumer_user_events(
],
)
"""
- response = self._raw_client.create_consumer_user_events(
+ _response = self._raw_client.create_consumer_user_events(
data=data,
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
batch_id=batch_id,
request_options=request_options,
)
- return response.data
+ return _response.data
def create_business_user_events(
self,
@@ -389,6 +398,8 @@ def create_business_user_events(
api_key="YOUR_API_KEY",
)
client.batch.create_business_user_events(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
data=[
BusinessUserEvent(
timestamp=1.1,
@@ -397,14 +408,14 @@ def create_business_user_events(
],
)
"""
- response = self._raw_client.create_business_user_events(
+ _response = self._raw_client.create_business_user_events(
data=data,
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
batch_id=batch_id,
request_options=request_options,
)
- return response.data
+ return _response.data
class AsyncBatchClient:
@@ -465,6 +476,8 @@ async def verify_transaction(
async def main() -> None:
await client.batch.verify_transaction(
+ validate_origin_user_id="true",
+ validate_destination_user_id="true",
data=[
Transaction(
type="type",
@@ -477,14 +490,14 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.verify_transaction(
+ _response = await self._raw_client.verify_transaction(
data=data,
validate_origin_user_id=validate_origin_user_id,
validate_destination_user_id=validate_destination_user_id,
batch_id=batch_id,
request_options=request_options,
)
- return response.data
+ return _response.data
async def get(
self,
@@ -528,13 +541,17 @@ async def get(
async def main() -> None:
await client.batch.get(
batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
)
asyncio.run(main())
"""
- response = await self._raw_client.get(batch_id, page_size=page_size, page=page, request_options=request_options)
- return response.data
+ _response = await self._raw_client.get(
+ batch_id, page_size=page_size, page=page, request_options=request_options
+ )
+ return _response.data
async def create_transaction_events(
self,
@@ -583,10 +600,10 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.create_transaction_events(
+ _response = await self._raw_client.create_transaction_events(
data=data, batch_id=batch_id, request_options=request_options
)
- return response.data
+ return _response.data
async def create_consumer_users(
self,
@@ -631,6 +648,8 @@ async def create_consumer_users(
async def main() -> None:
await client.batch.create_consumer_users(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
data=[
User(
user_id="userId",
@@ -642,14 +661,14 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.create_consumer_users(
+ _response = await self._raw_client.create_consumer_users(
data=data,
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
batch_id=batch_id,
request_options=request_options,
)
- return response.data
+ return _response.data
async def create_business_users(
self,
@@ -699,6 +718,8 @@ async def create_business_users(
async def main() -> None:
await client.batch.create_business_users(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
data=[
Business(
user_id="userId",
@@ -717,14 +738,14 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.create_business_users(
+ _response = await self._raw_client.create_business_users(
data=data,
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
batch_id=batch_id,
request_options=request_options,
)
- return response.data
+ return _response.data
async def create_consumer_user_events(
self,
@@ -769,6 +790,8 @@ async def create_consumer_user_events(
async def main() -> None:
await client.batch.create_consumer_user_events(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
data=[
ConsumerUserEvent(
timestamp=1.1,
@@ -780,14 +803,14 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.create_consumer_user_events(
+ _response = await self._raw_client.create_consumer_user_events(
data=data,
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
batch_id=batch_id,
request_options=request_options,
)
- return response.data
+ return _response.data
async def create_business_user_events(
self,
@@ -832,6 +855,8 @@ async def create_business_user_events(
async def main() -> None:
await client.batch.create_business_user_events(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
data=[
BusinessUserEvent(
timestamp=1.1,
@@ -843,11 +868,11 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.create_business_user_events(
+ _response = await self._raw_client.create_business_user_events(
data=data,
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
batch_id=batch_id,
request_options=request_options,
)
- return response.data
+ return _response.data
diff --git a/src/flagright/batch/raw_client.py b/src/flagright/batch/raw_client.py
index 3229f81..9ed8048 100644
--- a/src/flagright/batch/raw_client.py
+++ b/src/flagright/batch/raw_client.py
@@ -1,33 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from ..types.transaction import Transaction
-from ..types.boolean_string import BooleanString
+from json.decoder import JSONDecodeError
+
+from ..core.api_error import ApiError
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.http_response import AsyncHttpResponse, HttpResponse
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.pydantic_utilities import parse_obj_as
from ..core.request_options import RequestOptions
-from ..core.http_response import HttpResponse
-from ..types.batch_response import BatchResponse
from ..core.serialization import convert_and_respect_annotation_metadata
-from ..core.pydantic_utilities import parse_obj_as
from ..errors.bad_request_error import BadRequestError
-from ..types.api_error_response import ApiErrorResponse
-from ..errors.unauthorized_error import UnauthorizedError
+from ..errors.conflict_error import ConflictError
+from ..errors.not_found_error import NotFoundError
from ..errors.too_many_requests_error import TooManyRequestsError
-from json.decoder import JSONDecodeError
-from ..core.api_error import ApiError
-from ..types.page_size import PageSize
-from ..types.page import Page
+from ..errors.unauthorized_error import UnauthorizedError
+from ..types.api_error_response import ApiErrorResponse
from ..types.batch_business_user_events_with_rules_result import BatchBusinessUserEventsWithRulesResult
-from ..core.jsonable_encoder import jsonable_encoder
-from ..errors.not_found_error import NotFoundError
-from ..types.transaction_event import TransactionEvent
-from ..errors.conflict_error import ConflictError
-from ..types.user import User
+from ..types.batch_response import BatchResponse
+from ..types.boolean_string import BooleanString
from ..types.business import Business
-from ..types.consumer_user_event import ConsumerUserEvent
from ..types.business_user_event import BusinessUserEvent
-from ..core.client_wrapper import AsyncClientWrapper
-from ..core.http_response import AsyncHttpResponse
+from ..types.consumer_user_event import ConsumerUserEvent
+from ..types.page import Page
+from ..types.page_size import PageSize
+from ..types.transaction import Transaction
+from ..types.transaction_event import TransactionEvent
+from ..types.user import User
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -98,38 +97,41 @@ def verify_transaction(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get(
self,
@@ -180,38 +182,41 @@ def get(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 404:
raise NotFoundError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def create_transaction_events(
self,
@@ -262,48 +267,52 @@ def create_transaction_events(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 409:
raise ConflictError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def create_consumer_users(
self,
@@ -366,38 +375,41 @@ def create_consumer_users(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def create_business_users(
self,
@@ -460,38 +472,41 @@ def create_business_users(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def create_consumer_user_events(
self,
@@ -554,38 +569,41 @@ def create_consumer_user_events(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def create_business_user_events(
self,
@@ -648,38 +666,41 @@ def create_business_user_events(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
class AsyncRawBatchClient:
@@ -747,38 +768,41 @@ async def verify_transaction(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get(
self,
@@ -829,38 +853,41 @@ async def get(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 404:
raise NotFoundError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def create_transaction_events(
self,
@@ -911,48 +938,52 @@ async def create_transaction_events(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 409:
raise ConflictError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def create_consumer_users(
self,
@@ -1015,38 +1046,41 @@ async def create_consumer_users(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def create_business_users(
self,
@@ -1109,38 +1143,41 @@ async def create_business_users(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def create_consumer_user_events(
self,
@@ -1203,38 +1240,41 @@ async def create_consumer_user_events(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def create_business_user_events(
self,
@@ -1297,35 +1337,38 @@ async def create_business_user_events(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/flagright/business_user_events/__init__.py b/src/flagright/business_user_events/__init__.py
index f3ea265..5cde020 100644
--- a/src/flagright/business_user_events/__init__.py
+++ b/src/flagright/business_user_events/__init__.py
@@ -1,2 +1,4 @@
# This file was auto-generated by Fern from our API Definition.
+# isort: skip_file
+
diff --git a/src/flagright/business_user_events/client.py b/src/flagright/business_user_events/client.py
index 1abe7c7..1b94587 100644
--- a/src/flagright/business_user_events/client.py
+++ b/src/flagright/business_user_events/client.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from .raw_client import RawBusinessUserEventsClient
+
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.request_options import RequestOptions
from ..types.boolean_string import BooleanString
from ..types.business_optional import BusinessOptional
-from ..core.request_options import RequestOptions
-from ..types.business_with_rules_result import BusinessWithRulesResult
from ..types.business_user_event_with_rules_result import BusinessUserEventWithRulesResult
-from ..core.client_wrapper import AsyncClientWrapper
-from .raw_client import AsyncRawBusinessUserEventsClient
+from ..types.business_with_rules_result import BusinessWithRulesResult
+from .raw_client import AsyncRawBusinessUserEventsClient, RawBusinessUserEventsClient
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -112,11 +111,14 @@ def create(
api_key="YOUR_API_KEY",
)
client.business_user_events.create(
+ allow_user_type_conversion="true",
+ lock_kyc_risk_level="true",
+ lock_cra_risk_level="true",
timestamp=1.1,
user_id="userId",
)
"""
- response = self._raw_client.create(
+ _response = self._raw_client.create(
timestamp=timestamp,
user_id=user_id,
allow_user_type_conversion=allow_user_type_conversion,
@@ -129,7 +131,7 @@ def create(
update_count=update_count,
request_options=request_options,
)
- return response.data
+ return _response.data
def get(
self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -162,8 +164,8 @@ def get(
event_id="eventId",
)
"""
- response = self._raw_client.get(event_id, request_options=request_options)
- return response.data
+ _response = self._raw_client.get(event_id, request_options=request_options)
+ return _response.data
class AsyncBusinessUserEventsClient:
@@ -268,6 +270,9 @@ async def create(
async def main() -> None:
await client.business_user_events.create(
+ allow_user_type_conversion="true",
+ lock_kyc_risk_level="true",
+ lock_cra_risk_level="true",
timestamp=1.1,
user_id="userId",
)
@@ -275,7 +280,7 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.create(
+ _response = await self._raw_client.create(
timestamp=timestamp,
user_id=user_id,
allow_user_type_conversion=allow_user_type_conversion,
@@ -288,7 +293,7 @@ async def main() -> None:
update_count=update_count,
request_options=request_options,
)
- return response.data
+ return _response.data
async def get(
self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -329,5 +334,5 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.get(event_id, request_options=request_options)
- return response.data
+ _response = await self._raw_client.get(event_id, request_options=request_options)
+ return _response.data
diff --git a/src/flagright/business_user_events/raw_client.py b/src/flagright/business_user_events/raw_client.py
index 9398615..eb72cdf 100644
--- a/src/flagright/business_user_events/raw_client.py
+++ b/src/flagright/business_user_events/raw_client.py
@@ -1,25 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from ..types.boolean_string import BooleanString
-from ..types.business_optional import BusinessOptional
+from json.decoder import JSONDecodeError
+
+from ..core.api_error import ApiError
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.http_response import AsyncHttpResponse, HttpResponse
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.pydantic_utilities import parse_obj_as
from ..core.request_options import RequestOptions
-from ..core.http_response import HttpResponse
-from ..types.business_with_rules_result import BusinessWithRulesResult
from ..core.serialization import convert_and_respect_annotation_metadata
-from ..core.pydantic_utilities import parse_obj_as
from ..errors.bad_request_error import BadRequestError
-from ..types.api_error_response import ApiErrorResponse
-from ..errors.unauthorized_error import UnauthorizedError
from ..errors.conflict_error import ConflictError
from ..errors.too_many_requests_error import TooManyRequestsError
-from json.decoder import JSONDecodeError
-from ..core.api_error import ApiError
+from ..errors.unauthorized_error import UnauthorizedError
+from ..types.api_error_response import ApiErrorResponse
+from ..types.boolean_string import BooleanString
+from ..types.business_optional import BusinessOptional
from ..types.business_user_event_with_rules_result import BusinessUserEventWithRulesResult
-from ..core.jsonable_encoder import jsonable_encoder
-from ..core.client_wrapper import AsyncClientWrapper
-from ..core.http_response import AsyncHttpResponse
+from ..types.business_with_rules_result import BusinessWithRulesResult
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -122,6 +121,9 @@ def create(
),
"updateCount": update_count,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -137,48 +139,52 @@ def create(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 409:
raise ConflictError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get(
self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -217,38 +223,41 @@ def get(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
class AsyncRawBusinessUserEventsClient:
@@ -348,6 +357,9 @@ async def create(
),
"updateCount": update_count,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -363,48 +375,52 @@ async def create(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 409:
raise ConflictError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get(
self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -443,35 +459,38 @@ async def get(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/flagright/business_users/__init__.py b/src/flagright/business_users/__init__.py
index f8433f6..dab9973 100644
--- a/src/flagright/business_users/__init__.py
+++ b/src/flagright/business_users/__init__.py
@@ -1,5 +1,34 @@
# This file was auto-generated by Fern from our API Definition.
-from .types import BusinessUsersCreateResponse
+# isort: skip_file
+
+import typing
+from importlib import import_module
+
+if typing.TYPE_CHECKING:
+ from .types import BusinessUsersCreateResponse
+_dynamic_imports: typing.Dict[str, str] = {"BusinessUsersCreateResponse": ".types"}
+
+
+def __getattr__(attr_name: str) -> typing.Any:
+ module_name = _dynamic_imports.get(attr_name)
+ if module_name is None:
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
+ try:
+ module = import_module(module_name, __package__)
+ if module_name == f".{attr_name}":
+ return module
+ else:
+ return getattr(module, attr_name)
+ except ImportError as e:
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
+ except AttributeError as e:
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
+
+
+def __dir__():
+ lazy_attrs = list(_dynamic_imports.keys())
+ return sorted(lazy_attrs)
+
__all__ = ["BusinessUsersCreateResponse"]
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index 3e06493..4d44a7f 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -1,28 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from .raw_client import RawBusinessUsersClient
-from ..types.legal_entity import LegalEntity
+
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.request_options import RequestOptions
+from ..types.acquisition_channel import AcquisitionChannel
from ..types.boolean_string import BooleanString
-from ..types.user_state_details import UserStateDetails
+from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
+from ..types.business_with_rules_result import BusinessWithRulesResult
+from ..types.device_data import DeviceData
from ..types.kyc_status_details import KycStatusDetails
+from ..types.legal_entity import LegalEntity
+from ..types.mcc_details import MccDetails
+from ..types.payment_method import PaymentMethod
from ..types.person import Person
-from ..types.transaction_limits import TransactionLimits
+from ..types.person_attachment import PersonAttachment
from ..types.risk_level import RiskLevel
-from ..types.payment_method import PaymentMethod
+from ..types.transaction_limits import TransactionLimits
from ..types.user_entity_link import UserEntityLink
-from ..types.acquisition_channel import AcquisitionChannel
-from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
-from ..types.mcc_details import MccDetails
+from ..types.user_state_details import UserStateDetails
from ..types.user_tag import UserTag
-from ..types.person_attachment import PersonAttachment
-from ..types.device_data import DeviceData
-from ..core.request_options import RequestOptions
+from .raw_client import AsyncRawBusinessUsersClient, RawBusinessUsersClient
from .types.business_users_create_response import BusinessUsersCreateResponse
-from ..types.business_with_rules_result import BusinessWithRulesResult
-from ..core.client_wrapper import AsyncClientWrapper
-from .raw_client import AsyncRawBusinessUsersClient
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -165,6 +164,9 @@ def create(
api_key="YOUR_API_KEY",
)
client.business_users.create(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
+ validate_user_id="true",
user_id="userId",
created_timestamp=1.1,
legal_entity=LegalEntity(
@@ -176,7 +178,7 @@ def create(
),
)
"""
- response = self._raw_client.create(
+ _response = self._raw_client.create(
user_id=user_id,
created_timestamp=created_timestamp,
legal_entity=legal_entity,
@@ -203,7 +205,7 @@ def create(
update_count=update_count,
request_options=request_options,
)
- return response.data
+ return _response.data
def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> BusinessWithRulesResult:
"""
@@ -237,8 +239,8 @@ def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions]
user_id="userId",
)
"""
- response = self._raw_client.get(user_id, request_options=request_options)
- return response.data
+ _response = self._raw_client.get(user_id, request_options=request_options)
+ return _response.data
class AsyncBusinessUsersClient:
@@ -383,6 +385,9 @@ async def create(
async def main() -> None:
await client.business_users.create(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
+ validate_user_id="true",
user_id="userId",
created_timestamp=1.1,
legal_entity=LegalEntity(
@@ -397,7 +402,7 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.create(
+ _response = await self._raw_client.create(
user_id=user_id,
created_timestamp=created_timestamp,
legal_entity=legal_entity,
@@ -424,7 +429,7 @@ async def main() -> None:
update_count=update_count,
request_options=request_options,
)
- return response.data
+ return _response.data
async def get(
self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -468,5 +473,5 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.get(user_id, request_options=request_options)
- return response.data
+ _response = await self._raw_client.get(user_id, request_options=request_options)
+ return _response.data
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index 828db27..e639f37 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -1,37 +1,36 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from ..types.legal_entity import LegalEntity
+from json.decoder import JSONDecodeError
+
+from ..core.api_error import ApiError
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.http_response import AsyncHttpResponse, HttpResponse
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.pydantic_utilities import parse_obj_as
+from ..core.request_options import RequestOptions
+from ..core.serialization import convert_and_respect_annotation_metadata
+from ..errors.bad_request_error import BadRequestError
+from ..errors.too_many_requests_error import TooManyRequestsError
+from ..errors.unauthorized_error import UnauthorizedError
+from ..types.acquisition_channel import AcquisitionChannel
+from ..types.api_error_response import ApiErrorResponse
from ..types.boolean_string import BooleanString
-from ..types.user_state_details import UserStateDetails
+from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
+from ..types.business_with_rules_result import BusinessWithRulesResult
+from ..types.device_data import DeviceData
from ..types.kyc_status_details import KycStatusDetails
+from ..types.legal_entity import LegalEntity
+from ..types.mcc_details import MccDetails
+from ..types.payment_method import PaymentMethod
from ..types.person import Person
-from ..types.transaction_limits import TransactionLimits
+from ..types.person_attachment import PersonAttachment
from ..types.risk_level import RiskLevel
-from ..types.payment_method import PaymentMethod
+from ..types.transaction_limits import TransactionLimits
from ..types.user_entity_link import UserEntityLink
-from ..types.acquisition_channel import AcquisitionChannel
-from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
-from ..types.mcc_details import MccDetails
+from ..types.user_state_details import UserStateDetails
from ..types.user_tag import UserTag
-from ..types.person_attachment import PersonAttachment
-from ..types.device_data import DeviceData
-from ..core.request_options import RequestOptions
-from ..core.http_response import HttpResponse
from .types.business_users_create_response import BusinessUsersCreateResponse
-from ..core.serialization import convert_and_respect_annotation_metadata
-from ..core.pydantic_utilities import parse_obj_as
-from ..errors.bad_request_error import BadRequestError
-from ..types.api_error_response import ApiErrorResponse
-from ..errors.unauthorized_error import UnauthorizedError
-from ..errors.too_many_requests_error import TooManyRequestsError
-from json.decoder import JSONDecodeError
-from ..core.api_error import ApiError
-from ..types.business_with_rules_result import BusinessWithRulesResult
-from ..core.jsonable_encoder import jsonable_encoder
-from ..core.client_wrapper import AsyncClientWrapper
-from ..core.http_response import AsyncHttpResponse
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -212,6 +211,9 @@ def create(
),
"updateCount": update_count,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -227,38 +229,41 @@ def create(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get(
self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -300,38 +305,41 @@ def get(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
class AsyncRawBusinessUsersClient:
@@ -509,6 +517,9 @@ async def create(
),
"updateCount": update_count,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -524,38 +535,41 @@ async def create(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get(
self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -597,35 +611,38 @@ async def get(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/flagright/business_users/types/__init__.py b/src/flagright/business_users/types/__init__.py
index 8a19bf1..692f408 100644
--- a/src/flagright/business_users/types/__init__.py
+++ b/src/flagright/business_users/types/__init__.py
@@ -1,5 +1,34 @@
# This file was auto-generated by Fern from our API Definition.
-from .business_users_create_response import BusinessUsersCreateResponse
+# isort: skip_file
+
+import typing
+from importlib import import_module
+
+if typing.TYPE_CHECKING:
+ from .business_users_create_response import BusinessUsersCreateResponse
+_dynamic_imports: typing.Dict[str, str] = {"BusinessUsersCreateResponse": ".business_users_create_response"}
+
+
+def __getattr__(attr_name: str) -> typing.Any:
+ module_name = _dynamic_imports.get(attr_name)
+ if module_name is None:
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
+ try:
+ module = import_module(module_name, __package__)
+ if module_name == f".{attr_name}":
+ return module
+ else:
+ return getattr(module, attr_name)
+ except ImportError as e:
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
+ except AttributeError as e:
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
+
+
+def __dir__():
+ lazy_attrs = list(_dynamic_imports.keys())
+ return sorted(lazy_attrs)
+
__all__ = ["BusinessUsersCreateResponse"]
diff --git a/src/flagright/business_users/types/business_users_create_response.py b/src/flagright/business_users/types/business_users_create_response.py
index 81a575c..944c41e 100644
--- a/src/flagright/business_users/types/business_users_create_response.py
+++ b/src/flagright/business_users/types/business_users_create_response.py
@@ -1,9 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from ...types.business_user_monitoring_result import BusinessUserMonitoringResult
import typing
-from ...core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2
+from ...types.business_user_monitoring_result import BusinessUserMonitoringResult
class BusinessUsersCreateResponse(BusinessUserMonitoringResult):
diff --git a/src/flagright/client.py b/src/flagright/client.py
index 63ba93c..36c79e1 100644
--- a/src/flagright/client.py
+++ b/src/flagright/client.py
@@ -1,24 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+
import typing
-from .environment import FlagrightEnvironment
+
import httpx
-from .core.client_wrapper import SyncClientWrapper
-from .transactions.client import TransactionsClient
-from .batch.client import BatchClient
-from .transaction_events.client import TransactionEventsClient
-from .consumer_users.client import ConsumerUsersClient
-from .business_users.client import BusinessUsersClient
-from .consumer_user_events.client import ConsumerUserEventsClient
-from .business_user_events.client import BusinessUserEventsClient
-from .core.client_wrapper import AsyncClientWrapper
-from .transactions.client import AsyncTransactionsClient
-from .batch.client import AsyncBatchClient
-from .transaction_events.client import AsyncTransactionEventsClient
-from .consumer_users.client import AsyncConsumerUsersClient
-from .business_users.client import AsyncBusinessUsersClient
-from .consumer_user_events.client import AsyncConsumerUserEventsClient
-from .business_user_events.client import AsyncBusinessUserEventsClient
+from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from .environment import FlagrightEnvironment
+
+if typing.TYPE_CHECKING:
+ from .batch.client import AsyncBatchClient, BatchClient
+ from .business_user_events.client import AsyncBusinessUserEventsClient, BusinessUserEventsClient
+ from .business_users.client import AsyncBusinessUsersClient, BusinessUsersClient
+ from .consumer_user_events.client import AsyncConsumerUserEventsClient, ConsumerUserEventsClient
+ from .consumer_users.client import AsyncConsumerUsersClient, ConsumerUsersClient
+ from .transaction_events.client import AsyncTransactionEventsClient, TransactionEventsClient
+ from .transactions.client import AsyncTransactionsClient, TransactionsClient
class Flagright:
@@ -40,6 +37,9 @@ class Flagright:
api_key : str
+ headers : typing.Optional[typing.Dict[str, str]]
+ Additional headers to send with every request.
+
timeout : typing.Optional[float]
The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
@@ -64,6 +64,7 @@ def __init__(
base_url: typing.Optional[str] = None,
environment: FlagrightEnvironment = FlagrightEnvironment.SANDBOX_API_SERVER_EU_1,
api_key: str,
+ headers: typing.Optional[typing.Dict[str, str]] = None,
timeout: typing.Optional[float] = None,
follow_redirects: typing.Optional[bool] = True,
httpx_client: typing.Optional[httpx.Client] = None,
@@ -74,6 +75,7 @@ def __init__(
self._client_wrapper = SyncClientWrapper(
base_url=_get_base_url(base_url=base_url, environment=environment),
api_key=api_key,
+ headers=headers,
httpx_client=httpx_client
if httpx_client is not None
else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
@@ -81,13 +83,69 @@ def __init__(
else httpx.Client(timeout=_defaulted_timeout),
timeout=_defaulted_timeout,
)
- self.transactions = TransactionsClient(client_wrapper=self._client_wrapper)
- self.batch = BatchClient(client_wrapper=self._client_wrapper)
- self.transaction_events = TransactionEventsClient(client_wrapper=self._client_wrapper)
- self.consumer_users = ConsumerUsersClient(client_wrapper=self._client_wrapper)
- self.business_users = BusinessUsersClient(client_wrapper=self._client_wrapper)
- self.consumer_user_events = ConsumerUserEventsClient(client_wrapper=self._client_wrapper)
- self.business_user_events = BusinessUserEventsClient(client_wrapper=self._client_wrapper)
+ self._transactions: typing.Optional[TransactionsClient] = None
+ self._batch: typing.Optional[BatchClient] = None
+ self._transaction_events: typing.Optional[TransactionEventsClient] = None
+ self._consumer_users: typing.Optional[ConsumerUsersClient] = None
+ self._business_users: typing.Optional[BusinessUsersClient] = None
+ self._consumer_user_events: typing.Optional[ConsumerUserEventsClient] = None
+ self._business_user_events: typing.Optional[BusinessUserEventsClient] = None
+
+ @property
+ def transactions(self):
+ if self._transactions is None:
+ from .transactions.client import TransactionsClient # noqa: E402
+
+ self._transactions = TransactionsClient(client_wrapper=self._client_wrapper)
+ return self._transactions
+
+ @property
+ def batch(self):
+ if self._batch is None:
+ from .batch.client import BatchClient # noqa: E402
+
+ self._batch = BatchClient(client_wrapper=self._client_wrapper)
+ return self._batch
+
+ @property
+ def transaction_events(self):
+ if self._transaction_events is None:
+ from .transaction_events.client import TransactionEventsClient # noqa: E402
+
+ self._transaction_events = TransactionEventsClient(client_wrapper=self._client_wrapper)
+ return self._transaction_events
+
+ @property
+ def consumer_users(self):
+ if self._consumer_users is None:
+ from .consumer_users.client import ConsumerUsersClient # noqa: E402
+
+ self._consumer_users = ConsumerUsersClient(client_wrapper=self._client_wrapper)
+ return self._consumer_users
+
+ @property
+ def business_users(self):
+ if self._business_users is None:
+ from .business_users.client import BusinessUsersClient # noqa: E402
+
+ self._business_users = BusinessUsersClient(client_wrapper=self._client_wrapper)
+ return self._business_users
+
+ @property
+ def consumer_user_events(self):
+ if self._consumer_user_events is None:
+ from .consumer_user_events.client import ConsumerUserEventsClient # noqa: E402
+
+ self._consumer_user_events = ConsumerUserEventsClient(client_wrapper=self._client_wrapper)
+ return self._consumer_user_events
+
+ @property
+ def business_user_events(self):
+ if self._business_user_events is None:
+ from .business_user_events.client import BusinessUserEventsClient # noqa: E402
+
+ self._business_user_events = BusinessUserEventsClient(client_wrapper=self._client_wrapper)
+ return self._business_user_events
class AsyncFlagright:
@@ -109,6 +167,9 @@ class AsyncFlagright:
api_key : str
+ headers : typing.Optional[typing.Dict[str, str]]
+ Additional headers to send with every request.
+
timeout : typing.Optional[float]
The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
@@ -133,6 +194,7 @@ def __init__(
base_url: typing.Optional[str] = None,
environment: FlagrightEnvironment = FlagrightEnvironment.SANDBOX_API_SERVER_EU_1,
api_key: str,
+ headers: typing.Optional[typing.Dict[str, str]] = None,
timeout: typing.Optional[float] = None,
follow_redirects: typing.Optional[bool] = True,
httpx_client: typing.Optional[httpx.AsyncClient] = None,
@@ -143,6 +205,7 @@ def __init__(
self._client_wrapper = AsyncClientWrapper(
base_url=_get_base_url(base_url=base_url, environment=environment),
api_key=api_key,
+ headers=headers,
httpx_client=httpx_client
if httpx_client is not None
else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
@@ -150,13 +213,69 @@ def __init__(
else httpx.AsyncClient(timeout=_defaulted_timeout),
timeout=_defaulted_timeout,
)
- self.transactions = AsyncTransactionsClient(client_wrapper=self._client_wrapper)
- self.batch = AsyncBatchClient(client_wrapper=self._client_wrapper)
- self.transaction_events = AsyncTransactionEventsClient(client_wrapper=self._client_wrapper)
- self.consumer_users = AsyncConsumerUsersClient(client_wrapper=self._client_wrapper)
- self.business_users = AsyncBusinessUsersClient(client_wrapper=self._client_wrapper)
- self.consumer_user_events = AsyncConsumerUserEventsClient(client_wrapper=self._client_wrapper)
- self.business_user_events = AsyncBusinessUserEventsClient(client_wrapper=self._client_wrapper)
+ self._transactions: typing.Optional[AsyncTransactionsClient] = None
+ self._batch: typing.Optional[AsyncBatchClient] = None
+ self._transaction_events: typing.Optional[AsyncTransactionEventsClient] = None
+ self._consumer_users: typing.Optional[AsyncConsumerUsersClient] = None
+ self._business_users: typing.Optional[AsyncBusinessUsersClient] = None
+ self._consumer_user_events: typing.Optional[AsyncConsumerUserEventsClient] = None
+ self._business_user_events: typing.Optional[AsyncBusinessUserEventsClient] = None
+
+ @property
+ def transactions(self):
+ if self._transactions is None:
+ from .transactions.client import AsyncTransactionsClient # noqa: E402
+
+ self._transactions = AsyncTransactionsClient(client_wrapper=self._client_wrapper)
+ return self._transactions
+
+ @property
+ def batch(self):
+ if self._batch is None:
+ from .batch.client import AsyncBatchClient # noqa: E402
+
+ self._batch = AsyncBatchClient(client_wrapper=self._client_wrapper)
+ return self._batch
+
+ @property
+ def transaction_events(self):
+ if self._transaction_events is None:
+ from .transaction_events.client import AsyncTransactionEventsClient # noqa: E402
+
+ self._transaction_events = AsyncTransactionEventsClient(client_wrapper=self._client_wrapper)
+ return self._transaction_events
+
+ @property
+ def consumer_users(self):
+ if self._consumer_users is None:
+ from .consumer_users.client import AsyncConsumerUsersClient # noqa: E402
+
+ self._consumer_users = AsyncConsumerUsersClient(client_wrapper=self._client_wrapper)
+ return self._consumer_users
+
+ @property
+ def business_users(self):
+ if self._business_users is None:
+ from .business_users.client import AsyncBusinessUsersClient # noqa: E402
+
+ self._business_users = AsyncBusinessUsersClient(client_wrapper=self._client_wrapper)
+ return self._business_users
+
+ @property
+ def consumer_user_events(self):
+ if self._consumer_user_events is None:
+ from .consumer_user_events.client import AsyncConsumerUserEventsClient # noqa: E402
+
+ self._consumer_user_events = AsyncConsumerUserEventsClient(client_wrapper=self._client_wrapper)
+ return self._consumer_user_events
+
+ @property
+ def business_user_events(self):
+ if self._business_user_events is None:
+ from .business_user_events.client import AsyncBusinessUserEventsClient # noqa: E402
+
+ self._business_user_events = AsyncBusinessUserEventsClient(client_wrapper=self._client_wrapper)
+ return self._business_user_events
def _get_base_url(*, base_url: typing.Optional[str] = None, environment: FlagrightEnvironment) -> str:
diff --git a/src/flagright/consumer_user_events/__init__.py b/src/flagright/consumer_user_events/__init__.py
index f3ea265..5cde020 100644
--- a/src/flagright/consumer_user_events/__init__.py
+++ b/src/flagright/consumer_user_events/__init__.py
@@ -1,2 +1,4 @@
# This file was auto-generated by Fern from our API Definition.
+# isort: skip_file
+
diff --git a/src/flagright/consumer_user_events/client.py b/src/flagright/consumer_user_events/client.py
index 78f4b08..8148a4b 100644
--- a/src/flagright/consumer_user_events/client.py
+++ b/src/flagright/consumer_user_events/client.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from .raw_client import RawConsumerUserEventsClient
+
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.request_options import RequestOptions
from ..types.boolean_string import BooleanString
+from ..types.consumer_user_event_with_rules_result import ConsumerUserEventWithRulesResult
from ..types.user_optional import UserOptional
-from ..core.request_options import RequestOptions
from ..types.user_with_rules_result import UserWithRulesResult
-from ..types.consumer_user_event_with_rules_result import ConsumerUserEventWithRulesResult
-from ..core.client_wrapper import AsyncClientWrapper
-from .raw_client import AsyncRawConsumerUserEventsClient
+from .raw_client import AsyncRawConsumerUserEventsClient, RawConsumerUserEventsClient
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -112,11 +111,14 @@ def create(
api_key="YOUR_API_KEY",
)
client.consumer_user_events.create(
+ allow_user_type_conversion="true",
+ lock_kyc_risk_level="true",
+ lock_cra_risk_level="true",
timestamp=1.1,
user_id="userId",
)
"""
- response = self._raw_client.create(
+ _response = self._raw_client.create(
timestamp=timestamp,
user_id=user_id,
allow_user_type_conversion=allow_user_type_conversion,
@@ -129,7 +131,7 @@ def create(
update_count=update_count,
request_options=request_options,
)
- return response.data
+ return _response.data
def get(
self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -162,8 +164,8 @@ def get(
event_id="eventId",
)
"""
- response = self._raw_client.get(event_id, request_options=request_options)
- return response.data
+ _response = self._raw_client.get(event_id, request_options=request_options)
+ return _response.data
class AsyncConsumerUserEventsClient:
@@ -268,6 +270,9 @@ async def create(
async def main() -> None:
await client.consumer_user_events.create(
+ allow_user_type_conversion="true",
+ lock_kyc_risk_level="true",
+ lock_cra_risk_level="true",
timestamp=1.1,
user_id="userId",
)
@@ -275,7 +280,7 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.create(
+ _response = await self._raw_client.create(
timestamp=timestamp,
user_id=user_id,
allow_user_type_conversion=allow_user_type_conversion,
@@ -288,7 +293,7 @@ async def main() -> None:
update_count=update_count,
request_options=request_options,
)
- return response.data
+ return _response.data
async def get(
self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -329,5 +334,5 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.get(event_id, request_options=request_options)
- return response.data
+ _response = await self._raw_client.get(event_id, request_options=request_options)
+ return _response.data
diff --git a/src/flagright/consumer_user_events/raw_client.py b/src/flagright/consumer_user_events/raw_client.py
index df53256..1fdc4a6 100644
--- a/src/flagright/consumer_user_events/raw_client.py
+++ b/src/flagright/consumer_user_events/raw_client.py
@@ -1,25 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from ..types.boolean_string import BooleanString
-from ..types.user_optional import UserOptional
+from json.decoder import JSONDecodeError
+
+from ..core.api_error import ApiError
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.http_response import AsyncHttpResponse, HttpResponse
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.pydantic_utilities import parse_obj_as
from ..core.request_options import RequestOptions
-from ..core.http_response import HttpResponse
-from ..types.user_with_rules_result import UserWithRulesResult
from ..core.serialization import convert_and_respect_annotation_metadata
-from ..core.pydantic_utilities import parse_obj_as
from ..errors.bad_request_error import BadRequestError
-from ..types.api_error_response import ApiErrorResponse
-from ..errors.unauthorized_error import UnauthorizedError
from ..errors.conflict_error import ConflictError
from ..errors.too_many_requests_error import TooManyRequestsError
-from json.decoder import JSONDecodeError
-from ..core.api_error import ApiError
+from ..errors.unauthorized_error import UnauthorizedError
+from ..types.api_error_response import ApiErrorResponse
+from ..types.boolean_string import BooleanString
from ..types.consumer_user_event_with_rules_result import ConsumerUserEventWithRulesResult
-from ..core.jsonable_encoder import jsonable_encoder
-from ..core.client_wrapper import AsyncClientWrapper
-from ..core.http_response import AsyncHttpResponse
+from ..types.user_optional import UserOptional
+from ..types.user_with_rules_result import UserWithRulesResult
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -122,6 +121,9 @@ def create(
),
"updateCount": update_count,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -137,48 +139,52 @@ def create(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 409:
raise ConflictError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get(
self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -217,38 +223,41 @@ def get(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
class AsyncRawConsumerUserEventsClient:
@@ -348,6 +357,9 @@ async def create(
),
"updateCount": update_count,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -363,48 +375,52 @@ async def create(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 409:
raise ConflictError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get(
self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -443,35 +459,38 @@ async def get(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/flagright/consumer_users/__init__.py b/src/flagright/consumer_users/__init__.py
index 096f334..f8852dd 100644
--- a/src/flagright/consumer_users/__init__.py
+++ b/src/flagright/consumer_users/__init__.py
@@ -1,5 +1,34 @@
# This file was auto-generated by Fern from our API Definition.
-from .types import ConsumerUsersCreateResponse
+# isort: skip_file
+
+import typing
+from importlib import import_module
+
+if typing.TYPE_CHECKING:
+ from .types import ConsumerUsersCreateResponse
+_dynamic_imports: typing.Dict[str, str] = {"ConsumerUsersCreateResponse": ".types"}
+
+
+def __getattr__(attr_name: str) -> typing.Any:
+ module_name = _dynamic_imports.get(attr_name)
+ if module_name is None:
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
+ try:
+ module = import_module(module_name, __package__)
+ if module_name == f".{attr_name}":
+ return module
+ else:
+ return getattr(module, attr_name)
+ except ImportError as e:
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
+ except AttributeError as e:
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
+
+
+def __dir__():
+ lazy_attrs = list(_dynamic_imports.keys())
+ return sorted(lazy_attrs)
+
__all__ = ["ConsumerUsersCreateResponse"]
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
index daebae4..8713373 100644
--- a/src/flagright/consumer_users/client.py
+++ b/src/flagright/consumer_users/client.py
@@ -1,35 +1,34 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from .raw_client import RawConsumerUsersClient
+
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.request_options import RequestOptions
+from ..types.acquisition_channel import AcquisitionChannel
+from ..types.adverse_media_status import AdverseMediaStatus
from ..types.boolean_string import BooleanString
-from ..types.user_details import UserDetails
-from ..types.user_state_details import UserStateDetails
-from ..types.kyc_status_details import KycStatusDetails
-from ..types.employment_status import EmploymentStatus
-from ..types.legal_document import LegalDocument
+from ..types.consumer_user_segment import ConsumerUserSegment
from ..types.contact_details import ContactDetails
+from ..types.device_data import DeviceData
from ..types.employment_details import EmploymentDetails
-from ..types.transaction_limits import TransactionLimits
+from ..types.employment_status import EmploymentStatus
from ..types.expected_income import ExpectedIncome
-from ..types.risk_level import RiskLevel
-from ..types.acquisition_channel import AcquisitionChannel
-from ..types.source_of_funds import SourceOfFunds
-from ..types.consumer_user_segment import ConsumerUserSegment
+from ..types.kyc_status_details import KycStatusDetails
+from ..types.legal_document import LegalDocument
from ..types.pep_status import PepStatus
+from ..types.person_attachment import PersonAttachment
+from ..types.risk_level import RiskLevel
from ..types.sanctions_status import SanctionsStatus
-from ..types.adverse_media_status import AdverseMediaStatus
+from ..types.source_of_funds import SourceOfFunds
+from ..types.transaction_limits import TransactionLimits
+from ..types.user_details import UserDetails
from ..types.user_entity_link import UserEntityLink
from ..types.user_saved_payment_details_item import UserSavedPaymentDetailsItem
+from ..types.user_state_details import UserStateDetails
from ..types.user_tag import UserTag
-from ..types.person_attachment import PersonAttachment
-from ..types.device_data import DeviceData
-from ..core.request_options import RequestOptions
-from .types.consumer_users_create_response import ConsumerUsersCreateResponse
from ..types.user_with_rules_result import UserWithRulesResult
-from ..core.client_wrapper import AsyncClientWrapper
-from .raw_client import AsyncRawConsumerUsersClient
+from .raw_client import AsyncRawConsumerUsersClient, RawConsumerUsersClient
+from .types.consumer_users_create_response import ConsumerUsersCreateResponse
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -205,6 +204,9 @@ def create(
api_key="YOUR_API_KEY",
)
client.consumer_users.create(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
+ validate_user_id="true",
user_id="96647cfd9e8fe66ee0f3362e011e34e8",
created_timestamp=1641654664000.0,
user_details=UserDetails(
@@ -260,7 +262,7 @@ def create(
],
)
"""
- response = self._raw_client.create(
+ _response = self._raw_client.create(
user_id=user_id,
created_timestamp=created_timestamp,
lock_cra_risk_level=lock_cra_risk_level,
@@ -296,7 +298,7 @@ def create(
update_count=update_count,
request_options=request_options,
)
- return response.data
+ return _response.data
def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> UserWithRulesResult:
"""
@@ -330,8 +332,8 @@ def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions]
user_id="userId",
)
"""
- response = self._raw_client.get(user_id, request_options=request_options)
- return response.data
+ _response = self._raw_client.get(user_id, request_options=request_options)
+ return _response.data
class AsyncConsumerUsersClient:
@@ -509,6 +511,9 @@ async def create(
async def main() -> None:
await client.consumer_users.create(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
+ validate_user_id="true",
user_id="96647cfd9e8fe66ee0f3362e011e34e8",
created_timestamp=1641654664000.0,
user_details=UserDetails(
@@ -567,7 +572,7 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.create(
+ _response = await self._raw_client.create(
user_id=user_id,
created_timestamp=created_timestamp,
lock_cra_risk_level=lock_cra_risk_level,
@@ -603,7 +608,7 @@ async def main() -> None:
update_count=update_count,
request_options=request_options,
)
- return response.data
+ return _response.data
async def get(
self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -647,5 +652,5 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.get(user_id, request_options=request_options)
- return response.data
+ _response = await self._raw_client.get(user_id, request_options=request_options)
+ return _response.data
diff --git a/src/flagright/consumer_users/raw_client.py b/src/flagright/consumer_users/raw_client.py
index 0a0238c..151f5d6 100644
--- a/src/flagright/consumer_users/raw_client.py
+++ b/src/flagright/consumer_users/raw_client.py
@@ -1,44 +1,43 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
+from json.decoder import JSONDecodeError
+
+from ..core.api_error import ApiError
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.http_response import AsyncHttpResponse, HttpResponse
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.pydantic_utilities import parse_obj_as
+from ..core.request_options import RequestOptions
+from ..core.serialization import convert_and_respect_annotation_metadata
+from ..errors.bad_request_error import BadRequestError
+from ..errors.too_many_requests_error import TooManyRequestsError
+from ..errors.unauthorized_error import UnauthorizedError
+from ..types.acquisition_channel import AcquisitionChannel
+from ..types.adverse_media_status import AdverseMediaStatus
+from ..types.api_error_response import ApiErrorResponse
from ..types.boolean_string import BooleanString
-from ..types.user_details import UserDetails
-from ..types.user_state_details import UserStateDetails
-from ..types.kyc_status_details import KycStatusDetails
-from ..types.employment_status import EmploymentStatus
-from ..types.legal_document import LegalDocument
+from ..types.consumer_user_segment import ConsumerUserSegment
from ..types.contact_details import ContactDetails
+from ..types.device_data import DeviceData
from ..types.employment_details import EmploymentDetails
-from ..types.transaction_limits import TransactionLimits
+from ..types.employment_status import EmploymentStatus
from ..types.expected_income import ExpectedIncome
-from ..types.risk_level import RiskLevel
-from ..types.acquisition_channel import AcquisitionChannel
-from ..types.source_of_funds import SourceOfFunds
-from ..types.consumer_user_segment import ConsumerUserSegment
+from ..types.kyc_status_details import KycStatusDetails
+from ..types.legal_document import LegalDocument
from ..types.pep_status import PepStatus
+from ..types.person_attachment import PersonAttachment
+from ..types.risk_level import RiskLevel
from ..types.sanctions_status import SanctionsStatus
-from ..types.adverse_media_status import AdverseMediaStatus
+from ..types.source_of_funds import SourceOfFunds
+from ..types.transaction_limits import TransactionLimits
+from ..types.user_details import UserDetails
from ..types.user_entity_link import UserEntityLink
from ..types.user_saved_payment_details_item import UserSavedPaymentDetailsItem
+from ..types.user_state_details import UserStateDetails
from ..types.user_tag import UserTag
-from ..types.person_attachment import PersonAttachment
-from ..types.device_data import DeviceData
-from ..core.request_options import RequestOptions
-from ..core.http_response import HttpResponse
-from .types.consumer_users_create_response import ConsumerUsersCreateResponse
-from ..core.serialization import convert_and_respect_annotation_metadata
-from ..core.pydantic_utilities import parse_obj_as
-from ..errors.bad_request_error import BadRequestError
-from ..types.api_error_response import ApiErrorResponse
-from ..errors.unauthorized_error import UnauthorizedError
-from ..errors.too_many_requests_error import TooManyRequestsError
-from json.decoder import JSONDecodeError
-from ..core.api_error import ApiError
from ..types.user_with_rules_result import UserWithRulesResult
-from ..core.jsonable_encoder import jsonable_encoder
-from ..core.client_wrapper import AsyncClientWrapper
-from ..core.http_response import AsyncHttpResponse
+from .types.consumer_users_create_response import ConsumerUsersCreateResponse
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -256,6 +255,9 @@ def create(
),
"updateCount": update_count,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -271,38 +273,41 @@ def create(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get(
self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -344,38 +349,41 @@ def get(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
class AsyncRawConsumerUsersClient:
@@ -590,6 +598,9 @@ async def create(
),
"updateCount": update_count,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -605,38 +616,41 @@ async def create(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get(
self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -678,35 +692,38 @@ async def get(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/flagright/consumer_users/types/__init__.py b/src/flagright/consumer_users/types/__init__.py
index 20e164e..8e50a6e 100644
--- a/src/flagright/consumer_users/types/__init__.py
+++ b/src/flagright/consumer_users/types/__init__.py
@@ -1,5 +1,34 @@
# This file was auto-generated by Fern from our API Definition.
-from .consumer_users_create_response import ConsumerUsersCreateResponse
+# isort: skip_file
+
+import typing
+from importlib import import_module
+
+if typing.TYPE_CHECKING:
+ from .consumer_users_create_response import ConsumerUsersCreateResponse
+_dynamic_imports: typing.Dict[str, str] = {"ConsumerUsersCreateResponse": ".consumer_users_create_response"}
+
+
+def __getattr__(attr_name: str) -> typing.Any:
+ module_name = _dynamic_imports.get(attr_name)
+ if module_name is None:
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
+ try:
+ module = import_module(module_name, __package__)
+ if module_name == f".{attr_name}":
+ return module
+ else:
+ return getattr(module, attr_name)
+ except ImportError as e:
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
+ except AttributeError as e:
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
+
+
+def __dir__():
+ lazy_attrs = list(_dynamic_imports.keys())
+ return sorted(lazy_attrs)
+
__all__ = ["ConsumerUsersCreateResponse"]
diff --git a/src/flagright/consumer_users/types/consumer_users_create_response.py b/src/flagright/consumer_users/types/consumer_users_create_response.py
index 55a9adf..4d419bf 100644
--- a/src/flagright/consumer_users/types/consumer_users_create_response.py
+++ b/src/flagright/consumer_users/types/consumer_users_create_response.py
@@ -1,9 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from ...types.consumer_user_monitoring_result import ConsumerUserMonitoringResult
import typing
-from ...core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2
+from ...types.consumer_user_monitoring_result import ConsumerUserMonitoringResult
class ConsumerUsersCreateResponse(ConsumerUserMonitoringResult):
diff --git a/src/flagright/core/__init__.py b/src/flagright/core/__init__.py
index 7a7ee41..9a33e23 100644
--- a/src/flagright/core/__init__.py
+++ b/src/flagright/core/__init__.py
@@ -1,25 +1,80 @@
# This file was auto-generated by Fern from our API Definition.
-from .api_error import ApiError
-from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper
-from .datetime_utils import serialize_datetime
-from .file import File, convert_file_dict_to_httpx_tuples, with_content_type
-from .http_client import AsyncHttpClient, HttpClient
-from .http_response import AsyncHttpResponse, HttpResponse
-from .jsonable_encoder import jsonable_encoder
-from .pydantic_utilities import (
- IS_PYDANTIC_V2,
- UniversalBaseModel,
- UniversalRootModel,
- parse_obj_as,
- universal_field_validator,
- universal_root_validator,
- update_forward_refs,
-)
-from .query_encoder import encode_query
-from .remove_none_from_dict import remove_none_from_dict
-from .request_options import RequestOptions
-from .serialization import FieldMetadata, convert_and_respect_annotation_metadata
+# isort: skip_file
+
+import typing
+from importlib import import_module
+
+if typing.TYPE_CHECKING:
+ from .api_error import ApiError
+ from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper
+ from .datetime_utils import serialize_datetime
+ from .file import File, convert_file_dict_to_httpx_tuples, with_content_type
+ from .http_client import AsyncHttpClient, HttpClient
+ from .http_response import AsyncHttpResponse, HttpResponse
+ from .jsonable_encoder import jsonable_encoder
+ from .pydantic_utilities import (
+ IS_PYDANTIC_V2,
+ UniversalBaseModel,
+ UniversalRootModel,
+ parse_obj_as,
+ universal_field_validator,
+ universal_root_validator,
+ update_forward_refs,
+ )
+ from .query_encoder import encode_query
+ from .remove_none_from_dict import remove_none_from_dict
+ from .request_options import RequestOptions
+ from .serialization import FieldMetadata, convert_and_respect_annotation_metadata
+_dynamic_imports: typing.Dict[str, str] = {
+ "ApiError": ".api_error",
+ "AsyncClientWrapper": ".client_wrapper",
+ "AsyncHttpClient": ".http_client",
+ "AsyncHttpResponse": ".http_response",
+ "BaseClientWrapper": ".client_wrapper",
+ "FieldMetadata": ".serialization",
+ "File": ".file",
+ "HttpClient": ".http_client",
+ "HttpResponse": ".http_response",
+ "IS_PYDANTIC_V2": ".pydantic_utilities",
+ "RequestOptions": ".request_options",
+ "SyncClientWrapper": ".client_wrapper",
+ "UniversalBaseModel": ".pydantic_utilities",
+ "UniversalRootModel": ".pydantic_utilities",
+ "convert_and_respect_annotation_metadata": ".serialization",
+ "convert_file_dict_to_httpx_tuples": ".file",
+ "encode_query": ".query_encoder",
+ "jsonable_encoder": ".jsonable_encoder",
+ "parse_obj_as": ".pydantic_utilities",
+ "remove_none_from_dict": ".remove_none_from_dict",
+ "serialize_datetime": ".datetime_utils",
+ "universal_field_validator": ".pydantic_utilities",
+ "universal_root_validator": ".pydantic_utilities",
+ "update_forward_refs": ".pydantic_utilities",
+ "with_content_type": ".file",
+}
+
+
+def __getattr__(attr_name: str) -> typing.Any:
+ module_name = _dynamic_imports.get(attr_name)
+ if module_name is None:
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
+ try:
+ module = import_module(module_name, __package__)
+ if module_name == f".{attr_name}":
+ return module
+ else:
+ return getattr(module, attr_name)
+ except ImportError as e:
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
+ except AttributeError as e:
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
+
+
+def __dir__():
+ lazy_attrs = list(_dynamic_imports.keys())
+ return sorted(lazy_attrs)
+
__all__ = [
"ApiError",
diff --git a/src/flagright/core/api_error.py b/src/flagright/core/api_error.py
index 2e9fc54..6f850a6 100644
--- a/src/flagright/core/api_error.py
+++ b/src/flagright/core/api_error.py
@@ -1,15 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import typing
+from typing import Any, Dict, Optional
class ApiError(Exception):
- status_code: typing.Optional[int]
- body: typing.Any
+ headers: Optional[Dict[str, str]]
+ status_code: Optional[int]
+ body: Any
- def __init__(self, *, status_code: typing.Optional[int] = None, body: typing.Any = None):
+ def __init__(
+ self,
+ *,
+ headers: Optional[Dict[str, str]] = None,
+ status_code: Optional[int] = None,
+ body: Any = None,
+ ) -> None:
+ self.headers = headers
self.status_code = status_code
self.body = body
def __str__(self) -> str:
- return f"status_code: {self.status_code}, body: {self.body}"
+ return f"headers: {self.headers}, status_code: {self.status_code}, body: {self.body}"
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 6ff89ac..8ba0952 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -1,27 +1,39 @@
# This file was auto-generated by Fern from our API Definition.
import typing
+
import httpx
-from .http_client import HttpClient
-from .http_client import AsyncHttpClient
+from .http_client import AsyncHttpClient, HttpClient
class BaseClientWrapper:
- def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[float] = None):
+ def __init__(
+ self,
+ *,
+ api_key: str,
+ headers: typing.Optional[typing.Dict[str, str]] = None,
+ base_url: str,
+ timeout: typing.Optional[float] = None,
+ ):
self.api_key = api_key
+ self._headers = headers
self._base_url = base_url
self._timeout = timeout
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.7",
+ "User-Agent": "flagright/1.8.8",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.7",
+ "X-Fern-SDK-Version": "1.8.8",
+ **(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
return headers
+ def get_custom_headers(self) -> typing.Optional[typing.Dict[str, str]]:
+ return self._headers
+
def get_base_url(self) -> str:
return self._base_url
@@ -31,9 +43,15 @@ def get_timeout(self) -> typing.Optional[float]:
class SyncClientWrapper(BaseClientWrapper):
def __init__(
- self, *, api_key: str, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.Client
+ self,
+ *,
+ api_key: str,
+ headers: typing.Optional[typing.Dict[str, str]] = None,
+ base_url: str,
+ timeout: typing.Optional[float] = None,
+ httpx_client: httpx.Client,
):
- super().__init__(api_key=api_key, base_url=base_url, timeout=timeout)
+ super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout)
self.httpx_client = HttpClient(
httpx_client=httpx_client,
base_headers=self.get_headers,
@@ -44,9 +62,15 @@ def __init__(
class AsyncClientWrapper(BaseClientWrapper):
def __init__(
- self, *, api_key: str, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.AsyncClient
+ self,
+ *,
+ api_key: str,
+ headers: typing.Optional[typing.Dict[str, str]] = None,
+ base_url: str,
+ timeout: typing.Optional[float] = None,
+ httpx_client: httpx.AsyncClient,
):
- super().__init__(api_key=api_key, base_url=base_url, timeout=timeout)
+ super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout)
self.httpx_client = AsyncHttpClient(
httpx_client=httpx_client,
base_headers=self.get_headers,
diff --git a/src/flagright/core/force_multipart.py b/src/flagright/core/force_multipart.py
new file mode 100644
index 0000000..5440913
--- /dev/null
+++ b/src/flagright/core/force_multipart.py
@@ -0,0 +1,18 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from typing import Any, Dict
+
+
+class ForceMultipartDict(Dict[str, Any]):
+ """
+ A dictionary subclass that always evaluates to True in boolean contexts.
+
+ This is used to force multipart/form-data encoding in HTTP requests even when
+ the dictionary is empty, which would normally evaluate to False.
+ """
+
+ def __bool__(self) -> bool:
+ return True
+
+
+FORCE_MULTIPART = ForceMultipartDict()
diff --git a/src/flagright/core/http_client.py b/src/flagright/core/http_client.py
index e7bd4f7..e4173f9 100644
--- a/src/flagright/core/http_client.py
+++ b/src/flagright/core/http_client.py
@@ -11,10 +11,12 @@
import httpx
from .file import File, convert_file_dict_to_httpx_tuples
+from .force_multipart import FORCE_MULTIPART
from .jsonable_encoder import jsonable_encoder
from .query_encoder import encode_query
from .remove_none_from_dict import remove_none_from_dict
from .request_options import RequestOptions
+from httpx._types import RequestFiles
INITIAL_RETRY_DELAY_SECONDS = 0.5
MAX_RETRY_DELAY_SECONDS = 10
@@ -178,11 +180,17 @@ def request(
json: typing.Optional[typing.Any] = None,
data: typing.Optional[typing.Any] = None,
content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None,
- files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None,
+ files: typing.Optional[
+ typing.Union[
+ typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]],
+ typing.List[typing.Tuple[str, File]],
+ ]
+ ] = None,
headers: typing.Optional[typing.Dict[str, typing.Any]] = None,
request_options: typing.Optional[RequestOptions] = None,
retries: int = 2,
omit: typing.Optional[typing.Any] = None,
+ force_multipart: typing.Optional[bool] = None,
) -> httpx.Response:
base_url = self.get_base_url(base_url)
timeout = (
@@ -193,6 +201,15 @@ def request(
json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
+ request_files: typing.Optional[RequestFiles] = (
+ convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
+ if (files is not None and files is not omit and isinstance(files, dict))
+ else None
+ )
+
+ if (request_files is None or len(request_files) == 0) and force_multipart:
+ request_files = FORCE_MULTIPART
+
response = self.httpx_client.request(
method=method,
url=urllib.parse.urljoin(f"{base_url}/", path),
@@ -225,11 +242,7 @@ def request(
json=json_body,
data=data_body,
content=content,
- files=(
- convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
- if (files is not None and files is not omit)
- else None
- ),
+ files=request_files,
timeout=timeout,
)
@@ -264,11 +277,17 @@ def stream(
json: typing.Optional[typing.Any] = None,
data: typing.Optional[typing.Any] = None,
content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None,
- files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None,
+ files: typing.Optional[
+ typing.Union[
+ typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]],
+ typing.List[typing.Tuple[str, File]],
+ ]
+ ] = None,
headers: typing.Optional[typing.Dict[str, typing.Any]] = None,
request_options: typing.Optional[RequestOptions] = None,
retries: int = 2,
omit: typing.Optional[typing.Any] = None,
+ force_multipart: typing.Optional[bool] = None,
) -> typing.Iterator[httpx.Response]:
base_url = self.get_base_url(base_url)
timeout = (
@@ -277,6 +296,15 @@ def stream(
else self.base_timeout()
)
+ request_files: typing.Optional[RequestFiles] = (
+ convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
+ if (files is not None and files is not omit and isinstance(files, dict))
+ else None
+ )
+
+ if (request_files is None or len(request_files) == 0) and force_multipart:
+ request_files = FORCE_MULTIPART
+
json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
with self.httpx_client.stream(
@@ -311,11 +339,7 @@ def stream(
json=json_body,
data=data_body,
content=content,
- files=(
- convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
- if (files is not None and files is not omit)
- else None
- ),
+ files=request_files,
timeout=timeout,
) as stream:
yield stream
@@ -354,11 +378,17 @@ async def request(
json: typing.Optional[typing.Any] = None,
data: typing.Optional[typing.Any] = None,
content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None,
- files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None,
+ files: typing.Optional[
+ typing.Union[
+ typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]],
+ typing.List[typing.Tuple[str, File]],
+ ]
+ ] = None,
headers: typing.Optional[typing.Dict[str, typing.Any]] = None,
request_options: typing.Optional[RequestOptions] = None,
retries: int = 2,
omit: typing.Optional[typing.Any] = None,
+ force_multipart: typing.Optional[bool] = None,
) -> httpx.Response:
base_url = self.get_base_url(base_url)
timeout = (
@@ -367,6 +397,15 @@ async def request(
else self.base_timeout()
)
+ request_files: typing.Optional[RequestFiles] = (
+ convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
+ if (files is not None and files is not omit and isinstance(files, dict))
+ else None
+ )
+
+ if (request_files is None or len(request_files) == 0) and force_multipart:
+ request_files = FORCE_MULTIPART
+
json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
# Add the input to each of these and do None-safety checks
@@ -402,11 +441,7 @@ async def request(
json=json_body,
data=data_body,
content=content,
- files=(
- convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
- if files is not None
- else None
- ),
+ files=request_files,
timeout=timeout,
)
@@ -440,11 +475,17 @@ async def stream(
json: typing.Optional[typing.Any] = None,
data: typing.Optional[typing.Any] = None,
content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None,
- files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None,
+ files: typing.Optional[
+ typing.Union[
+ typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]],
+ typing.List[typing.Tuple[str, File]],
+ ]
+ ] = None,
headers: typing.Optional[typing.Dict[str, typing.Any]] = None,
request_options: typing.Optional[RequestOptions] = None,
retries: int = 2,
omit: typing.Optional[typing.Any] = None,
+ force_multipart: typing.Optional[bool] = None,
) -> typing.AsyncIterator[httpx.Response]:
base_url = self.get_base_url(base_url)
timeout = (
@@ -453,6 +494,15 @@ async def stream(
else self.base_timeout()
)
+ request_files: typing.Optional[RequestFiles] = (
+ convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
+ if (files is not None and files is not omit and isinstance(files, dict))
+ else None
+ )
+
+ if (request_files is None or len(request_files) == 0) and force_multipart:
+ request_files = FORCE_MULTIPART
+
json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
async with self.httpx_client.stream(
@@ -487,11 +537,7 @@ async def stream(
json=json_body,
data=data_body,
content=content,
- files=(
- convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
- if files is not None
- else None
- ),
+ files=request_files,
timeout=timeout,
) as stream:
yield stream
diff --git a/src/flagright/core/http_response.py b/src/flagright/core/http_response.py
index c72a913..2479747 100644
--- a/src/flagright/core/http_response.py
+++ b/src/flagright/core/http_response.py
@@ -4,21 +4,32 @@
import httpx
+# Generic to represent the underlying type of the data wrapped by the HTTP response.
T = TypeVar("T")
-class HttpResponse(Generic[T]):
+class BaseHttpResponse:
+ """Minimalist HTTP response wrapper that exposes response headers."""
+
_response: httpx.Response
- _data: T
- def __init__(self, response: httpx.Response, data: T):
+ def __init__(self, response: httpx.Response):
self._response = response
- self._data = data
@property
def headers(self) -> Dict[str, str]:
return dict(self._response.headers)
+
+class HttpResponse(Generic[T], BaseHttpResponse):
+ """HTTP response wrapper that exposes response headers and data."""
+
+ _data: T
+
+ def __init__(self, response: httpx.Response, data: T):
+ super().__init__(response)
+ self._data = data
+
@property
def data(self) -> T:
return self._data
@@ -27,18 +38,15 @@ def close(self) -> None:
self._response.close()
-class AsyncHttpResponse(Generic[T]):
- _response: httpx.Response
+class AsyncHttpResponse(Generic[T], BaseHttpResponse):
+ """HTTP response wrapper that exposes response headers and data."""
+
_data: T
def __init__(self, response: httpx.Response, data: T):
- self._response = response
+ super().__init__(response)
self._data = data
- @property
- def headers(self) -> Dict[str, str]:
- return dict(self._response.headers)
-
@property
def data(self) -> T:
return self._data
diff --git a/src/flagright/core/pydantic_utilities.py b/src/flagright/core/pydantic_utilities.py
index f7467bc..8906cdf 100644
--- a/src/flagright/core/pydantic_utilities.py
+++ b/src/flagright/core/pydantic_utilities.py
@@ -2,88 +2,66 @@
# nopycln: file
import datetime as dt
-import typing
from collections import defaultdict
+from typing import Any, Callable, ClassVar, Dict, List, Mapping, Optional, Set, Tuple, Type, TypeVar, Union, cast
import pydantic
-import typing_extensions
-from .datetime_utils import serialize_datetime
-from .serialization import convert_and_respect_annotation_metadata
IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.")
if IS_PYDANTIC_V2:
- # isort will try to reformat the comments on these imports, which breaks mypy
- # isort: off
- from pydantic.v1.datetime_parse import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
- parse_date as parse_date,
- )
- from pydantic.v1.datetime_parse import ( # pyright: ignore[reportMissingImports] # Pydantic v2
- parse_datetime as parse_datetime,
- )
- from pydantic.v1.json import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
- ENCODERS_BY_TYPE as encoders_by_type,
- )
- from pydantic.v1.typing import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
- get_args as get_args,
- )
- from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2
- get_origin as get_origin,
- )
- from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2
- is_literal_type as is_literal_type,
- )
- from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2
- is_union as is_union,
- )
- from pydantic.v1.fields import ModelField as ModelField # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
+ from pydantic.v1.datetime_parse import parse_date as parse_date
+ from pydantic.v1.datetime_parse import parse_datetime as parse_datetime
+ from pydantic.v1.fields import ModelField as ModelField
+ from pydantic.v1.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore[attr-defined]
+ from pydantic.v1.typing import get_args as get_args
+ from pydantic.v1.typing import get_origin as get_origin
+ from pydantic.v1.typing import is_literal_type as is_literal_type
+ from pydantic.v1.typing import is_union as is_union
else:
- from pydantic.datetime_parse import parse_date as parse_date # type: ignore # Pydantic v1
- from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore # Pydantic v1
- from pydantic.fields import ModelField as ModelField # type: ignore # Pydantic v1
- from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore # Pydantic v1
- from pydantic.typing import get_args as get_args # type: ignore # Pydantic v1
- from pydantic.typing import get_origin as get_origin # type: ignore # Pydantic v1
- from pydantic.typing import is_literal_type as is_literal_type # type: ignore # Pydantic v1
- from pydantic.typing import is_union as is_union # type: ignore # Pydantic v1
-
- # isort: on
+ from pydantic.datetime_parse import parse_date as parse_date # type: ignore[no-redef]
+ from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore[no-redef]
+ from pydantic.fields import ModelField as ModelField # type: ignore[attr-defined, no-redef]
+ from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore[no-redef]
+ from pydantic.typing import get_args as get_args # type: ignore[no-redef]
+ from pydantic.typing import get_origin as get_origin # type: ignore[no-redef]
+ from pydantic.typing import is_literal_type as is_literal_type # type: ignore[no-redef]
+ from pydantic.typing import is_union as is_union # type: ignore[no-redef]
+from .datetime_utils import serialize_datetime
+from .serialization import convert_and_respect_annotation_metadata
+from typing_extensions import TypeAlias
-T = typing.TypeVar("T")
-Model = typing.TypeVar("Model", bound=pydantic.BaseModel)
+T = TypeVar("T")
+Model = TypeVar("Model", bound=pydantic.BaseModel)
-def parse_obj_as(type_: typing.Type[T], object_: typing.Any) -> T:
+def parse_obj_as(type_: Type[T], object_: Any) -> T:
dealiased_object = convert_and_respect_annotation_metadata(object_=object_, annotation=type_, direction="read")
if IS_PYDANTIC_V2:
- adapter = pydantic.TypeAdapter(type_) # type: ignore # Pydantic v2
+ adapter = pydantic.TypeAdapter(type_) # type: ignore[attr-defined]
return adapter.validate_python(dealiased_object)
- else:
- return pydantic.parse_obj_as(type_, dealiased_object)
+ return pydantic.parse_obj_as(type_, dealiased_object)
-def to_jsonable_with_fallback(
- obj: typing.Any, fallback_serializer: typing.Callable[[typing.Any], typing.Any]
-) -> typing.Any:
+def to_jsonable_with_fallback(obj: Any, fallback_serializer: Callable[[Any], Any]) -> Any:
if IS_PYDANTIC_V2:
from pydantic_core import to_jsonable_python
return to_jsonable_python(obj, fallback=fallback_serializer)
- else:
- return fallback_serializer(obj)
+ return fallback_serializer(obj)
class UniversalBaseModel(pydantic.BaseModel):
if IS_PYDANTIC_V2:
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
+ model_config: ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( # type: ignore[typeddict-unknown-key]
# Allow fields beginning with `model_` to be used in the model
protected_namespaces=(),
- ) # type: ignore # Pydantic v2
+ )
- @pydantic.model_serializer(mode="wrap", when_used="json") # type: ignore # Pydantic v2
- def serialize_model(self, handler: pydantic.SerializerFunctionWrapHandler) -> typing.Any: # type: ignore # Pydantic v2
- serialized = handler(self)
+ @pydantic.model_serializer(mode="plain", when_used="json") # type: ignore[attr-defined]
+ def serialize_model(self) -> Any: # type: ignore[name-defined]
+ serialized = self.dict() # type: ignore[attr-defined]
data = {k: serialize_datetime(v) if isinstance(v, dt.datetime) else v for k, v in serialized.items()}
return data
@@ -94,34 +72,28 @@ class Config:
json_encoders = {dt.datetime: serialize_datetime}
@classmethod
- def model_construct(
- cls: typing.Type["Model"], _fields_set: typing.Optional[typing.Set[str]] = None, **values: typing.Any
- ) -> "Model":
+ def model_construct(cls: Type["Model"], _fields_set: Optional[Set[str]] = None, **values: Any) -> "Model":
dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read")
return cls.construct(_fields_set, **dealiased_object)
@classmethod
- def construct(
- cls: typing.Type["Model"], _fields_set: typing.Optional[typing.Set[str]] = None, **values: typing.Any
- ) -> "Model":
+ def construct(cls: Type["Model"], _fields_set: Optional[Set[str]] = None, **values: Any) -> "Model":
dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read")
if IS_PYDANTIC_V2:
- return super().model_construct(_fields_set, **dealiased_object) # type: ignore # Pydantic v2
- else:
- return super().construct(_fields_set, **dealiased_object)
+ return super().model_construct(_fields_set, **dealiased_object) # type: ignore[misc]
+ return super().construct(_fields_set, **dealiased_object)
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {
+ def json(self, **kwargs: Any) -> str:
+ kwargs_with_defaults = {
"by_alias": True,
"exclude_unset": True,
**kwargs,
}
if IS_PYDANTIC_V2:
- return super().model_dump_json(**kwargs_with_defaults) # type: ignore # Pydantic v2
- else:
- return super().json(**kwargs_with_defaults)
+ return super().model_dump_json(**kwargs_with_defaults) # type: ignore[misc]
+ return super().json(**kwargs_with_defaults)
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
+ def dict(self, **kwargs: Any) -> Dict[str, Any]:
"""
Override the default dict method to `exclude_unset` by default. This function patches
`exclude_unset` to work include fields within non-None default values.
@@ -132,21 +104,21 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
# We'd ideally do the same for Pydantic V2, but it shells out to a library to serialize models
# that we have less control over, and this is less intrusive than custom serializers for now.
if IS_PYDANTIC_V2:
- kwargs_with_defaults_exclude_unset: typing.Any = {
+ kwargs_with_defaults_exclude_unset = {
**kwargs,
"by_alias": True,
"exclude_unset": True,
"exclude_none": False,
}
- kwargs_with_defaults_exclude_none: typing.Any = {
+ kwargs_with_defaults_exclude_none = {
**kwargs,
"by_alias": True,
"exclude_none": True,
"exclude_unset": False,
}
dict_dump = deep_union_pydantic_dicts(
- super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore # Pydantic v2
- super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore # Pydantic v2
+ super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore[misc]
+ super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore[misc]
)
else:
@@ -166,7 +138,7 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
if default is not None:
self.__fields_set__.add(name)
- kwargs_with_defaults_exclude_unset_include_fields: typing.Any = {
+ kwargs_with_defaults_exclude_unset_include_fields = {
"by_alias": True,
"exclude_unset": True,
"include": _fields_set,
@@ -175,15 +147,16 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
dict_dump = super().dict(**kwargs_with_defaults_exclude_unset_include_fields)
- return convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write")
+ return cast(
+ Dict[str, Any],
+ convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write"),
+ )
-def _union_list_of_pydantic_dicts(
- source: typing.List[typing.Any], destination: typing.List[typing.Any]
-) -> typing.List[typing.Any]:
- converted_list: typing.List[typing.Any] = []
+def _union_list_of_pydantic_dicts(source: List[Any], destination: List[Any]) -> List[Any]:
+ converted_list: List[Any] = []
for i, item in enumerate(source):
- destination_value = destination[i] # type: ignore
+ destination_value = destination[i]
if isinstance(item, dict):
converted_list.append(deep_union_pydantic_dicts(item, destination_value))
elif isinstance(item, list):
@@ -193,9 +166,7 @@ def _union_list_of_pydantic_dicts(
return converted_list
-def deep_union_pydantic_dicts(
- source: typing.Dict[str, typing.Any], destination: typing.Dict[str, typing.Any]
-) -> typing.Dict[str, typing.Any]:
+def deep_union_pydantic_dicts(source: Dict[str, Any], destination: Dict[str, Any]) -> Dict[str, Any]:
for key, value in source.items():
node = destination.setdefault(key, {})
if isinstance(value, dict):
@@ -213,18 +184,16 @@ def deep_union_pydantic_dicts(
if IS_PYDANTIC_V2:
- class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore # Pydantic v2
+ class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore[misc, name-defined, type-arg]
pass
- UniversalRootModel: typing_extensions.TypeAlias = V2RootModel # type: ignore
+ UniversalRootModel: TypeAlias = V2RootModel # type: ignore[misc]
else:
- UniversalRootModel: typing_extensions.TypeAlias = UniversalBaseModel # type: ignore
+ UniversalRootModel: TypeAlias = UniversalBaseModel # type: ignore[misc, no-redef]
-def encode_by_type(o: typing.Any) -> typing.Any:
- encoders_by_class_tuples: typing.Dict[typing.Callable[[typing.Any], typing.Any], typing.Tuple[typing.Any, ...]] = (
- defaultdict(tuple)
- )
+def encode_by_type(o: Any) -> Any:
+ encoders_by_class_tuples: Dict[Callable[[Any], Any], Tuple[Any, ...]] = defaultdict(tuple)
for type_, encoder in encoders_by_type.items():
encoders_by_class_tuples[encoder] += (type_,)
@@ -235,54 +204,49 @@ def encode_by_type(o: typing.Any) -> typing.Any:
return encoder(o)
-def update_forward_refs(model: typing.Type["Model"], **localns: typing.Any) -> None:
+def update_forward_refs(model: Type["Model"], **localns: Any) -> None:
if IS_PYDANTIC_V2:
- model.model_rebuild(raise_errors=False) # type: ignore # Pydantic v2
+ model.model_rebuild(raise_errors=False) # type: ignore[attr-defined]
else:
model.update_forward_refs(**localns)
# Mirrors Pydantic's internal typing
-AnyCallable = typing.Callable[..., typing.Any]
+AnyCallable = Callable[..., Any]
def universal_root_validator(
pre: bool = False,
-) -> typing.Callable[[AnyCallable], AnyCallable]:
+) -> Callable[[AnyCallable], AnyCallable]:
def decorator(func: AnyCallable) -> AnyCallable:
if IS_PYDANTIC_V2:
- return pydantic.model_validator(mode="before" if pre else "after")(func) # type: ignore # Pydantic v2
- else:
- return pydantic.root_validator(pre=pre)(func) # type: ignore # Pydantic v1
+ return cast(AnyCallable, pydantic.model_validator(mode="before" if pre else "after")(func)) # type: ignore[attr-defined]
+ return cast(AnyCallable, pydantic.root_validator(pre=pre)(func)) # type: ignore[call-overload]
return decorator
-def universal_field_validator(field_name: str, pre: bool = False) -> typing.Callable[[AnyCallable], AnyCallable]:
+def universal_field_validator(field_name: str, pre: bool = False) -> Callable[[AnyCallable], AnyCallable]:
def decorator(func: AnyCallable) -> AnyCallable:
if IS_PYDANTIC_V2:
- return pydantic.field_validator(field_name, mode="before" if pre else "after")(func) # type: ignore # Pydantic v2
- else:
- return pydantic.validator(field_name, pre=pre)(func) # type: ignore # Pydantic v1
+ return cast(AnyCallable, pydantic.field_validator(field_name, mode="before" if pre else "after")(func)) # type: ignore[attr-defined]
+ return cast(AnyCallable, pydantic.validator(field_name, pre=pre)(func))
return decorator
-PydanticField = typing.Union[ModelField, pydantic.fields.FieldInfo]
+PydanticField = Union[ModelField, pydantic.fields.FieldInfo]
-def _get_model_fields(
- model: typing.Type["Model"],
-) -> typing.Mapping[str, PydanticField]:
+def _get_model_fields(model: Type["Model"]) -> Mapping[str, PydanticField]:
if IS_PYDANTIC_V2:
- return model.model_fields # type: ignore # Pydantic v2
- else:
- return model.__fields__ # type: ignore # Pydantic v1
+ return cast(Mapping[str, PydanticField], model.model_fields) # type: ignore[attr-defined]
+ return cast(Mapping[str, PydanticField], model.__fields__)
-def _get_field_default(field: PydanticField) -> typing.Any:
+def _get_field_default(field: PydanticField) -> Any:
try:
- value = field.get_default() # type: ignore # Pydantic < v1.10.15
+ value = field.get_default() # type: ignore[union-attr]
except:
value = field.default
if IS_PYDANTIC_V2:
diff --git a/src/flagright/errors/__init__.py b/src/flagright/errors/__init__.py
index 927bc44..e1655ae 100644
--- a/src/flagright/errors/__init__.py
+++ b/src/flagright/errors/__init__.py
@@ -1,9 +1,44 @@
# This file was auto-generated by Fern from our API Definition.
-from .bad_request_error import BadRequestError
-from .conflict_error import ConflictError
-from .not_found_error import NotFoundError
-from .too_many_requests_error import TooManyRequestsError
-from .unauthorized_error import UnauthorizedError
+# isort: skip_file
+
+import typing
+from importlib import import_module
+
+if typing.TYPE_CHECKING:
+ from .bad_request_error import BadRequestError
+ from .conflict_error import ConflictError
+ from .not_found_error import NotFoundError
+ from .too_many_requests_error import TooManyRequestsError
+ from .unauthorized_error import UnauthorizedError
+_dynamic_imports: typing.Dict[str, str] = {
+ "BadRequestError": ".bad_request_error",
+ "ConflictError": ".conflict_error",
+ "NotFoundError": ".not_found_error",
+ "TooManyRequestsError": ".too_many_requests_error",
+ "UnauthorizedError": ".unauthorized_error",
+}
+
+
+def __getattr__(attr_name: str) -> typing.Any:
+ module_name = _dynamic_imports.get(attr_name)
+ if module_name is None:
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
+ try:
+ module = import_module(module_name, __package__)
+ if module_name == f".{attr_name}":
+ return module
+ else:
+ return getattr(module, attr_name)
+ except ImportError as e:
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
+ except AttributeError as e:
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
+
+
+def __dir__():
+ lazy_attrs = list(_dynamic_imports.keys())
+ return sorted(lazy_attrs)
+
__all__ = ["BadRequestError", "ConflictError", "NotFoundError", "TooManyRequestsError", "UnauthorizedError"]
diff --git a/src/flagright/errors/bad_request_error.py b/src/flagright/errors/bad_request_error.py
index bd138d1..9f10365 100644
--- a/src/flagright/errors/bad_request_error.py
+++ b/src/flagright/errors/bad_request_error.py
@@ -1,9 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
+import typing
+
from ..core.api_error import ApiError
from ..types.api_error_response import ApiErrorResponse
class BadRequestError(ApiError):
- def __init__(self, body: ApiErrorResponse):
- super().__init__(status_code=400, body=body)
+ def __init__(self, body: ApiErrorResponse, headers: typing.Optional[typing.Dict[str, str]] = None):
+ super().__init__(status_code=400, headers=headers, body=body)
diff --git a/src/flagright/errors/conflict_error.py b/src/flagright/errors/conflict_error.py
index 164e7c9..eaf779a 100644
--- a/src/flagright/errors/conflict_error.py
+++ b/src/flagright/errors/conflict_error.py
@@ -1,9 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
+import typing
+
from ..core.api_error import ApiError
from ..types.api_error_response import ApiErrorResponse
class ConflictError(ApiError):
- def __init__(self, body: ApiErrorResponse):
- super().__init__(status_code=409, body=body)
+ def __init__(self, body: ApiErrorResponse, headers: typing.Optional[typing.Dict[str, str]] = None):
+ super().__init__(status_code=409, headers=headers, body=body)
diff --git a/src/flagright/errors/not_found_error.py b/src/flagright/errors/not_found_error.py
index b71a67a..e0e4607 100644
--- a/src/flagright/errors/not_found_error.py
+++ b/src/flagright/errors/not_found_error.py
@@ -1,9 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
+import typing
+
from ..core.api_error import ApiError
from ..types.api_error_response import ApiErrorResponse
class NotFoundError(ApiError):
- def __init__(self, body: ApiErrorResponse):
- super().__init__(status_code=404, body=body)
+ def __init__(self, body: ApiErrorResponse, headers: typing.Optional[typing.Dict[str, str]] = None):
+ super().__init__(status_code=404, headers=headers, body=body)
diff --git a/src/flagright/errors/too_many_requests_error.py b/src/flagright/errors/too_many_requests_error.py
index 675c104..c871115 100644
--- a/src/flagright/errors/too_many_requests_error.py
+++ b/src/flagright/errors/too_many_requests_error.py
@@ -1,9 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
+import typing
+
from ..core.api_error import ApiError
from ..types.api_error_response import ApiErrorResponse
class TooManyRequestsError(ApiError):
- def __init__(self, body: ApiErrorResponse):
- super().__init__(status_code=429, body=body)
+ def __init__(self, body: ApiErrorResponse, headers: typing.Optional[typing.Dict[str, str]] = None):
+ super().__init__(status_code=429, headers=headers, body=body)
diff --git a/src/flagright/errors/unauthorized_error.py b/src/flagright/errors/unauthorized_error.py
index c3280f5..5d68a81 100644
--- a/src/flagright/errors/unauthorized_error.py
+++ b/src/flagright/errors/unauthorized_error.py
@@ -1,9 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
+import typing
+
from ..core.api_error import ApiError
from ..types.api_error_response import ApiErrorResponse
class UnauthorizedError(ApiError):
- def __init__(self, body: ApiErrorResponse):
- super().__init__(status_code=401, body=body)
+ def __init__(self, body: ApiErrorResponse, headers: typing.Optional[typing.Dict[str, str]] = None):
+ super().__init__(status_code=401, headers=headers, body=body)
diff --git a/src/flagright/transaction_events/__init__.py b/src/flagright/transaction_events/__init__.py
index f3ea265..5cde020 100644
--- a/src/flagright/transaction_events/__init__.py
+++ b/src/flagright/transaction_events/__init__.py
@@ -1,2 +1,4 @@
# This file was auto-generated by Fern from our API Definition.
+# isort: skip_file
+
diff --git a/src/flagright/transaction_events/client.py b/src/flagright/transaction_events/client.py
index 23db661..9e2e11c 100644
--- a/src/flagright/transaction_events/client.py
+++ b/src/flagright/transaction_events/client.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from .raw_client import RawTransactionEventsClient
-from ..types.transaction_state import TransactionState
-from ..types.transaction_updatable import TransactionUpdatable
-from ..types.device_data import DeviceData
+
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
+from ..types.device_data import DeviceData
from ..types.transaction_event_monitoring_result import TransactionEventMonitoringResult
from ..types.transaction_event_with_rules_result import TransactionEventWithRulesResult
-from ..core.client_wrapper import AsyncClientWrapper
-from .raw_client import AsyncRawTransactionEventsClient
+from ..types.transaction_state import TransactionState
+from ..types.transaction_updatable import TransactionUpdatable
+from .raw_client import AsyncRawTransactionEventsClient, RawTransactionEventsClient
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -122,7 +121,7 @@ def create(
),
)
"""
- response = self._raw_client.create(
+ _response = self._raw_client.create(
transaction_state=transaction_state,
timestamp=timestamp,
transaction_id=transaction_id,
@@ -134,7 +133,7 @@ def create(
update_count=update_count,
request_options=request_options,
)
- return response.data
+ return _response.data
def get(
self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -170,8 +169,8 @@ def get(
event_id="eventId",
)
"""
- response = self._raw_client.get(event_id, request_options=request_options)
- return response.data
+ _response = self._raw_client.get(event_id, request_options=request_options)
+ return _response.data
class AsyncTransactionEventsClient:
@@ -288,7 +287,7 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.create(
+ _response = await self._raw_client.create(
transaction_state=transaction_state,
timestamp=timestamp,
transaction_id=transaction_id,
@@ -300,7 +299,7 @@ async def main() -> None:
update_count=update_count,
request_options=request_options,
)
- return response.data
+ return _response.data
async def get(
self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -344,5 +343,5 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.get(event_id, request_options=request_options)
- return response.data
+ _response = await self._raw_client.get(event_id, request_options=request_options)
+ return _response.data
diff --git a/src/flagright/transaction_events/raw_client.py b/src/flagright/transaction_events/raw_client.py
index 0069354..1d938bf 100644
--- a/src/flagright/transaction_events/raw_client.py
+++ b/src/flagright/transaction_events/raw_client.py
@@ -1,25 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from ..types.transaction_state import TransactionState
-from ..types.transaction_updatable import TransactionUpdatable
-from ..types.device_data import DeviceData
+from json.decoder import JSONDecodeError
+
+from ..core.api_error import ApiError
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.http_response import AsyncHttpResponse, HttpResponse
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.pydantic_utilities import parse_obj_as
from ..core.request_options import RequestOptions
-from ..core.http_response import HttpResponse
-from ..types.transaction_event_monitoring_result import TransactionEventMonitoringResult
from ..core.serialization import convert_and_respect_annotation_metadata
-from ..core.pydantic_utilities import parse_obj_as
from ..errors.bad_request_error import BadRequestError
-from ..types.api_error_response import ApiErrorResponse
-from ..errors.unauthorized_error import UnauthorizedError
from ..errors.too_many_requests_error import TooManyRequestsError
-from json.decoder import JSONDecodeError
-from ..core.api_error import ApiError
+from ..errors.unauthorized_error import UnauthorizedError
+from ..types.api_error_response import ApiErrorResponse
+from ..types.device_data import DeviceData
+from ..types.transaction_event_monitoring_result import TransactionEventMonitoringResult
from ..types.transaction_event_with_rules_result import TransactionEventWithRulesResult
-from ..core.jsonable_encoder import jsonable_encoder
-from ..core.client_wrapper import AsyncClientWrapper
-from ..core.http_response import AsyncHttpResponse
+from ..types.transaction_state import TransactionState
+from ..types.transaction_updatable import TransactionUpdatable
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -116,6 +115,9 @@ def create(
),
"updateCount": update_count,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -131,38 +133,41 @@ def create(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get(
self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -204,38 +209,41 @@ def get(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
class AsyncRawTransactionEventsClient:
@@ -329,6 +337,9 @@ async def create(
),
"updateCount": update_count,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -344,38 +355,41 @@ async def create(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get(
self, event_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -417,35 +431,38 @@ async def get(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/flagright/transactions/__init__.py b/src/flagright/transactions/__init__.py
index 8dbdce1..765efeb 100644
--- a/src/flagright/transactions/__init__.py
+++ b/src/flagright/transactions/__init__.py
@@ -1,5 +1,34 @@
# This file was auto-generated by Fern from our API Definition.
-from .types import TransactionsVerifyResponse
+# isort: skip_file
+
+import typing
+from importlib import import_module
+
+if typing.TYPE_CHECKING:
+ from .types import TransactionsVerifyResponse
+_dynamic_imports: typing.Dict[str, str] = {"TransactionsVerifyResponse": ".types"}
+
+
+def __getattr__(attr_name: str) -> typing.Any:
+ module_name = _dynamic_imports.get(attr_name)
+ if module_name is None:
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
+ try:
+ module = import_module(module_name, __package__)
+ if module_name == f".{attr_name}":
+ return module
+ else:
+ return getattr(module, attr_name)
+ except ImportError as e:
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
+ except AttributeError as e:
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
+
+
+def __dir__():
+ lazy_attrs = list(_dynamic_imports.keys())
+ return sorted(lazy_attrs)
+
__all__ = ["TransactionsVerifyResponse"]
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index 396152d..6d182c2 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -1,21 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from .raw_client import RawTransactionsClient
+
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.request_options import RequestOptions
from ..types.boolean_string import BooleanString
-from ..types.transaction_state import TransactionState
-from ..types.transaction_amount_details import TransactionAmountDetails
-from ..types.transaction_origin_payment_details import TransactionOriginPaymentDetails
-from ..types.transaction_destination_payment_details import TransactionDestinationPaymentDetails
-from ..types.origin_funds_info import OriginFundsInfo
from ..types.device_data import DeviceData
+from ..types.origin_funds_info import OriginFundsInfo
from ..types.tag import Tag
-from ..core.request_options import RequestOptions
-from .types.transactions_verify_response import TransactionsVerifyResponse
+from ..types.transaction_amount_details import TransactionAmountDetails
+from ..types.transaction_destination_payment_details import TransactionDestinationPaymentDetails
+from ..types.transaction_origin_payment_details import TransactionOriginPaymentDetails
+from ..types.transaction_state import TransactionState
from ..types.transaction_with_rules_result import TransactionWithRulesResult
-from ..core.client_wrapper import AsyncClientWrapper
-from .raw_client import AsyncRawTransactionsClient
+from .raw_client import AsyncRawTransactionsClient, RawTransactionsClient
+from .types.transactions_verify_response import TransactionsVerifyResponse
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -165,6 +164,8 @@ def verify(
api_key="YOUR_API_KEY",
)
client.transactions.verify(
+ validate_origin_user_id="true",
+ validate_destination_user_id="true",
type="DEPOSIT",
transaction_id="7b80a539eea6e78acbd6d458e5971482",
timestamp=1641654664000.0,
@@ -228,7 +229,7 @@ def verify(
],
)
"""
- response = self._raw_client.verify(
+ _response = self._raw_client.verify(
type=type,
transaction_id=transaction_id,
timestamp=timestamp,
@@ -252,7 +253,7 @@ def verify(
update_count=update_count,
request_options=request_options,
)
- return response.data
+ return _response.data
def get(
self, transaction_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -288,8 +289,8 @@ def get(
transaction_id="transactionId",
)
"""
- response = self._raw_client.get(transaction_id, request_options=request_options)
- return response.data
+ _response = self._raw_client.get(transaction_id, request_options=request_options)
+ return _response.data
class AsyncTransactionsClient:
@@ -441,6 +442,8 @@ async def verify(
async def main() -> None:
await client.transactions.verify(
+ validate_origin_user_id="true",
+ validate_destination_user_id="true",
type="DEPOSIT",
transaction_id="7b80a539eea6e78acbd6d458e5971482",
timestamp=1641654664000.0,
@@ -507,7 +510,7 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.verify(
+ _response = await self._raw_client.verify(
type=type,
transaction_id=transaction_id,
timestamp=timestamp,
@@ -531,7 +534,7 @@ async def main() -> None:
update_count=update_count,
request_options=request_options,
)
- return response.data
+ return _response.data
async def get(
self, transaction_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -575,5 +578,5 @@ async def main() -> None:
asyncio.run(main())
"""
- response = await self._raw_client.get(transaction_id, request_options=request_options)
- return response.data
+ _response = await self._raw_client.get(transaction_id, request_options=request_options)
+ return _response.data
diff --git a/src/flagright/transactions/raw_client.py b/src/flagright/transactions/raw_client.py
index 4668fd7..19110ba 100644
--- a/src/flagright/transactions/raw_client.py
+++ b/src/flagright/transactions/raw_client.py
@@ -1,30 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from ..core.client_wrapper import SyncClientWrapper
-from ..types.boolean_string import BooleanString
-from ..types.transaction_state import TransactionState
-from ..types.transaction_amount_details import TransactionAmountDetails
-from ..types.transaction_origin_payment_details import TransactionOriginPaymentDetails
-from ..types.transaction_destination_payment_details import TransactionDestinationPaymentDetails
-from ..types.origin_funds_info import OriginFundsInfo
-from ..types.device_data import DeviceData
-from ..types.tag import Tag
+from json.decoder import JSONDecodeError
+
+from ..core.api_error import ApiError
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.http_response import AsyncHttpResponse, HttpResponse
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.pydantic_utilities import parse_obj_as
from ..core.request_options import RequestOptions
-from ..core.http_response import HttpResponse
-from .types.transactions_verify_response import TransactionsVerifyResponse
from ..core.serialization import convert_and_respect_annotation_metadata
-from ..core.pydantic_utilities import parse_obj_as
from ..errors.bad_request_error import BadRequestError
-from ..types.api_error_response import ApiErrorResponse
-from ..errors.unauthorized_error import UnauthorizedError
from ..errors.too_many_requests_error import TooManyRequestsError
-from json.decoder import JSONDecodeError
-from ..core.api_error import ApiError
+from ..errors.unauthorized_error import UnauthorizedError
+from ..types.api_error_response import ApiErrorResponse
+from ..types.boolean_string import BooleanString
+from ..types.device_data import DeviceData
+from ..types.origin_funds_info import OriginFundsInfo
+from ..types.tag import Tag
+from ..types.transaction_amount_details import TransactionAmountDetails
+from ..types.transaction_destination_payment_details import TransactionDestinationPaymentDetails
+from ..types.transaction_origin_payment_details import TransactionOriginPaymentDetails
+from ..types.transaction_state import TransactionState
from ..types.transaction_with_rules_result import TransactionWithRulesResult
-from ..core.jsonable_encoder import jsonable_encoder
-from ..core.client_wrapper import AsyncClientWrapper
-from ..core.http_response import AsyncHttpResponse
+from .types.transactions_verify_response import TransactionsVerifyResponse
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -194,6 +193,9 @@ def verify(
),
"updateCount": update_count,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -209,38 +211,41 @@ def verify(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get(
self, transaction_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -282,38 +287,41 @@ def get(
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
class AsyncRawTransactionsClient:
@@ -480,6 +488,9 @@ async def verify(
),
"updateCount": update_count,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -495,38 +506,41 @@ async def verify(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get(
self, transaction_id: str, *, request_options: typing.Optional[RequestOptions] = None
@@ -568,35 +582,38 @@ async def get(
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 401:
raise UnauthorizedError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
if _response.status_code == 429:
raise TooManyRequestsError(
- typing.cast(
+ headers=dict(_response.headers),
+ body=typing.cast(
ApiErrorResponse,
parse_obj_as(
type_=ApiErrorResponse, # type: ignore
object_=_response.json(),
),
- )
+ ),
)
_response_json = _response.json()
except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, body=_response.text)
- raise ApiError(status_code=_response.status_code, body=_response_json)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/flagright/transactions/types/__init__.py b/src/flagright/transactions/types/__init__.py
index c42128c..a6a961c 100644
--- a/src/flagright/transactions/types/__init__.py
+++ b/src/flagright/transactions/types/__init__.py
@@ -1,5 +1,34 @@
# This file was auto-generated by Fern from our API Definition.
-from .transactions_verify_response import TransactionsVerifyResponse
+# isort: skip_file
+
+import typing
+from importlib import import_module
+
+if typing.TYPE_CHECKING:
+ from .transactions_verify_response import TransactionsVerifyResponse
+_dynamic_imports: typing.Dict[str, str] = {"TransactionsVerifyResponse": ".transactions_verify_response"}
+
+
+def __getattr__(attr_name: str) -> typing.Any:
+ module_name = _dynamic_imports.get(attr_name)
+ if module_name is None:
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
+ try:
+ module = import_module(module_name, __package__)
+ if module_name == f".{attr_name}":
+ return module
+ else:
+ return getattr(module, attr_name)
+ except ImportError as e:
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
+ except AttributeError as e:
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
+
+
+def __dir__():
+ lazy_attrs = list(_dynamic_imports.keys())
+ return sorted(lazy_attrs)
+
__all__ = ["TransactionsVerifyResponse"]
diff --git a/src/flagright/transactions/types/transactions_verify_response.py b/src/flagright/transactions/types/transactions_verify_response.py
index 3c65c69..f81f2f2 100644
--- a/src/flagright/transactions/types/transactions_verify_response.py
+++ b/src/flagright/transactions/types/transactions_verify_response.py
@@ -1,9 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from ...types.transaction_monitoring_result import TransactionMonitoringResult
import typing
-from ...core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2
+from ...types.transaction_monitoring_result import TransactionMonitoringResult
class TransactionsVerifyResponse(TransactionMonitoringResult):
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 3642116..4d763a3 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -1,379 +1,755 @@
# This file was auto-generated by Fern from our API Definition.
-from .ach_details import AchDetails
-from .ach_payment_method import AchPaymentMethod
-from .acquisition_channel import AcquisitionChannel
-from .address import Address
-from .adverse_media_status import AdverseMediaStatus
-from .alert_opened_details import AlertOpenedDetails
-from .alert_status_details import AlertStatusDetails
-from .amount import Amount
-from .api_error_response import ApiErrorResponse
-from .batch_business_user_event_with_rules_result import BatchBusinessUserEventWithRulesResult
-from .batch_business_user_events_with_rules_result import BatchBusinessUserEventsWithRulesResult
-from .batch_business_user_with_rules_result import BatchBusinessUserWithRulesResult
-from .batch_business_user_with_rules_result_saved_payment_details_item import (
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi,
- BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet,
-)
-from .batch_business_users_with_rules_results import BatchBusinessUsersWithRulesResults
-from .batch_consumer_user_event_with_rules_result import BatchConsumerUserEventWithRulesResult
-from .batch_consumer_user_events_rules_result import BatchConsumerUserEventsRulesResult
-from .batch_consumer_user_with_rules_result import BatchConsumerUserWithRulesResult
-from .batch_consumer_user_with_rules_result_saved_payment_details_item import (
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi,
- BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet,
-)
-from .batch_consumer_users_with_rules_result import BatchConsumerUsersWithRulesResult
-from .batch_response import BatchResponse
-from .batch_response_failed_record import BatchResponseFailedRecord
-from .batch_response_status import BatchResponseStatus
-from .batch_transaction_event_monitoring_result import BatchTransactionEventMonitoringResult
-from .batch_transaction_event_monitoring_results import BatchTransactionEventMonitoringResults
-from .batch_transaction_monitoring_result import BatchTransactionMonitoringResult
-from .batch_transaction_monitoring_results import BatchTransactionMonitoringResults
-from .batch_user_rules_result import BatchUserRulesResult
-from .boolean_string import BooleanString
-from .business import Business
-from .business_base import BusinessBase
-from .business_optional import BusinessOptional
-from .business_optional_saved_payment_details_item import (
- BusinessOptionalSavedPaymentDetailsItem,
- BusinessOptionalSavedPaymentDetailsItem_Ach,
- BusinessOptionalSavedPaymentDetailsItem_Card,
- BusinessOptionalSavedPaymentDetailsItem_Cash,
- BusinessOptionalSavedPaymentDetailsItem_Check,
- BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount,
- BusinessOptionalSavedPaymentDetailsItem_Iban,
- BusinessOptionalSavedPaymentDetailsItem_Mpesa,
- BusinessOptionalSavedPaymentDetailsItem_Npp,
- BusinessOptionalSavedPaymentDetailsItem_Swift,
- BusinessOptionalSavedPaymentDetailsItem_Upi,
- BusinessOptionalSavedPaymentDetailsItem_Wallet,
-)
-from .business_saved_payment_details_item import (
- BusinessSavedPaymentDetailsItem,
- BusinessSavedPaymentDetailsItem_Ach,
- BusinessSavedPaymentDetailsItem_Card,
- BusinessSavedPaymentDetailsItem_Cash,
- BusinessSavedPaymentDetailsItem_Check,
- BusinessSavedPaymentDetailsItem_GenericBankAccount,
- BusinessSavedPaymentDetailsItem_Iban,
- BusinessSavedPaymentDetailsItem_Mpesa,
- BusinessSavedPaymentDetailsItem_Npp,
- BusinessSavedPaymentDetailsItem_Swift,
- BusinessSavedPaymentDetailsItem_Upi,
- BusinessSavedPaymentDetailsItem_Wallet,
-)
-from .business_user_event import BusinessUserEvent
-from .business_user_event_with_rules_result import BusinessUserEventWithRulesResult
-from .business_user_monitoring_result import BusinessUserMonitoringResult
-from .business_user_segment import BusinessUserSegment
-from .business_with_rules_result import BusinessWithRulesResult
-from .business_with_rules_result_saved_payment_details_item import (
- BusinessWithRulesResultSavedPaymentDetailsItem,
- BusinessWithRulesResultSavedPaymentDetailsItem_Ach,
- BusinessWithRulesResultSavedPaymentDetailsItem_Card,
- BusinessWithRulesResultSavedPaymentDetailsItem_Cash,
- BusinessWithRulesResultSavedPaymentDetailsItem_Check,
- BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
- BusinessWithRulesResultSavedPaymentDetailsItem_Iban,
- BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa,
- BusinessWithRulesResultSavedPaymentDetailsItem_Npp,
- BusinessWithRulesResultSavedPaymentDetailsItem_Swift,
- BusinessWithRulesResultSavedPaymentDetailsItem_Upi,
- BusinessWithRulesResultSavedPaymentDetailsItem_Wallet,
-)
-from .card_brand import CardBrand
-from .card_details import CardDetails
-from .card_expiry import CardExpiry
-from .card_funding import CardFunding
-from .card_merchant_details import CardMerchantDetails
-from .card_payment_method import CardPaymentMethod
-from .card_status import CardStatus
-from .card_type import CardType
-from .case_management_event import CaseManagementEvent
-from .case_management_event_case_status import CaseManagementEventCaseStatus
-from .case_management_event_case_status_reason import CaseManagementEventCaseStatusReason
-from .case_opened_details import CaseOpenedDetails
-from .case_status_details import CaseStatusDetails
-from .cash_details import CashDetails
-from .cash_payment_method import CashPaymentMethod
-from .check_delivery_status import CheckDeliveryStatus
-from .check_details import CheckDetails
-from .check_payment_method import CheckPaymentMethod
-from .column_type import ColumnType
-from .company_financial_details import CompanyFinancialDetails
-from .company_general_details import CompanyGeneralDetails
-from .company_registration_details import CompanyRegistrationDetails
-from .consumer_name import ConsumerName
-from .consumer_user_event import ConsumerUserEvent
-from .consumer_user_event_with_rules_result import ConsumerUserEventWithRulesResult
-from .consumer_user_monitoring_result import ConsumerUserMonitoringResult
-from .consumer_user_segment import ConsumerUserSegment
-from .contact_details import ContactDetails
-from .country_code import CountryCode
-from .cra_risk_level_updated_details import CraRiskLevelUpdatedDetails
-from .currency_code import CurrencyCode
-from .custom_column import CustomColumn
-from .date import Date
-from .device_data import DeviceData
-from .email_id import EmailId
-from .employment_details import EmploymentDetails
-from .employment_status import EmploymentStatus
-from .executed_logic_vars import ExecutedLogicVars
-from .executed_rules_result import ExecutedRulesResult
-from .expected_income import ExpectedIncome
-from .failed_rules_result import FailedRulesResult
-from .false_positive_details import FalsePositiveDetails
-from .file_info import FileInfo
-from .gender import Gender
-from .general_bank_account_payment_method import GeneralBankAccountPaymentMethod
-from .generic_bank_account_details import GenericBankAccountDetails
-from .hit_rules_details import HitRulesDetails
-from .hit_rules_results import HitRulesResults
-from .iban_details import IbanDetails
-from .iban_payment_method import IbanPaymentMethod
-from .kyc_status import KycStatus
-from .kyc_status_details import KycStatusDetails
-from .legal_document import LegalDocument
-from .legal_entity import LegalEntity
-from .list_data import ListData
-from .list_existed import ListExisted
-from .list_header import ListHeader
-from .list_item import ListItem
-from .list_key_metadata import ListKeyMetadata
-from .list_metadata import ListMetadata
-from .list_metadata_ttl import ListMetadataTtl
-from .list_metadata_ttl_unit import ListMetadataTtlUnit
-from .list_subtype import ListSubtype
-from .list_type import ListType
-from .list_updated_details import ListUpdatedDetails
-from .list_updated_details_action import ListUpdatedDetailsAction
-from .marital_status import MaritalStatus
-from .mcc_details import MccDetails
-from .mpesa_details import MpesaDetails
-from .mpesa_payment_method import MpesaPaymentMethod
-from .mpesa_transaction_type import MpesaTransactionType
-from .npp_details import NppDetails
-from .npp_payment_method import NppPaymentMethod
-from .origin_funds_info import OriginFundsInfo
-from .page import Page
-from .page_size import PageSize
-from .payment_method import PaymentMethod
-from .pep_rank import PepRank
-from .pep_status import PepStatus
-from .person import Person
-from .person_attachment import PersonAttachment
-from .place_of_birth import PlaceOfBirth
-from .pos_details import PosDetails
-from .pos_entry_mode import PosEntryMode
-from .risk_level import RiskLevel
-from .rule_action import RuleAction
-from .rule_failure_exception import RuleFailureException
-from .rule_hit_direction import RuleHitDirection
-from .rule_hit_meta import RuleHitMeta
-from .rule_labels import RuleLabels
-from .rule_nature import RuleNature
-from .rules_results import RulesResults
-from .sanctions_details import SanctionsDetails
-from .sanctions_details_entity_type import SanctionsDetailsEntityType
-from .sanctions_hit_context import SanctionsHitContext
-from .sanctions_screening_entity import SanctionsScreeningEntity
-from .sanctions_status import SanctionsStatus
-from .source_of_funds import SourceOfFunds
-from .swift_details import SwiftDetails
-from .swift_payment_method import SwiftPaymentMethod
-from .tag import Tag
-from .transaction import Transaction
-from .transaction_amount_details import TransactionAmountDetails
-from .transaction_amount_limit import TransactionAmountLimit
-from .transaction_base import TransactionBase
-from .transaction_count_limit import TransactionCountLimit
-from .transaction_destination_payment_details import (
- TransactionDestinationPaymentDetails,
- TransactionDestinationPaymentDetails_Ach,
- TransactionDestinationPaymentDetails_Card,
- TransactionDestinationPaymentDetails_Cash,
- TransactionDestinationPaymentDetails_Check,
- TransactionDestinationPaymentDetails_GenericBankAccount,
- TransactionDestinationPaymentDetails_Iban,
- TransactionDestinationPaymentDetails_Mpesa,
- TransactionDestinationPaymentDetails_Npp,
- TransactionDestinationPaymentDetails_Swift,
- TransactionDestinationPaymentDetails_Upi,
- TransactionDestinationPaymentDetails_Wallet,
-)
-from .transaction_event import TransactionEvent
-from .transaction_event_monitoring_result import TransactionEventMonitoringResult
-from .transaction_event_with_rules_result import TransactionEventWithRulesResult
-from .transaction_limit import TransactionLimit
-from .transaction_limits import TransactionLimits
-from .transaction_limits_payment_method_limits import TransactionLimitsPaymentMethodLimits
-from .transaction_monitoring_result import TransactionMonitoringResult
-from .transaction_origin_payment_details import (
- TransactionOriginPaymentDetails,
- TransactionOriginPaymentDetails_Ach,
- TransactionOriginPaymentDetails_Card,
- TransactionOriginPaymentDetails_Cash,
- TransactionOriginPaymentDetails_Check,
- TransactionOriginPaymentDetails_GenericBankAccount,
- TransactionOriginPaymentDetails_Iban,
- TransactionOriginPaymentDetails_Mpesa,
- TransactionOriginPaymentDetails_Npp,
- TransactionOriginPaymentDetails_Swift,
- TransactionOriginPaymentDetails_Upi,
- TransactionOriginPaymentDetails_Wallet,
-)
-from .transaction_risk_scoring_result import TransactionRiskScoringResult
-from .transaction_state import TransactionState
-from .transaction_status_details import TransactionStatusDetails
-from .transaction_updatable import TransactionUpdatable
-from .transaction_updatable_destination_payment_details import (
- TransactionUpdatableDestinationPaymentDetails,
- TransactionUpdatableDestinationPaymentDetails_Ach,
- TransactionUpdatableDestinationPaymentDetails_Card,
- TransactionUpdatableDestinationPaymentDetails_Cash,
- TransactionUpdatableDestinationPaymentDetails_Check,
- TransactionUpdatableDestinationPaymentDetails_GenericBankAccount,
- TransactionUpdatableDestinationPaymentDetails_Iban,
- TransactionUpdatableDestinationPaymentDetails_Mpesa,
- TransactionUpdatableDestinationPaymentDetails_Npp,
- TransactionUpdatableDestinationPaymentDetails_Swift,
- TransactionUpdatableDestinationPaymentDetails_Upi,
- TransactionUpdatableDestinationPaymentDetails_Wallet,
-)
-from .transaction_updatable_origin_payment_details import (
- TransactionUpdatableOriginPaymentDetails,
- TransactionUpdatableOriginPaymentDetails_Ach,
- TransactionUpdatableOriginPaymentDetails_Card,
- TransactionUpdatableOriginPaymentDetails_Cash,
- TransactionUpdatableOriginPaymentDetails_Check,
- TransactionUpdatableOriginPaymentDetails_GenericBankAccount,
- TransactionUpdatableOriginPaymentDetails_Iban,
- TransactionUpdatableOriginPaymentDetails_Mpesa,
- TransactionUpdatableOriginPaymentDetails_Npp,
- TransactionUpdatableOriginPaymentDetails_Swift,
- TransactionUpdatableOriginPaymentDetails_Upi,
- TransactionUpdatableOriginPaymentDetails_Wallet,
-)
-from .transaction_with_rules_result import TransactionWithRulesResult
-from .transaction_with_rules_result_destination_payment_details import (
- TransactionWithRulesResultDestinationPaymentDetails,
- TransactionWithRulesResultDestinationPaymentDetails_Ach,
- TransactionWithRulesResultDestinationPaymentDetails_Card,
- TransactionWithRulesResultDestinationPaymentDetails_Cash,
- TransactionWithRulesResultDestinationPaymentDetails_Check,
- TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount,
- TransactionWithRulesResultDestinationPaymentDetails_Iban,
- TransactionWithRulesResultDestinationPaymentDetails_Mpesa,
- TransactionWithRulesResultDestinationPaymentDetails_Npp,
- TransactionWithRulesResultDestinationPaymentDetails_Swift,
- TransactionWithRulesResultDestinationPaymentDetails_Upi,
- TransactionWithRulesResultDestinationPaymentDetails_Wallet,
-)
-from .transaction_with_rules_result_origin_payment_details import (
- TransactionWithRulesResultOriginPaymentDetails,
- TransactionWithRulesResultOriginPaymentDetails_Ach,
- TransactionWithRulesResultOriginPaymentDetails_Card,
- TransactionWithRulesResultOriginPaymentDetails_Cash,
- TransactionWithRulesResultOriginPaymentDetails_Check,
- TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount,
- TransactionWithRulesResultOriginPaymentDetails_Iban,
- TransactionWithRulesResultOriginPaymentDetails_Mpesa,
- TransactionWithRulesResultOriginPaymentDetails_Npp,
- TransactionWithRulesResultOriginPaymentDetails_Swift,
- TransactionWithRulesResultOriginPaymentDetails_Upi,
- TransactionWithRulesResultOriginPaymentDetails_Wallet,
-)
-from .upi_details import UpiDetails
-from .upi_payment_method import UpiPaymentMethod
-from .user import User
-from .user_base import UserBase
-from .user_details import UserDetails
-from .user_entity_link import UserEntityLink
-from .user_optional import UserOptional
-from .user_optional_saved_payment_details_item import (
- UserOptionalSavedPaymentDetailsItem,
- UserOptionalSavedPaymentDetailsItem_Ach,
- UserOptionalSavedPaymentDetailsItem_Card,
- UserOptionalSavedPaymentDetailsItem_Cash,
- UserOptionalSavedPaymentDetailsItem_Check,
- UserOptionalSavedPaymentDetailsItem_GenericBankAccount,
- UserOptionalSavedPaymentDetailsItem_Iban,
- UserOptionalSavedPaymentDetailsItem_Mpesa,
- UserOptionalSavedPaymentDetailsItem_Npp,
- UserOptionalSavedPaymentDetailsItem_Swift,
- UserOptionalSavedPaymentDetailsItem_Upi,
- UserOptionalSavedPaymentDetailsItem_Wallet,
-)
-from .user_registration_status import UserRegistrationStatus
-from .user_risk_score_details import UserRiskScoreDetails
-from .user_rules_result import UserRulesResult
-from .user_saved_payment_details_item import (
- UserSavedPaymentDetailsItem,
- UserSavedPaymentDetailsItem_Ach,
- UserSavedPaymentDetailsItem_Card,
- UserSavedPaymentDetailsItem_Cash,
- UserSavedPaymentDetailsItem_Check,
- UserSavedPaymentDetailsItem_GenericBankAccount,
- UserSavedPaymentDetailsItem_Iban,
- UserSavedPaymentDetailsItem_Mpesa,
- UserSavedPaymentDetailsItem_Npp,
- UserSavedPaymentDetailsItem_Swift,
- UserSavedPaymentDetailsItem_Upi,
- UserSavedPaymentDetailsItem_Wallet,
-)
-from .user_state import UserState
-from .user_state_details import UserStateDetails
-from .user_tag import UserTag
-from .user_tags_update import UserTagsUpdate
-from .user_with_rules_result import UserWithRulesResult
-from .user_with_rules_result_saved_payment_details_item import (
- UserWithRulesResultSavedPaymentDetailsItem,
- UserWithRulesResultSavedPaymentDetailsItem_Ach,
- UserWithRulesResultSavedPaymentDetailsItem_Card,
- UserWithRulesResultSavedPaymentDetailsItem_Cash,
- UserWithRulesResultSavedPaymentDetailsItem_Check,
- UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
- UserWithRulesResultSavedPaymentDetailsItem_Iban,
- UserWithRulesResultSavedPaymentDetailsItem_Mpesa,
- UserWithRulesResultSavedPaymentDetailsItem_Npp,
- UserWithRulesResultSavedPaymentDetailsItem_Swift,
- UserWithRulesResultSavedPaymentDetailsItem_Upi,
- UserWithRulesResultSavedPaymentDetailsItem_Wallet,
-)
-from .wallet_details import WalletDetails
-from .wallet_network import WalletNetwork
-from .wallet_payment_method import WalletPaymentMethod
-from .webhook_event import WebhookEvent
-from .webhook_event_base import WebhookEventBase
-from .webhook_event_base_triggered_by import WebhookEventBaseTriggeredBy
-from .webhook_event_data import WebhookEventData
-from .webhook_event_triggered_by import WebhookEventTriggeredBy
-from .webhook_event_type import WebhookEventType
-from .webhook_kyc_status_details import WebhookKycStatusDetails
-from .webhook_user_state_details import WebhookUserStateDetails
+# isort: skip_file
+
+import typing
+from importlib import import_module
+
+if typing.TYPE_CHECKING:
+ from .ach_details import AchDetails
+ from .ach_payment_method import AchPaymentMethod
+ from .acquisition_channel import AcquisitionChannel
+ from .address import Address
+ from .adverse_media_status import AdverseMediaStatus
+ from .alert_opened_details import AlertOpenedDetails
+ from .alert_status_details import AlertStatusDetails
+ from .amount import Amount
+ from .api_error_response import ApiErrorResponse
+ from .batch_business_user_event_with_rules_result import BatchBusinessUserEventWithRulesResult
+ from .batch_business_user_events_with_rules_result import BatchBusinessUserEventsWithRulesResult
+ from .batch_business_user_with_rules_result import BatchBusinessUserWithRulesResult
+ from .batch_business_user_with_rules_result_saved_payment_details_item import (
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi,
+ BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet,
+ )
+ from .batch_business_users_with_rules_results import BatchBusinessUsersWithRulesResults
+ from .batch_consumer_user_event_with_rules_result import BatchConsumerUserEventWithRulesResult
+ from .batch_consumer_user_events_rules_result import BatchConsumerUserEventsRulesResult
+ from .batch_consumer_user_with_rules_result import BatchConsumerUserWithRulesResult
+ from .batch_consumer_user_with_rules_result_saved_payment_details_item import (
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi,
+ BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet,
+ )
+ from .batch_consumer_users_with_rules_result import BatchConsumerUsersWithRulesResult
+ from .batch_response import BatchResponse
+ from .batch_response_failed_record import BatchResponseFailedRecord
+ from .batch_response_status import BatchResponseStatus
+ from .batch_transaction_event_monitoring_result import BatchTransactionEventMonitoringResult
+ from .batch_transaction_event_monitoring_results import BatchTransactionEventMonitoringResults
+ from .batch_transaction_monitoring_result import BatchTransactionMonitoringResult
+ from .batch_transaction_monitoring_results import BatchTransactionMonitoringResults
+ from .batch_user_rules_result import BatchUserRulesResult
+ from .boolean_string import BooleanString
+ from .business import Business
+ from .business_base import BusinessBase
+ from .business_optional import BusinessOptional
+ from .business_optional_saved_payment_details_item import (
+ BusinessOptionalSavedPaymentDetailsItem,
+ BusinessOptionalSavedPaymentDetailsItem_Ach,
+ BusinessOptionalSavedPaymentDetailsItem_Card,
+ BusinessOptionalSavedPaymentDetailsItem_Cash,
+ BusinessOptionalSavedPaymentDetailsItem_Check,
+ BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount,
+ BusinessOptionalSavedPaymentDetailsItem_Iban,
+ BusinessOptionalSavedPaymentDetailsItem_Mpesa,
+ BusinessOptionalSavedPaymentDetailsItem_Npp,
+ BusinessOptionalSavedPaymentDetailsItem_Swift,
+ BusinessOptionalSavedPaymentDetailsItem_Upi,
+ BusinessOptionalSavedPaymentDetailsItem_Wallet,
+ )
+ from .business_saved_payment_details_item import (
+ BusinessSavedPaymentDetailsItem,
+ BusinessSavedPaymentDetailsItem_Ach,
+ BusinessSavedPaymentDetailsItem_Card,
+ BusinessSavedPaymentDetailsItem_Cash,
+ BusinessSavedPaymentDetailsItem_Check,
+ BusinessSavedPaymentDetailsItem_GenericBankAccount,
+ BusinessSavedPaymentDetailsItem_Iban,
+ BusinessSavedPaymentDetailsItem_Mpesa,
+ BusinessSavedPaymentDetailsItem_Npp,
+ BusinessSavedPaymentDetailsItem_Swift,
+ BusinessSavedPaymentDetailsItem_Upi,
+ BusinessSavedPaymentDetailsItem_Wallet,
+ )
+ from .business_user_event import BusinessUserEvent
+ from .business_user_event_with_rules_result import BusinessUserEventWithRulesResult
+ from .business_user_monitoring_result import BusinessUserMonitoringResult
+ from .business_user_segment import BusinessUserSegment
+ from .business_with_rules_result import BusinessWithRulesResult
+ from .business_with_rules_result_saved_payment_details_item import (
+ BusinessWithRulesResultSavedPaymentDetailsItem,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Ach,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Card,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Cash,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Check,
+ BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Iban,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Npp,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Swift,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Upi,
+ BusinessWithRulesResultSavedPaymentDetailsItem_Wallet,
+ )
+ from .card_brand import CardBrand
+ from .card_details import CardDetails
+ from .card_expiry import CardExpiry
+ from .card_funding import CardFunding
+ from .card_merchant_details import CardMerchantDetails
+ from .card_payment_method import CardPaymentMethod
+ from .card_status import CardStatus
+ from .card_type import CardType
+ from .case_management_event import CaseManagementEvent
+ from .case_management_event_case_status import CaseManagementEventCaseStatus
+ from .case_management_event_case_status_reason import CaseManagementEventCaseStatusReason
+ from .case_opened_details import CaseOpenedDetails
+ from .case_status_details import CaseStatusDetails
+ from .cash_details import CashDetails
+ from .cash_payment_method import CashPaymentMethod
+ from .check_delivery_status import CheckDeliveryStatus
+ from .check_details import CheckDetails
+ from .check_payment_method import CheckPaymentMethod
+ from .column_type import ColumnType
+ from .company_financial_details import CompanyFinancialDetails
+ from .company_general_details import CompanyGeneralDetails
+ from .company_registration_details import CompanyRegistrationDetails
+ from .consumer_name import ConsumerName
+ from .consumer_user_event import ConsumerUserEvent
+ from .consumer_user_event_with_rules_result import ConsumerUserEventWithRulesResult
+ from .consumer_user_monitoring_result import ConsumerUserMonitoringResult
+ from .consumer_user_segment import ConsumerUserSegment
+ from .contact_details import ContactDetails
+ from .country_code import CountryCode
+ from .cra_risk_level_updated_details import CraRiskLevelUpdatedDetails
+ from .currency_code import CurrencyCode
+ from .custom_column import CustomColumn
+ from .date import Date
+ from .device_data import DeviceData
+ from .email_id import EmailId
+ from .employment_details import EmploymentDetails
+ from .employment_status import EmploymentStatus
+ from .executed_logic_vars import ExecutedLogicVars
+ from .executed_rules_result import ExecutedRulesResult
+ from .expected_income import ExpectedIncome
+ from .failed_rules_result import FailedRulesResult
+ from .false_positive_details import FalsePositiveDetails
+ from .file_info import FileInfo
+ from .gender import Gender
+ from .general_bank_account_payment_method import GeneralBankAccountPaymentMethod
+ from .generic_bank_account_details import GenericBankAccountDetails
+ from .hit_rules_details import HitRulesDetails
+ from .hit_rules_results import HitRulesResults
+ from .iban_details import IbanDetails
+ from .iban_payment_method import IbanPaymentMethod
+ from .kyc_status import KycStatus
+ from .kyc_status_details import KycStatusDetails
+ from .legal_document import LegalDocument
+ from .legal_entity import LegalEntity
+ from .list_data import ListData
+ from .list_existed import ListExisted
+ from .list_header import ListHeader
+ from .list_item import ListItem
+ from .list_key_metadata import ListKeyMetadata
+ from .list_metadata import ListMetadata
+ from .list_metadata_ttl import ListMetadataTtl
+ from .list_metadata_ttl_unit import ListMetadataTtlUnit
+ from .list_subtype import ListSubtype
+ from .list_type import ListType
+ from .list_updated_details import ListUpdatedDetails
+ from .list_updated_details_action import ListUpdatedDetailsAction
+ from .marital_status import MaritalStatus
+ from .mcc_details import MccDetails
+ from .mpesa_details import MpesaDetails
+ from .mpesa_payment_method import MpesaPaymentMethod
+ from .mpesa_transaction_type import MpesaTransactionType
+ from .npp_details import NppDetails
+ from .npp_payment_method import NppPaymentMethod
+ from .origin_funds_info import OriginFundsInfo
+ from .page import Page
+ from .page_size import PageSize
+ from .payment_method import PaymentMethod
+ from .pep_rank import PepRank
+ from .pep_status import PepStatus
+ from .person import Person
+ from .person_attachment import PersonAttachment
+ from .place_of_birth import PlaceOfBirth
+ from .pos_details import PosDetails
+ from .pos_entry_mode import PosEntryMode
+ from .risk_level import RiskLevel
+ from .rule_action import RuleAction
+ from .rule_failure_exception import RuleFailureException
+ from .rule_hit_direction import RuleHitDirection
+ from .rule_hit_meta import RuleHitMeta
+ from .rule_labels import RuleLabels
+ from .rule_nature import RuleNature
+ from .rules_results import RulesResults
+ from .sanctions_details import SanctionsDetails
+ from .sanctions_details_entity_type import SanctionsDetailsEntityType
+ from .sanctions_hit_context import SanctionsHitContext
+ from .sanctions_screening_entity import SanctionsScreeningEntity
+ from .sanctions_status import SanctionsStatus
+ from .source_of_funds import SourceOfFunds
+ from .swift_details import SwiftDetails
+ from .swift_payment_method import SwiftPaymentMethod
+ from .tag import Tag
+ from .transaction import Transaction
+ from .transaction_amount_details import TransactionAmountDetails
+ from .transaction_amount_limit import TransactionAmountLimit
+ from .transaction_base import TransactionBase
+ from .transaction_count_limit import TransactionCountLimit
+ from .transaction_destination_payment_details import (
+ TransactionDestinationPaymentDetails,
+ TransactionDestinationPaymentDetails_Ach,
+ TransactionDestinationPaymentDetails_Card,
+ TransactionDestinationPaymentDetails_Cash,
+ TransactionDestinationPaymentDetails_Check,
+ TransactionDestinationPaymentDetails_GenericBankAccount,
+ TransactionDestinationPaymentDetails_Iban,
+ TransactionDestinationPaymentDetails_Mpesa,
+ TransactionDestinationPaymentDetails_Npp,
+ TransactionDestinationPaymentDetails_Swift,
+ TransactionDestinationPaymentDetails_Upi,
+ TransactionDestinationPaymentDetails_Wallet,
+ )
+ from .transaction_event import TransactionEvent
+ from .transaction_event_monitoring_result import TransactionEventMonitoringResult
+ from .transaction_event_with_rules_result import TransactionEventWithRulesResult
+ from .transaction_limit import TransactionLimit
+ from .transaction_limits import TransactionLimits
+ from .transaction_limits_payment_method_limits import TransactionLimitsPaymentMethodLimits
+ from .transaction_monitoring_result import TransactionMonitoringResult
+ from .transaction_origin_payment_details import (
+ TransactionOriginPaymentDetails,
+ TransactionOriginPaymentDetails_Ach,
+ TransactionOriginPaymentDetails_Card,
+ TransactionOriginPaymentDetails_Cash,
+ TransactionOriginPaymentDetails_Check,
+ TransactionOriginPaymentDetails_GenericBankAccount,
+ TransactionOriginPaymentDetails_Iban,
+ TransactionOriginPaymentDetails_Mpesa,
+ TransactionOriginPaymentDetails_Npp,
+ TransactionOriginPaymentDetails_Swift,
+ TransactionOriginPaymentDetails_Upi,
+ TransactionOriginPaymentDetails_Wallet,
+ )
+ from .transaction_risk_scoring_result import TransactionRiskScoringResult
+ from .transaction_state import TransactionState
+ from .transaction_status_details import TransactionStatusDetails
+ from .transaction_updatable import TransactionUpdatable
+ from .transaction_updatable_destination_payment_details import (
+ TransactionUpdatableDestinationPaymentDetails,
+ TransactionUpdatableDestinationPaymentDetails_Ach,
+ TransactionUpdatableDestinationPaymentDetails_Card,
+ TransactionUpdatableDestinationPaymentDetails_Cash,
+ TransactionUpdatableDestinationPaymentDetails_Check,
+ TransactionUpdatableDestinationPaymentDetails_GenericBankAccount,
+ TransactionUpdatableDestinationPaymentDetails_Iban,
+ TransactionUpdatableDestinationPaymentDetails_Mpesa,
+ TransactionUpdatableDestinationPaymentDetails_Npp,
+ TransactionUpdatableDestinationPaymentDetails_Swift,
+ TransactionUpdatableDestinationPaymentDetails_Upi,
+ TransactionUpdatableDestinationPaymentDetails_Wallet,
+ )
+ from .transaction_updatable_origin_payment_details import (
+ TransactionUpdatableOriginPaymentDetails,
+ TransactionUpdatableOriginPaymentDetails_Ach,
+ TransactionUpdatableOriginPaymentDetails_Card,
+ TransactionUpdatableOriginPaymentDetails_Cash,
+ TransactionUpdatableOriginPaymentDetails_Check,
+ TransactionUpdatableOriginPaymentDetails_GenericBankAccount,
+ TransactionUpdatableOriginPaymentDetails_Iban,
+ TransactionUpdatableOriginPaymentDetails_Mpesa,
+ TransactionUpdatableOriginPaymentDetails_Npp,
+ TransactionUpdatableOriginPaymentDetails_Swift,
+ TransactionUpdatableOriginPaymentDetails_Upi,
+ TransactionUpdatableOriginPaymentDetails_Wallet,
+ )
+ from .transaction_with_rules_result import TransactionWithRulesResult
+ from .transaction_with_rules_result_destination_payment_details import (
+ TransactionWithRulesResultDestinationPaymentDetails,
+ TransactionWithRulesResultDestinationPaymentDetails_Ach,
+ TransactionWithRulesResultDestinationPaymentDetails_Card,
+ TransactionWithRulesResultDestinationPaymentDetails_Cash,
+ TransactionWithRulesResultDestinationPaymentDetails_Check,
+ TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount,
+ TransactionWithRulesResultDestinationPaymentDetails_Iban,
+ TransactionWithRulesResultDestinationPaymentDetails_Mpesa,
+ TransactionWithRulesResultDestinationPaymentDetails_Npp,
+ TransactionWithRulesResultDestinationPaymentDetails_Swift,
+ TransactionWithRulesResultDestinationPaymentDetails_Upi,
+ TransactionWithRulesResultDestinationPaymentDetails_Wallet,
+ )
+ from .transaction_with_rules_result_origin_payment_details import (
+ TransactionWithRulesResultOriginPaymentDetails,
+ TransactionWithRulesResultOriginPaymentDetails_Ach,
+ TransactionWithRulesResultOriginPaymentDetails_Card,
+ TransactionWithRulesResultOriginPaymentDetails_Cash,
+ TransactionWithRulesResultOriginPaymentDetails_Check,
+ TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount,
+ TransactionWithRulesResultOriginPaymentDetails_Iban,
+ TransactionWithRulesResultOriginPaymentDetails_Mpesa,
+ TransactionWithRulesResultOriginPaymentDetails_Npp,
+ TransactionWithRulesResultOriginPaymentDetails_Swift,
+ TransactionWithRulesResultOriginPaymentDetails_Upi,
+ TransactionWithRulesResultOriginPaymentDetails_Wallet,
+ )
+ from .upi_details import UpiDetails
+ from .upi_payment_method import UpiPaymentMethod
+ from .user import User
+ from .user_base import UserBase
+ from .user_details import UserDetails
+ from .user_entity_link import UserEntityLink
+ from .user_optional import UserOptional
+ from .user_optional_saved_payment_details_item import (
+ UserOptionalSavedPaymentDetailsItem,
+ UserOptionalSavedPaymentDetailsItem_Ach,
+ UserOptionalSavedPaymentDetailsItem_Card,
+ UserOptionalSavedPaymentDetailsItem_Cash,
+ UserOptionalSavedPaymentDetailsItem_Check,
+ UserOptionalSavedPaymentDetailsItem_GenericBankAccount,
+ UserOptionalSavedPaymentDetailsItem_Iban,
+ UserOptionalSavedPaymentDetailsItem_Mpesa,
+ UserOptionalSavedPaymentDetailsItem_Npp,
+ UserOptionalSavedPaymentDetailsItem_Swift,
+ UserOptionalSavedPaymentDetailsItem_Upi,
+ UserOptionalSavedPaymentDetailsItem_Wallet,
+ )
+ from .user_registration_status import UserRegistrationStatus
+ from .user_risk_score_details import UserRiskScoreDetails
+ from .user_rules_result import UserRulesResult
+ from .user_saved_payment_details_item import (
+ UserSavedPaymentDetailsItem,
+ UserSavedPaymentDetailsItem_Ach,
+ UserSavedPaymentDetailsItem_Card,
+ UserSavedPaymentDetailsItem_Cash,
+ UserSavedPaymentDetailsItem_Check,
+ UserSavedPaymentDetailsItem_GenericBankAccount,
+ UserSavedPaymentDetailsItem_Iban,
+ UserSavedPaymentDetailsItem_Mpesa,
+ UserSavedPaymentDetailsItem_Npp,
+ UserSavedPaymentDetailsItem_Swift,
+ UserSavedPaymentDetailsItem_Upi,
+ UserSavedPaymentDetailsItem_Wallet,
+ )
+ from .user_state import UserState
+ from .user_state_details import UserStateDetails
+ from .user_tag import UserTag
+ from .user_tags_update import UserTagsUpdate
+ from .user_with_rules_result import UserWithRulesResult
+ from .user_with_rules_result_saved_payment_details_item import (
+ UserWithRulesResultSavedPaymentDetailsItem,
+ UserWithRulesResultSavedPaymentDetailsItem_Ach,
+ UserWithRulesResultSavedPaymentDetailsItem_Card,
+ UserWithRulesResultSavedPaymentDetailsItem_Cash,
+ UserWithRulesResultSavedPaymentDetailsItem_Check,
+ UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount,
+ UserWithRulesResultSavedPaymentDetailsItem_Iban,
+ UserWithRulesResultSavedPaymentDetailsItem_Mpesa,
+ UserWithRulesResultSavedPaymentDetailsItem_Npp,
+ UserWithRulesResultSavedPaymentDetailsItem_Swift,
+ UserWithRulesResultSavedPaymentDetailsItem_Upi,
+ UserWithRulesResultSavedPaymentDetailsItem_Wallet,
+ )
+ from .wallet_details import WalletDetails
+ from .wallet_network import WalletNetwork
+ from .wallet_payment_method import WalletPaymentMethod
+ from .webhook_event import WebhookEvent
+ from .webhook_event_base import WebhookEventBase
+ from .webhook_event_base_triggered_by import WebhookEventBaseTriggeredBy
+ from .webhook_event_data import WebhookEventData
+ from .webhook_event_triggered_by import WebhookEventTriggeredBy
+ from .webhook_event_type import WebhookEventType
+ from .webhook_kyc_status_details import WebhookKycStatusDetails
+ from .webhook_user_state_details import WebhookUserStateDetails
+_dynamic_imports: typing.Dict[str, str] = {
+ "AchDetails": ".ach_details",
+ "AchPaymentMethod": ".ach_payment_method",
+ "AcquisitionChannel": ".acquisition_channel",
+ "Address": ".address",
+ "AdverseMediaStatus": ".adverse_media_status",
+ "AlertOpenedDetails": ".alert_opened_details",
+ "AlertStatusDetails": ".alert_status_details",
+ "Amount": ".amount",
+ "ApiErrorResponse": ".api_error_response",
+ "BatchBusinessUserEventWithRulesResult": ".batch_business_user_event_with_rules_result",
+ "BatchBusinessUserEventsWithRulesResult": ".batch_business_user_events_with_rules_result",
+ "BatchBusinessUserWithRulesResult": ".batch_business_user_with_rules_result",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUsersWithRulesResults": ".batch_business_users_with_rules_results",
+ "BatchConsumerUserEventWithRulesResult": ".batch_consumer_user_event_with_rules_result",
+ "BatchConsumerUserEventsRulesResult": ".batch_consumer_user_events_rules_result",
+ "BatchConsumerUserWithRulesResult": ".batch_consumer_user_with_rules_result",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem": ".batch_consumer_user_with_rules_result_saved_payment_details_item",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach": ".batch_consumer_user_with_rules_result_saved_payment_details_item",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card": ".batch_consumer_user_with_rules_result_saved_payment_details_item",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash": ".batch_consumer_user_with_rules_result_saved_payment_details_item",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check": ".batch_consumer_user_with_rules_result_saved_payment_details_item",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount": ".batch_consumer_user_with_rules_result_saved_payment_details_item",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban": ".batch_consumer_user_with_rules_result_saved_payment_details_item",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa": ".batch_consumer_user_with_rules_result_saved_payment_details_item",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp": ".batch_consumer_user_with_rules_result_saved_payment_details_item",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift": ".batch_consumer_user_with_rules_result_saved_payment_details_item",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi": ".batch_consumer_user_with_rules_result_saved_payment_details_item",
+ "BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet": ".batch_consumer_user_with_rules_result_saved_payment_details_item",
+ "BatchConsumerUsersWithRulesResult": ".batch_consumer_users_with_rules_result",
+ "BatchResponse": ".batch_response",
+ "BatchResponseFailedRecord": ".batch_response_failed_record",
+ "BatchResponseStatus": ".batch_response_status",
+ "BatchTransactionEventMonitoringResult": ".batch_transaction_event_monitoring_result",
+ "BatchTransactionEventMonitoringResults": ".batch_transaction_event_monitoring_results",
+ "BatchTransactionMonitoringResult": ".batch_transaction_monitoring_result",
+ "BatchTransactionMonitoringResults": ".batch_transaction_monitoring_results",
+ "BatchUserRulesResult": ".batch_user_rules_result",
+ "BooleanString": ".boolean_string",
+ "Business": ".business",
+ "BusinessBase": ".business_base",
+ "BusinessOptional": ".business_optional",
+ "BusinessOptionalSavedPaymentDetailsItem": ".business_optional_saved_payment_details_item",
+ "BusinessOptionalSavedPaymentDetailsItem_Ach": ".business_optional_saved_payment_details_item",
+ "BusinessOptionalSavedPaymentDetailsItem_Card": ".business_optional_saved_payment_details_item",
+ "BusinessOptionalSavedPaymentDetailsItem_Cash": ".business_optional_saved_payment_details_item",
+ "BusinessOptionalSavedPaymentDetailsItem_Check": ".business_optional_saved_payment_details_item",
+ "BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount": ".business_optional_saved_payment_details_item",
+ "BusinessOptionalSavedPaymentDetailsItem_Iban": ".business_optional_saved_payment_details_item",
+ "BusinessOptionalSavedPaymentDetailsItem_Mpesa": ".business_optional_saved_payment_details_item",
+ "BusinessOptionalSavedPaymentDetailsItem_Npp": ".business_optional_saved_payment_details_item",
+ "BusinessOptionalSavedPaymentDetailsItem_Swift": ".business_optional_saved_payment_details_item",
+ "BusinessOptionalSavedPaymentDetailsItem_Upi": ".business_optional_saved_payment_details_item",
+ "BusinessOptionalSavedPaymentDetailsItem_Wallet": ".business_optional_saved_payment_details_item",
+ "BusinessSavedPaymentDetailsItem": ".business_saved_payment_details_item",
+ "BusinessSavedPaymentDetailsItem_Ach": ".business_saved_payment_details_item",
+ "BusinessSavedPaymentDetailsItem_Card": ".business_saved_payment_details_item",
+ "BusinessSavedPaymentDetailsItem_Cash": ".business_saved_payment_details_item",
+ "BusinessSavedPaymentDetailsItem_Check": ".business_saved_payment_details_item",
+ "BusinessSavedPaymentDetailsItem_GenericBankAccount": ".business_saved_payment_details_item",
+ "BusinessSavedPaymentDetailsItem_Iban": ".business_saved_payment_details_item",
+ "BusinessSavedPaymentDetailsItem_Mpesa": ".business_saved_payment_details_item",
+ "BusinessSavedPaymentDetailsItem_Npp": ".business_saved_payment_details_item",
+ "BusinessSavedPaymentDetailsItem_Swift": ".business_saved_payment_details_item",
+ "BusinessSavedPaymentDetailsItem_Upi": ".business_saved_payment_details_item",
+ "BusinessSavedPaymentDetailsItem_Wallet": ".business_saved_payment_details_item",
+ "BusinessUserEvent": ".business_user_event",
+ "BusinessUserEventWithRulesResult": ".business_user_event_with_rules_result",
+ "BusinessUserMonitoringResult": ".business_user_monitoring_result",
+ "BusinessUserSegment": ".business_user_segment",
+ "BusinessWithRulesResult": ".business_with_rules_result",
+ "BusinessWithRulesResultSavedPaymentDetailsItem": ".business_with_rules_result_saved_payment_details_item",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Ach": ".business_with_rules_result_saved_payment_details_item",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Card": ".business_with_rules_result_saved_payment_details_item",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Cash": ".business_with_rules_result_saved_payment_details_item",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Check": ".business_with_rules_result_saved_payment_details_item",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount": ".business_with_rules_result_saved_payment_details_item",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Iban": ".business_with_rules_result_saved_payment_details_item",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa": ".business_with_rules_result_saved_payment_details_item",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Npp": ".business_with_rules_result_saved_payment_details_item",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Swift": ".business_with_rules_result_saved_payment_details_item",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Upi": ".business_with_rules_result_saved_payment_details_item",
+ "BusinessWithRulesResultSavedPaymentDetailsItem_Wallet": ".business_with_rules_result_saved_payment_details_item",
+ "CardBrand": ".card_brand",
+ "CardDetails": ".card_details",
+ "CardExpiry": ".card_expiry",
+ "CardFunding": ".card_funding",
+ "CardMerchantDetails": ".card_merchant_details",
+ "CardPaymentMethod": ".card_payment_method",
+ "CardStatus": ".card_status",
+ "CardType": ".card_type",
+ "CaseManagementEvent": ".case_management_event",
+ "CaseManagementEventCaseStatus": ".case_management_event_case_status",
+ "CaseManagementEventCaseStatusReason": ".case_management_event_case_status_reason",
+ "CaseOpenedDetails": ".case_opened_details",
+ "CaseStatusDetails": ".case_status_details",
+ "CashDetails": ".cash_details",
+ "CashPaymentMethod": ".cash_payment_method",
+ "CheckDeliveryStatus": ".check_delivery_status",
+ "CheckDetails": ".check_details",
+ "CheckPaymentMethod": ".check_payment_method",
+ "ColumnType": ".column_type",
+ "CompanyFinancialDetails": ".company_financial_details",
+ "CompanyGeneralDetails": ".company_general_details",
+ "CompanyRegistrationDetails": ".company_registration_details",
+ "ConsumerName": ".consumer_name",
+ "ConsumerUserEvent": ".consumer_user_event",
+ "ConsumerUserEventWithRulesResult": ".consumer_user_event_with_rules_result",
+ "ConsumerUserMonitoringResult": ".consumer_user_monitoring_result",
+ "ConsumerUserSegment": ".consumer_user_segment",
+ "ContactDetails": ".contact_details",
+ "CountryCode": ".country_code",
+ "CraRiskLevelUpdatedDetails": ".cra_risk_level_updated_details",
+ "CurrencyCode": ".currency_code",
+ "CustomColumn": ".custom_column",
+ "Date": ".date",
+ "DeviceData": ".device_data",
+ "EmailId": ".email_id",
+ "EmploymentDetails": ".employment_details",
+ "EmploymentStatus": ".employment_status",
+ "ExecutedLogicVars": ".executed_logic_vars",
+ "ExecutedRulesResult": ".executed_rules_result",
+ "ExpectedIncome": ".expected_income",
+ "FailedRulesResult": ".failed_rules_result",
+ "FalsePositiveDetails": ".false_positive_details",
+ "FileInfo": ".file_info",
+ "Gender": ".gender",
+ "GeneralBankAccountPaymentMethod": ".general_bank_account_payment_method",
+ "GenericBankAccountDetails": ".generic_bank_account_details",
+ "HitRulesDetails": ".hit_rules_details",
+ "HitRulesResults": ".hit_rules_results",
+ "IbanDetails": ".iban_details",
+ "IbanPaymentMethod": ".iban_payment_method",
+ "KycStatus": ".kyc_status",
+ "KycStatusDetails": ".kyc_status_details",
+ "LegalDocument": ".legal_document",
+ "LegalEntity": ".legal_entity",
+ "ListData": ".list_data",
+ "ListExisted": ".list_existed",
+ "ListHeader": ".list_header",
+ "ListItem": ".list_item",
+ "ListKeyMetadata": ".list_key_metadata",
+ "ListMetadata": ".list_metadata",
+ "ListMetadataTtl": ".list_metadata_ttl",
+ "ListMetadataTtlUnit": ".list_metadata_ttl_unit",
+ "ListSubtype": ".list_subtype",
+ "ListType": ".list_type",
+ "ListUpdatedDetails": ".list_updated_details",
+ "ListUpdatedDetailsAction": ".list_updated_details_action",
+ "MaritalStatus": ".marital_status",
+ "MccDetails": ".mcc_details",
+ "MpesaDetails": ".mpesa_details",
+ "MpesaPaymentMethod": ".mpesa_payment_method",
+ "MpesaTransactionType": ".mpesa_transaction_type",
+ "NppDetails": ".npp_details",
+ "NppPaymentMethod": ".npp_payment_method",
+ "OriginFundsInfo": ".origin_funds_info",
+ "Page": ".page",
+ "PageSize": ".page_size",
+ "PaymentMethod": ".payment_method",
+ "PepRank": ".pep_rank",
+ "PepStatus": ".pep_status",
+ "Person": ".person",
+ "PersonAttachment": ".person_attachment",
+ "PlaceOfBirth": ".place_of_birth",
+ "PosDetails": ".pos_details",
+ "PosEntryMode": ".pos_entry_mode",
+ "RiskLevel": ".risk_level",
+ "RuleAction": ".rule_action",
+ "RuleFailureException": ".rule_failure_exception",
+ "RuleHitDirection": ".rule_hit_direction",
+ "RuleHitMeta": ".rule_hit_meta",
+ "RuleLabels": ".rule_labels",
+ "RuleNature": ".rule_nature",
+ "RulesResults": ".rules_results",
+ "SanctionsDetails": ".sanctions_details",
+ "SanctionsDetailsEntityType": ".sanctions_details_entity_type",
+ "SanctionsHitContext": ".sanctions_hit_context",
+ "SanctionsScreeningEntity": ".sanctions_screening_entity",
+ "SanctionsStatus": ".sanctions_status",
+ "SourceOfFunds": ".source_of_funds",
+ "SwiftDetails": ".swift_details",
+ "SwiftPaymentMethod": ".swift_payment_method",
+ "Tag": ".tag",
+ "Transaction": ".transaction",
+ "TransactionAmountDetails": ".transaction_amount_details",
+ "TransactionAmountLimit": ".transaction_amount_limit",
+ "TransactionBase": ".transaction_base",
+ "TransactionCountLimit": ".transaction_count_limit",
+ "TransactionDestinationPaymentDetails": ".transaction_destination_payment_details",
+ "TransactionDestinationPaymentDetails_Ach": ".transaction_destination_payment_details",
+ "TransactionDestinationPaymentDetails_Card": ".transaction_destination_payment_details",
+ "TransactionDestinationPaymentDetails_Cash": ".transaction_destination_payment_details",
+ "TransactionDestinationPaymentDetails_Check": ".transaction_destination_payment_details",
+ "TransactionDestinationPaymentDetails_GenericBankAccount": ".transaction_destination_payment_details",
+ "TransactionDestinationPaymentDetails_Iban": ".transaction_destination_payment_details",
+ "TransactionDestinationPaymentDetails_Mpesa": ".transaction_destination_payment_details",
+ "TransactionDestinationPaymentDetails_Npp": ".transaction_destination_payment_details",
+ "TransactionDestinationPaymentDetails_Swift": ".transaction_destination_payment_details",
+ "TransactionDestinationPaymentDetails_Upi": ".transaction_destination_payment_details",
+ "TransactionDestinationPaymentDetails_Wallet": ".transaction_destination_payment_details",
+ "TransactionEvent": ".transaction_event",
+ "TransactionEventMonitoringResult": ".transaction_event_monitoring_result",
+ "TransactionEventWithRulesResult": ".transaction_event_with_rules_result",
+ "TransactionLimit": ".transaction_limit",
+ "TransactionLimits": ".transaction_limits",
+ "TransactionLimitsPaymentMethodLimits": ".transaction_limits_payment_method_limits",
+ "TransactionMonitoringResult": ".transaction_monitoring_result",
+ "TransactionOriginPaymentDetails": ".transaction_origin_payment_details",
+ "TransactionOriginPaymentDetails_Ach": ".transaction_origin_payment_details",
+ "TransactionOriginPaymentDetails_Card": ".transaction_origin_payment_details",
+ "TransactionOriginPaymentDetails_Cash": ".transaction_origin_payment_details",
+ "TransactionOriginPaymentDetails_Check": ".transaction_origin_payment_details",
+ "TransactionOriginPaymentDetails_GenericBankAccount": ".transaction_origin_payment_details",
+ "TransactionOriginPaymentDetails_Iban": ".transaction_origin_payment_details",
+ "TransactionOriginPaymentDetails_Mpesa": ".transaction_origin_payment_details",
+ "TransactionOriginPaymentDetails_Npp": ".transaction_origin_payment_details",
+ "TransactionOriginPaymentDetails_Swift": ".transaction_origin_payment_details",
+ "TransactionOriginPaymentDetails_Upi": ".transaction_origin_payment_details",
+ "TransactionOriginPaymentDetails_Wallet": ".transaction_origin_payment_details",
+ "TransactionRiskScoringResult": ".transaction_risk_scoring_result",
+ "TransactionState": ".transaction_state",
+ "TransactionStatusDetails": ".transaction_status_details",
+ "TransactionUpdatable": ".transaction_updatable",
+ "TransactionUpdatableDestinationPaymentDetails": ".transaction_updatable_destination_payment_details",
+ "TransactionUpdatableDestinationPaymentDetails_Ach": ".transaction_updatable_destination_payment_details",
+ "TransactionUpdatableDestinationPaymentDetails_Card": ".transaction_updatable_destination_payment_details",
+ "TransactionUpdatableDestinationPaymentDetails_Cash": ".transaction_updatable_destination_payment_details",
+ "TransactionUpdatableDestinationPaymentDetails_Check": ".transaction_updatable_destination_payment_details",
+ "TransactionUpdatableDestinationPaymentDetails_GenericBankAccount": ".transaction_updatable_destination_payment_details",
+ "TransactionUpdatableDestinationPaymentDetails_Iban": ".transaction_updatable_destination_payment_details",
+ "TransactionUpdatableDestinationPaymentDetails_Mpesa": ".transaction_updatable_destination_payment_details",
+ "TransactionUpdatableDestinationPaymentDetails_Npp": ".transaction_updatable_destination_payment_details",
+ "TransactionUpdatableDestinationPaymentDetails_Swift": ".transaction_updatable_destination_payment_details",
+ "TransactionUpdatableDestinationPaymentDetails_Upi": ".transaction_updatable_destination_payment_details",
+ "TransactionUpdatableDestinationPaymentDetails_Wallet": ".transaction_updatable_destination_payment_details",
+ "TransactionUpdatableOriginPaymentDetails": ".transaction_updatable_origin_payment_details",
+ "TransactionUpdatableOriginPaymentDetails_Ach": ".transaction_updatable_origin_payment_details",
+ "TransactionUpdatableOriginPaymentDetails_Card": ".transaction_updatable_origin_payment_details",
+ "TransactionUpdatableOriginPaymentDetails_Cash": ".transaction_updatable_origin_payment_details",
+ "TransactionUpdatableOriginPaymentDetails_Check": ".transaction_updatable_origin_payment_details",
+ "TransactionUpdatableOriginPaymentDetails_GenericBankAccount": ".transaction_updatable_origin_payment_details",
+ "TransactionUpdatableOriginPaymentDetails_Iban": ".transaction_updatable_origin_payment_details",
+ "TransactionUpdatableOriginPaymentDetails_Mpesa": ".transaction_updatable_origin_payment_details",
+ "TransactionUpdatableOriginPaymentDetails_Npp": ".transaction_updatable_origin_payment_details",
+ "TransactionUpdatableOriginPaymentDetails_Swift": ".transaction_updatable_origin_payment_details",
+ "TransactionUpdatableOriginPaymentDetails_Upi": ".transaction_updatable_origin_payment_details",
+ "TransactionUpdatableOriginPaymentDetails_Wallet": ".transaction_updatable_origin_payment_details",
+ "TransactionWithRulesResult": ".transaction_with_rules_result",
+ "TransactionWithRulesResultDestinationPaymentDetails": ".transaction_with_rules_result_destination_payment_details",
+ "TransactionWithRulesResultDestinationPaymentDetails_Ach": ".transaction_with_rules_result_destination_payment_details",
+ "TransactionWithRulesResultDestinationPaymentDetails_Card": ".transaction_with_rules_result_destination_payment_details",
+ "TransactionWithRulesResultDestinationPaymentDetails_Cash": ".transaction_with_rules_result_destination_payment_details",
+ "TransactionWithRulesResultDestinationPaymentDetails_Check": ".transaction_with_rules_result_destination_payment_details",
+ "TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount": ".transaction_with_rules_result_destination_payment_details",
+ "TransactionWithRulesResultDestinationPaymentDetails_Iban": ".transaction_with_rules_result_destination_payment_details",
+ "TransactionWithRulesResultDestinationPaymentDetails_Mpesa": ".transaction_with_rules_result_destination_payment_details",
+ "TransactionWithRulesResultDestinationPaymentDetails_Npp": ".transaction_with_rules_result_destination_payment_details",
+ "TransactionWithRulesResultDestinationPaymentDetails_Swift": ".transaction_with_rules_result_destination_payment_details",
+ "TransactionWithRulesResultDestinationPaymentDetails_Upi": ".transaction_with_rules_result_destination_payment_details",
+ "TransactionWithRulesResultDestinationPaymentDetails_Wallet": ".transaction_with_rules_result_destination_payment_details",
+ "TransactionWithRulesResultOriginPaymentDetails": ".transaction_with_rules_result_origin_payment_details",
+ "TransactionWithRulesResultOriginPaymentDetails_Ach": ".transaction_with_rules_result_origin_payment_details",
+ "TransactionWithRulesResultOriginPaymentDetails_Card": ".transaction_with_rules_result_origin_payment_details",
+ "TransactionWithRulesResultOriginPaymentDetails_Cash": ".transaction_with_rules_result_origin_payment_details",
+ "TransactionWithRulesResultOriginPaymentDetails_Check": ".transaction_with_rules_result_origin_payment_details",
+ "TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount": ".transaction_with_rules_result_origin_payment_details",
+ "TransactionWithRulesResultOriginPaymentDetails_Iban": ".transaction_with_rules_result_origin_payment_details",
+ "TransactionWithRulesResultOriginPaymentDetails_Mpesa": ".transaction_with_rules_result_origin_payment_details",
+ "TransactionWithRulesResultOriginPaymentDetails_Npp": ".transaction_with_rules_result_origin_payment_details",
+ "TransactionWithRulesResultOriginPaymentDetails_Swift": ".transaction_with_rules_result_origin_payment_details",
+ "TransactionWithRulesResultOriginPaymentDetails_Upi": ".transaction_with_rules_result_origin_payment_details",
+ "TransactionWithRulesResultOriginPaymentDetails_Wallet": ".transaction_with_rules_result_origin_payment_details",
+ "UpiDetails": ".upi_details",
+ "UpiPaymentMethod": ".upi_payment_method",
+ "User": ".user",
+ "UserBase": ".user_base",
+ "UserDetails": ".user_details",
+ "UserEntityLink": ".user_entity_link",
+ "UserOptional": ".user_optional",
+ "UserOptionalSavedPaymentDetailsItem": ".user_optional_saved_payment_details_item",
+ "UserOptionalSavedPaymentDetailsItem_Ach": ".user_optional_saved_payment_details_item",
+ "UserOptionalSavedPaymentDetailsItem_Card": ".user_optional_saved_payment_details_item",
+ "UserOptionalSavedPaymentDetailsItem_Cash": ".user_optional_saved_payment_details_item",
+ "UserOptionalSavedPaymentDetailsItem_Check": ".user_optional_saved_payment_details_item",
+ "UserOptionalSavedPaymentDetailsItem_GenericBankAccount": ".user_optional_saved_payment_details_item",
+ "UserOptionalSavedPaymentDetailsItem_Iban": ".user_optional_saved_payment_details_item",
+ "UserOptionalSavedPaymentDetailsItem_Mpesa": ".user_optional_saved_payment_details_item",
+ "UserOptionalSavedPaymentDetailsItem_Npp": ".user_optional_saved_payment_details_item",
+ "UserOptionalSavedPaymentDetailsItem_Swift": ".user_optional_saved_payment_details_item",
+ "UserOptionalSavedPaymentDetailsItem_Upi": ".user_optional_saved_payment_details_item",
+ "UserOptionalSavedPaymentDetailsItem_Wallet": ".user_optional_saved_payment_details_item",
+ "UserRegistrationStatus": ".user_registration_status",
+ "UserRiskScoreDetails": ".user_risk_score_details",
+ "UserRulesResult": ".user_rules_result",
+ "UserSavedPaymentDetailsItem": ".user_saved_payment_details_item",
+ "UserSavedPaymentDetailsItem_Ach": ".user_saved_payment_details_item",
+ "UserSavedPaymentDetailsItem_Card": ".user_saved_payment_details_item",
+ "UserSavedPaymentDetailsItem_Cash": ".user_saved_payment_details_item",
+ "UserSavedPaymentDetailsItem_Check": ".user_saved_payment_details_item",
+ "UserSavedPaymentDetailsItem_GenericBankAccount": ".user_saved_payment_details_item",
+ "UserSavedPaymentDetailsItem_Iban": ".user_saved_payment_details_item",
+ "UserSavedPaymentDetailsItem_Mpesa": ".user_saved_payment_details_item",
+ "UserSavedPaymentDetailsItem_Npp": ".user_saved_payment_details_item",
+ "UserSavedPaymentDetailsItem_Swift": ".user_saved_payment_details_item",
+ "UserSavedPaymentDetailsItem_Upi": ".user_saved_payment_details_item",
+ "UserSavedPaymentDetailsItem_Wallet": ".user_saved_payment_details_item",
+ "UserState": ".user_state",
+ "UserStateDetails": ".user_state_details",
+ "UserTag": ".user_tag",
+ "UserTagsUpdate": ".user_tags_update",
+ "UserWithRulesResult": ".user_with_rules_result",
+ "UserWithRulesResultSavedPaymentDetailsItem": ".user_with_rules_result_saved_payment_details_item",
+ "UserWithRulesResultSavedPaymentDetailsItem_Ach": ".user_with_rules_result_saved_payment_details_item",
+ "UserWithRulesResultSavedPaymentDetailsItem_Card": ".user_with_rules_result_saved_payment_details_item",
+ "UserWithRulesResultSavedPaymentDetailsItem_Cash": ".user_with_rules_result_saved_payment_details_item",
+ "UserWithRulesResultSavedPaymentDetailsItem_Check": ".user_with_rules_result_saved_payment_details_item",
+ "UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount": ".user_with_rules_result_saved_payment_details_item",
+ "UserWithRulesResultSavedPaymentDetailsItem_Iban": ".user_with_rules_result_saved_payment_details_item",
+ "UserWithRulesResultSavedPaymentDetailsItem_Mpesa": ".user_with_rules_result_saved_payment_details_item",
+ "UserWithRulesResultSavedPaymentDetailsItem_Npp": ".user_with_rules_result_saved_payment_details_item",
+ "UserWithRulesResultSavedPaymentDetailsItem_Swift": ".user_with_rules_result_saved_payment_details_item",
+ "UserWithRulesResultSavedPaymentDetailsItem_Upi": ".user_with_rules_result_saved_payment_details_item",
+ "UserWithRulesResultSavedPaymentDetailsItem_Wallet": ".user_with_rules_result_saved_payment_details_item",
+ "WalletDetails": ".wallet_details",
+ "WalletNetwork": ".wallet_network",
+ "WalletPaymentMethod": ".wallet_payment_method",
+ "WebhookEvent": ".webhook_event",
+ "WebhookEventBase": ".webhook_event_base",
+ "WebhookEventBaseTriggeredBy": ".webhook_event_base_triggered_by",
+ "WebhookEventData": ".webhook_event_data",
+ "WebhookEventTriggeredBy": ".webhook_event_triggered_by",
+ "WebhookEventType": ".webhook_event_type",
+ "WebhookKycStatusDetails": ".webhook_kyc_status_details",
+ "WebhookUserStateDetails": ".webhook_user_state_details",
+}
+
+
+def __getattr__(attr_name: str) -> typing.Any:
+ module_name = _dynamic_imports.get(attr_name)
+ if module_name is None:
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
+ try:
+ module = import_module(module_name, __package__)
+ if module_name == f".{attr_name}":
+ return module
+ else:
+ return getattr(module, attr_name)
+ except ImportError as e:
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
+ except AttributeError as e:
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
+
+
+def __dir__():
+ lazy_attrs = list(_dynamic_imports.keys())
+ return sorted(lazy_attrs)
+
__all__ = [
"AchDetails",
diff --git a/src/flagright/types/ach_details.py b/src/flagright/types/ach_details.py
index 22a95fe..22f82e3 100644
--- a/src/flagright/types/ach_details.py
+++ b/src/flagright/types/ach_details.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
-from .amount import Amount
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
from .address import Address
+from .amount import Amount
from .email_id import EmailId
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class AchDetails(UniversalBaseModel):
diff --git a/src/flagright/types/address.py b/src/flagright/types/address.py
index 449f340..cfe966b 100644
--- a/src/flagright/types/address.py
+++ b/src/flagright/types/address.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class Address(UniversalBaseModel):
diff --git a/src/flagright/types/alert_opened_details.py b/src/flagright/types/alert_opened_details.py
index 9acc590..9e5f33a 100644
--- a/src/flagright/types/alert_opened_details.py
+++ b/src/flagright/types/alert_opened_details.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
class AlertOpenedDetails(UniversalBaseModel):
diff --git a/src/flagright/types/alert_status_details.py b/src/flagright/types/alert_status_details.py
index b19b0c9..35ca7a5 100644
--- a/src/flagright/types/alert_status_details.py
+++ b/src/flagright/types/alert_status_details.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
class AlertStatusDetails(UniversalBaseModel):
diff --git a/src/flagright/types/amount.py b/src/flagright/types/amount.py
index 763f0fc..1f714bc 100644
--- a/src/flagright/types/amount.py
+++ b/src/flagright/types/amount.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
from .currency_code import CurrencyCode
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import typing
class Amount(UniversalBaseModel):
diff --git a/src/flagright/types/api_error_response.py b/src/flagright/types/api_error_response.py
index 5280db4..e553d80 100644
--- a/src/flagright/types/api_error_response.py
+++ b/src/flagright/types/api_error_response.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
class ApiErrorResponse(UniversalBaseModel):
diff --git a/src/flagright/types/batch_business_user_event_with_rules_result.py b/src/flagright/types/batch_business_user_event_with_rules_result.py
index 2a5c7d8..9112587 100644
--- a/src/flagright/types/batch_business_user_event_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_event_with_rules_result.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
from .business_optional import BusinessOptional
from .executed_rules_result import ExecutedRulesResult
from .user_risk_score_details import UserRiskScoreDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class BatchBusinessUserEventWithRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/batch_business_user_events_with_rules_result.py b/src/flagright/types/batch_business_user_events_with_rules_result.py
index 2af9faf..34d237b 100644
--- a/src/flagright/types/batch_business_user_events_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_events_with_rules_result.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .batch_business_user_event_with_rules_result import BatchBusinessUserEventWithRulesResult
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .batch_business_user_event_with_rules_result import BatchBusinessUserEventWithRulesResult
class BatchBusinessUserEventsWithRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index e0fb2a7..bccef99 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -1,29 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-from .legal_entity import LegalEntity
-import typing
-from .user_state_details import UserStateDetails
-from .kyc_status_details import KycStatusDetails
-from .person import Person
-from .transaction_limits import TransactionLimits
-from .risk_level import RiskLevel
-from .payment_method import PaymentMethod
-from .user_entity_link import UserEntityLink
from .acquisition_channel import AcquisitionChannel
from .batch_business_user_with_rules_result_saved_payment_details_item import (
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
)
-from .mcc_details import MccDetails
-from .user_tag import UserTag
-from .person_attachment import PersonAttachment
from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
+from .kyc_status_details import KycStatusDetails
+from .legal_entity import LegalEntity
+from .mcc_details import MccDetails
+from .payment_method import PaymentMethod
+from .person import Person
+from .person_attachment import PersonAttachment
+from .risk_level import RiskLevel
+from .transaction_limits import TransactionLimits
+from .user_entity_link import UserEntityLink
from .user_risk_score_details import UserRiskScoreDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .user_state_details import UserStateDetails
+from .user_tag import UserTag
class BatchBusinessUserWithRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index 5924563..792ca1a 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
-from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
+from .tag import Tag
from .wallet_network import WalletNetwork
-from .check_delivery_status import CheckDeliveryStatus
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
diff --git a/src/flagright/types/batch_business_users_with_rules_results.py b/src/flagright/types/batch_business_users_with_rules_results.py
index 6fe40de..c0c98fd 100644
--- a/src/flagright/types/batch_business_users_with_rules_results.py
+++ b/src/flagright/types/batch_business_users_with_rules_results.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .batch_business_user_with_rules_result import BatchBusinessUserWithRulesResult
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .batch_business_user_with_rules_result import BatchBusinessUserWithRulesResult
class BatchBusinessUsersWithRulesResults(UniversalBaseModel):
diff --git a/src/flagright/types/batch_consumer_user_event_with_rules_result.py b/src/flagright/types/batch_consumer_user_event_with_rules_result.py
index 752d229..f2b7cc7 100644
--- a/src/flagright/types/batch_consumer_user_event_with_rules_result.py
+++ b/src/flagright/types/batch_consumer_user_event_with_rules_result.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
-from .user_optional import UserOptional
from .executed_rules_result import ExecutedRulesResult
+from .user_optional import UserOptional
from .user_risk_score_details import UserRiskScoreDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class BatchConsumerUserEventWithRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/batch_consumer_user_events_rules_result.py b/src/flagright/types/batch_consumer_user_events_rules_result.py
index b7fc718..b628a0a 100644
--- a/src/flagright/types/batch_consumer_user_events_rules_result.py
+++ b/src/flagright/types/batch_consumer_user_events_rules_result.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .batch_consumer_user_event_with_rules_result import BatchConsumerUserEventWithRulesResult
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .batch_consumer_user_event_with_rules_result import BatchConsumerUserEventWithRulesResult
class BatchConsumerUserEventsRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result.py b/src/flagright/types/batch_consumer_user_with_rules_result.py
index 5ba1360..f9a885d 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result.py
@@ -1,36 +1,36 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-import typing
-from .user_details import UserDetails
-from .user_state_details import UserStateDetails
-from .kyc_status_details import KycStatusDetails
-from .employment_status import EmploymentStatus
-from .legal_document import LegalDocument
-from .contact_details import ContactDetails
-from .employment_details import EmploymentDetails
-from .transaction_limits import TransactionLimits
-from .expected_income import ExpectedIncome
-from .risk_level import RiskLevel
from .acquisition_channel import AcquisitionChannel
-from .source_of_funds import SourceOfFunds
-from .consumer_user_segment import ConsumerUserSegment
-from .pep_status import PepStatus
-from .sanctions_status import SanctionsStatus
from .adverse_media_status import AdverseMediaStatus
-from .user_entity_link import UserEntityLink
from .batch_consumer_user_with_rules_result_saved_payment_details_item import (
BatchConsumerUserWithRulesResultSavedPaymentDetailsItem,
)
-from .user_tag import UserTag
-from .person_attachment import PersonAttachment
+from .consumer_user_segment import ConsumerUserSegment
+from .contact_details import ContactDetails
from .device_data import DeviceData
+from .employment_details import EmploymentDetails
+from .employment_status import EmploymentStatus
from .executed_rules_result import ExecutedRulesResult
+from .expected_income import ExpectedIncome
+from .kyc_status_details import KycStatusDetails
+from .legal_document import LegalDocument
+from .pep_status import PepStatus
+from .person_attachment import PersonAttachment
+from .risk_level import RiskLevel
+from .sanctions_status import SanctionsStatus
+from .source_of_funds import SourceOfFunds
+from .transaction_limits import TransactionLimits
+from .user_details import UserDetails
+from .user_entity_link import UserEntityLink
from .user_risk_score_details import UserRiskScoreDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .user_state_details import UserStateDetails
+from .user_tag import UserTag
class BatchConsumerUserWithRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index c59c186..8592fbc 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
-from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
+from .tag import Tag
from .wallet_network import WalletNetwork
-from .check_delivery_status import CheckDeliveryStatus
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
diff --git a/src/flagright/types/batch_consumer_users_with_rules_result.py b/src/flagright/types/batch_consumer_users_with_rules_result.py
index 7f74732..c7b5332 100644
--- a/src/flagright/types/batch_consumer_users_with_rules_result.py
+++ b/src/flagright/types/batch_consumer_users_with_rules_result.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .batch_consumer_user_with_rules_result import BatchConsumerUserWithRulesResult
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .batch_consumer_user_with_rules_result import BatchConsumerUserWithRulesResult
class BatchConsumerUsersWithRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/batch_response.py b/src/flagright/types/batch_response.py
index 4e9bf5c..b33a540 100644
--- a/src/flagright/types/batch_response.py
+++ b/src/flagright/types/batch_response.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-from .batch_response_status import BatchResponseStatus
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
from .batch_response_failed_record import BatchResponseFailedRecord
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .batch_response_status import BatchResponseStatus
class BatchResponse(UniversalBaseModel):
diff --git a/src/flagright/types/batch_response_failed_record.py b/src/flagright/types/batch_response_failed_record.py
index b2ff571..f494bb7 100644
--- a/src/flagright/types/batch_response_failed_record.py
+++ b/src/flagright/types/batch_response_failed_record.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
class BatchResponseFailedRecord(UniversalBaseModel):
diff --git a/src/flagright/types/batch_transaction_event_monitoring_result.py b/src/flagright/types/batch_transaction_event_monitoring_result.py
index ac61369..a8a5998 100644
--- a/src/flagright/types/batch_transaction_event_monitoring_result.py
+++ b/src/flagright/types/batch_transaction_event_monitoring_result.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
-from .transaction_state import TransactionState
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-import typing
-from .transaction_updatable import TransactionUpdatable
from .device_data import DeviceData
from .hit_rules_details import HitRulesDetails
from .rule_action import RuleAction
from .transaction_risk_scoring_result import TransactionRiskScoringResult
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .transaction_state import TransactionState
+from .transaction_updatable import TransactionUpdatable
class BatchTransactionEventMonitoringResult(UniversalBaseModel):
diff --git a/src/flagright/types/batch_transaction_event_monitoring_results.py b/src/flagright/types/batch_transaction_event_monitoring_results.py
index b34e44e..8299f3d 100644
--- a/src/flagright/types/batch_transaction_event_monitoring_results.py
+++ b/src/flagright/types/batch_transaction_event_monitoring_results.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .batch_transaction_event_monitoring_result import BatchTransactionEventMonitoringResult
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .batch_transaction_event_monitoring_result import BatchTransactionEventMonitoringResult
class BatchTransactionEventMonitoringResults(UniversalBaseModel):
diff --git a/src/flagright/types/batch_transaction_monitoring_result.py b/src/flagright/types/batch_transaction_monitoring_result.py
index 9b8d0b7..a3ee47b 100644
--- a/src/flagright/types/batch_transaction_monitoring_result.py
+++ b/src/flagright/types/batch_transaction_monitoring_result.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
+from .hit_rules_details import HitRulesDetails
from .rule_action import RuleAction
-import typing
from .transaction_risk_scoring_result import TransactionRiskScoringResult
-from .hit_rules_details import HitRulesDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class BatchTransactionMonitoringResult(UniversalBaseModel):
diff --git a/src/flagright/types/batch_transaction_monitoring_results.py b/src/flagright/types/batch_transaction_monitoring_results.py
index 812c182..915b4da 100644
--- a/src/flagright/types/batch_transaction_monitoring_results.py
+++ b/src/flagright/types/batch_transaction_monitoring_results.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .batch_transaction_monitoring_result import BatchTransactionMonitoringResult
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .batch_transaction_monitoring_result import BatchTransactionMonitoringResult
class BatchTransactionMonitoringResults(UniversalBaseModel):
diff --git a/src/flagright/types/batch_user_rules_result.py b/src/flagright/types/batch_user_rules_result.py
index 3058323..e30c0fb 100644
--- a/src/flagright/types/batch_user_rules_result.py
+++ b/src/flagright/types/batch_user_rules_result.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .executed_rules_result import ExecutedRulesResult
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
+from .executed_rules_result import ExecutedRulesResult
from .user_risk_score_details import UserRiskScoreDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
class BatchUserRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index d16aaa0..e5ef3f4 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -1,25 +1,25 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-from .legal_entity import LegalEntity
-import typing
-from .user_state_details import UserStateDetails
+from .acquisition_channel import AcquisitionChannel
+from .business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
+from .device_data import DeviceData
from .kyc_status_details import KycStatusDetails
+from .legal_entity import LegalEntity
+from .mcc_details import MccDetails
+from .payment_method import PaymentMethod
from .person import Person
-from .transaction_limits import TransactionLimits
+from .person_attachment import PersonAttachment
from .risk_level import RiskLevel
-from .payment_method import PaymentMethod
+from .transaction_limits import TransactionLimits
from .user_entity_link import UserEntityLink
-from .acquisition_channel import AcquisitionChannel
-from .business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
-from .mcc_details import MccDetails
+from .user_state_details import UserStateDetails
from .user_tag import UserTag
-from .person_attachment import PersonAttachment
-from .device_data import DeviceData
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class Business(UniversalBaseModel):
diff --git a/src/flagright/types/business_base.py b/src/flagright/types/business_base.py
index 7dbcab7..c32d7c0 100644
--- a/src/flagright/types/business_base.py
+++ b/src/flagright/types/business_base.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
from .legal_entity import LegalEntity
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import typing
class BusinessBase(UniversalBaseModel):
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index 28755df..6f3b1eb 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -1,25 +1,25 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
-from .user_state_details import UserStateDetails
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .acquisition_channel import AcquisitionChannel
+from .business_optional_saved_payment_details_item import BusinessOptionalSavedPaymentDetailsItem
+from .device_data import DeviceData
from .kyc_status_details import KycStatusDetails
from .legal_entity import LegalEntity
+from .mcc_details import MccDetails
+from .payment_method import PaymentMethod
from .person import Person
-from .transaction_limits import TransactionLimits
+from .person_attachment import PersonAttachment
from .risk_level import RiskLevel
-from .payment_method import PaymentMethod
+from .transaction_limits import TransactionLimits
from .user_entity_link import UserEntityLink
-from .acquisition_channel import AcquisitionChannel
-from .business_optional_saved_payment_details_item import BusinessOptionalSavedPaymentDetailsItem
-from .mcc_details import MccDetails
+from .user_state_details import UserStateDetails
from .user_tag import UserTag
-from .person_attachment import PersonAttachment
-from .device_data import DeviceData
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class BusinessOptional(UniversalBaseModel):
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 193c0f0..e25dd3a 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
-from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
+from .tag import Tag
from .wallet_network import WalletNetwork
-from .check_delivery_status import CheckDeliveryStatus
class BusinessOptionalSavedPaymentDetailsItem_Card(UniversalBaseModel):
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index f6d0a92..c556113 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
-from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
+from .tag import Tag
from .wallet_network import WalletNetwork
-from .check_delivery_status import CheckDeliveryStatus
class BusinessSavedPaymentDetailsItem_Card(UniversalBaseModel):
diff --git a/src/flagright/types/business_user_event.py b/src/flagright/types/business_user_event.py
index 62d0cf9..35c644d 100644
--- a/src/flagright/types/business_user_event.py
+++ b/src/flagright/types/business_user_event.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
from .business_optional import BusinessOptional
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class BusinessUserEvent(UniversalBaseModel):
diff --git a/src/flagright/types/business_user_event_with_rules_result.py b/src/flagright/types/business_user_event_with_rules_result.py
index f058f38..5e5a12c 100644
--- a/src/flagright/types/business_user_event_with_rules_result.py
+++ b/src/flagright/types/business_user_event_with_rules_result.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
from .business_optional import BusinessOptional
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
from .user_risk_score_details import UserRiskScoreDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class BusinessUserEventWithRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/business_user_monitoring_result.py b/src/flagright/types/business_user_monitoring_result.py
index 59a2800..0f4eeeb 100644
--- a/src/flagright/types/business_user_monitoring_result.py
+++ b/src/flagright/types/business_user_monitoring_result.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-import typing
-from .user_risk_score_details import UserRiskScoreDetails
-from .hit_rules_details import HitRulesDetails
from .executed_rules_result import ExecutedRulesResult
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .hit_rules_details import HitRulesDetails
+from .user_risk_score_details import UserRiskScoreDetails
class BusinessUserMonitoringResult(UniversalBaseModel):
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 7a17e22..0b0cc19 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -1,28 +1,28 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-from .legal_entity import LegalEntity
-import typing
-from .user_state_details import UserStateDetails
-from .kyc_status_details import KycStatusDetails
-from .person import Person
-from .transaction_limits import TransactionLimits
-from .risk_level import RiskLevel
-from .payment_method import PaymentMethod
-from .user_entity_link import UserEntityLink
from .acquisition_channel import AcquisitionChannel
from .business_with_rules_result_saved_payment_details_item import BusinessWithRulesResultSavedPaymentDetailsItem
-from .mcc_details import MccDetails
-from .user_tag import UserTag
-from .person_attachment import PersonAttachment
from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
+from .kyc_status_details import KycStatusDetails
+from .legal_entity import LegalEntity
+from .mcc_details import MccDetails
+from .payment_method import PaymentMethod
+from .person import Person
+from .person_attachment import PersonAttachment
+from .risk_level import RiskLevel
+from .transaction_limits import TransactionLimits
+from .user_entity_link import UserEntityLink
from .user_risk_score_details import UserRiskScoreDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .user_state_details import UserStateDetails
+from .user_tag import UserTag
class BusinessWithRulesResult(UniversalBaseModel):
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 7896b47..723ba6e 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
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
-from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
+from .tag import Tag
from .wallet_network import WalletNetwork
-from .check_delivery_status import CheckDeliveryStatus
class BusinessWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
diff --git a/src/flagright/types/card_details.py b/src/flagright/types/card_details.py
index 6d3db7a..d9f3cdd 100644
--- a/src/flagright/types/card_details.py
+++ b/src/flagright/types/card_details.py
@@ -1,24 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
+from .card_status import CardStatus
+from .card_type import CardType
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
+from .pos_details import PosDetails
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class CardDetails(UniversalBaseModel):
diff --git a/src/flagright/types/card_expiry.py b/src/flagright/types/card_expiry.py
index 53de53f..da31a4e 100644
--- a/src/flagright/types/card_expiry.py
+++ b/src/flagright/types/card_expiry.py
@@ -1,9 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class CardExpiry(UniversalBaseModel):
diff --git a/src/flagright/types/card_merchant_details.py b/src/flagright/types/card_merchant_details.py
index de993a7..63df773 100644
--- a/src/flagright/types/card_merchant_details.py
+++ b/src/flagright/types/card_merchant_details.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .country_code import CountryCode
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
class CardMerchantDetails(UniversalBaseModel):
diff --git a/src/flagright/types/case_management_event.py b/src/flagright/types/case_management_event.py
index e506d8e..d9d43ed 100644
--- a/src/flagright/types/case_management_event.py
+++ b/src/flagright/types/case_management_event.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
-from .case_management_event_case_status import CaseManagementEventCaseStatus
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
+from .case_management_event_case_status import CaseManagementEventCaseStatus
from .case_management_event_case_status_reason import CaseManagementEventCaseStatusReason
-import typing
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class CaseManagementEvent(UniversalBaseModel):
diff --git a/src/flagright/types/case_opened_details.py b/src/flagright/types/case_opened_details.py
index 50f0982..04c1e21 100644
--- a/src/flagright/types/case_opened_details.py
+++ b/src/flagright/types/case_opened_details.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
class CaseOpenedDetails(UniversalBaseModel):
diff --git a/src/flagright/types/case_status_details.py b/src/flagright/types/case_status_details.py
index 87cf6b3..7133c59 100644
--- a/src/flagright/types/case_status_details.py
+++ b/src/flagright/types/case_status_details.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
class CaseStatusDetails(UniversalBaseModel):
diff --git a/src/flagright/types/cash_details.py b/src/flagright/types/cash_details.py
index 95e82bd..b970c8d 100644
--- a/src/flagright/types/cash_details.py
+++ b/src/flagright/types/cash_details.py
@@ -1,10 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
+
import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .address import Address
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class CashDetails(UniversalBaseModel):
diff --git a/src/flagright/types/check_details.py b/src/flagright/types/check_details.py
index 65c4f33..4d3168f 100644
--- a/src/flagright/types/check_details.py
+++ b/src/flagright/types/check_details.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
-from .check_delivery_status import CheckDeliveryStatus
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
from .address import Address
+from .check_delivery_status import CheckDeliveryStatus
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class CheckDetails(UniversalBaseModel):
diff --git a/src/flagright/types/company_financial_details.py b/src/flagright/types/company_financial_details.py
index 466ae64..edf6fc4 100644
--- a/src/flagright/types/company_financial_details.py
+++ b/src/flagright/types/company_financial_details.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .amount import Amount
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
+from .amount import Amount
from .tag import Tag
-import pydantic
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class CompanyFinancialDetails(UniversalBaseModel):
diff --git a/src/flagright/types/company_general_details.py b/src/flagright/types/company_general_details.py
index 8e09593..543dd14 100644
--- a/src/flagright/types/company_general_details.py
+++ b/src/flagright/types/company_general_details.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
from .business_user_segment import BusinessUserSegment
-from .user_registration_status import UserRegistrationStatus
from .country_code import CountryCode
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .user_registration_status import UserRegistrationStatus
class CompanyGeneralDetails(UniversalBaseModel):
diff --git a/src/flagright/types/company_registration_details.py b/src/flagright/types/company_registration_details.py
index 59ea440..ba2ff28 100644
--- a/src/flagright/types/company_registration_details.py
+++ b/src/flagright/types/company_registration_details.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
from .country_code import CountryCode
-import typing
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class CompanyRegistrationDetails(UniversalBaseModel):
diff --git a/src/flagright/types/consumer_name.py b/src/flagright/types/consumer_name.py
index 5b62518..cebb7c8 100644
--- a/src/flagright/types/consumer_name.py
+++ b/src/flagright/types/consumer_name.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-import typing
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class ConsumerName(UniversalBaseModel):
diff --git a/src/flagright/types/consumer_user_event.py b/src/flagright/types/consumer_user_event.py
index c340e50..8742118 100644
--- a/src/flagright/types/consumer_user_event.py
+++ b/src/flagright/types/consumer_user_event.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
from .user_optional import UserOptional
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class ConsumerUserEvent(UniversalBaseModel):
diff --git a/src/flagright/types/consumer_user_event_with_rules_result.py b/src/flagright/types/consumer_user_event_with_rules_result.py
index 6773669..d385190 100644
--- a/src/flagright/types/consumer_user_event_with_rules_result.py
+++ b/src/flagright/types/consumer_user_event_with_rules_result.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
-from .user_optional import UserOptional
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
+from .user_optional import UserOptional
from .user_risk_score_details import UserRiskScoreDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class ConsumerUserEventWithRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/consumer_user_monitoring_result.py b/src/flagright/types/consumer_user_monitoring_result.py
index 5409855..b745584 100644
--- a/src/flagright/types/consumer_user_monitoring_result.py
+++ b/src/flagright/types/consumer_user_monitoring_result.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-import typing
-from .user_risk_score_details import UserRiskScoreDetails
-from .hit_rules_details import HitRulesDetails
from .executed_rules_result import ExecutedRulesResult
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .hit_rules_details import HitRulesDetails
+from .user_risk_score_details import UserRiskScoreDetails
class ConsumerUserMonitoringResult(UniversalBaseModel):
diff --git a/src/flagright/types/contact_details.py b/src/flagright/types/contact_details.py
index c969b4f..07071b4 100644
--- a/src/flagright/types/contact_details.py
+++ b/src/flagright/types/contact_details.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
from .address import Address
from .consumer_name import ConsumerName
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class ContactDetails(UniversalBaseModel):
diff --git a/src/flagright/types/cra_risk_level_updated_details.py b/src/flagright/types/cra_risk_level_updated_details.py
index 2ce1578..57303d7 100644
--- a/src/flagright/types/cra_risk_level_updated_details.py
+++ b/src/flagright/types/cra_risk_level_updated_details.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
class CraRiskLevelUpdatedDetails(UniversalBaseModel):
diff --git a/src/flagright/types/custom_column.py b/src/flagright/types/custom_column.py
index 67c58c0..d8ce90f 100644
--- a/src/flagright/types/custom_column.py
+++ b/src/flagright/types/custom_column.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-from .column_type import ColumnType
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .column_type import ColumnType
class CustomColumn(UniversalBaseModel):
diff --git a/src/flagright/types/date.py b/src/flagright/types/date.py
index 0462634..cf7e61c 100644
--- a/src/flagright/types/date.py
+++ b/src/flagright/types/date.py
@@ -1,10 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import pydantic
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+
class Date(UniversalBaseModel):
"""
diff --git a/src/flagright/types/device_data.py b/src/flagright/types/device_data.py
index 080e647..ec9fad3 100644
--- a/src/flagright/types/device_data.py
+++ b/src/flagright/types/device_data.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
from .country_code import CountryCode
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class DeviceData(UniversalBaseModel):
diff --git a/src/flagright/types/employment_details.py b/src/flagright/types/employment_details.py
index 33b17f8..a7efb2b 100644
--- a/src/flagright/types/employment_details.py
+++ b/src/flagright/types/employment_details.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
class EmploymentDetails(UniversalBaseModel):
diff --git a/src/flagright/types/executed_logic_vars.py b/src/flagright/types/executed_logic_vars.py
index 8cdc214..4992d6a 100644
--- a/src/flagright/types/executed_logic_vars.py
+++ b/src/flagright/types/executed_logic_vars.py
@@ -1,10 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .rule_hit_direction import RuleHitDirection
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .rule_hit_direction import RuleHitDirection
class ExecutedLogicVars(UniversalBaseModel):
diff --git a/src/flagright/types/executed_rules_result.py b/src/flagright/types/executed_rules_result.py
index fd1bfa4..2a8163c 100644
--- a/src/flagright/types/executed_rules_result.py
+++ b/src/flagright/types/executed_rules_result.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .executed_logic_vars import ExecutedLogicVars
from .rule_action import RuleAction
from .rule_hit_meta import RuleHitMeta
-from .executed_logic_vars import ExecutedLogicVars
from .rule_labels import RuleLabels
from .rule_nature import RuleNature
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class ExecutedRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/expected_income.py b/src/flagright/types/expected_income.py
index 610db47..f4dcba1 100644
--- a/src/flagright/types/expected_income.py
+++ b/src/flagright/types/expected_income.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .amount import Amount
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .amount import Amount
class ExpectedIncome(UniversalBaseModel):
diff --git a/src/flagright/types/failed_rules_result.py b/src/flagright/types/failed_rules_result.py
index de0bcc0..68057fe 100644
--- a/src/flagright/types/failed_rules_result.py
+++ b/src/flagright/types/failed_rules_result.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
from .rule_failure_exception import RuleFailureException
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import typing
class FailedRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/false_positive_details.py b/src/flagright/types/false_positive_details.py
index 957ce8a..68a3056 100644
--- a/src/flagright/types/false_positive_details.py
+++ b/src/flagright/types/false_positive_details.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
class FalsePositiveDetails(UniversalBaseModel):
diff --git a/src/flagright/types/file_info.py b/src/flagright/types/file_info.py
index 2edd279..90a76a8 100644
--- a/src/flagright/types/file_info.py
+++ b/src/flagright/types/file_info.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
-from ..core.serialization import FieldMetadata
import typing
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
class FileInfo(UniversalBaseModel):
diff --git a/src/flagright/types/generic_bank_account_details.py b/src/flagright/types/generic_bank_account_details.py
index 057a651..d6437ee 100644
--- a/src/flagright/types/generic_bank_account_details.py
+++ b/src/flagright/types/generic_bank_account_details.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .address import Address
from .amount import Amount
from .country_code import CountryCode
-from .address import Address
from .email_id import EmailId
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class GenericBankAccountDetails(UniversalBaseModel):
diff --git a/src/flagright/types/hit_rules_details.py b/src/flagright/types/hit_rules_details.py
index f7d8252..93473bd 100644
--- a/src/flagright/types/hit_rules_details.py
+++ b/src/flagright/types/hit_rules_details.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
from .rule_action import RuleAction
from .rule_hit_meta import RuleHitMeta
from .rule_labels import RuleLabels
from .rule_nature import RuleNature
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class HitRulesDetails(UniversalBaseModel):
diff --git a/src/flagright/types/hit_rules_results.py b/src/flagright/types/hit_rules_results.py
index 3e0ad08..e509a24 100644
--- a/src/flagright/types/hit_rules_results.py
+++ b/src/flagright/types/hit_rules_results.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .hit_rules_details import HitRulesDetails
-from ..core.serialization import FieldMetadata
+
import pydantic
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .hit_rules_details import HitRulesDetails
class HitRulesResults(UniversalBaseModel):
diff --git a/src/flagright/types/iban_details.py b/src/flagright/types/iban_details.py
index 37466b8..331423f 100644
--- a/src/flagright/types/iban_details.py
+++ b/src/flagright/types/iban_details.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
from .address import Address
-from .country_code import CountryCode
from .amount import Amount
+from .country_code import CountryCode
from .email_id import EmailId
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class IbanDetails(UniversalBaseModel):
diff --git a/src/flagright/types/kyc_status_details.py b/src/flagright/types/kyc_status_details.py
index db0bf5b..491cdaa 100644
--- a/src/flagright/types/kyc_status_details.py
+++ b/src/flagright/types/kyc_status_details.py
@@ -1,10 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .kyc_status import KycStatus
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .kyc_status import KycStatus
class KycStatusDetails(UniversalBaseModel):
diff --git a/src/flagright/types/legal_document.py b/src/flagright/types/legal_document.py
index 694ff6a..1dbe1c7 100644
--- a/src/flagright/types/legal_document.py
+++ b/src/flagright/types/legal_document.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-import typing
+from .consumer_name import ConsumerName
from .country_code import CountryCode
from .tag import Tag
-from .consumer_name import ConsumerName
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class LegalDocument(UniversalBaseModel):
diff --git a/src/flagright/types/legal_entity.py b/src/flagright/types/legal_entity.py
index 243e1dc..418bb5b 100644
--- a/src/flagright/types/legal_entity.py
+++ b/src/flagright/types/legal_entity.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
-from .company_general_details import CompanyGeneralDetails
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
from .company_financial_details import CompanyFinancialDetails
+from .company_general_details import CompanyGeneralDetails
from .company_registration_details import CompanyRegistrationDetails
-from .source_of_funds import SourceOfFunds
from .contact_details import ContactDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .source_of_funds import SourceOfFunds
class LegalEntity(UniversalBaseModel):
diff --git a/src/flagright/types/list_data.py b/src/flagright/types/list_data.py
index eeed926..a4d4c06 100644
--- a/src/flagright/types/list_data.py
+++ b/src/flagright/types/list_data.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .list_metadata import ListMetadata
-from .list_item import ListItem
+
import pydantic
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .list_item import ListItem
+from .list_metadata import ListMetadata
class ListData(UniversalBaseModel):
diff --git a/src/flagright/types/list_existed.py b/src/flagright/types/list_existed.py
index e70165c..33074f1 100644
--- a/src/flagright/types/list_existed.py
+++ b/src/flagright/types/list_existed.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .list_header import ListHeader
-import typing
from .list_item import ListItem
-import pydantic
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class ListExisted(UniversalBaseModel):
diff --git a/src/flagright/types/list_header.py b/src/flagright/types/list_header.py
index c3af136..b126ca6 100644
--- a/src/flagright/types/list_header.py
+++ b/src/flagright/types/list_header.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .list_type import ListType
-from .list_subtype import ListSubtype
-import typing
from .list_metadata import ListMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .list_subtype import ListSubtype
+from .list_type import ListType
class ListHeader(UniversalBaseModel):
diff --git a/src/flagright/types/list_item.py b/src/flagright/types/list_item.py
index b385cb3..2af28b2 100644
--- a/src/flagright/types/list_item.py
+++ b/src/flagright/types/list_item.py
@@ -1,10 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .list_key_metadata import ListKeyMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .list_key_metadata import ListKeyMetadata
class ListItem(UniversalBaseModel):
diff --git a/src/flagright/types/list_metadata.py b/src/flagright/types/list_metadata.py
index 20ae80e..c444ada 100644
--- a/src/flagright/types/list_metadata.py
+++ b/src/flagright/types/list_metadata.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
+
import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .custom_column import CustomColumn
from .list_metadata_ttl import ListMetadataTtl
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class ListMetadata(UniversalBaseModel):
diff --git a/src/flagright/types/list_metadata_ttl.py b/src/flagright/types/list_metadata_ttl.py
index 913e486..1bdd48d 100644
--- a/src/flagright/types/list_metadata_ttl.py
+++ b/src/flagright/types/list_metadata_ttl.py
@@ -1,10 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-from .list_metadata_ttl_unit import ListMetadataTtlUnit
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+
import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .list_metadata_ttl_unit import ListMetadataTtlUnit
class ListMetadataTtl(UniversalBaseModel):
diff --git a/src/flagright/types/list_updated_details.py b/src/flagright/types/list_updated_details.py
index 6e809e9..62bea21 100644
--- a/src/flagright/types/list_updated_details.py
+++ b/src/flagright/types/list_updated_details.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .list_updated_details_action import ListUpdatedDetailsAction
-import typing
from .list_item import ListItem
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .list_updated_details_action import ListUpdatedDetailsAction
class ListUpdatedDetails(UniversalBaseModel):
diff --git a/src/flagright/types/mcc_details.py b/src/flagright/types/mcc_details.py
index 6bad42d..2174fc7 100644
--- a/src/flagright/types/mcc_details.py
+++ b/src/flagright/types/mcc_details.py
@@ -1,9 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import pydantic
import typing
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class MccDetails(UniversalBaseModel):
diff --git a/src/flagright/types/mpesa_details.py b/src/flagright/types/mpesa_details.py
index 33cd168..3313fce 100644
--- a/src/flagright/types/mpesa_details.py
+++ b/src/flagright/types/mpesa_details.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-from .mpesa_transaction_type import MpesaTransactionType
-import typing
-from .email_id import EmailId
from .address import Address
+from .email_id import EmailId
+from .mpesa_transaction_type import MpesaTransactionType
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class MpesaDetails(UniversalBaseModel):
diff --git a/src/flagright/types/npp_details.py b/src/flagright/types/npp_details.py
index 4fdca60..4ee3c79 100644
--- a/src/flagright/types/npp_details.py
+++ b/src/flagright/types/npp_details.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .address import Address
from .consumer_name import ConsumerName
from .email_id import EmailId
from .tag import Tag
-from .address import Address
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class NppDetails(UniversalBaseModel):
diff --git a/src/flagright/types/origin_funds_info.py b/src/flagright/types/origin_funds_info.py
index a6854b4..2060092 100644
--- a/src/flagright/types/origin_funds_info.py
+++ b/src/flagright/types/origin_funds_info.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
class OriginFundsInfo(UniversalBaseModel):
diff --git a/src/flagright/types/pep_status.py b/src/flagright/types/pep_status.py
index 0072883..c89f7fa 100644
--- a/src/flagright/types/pep_status.py
+++ b/src/flagright/types/pep_status.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
from .country_code import CountryCode
from .pep_rank import PepRank
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
class PepStatus(UniversalBaseModel):
diff --git a/src/flagright/types/person.py b/src/flagright/types/person.py
index 744e00e..7a00612 100644
--- a/src/flagright/types/person.py
+++ b/src/flagright/types/person.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
-from .user_details import UserDetails
-from .legal_document import LegalDocument
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
from .contact_details import ContactDetails
+from .legal_document import LegalDocument
from .pep_status import PepStatus
-from .tag import Tag
from .person_attachment import PersonAttachment
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .tag import Tag
+from .user_details import UserDetails
class Person(UniversalBaseModel):
diff --git a/src/flagright/types/person_attachment.py b/src/flagright/types/person_attachment.py
index e184244..1d38771 100644
--- a/src/flagright/types/person_attachment.py
+++ b/src/flagright/types/person_attachment.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
+
import pydantic
-from .file_info import FileInfo
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .file_info import FileInfo
class PersonAttachment(UniversalBaseModel):
diff --git a/src/flagright/types/place_of_birth.py b/src/flagright/types/place_of_birth.py
index 7238017..ff1ada6 100644
--- a/src/flagright/types/place_of_birth.py
+++ b/src/flagright/types/place_of_birth.py
@@ -1,10 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .country_code import CountryCode
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .country_code import CountryCode
class PlaceOfBirth(UniversalBaseModel):
diff --git a/src/flagright/types/pos_details.py b/src/flagright/types/pos_details.py
index fba5c03..0d467f3 100644
--- a/src/flagright/types/pos_details.py
+++ b/src/flagright/types/pos_details.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .pos_entry_mode import PosEntryMode
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .pos_entry_mode import PosEntryMode
class PosDetails(UniversalBaseModel):
diff --git a/src/flagright/types/rule_failure_exception.py b/src/flagright/types/rule_failure_exception.py
index 6a53427..a0c6f98 100644
--- a/src/flagright/types/rule_failure_exception.py
+++ b/src/flagright/types/rule_failure_exception.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import typing
class RuleFailureException(UniversalBaseModel):
diff --git a/src/flagright/types/rule_hit_meta.py b/src/flagright/types/rule_hit_meta.py
index ca4883a..f0c43ee 100644
--- a/src/flagright/types/rule_hit_meta.py
+++ b/src/flagright/types/rule_hit_meta.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .rule_hit_direction import RuleHitDirection
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .false_positive_details import FalsePositiveDetails
+from .rule_hit_direction import RuleHitDirection
from .sanctions_details import SanctionsDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
class RuleHitMeta(UniversalBaseModel):
diff --git a/src/flagright/types/rules_results.py b/src/flagright/types/rules_results.py
index 194f189..156bbe5 100644
--- a/src/flagright/types/rules_results.py
+++ b/src/flagright/types/rules_results.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .executed_rules_result import ExecutedRulesResult
-from ..core.serialization import FieldMetadata
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class RulesResults(UniversalBaseModel):
diff --git a/src/flagright/types/sanctions_details.py b/src/flagright/types/sanctions_details.py
index 43eeb0d..5fb750b 100644
--- a/src/flagright/types/sanctions_details.py
+++ b/src/flagright/types/sanctions_details.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
+from .rule_hit_direction import RuleHitDirection
from .sanctions_details_entity_type import SanctionsDetailsEntityType
from .sanctions_hit_context import SanctionsHitContext
-from .rule_hit_direction import RuleHitDirection
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
class SanctionsDetails(UniversalBaseModel):
diff --git a/src/flagright/types/sanctions_hit_context.py b/src/flagright/types/sanctions_hit_context.py
index 1e316b4..927f3aa 100644
--- a/src/flagright/types/sanctions_hit_context.py
+++ b/src/flagright/types/sanctions_hit_context.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-from .sanctions_screening_entity import SanctionsScreeningEntity
-import typing_extensions
import typing
-from .sanctions_details_entity_type import SanctionsDetailsEntityType
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .sanctions_details_entity_type import SanctionsDetailsEntityType
+from .sanctions_screening_entity import SanctionsScreeningEntity
class SanctionsHitContext(UniversalBaseModel):
diff --git a/src/flagright/types/swift_details.py b/src/flagright/types/swift_details.py
index 6f4ca15..21f1c9e 100644
--- a/src/flagright/types/swift_details.py
+++ b/src/flagright/types/swift_details.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
-from .amount import Amount
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
from .address import Address
+from .amount import Amount
from .email_id import EmailId
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class SwiftDetails(UniversalBaseModel):
diff --git a/src/flagright/types/tag.py b/src/flagright/types/tag.py
index ab0ecac..1865f67 100644
--- a/src/flagright/types/tag.py
+++ b/src/flagright/types/tag.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
-import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class Tag(UniversalBaseModel):
diff --git a/src/flagright/types/transaction.py b/src/flagright/types/transaction.py
index 32d0f28..860e90b 100644
--- a/src/flagright/types/transaction.py
+++ b/src/flagright/types/transaction.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
-from .transaction_state import TransactionState
-from .transaction_amount_details import TransactionAmountDetails
-from .transaction_origin_payment_details import TransactionOriginPaymentDetails
-from .transaction_destination_payment_details import TransactionDestinationPaymentDetails
-from .origin_funds_info import OriginFundsInfo
from .device_data import DeviceData
+from .origin_funds_info import OriginFundsInfo
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .transaction_amount_details import TransactionAmountDetails
+from .transaction_destination_payment_details import TransactionDestinationPaymentDetails
+from .transaction_origin_payment_details import TransactionOriginPaymentDetails
+from .transaction_state import TransactionState
class Transaction(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_amount_details.py b/src/flagright/types/transaction_amount_details.py
index 2023fad..1ecd9ba 100644
--- a/src/flagright/types/transaction_amount_details.py
+++ b/src/flagright/types/transaction_amount_details.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-from .currency_code import CurrencyCode
-import typing
from .country_code import CountryCode
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .currency_code import CurrencyCode
class TransactionAmountDetails(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_amount_limit.py b/src/flagright/types/transaction_amount_limit.py
index 2bfe035..4212bd5 100644
--- a/src/flagright/types/transaction_amount_limit.py
+++ b/src/flagright/types/transaction_amount_limit.py
@@ -1,10 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .amount import Amount
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .amount import Amount
class TransactionAmountLimit(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_base.py b/src/flagright/types/transaction_base.py
index 00fa646..db058f3 100644
--- a/src/flagright/types/transaction_base.py
+++ b/src/flagright/types/transaction_base.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
from .transaction_state import TransactionState
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class TransactionBase(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_count_limit.py b/src/flagright/types/transaction_count_limit.py
index 63c5102..674389b 100644
--- a/src/flagright/types/transaction_count_limit.py
+++ b/src/flagright/types/transaction_count_limit.py
@@ -1,9 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class TransactionCountLimit(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index ced88f6..8e318e7 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
+from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
from .wallet_network import WalletNetwork
-from .mpesa_transaction_type import MpesaTransactionType
-from .check_delivery_status import CheckDeliveryStatus
class TransactionDestinationPaymentDetails_Card(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_event.py b/src/flagright/types/transaction_event.py
index 57ebb85..7a41893 100644
--- a/src/flagright/types/transaction_event.py
+++ b/src/flagright/types/transaction_event.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
-from .transaction_state import TransactionState
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-import typing
-from .transaction_updatable import TransactionUpdatable
from .device_data import DeviceData
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .transaction_state import TransactionState
+from .transaction_updatable import TransactionUpdatable
class TransactionEvent(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_event_monitoring_result.py b/src/flagright/types/transaction_event_monitoring_result.py
index a6aeea8..aeafb68 100644
--- a/src/flagright/types/transaction_event_monitoring_result.py
+++ b/src/flagright/types/transaction_event_monitoring_result.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .transaction import Transaction
-import typing
-from .rule_action import RuleAction
-from .transaction_risk_scoring_result import TransactionRiskScoringResult
from .executed_rules_result import ExecutedRulesResult
-import pydantic
from .hit_rules_details import HitRulesDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .rule_action import RuleAction
+from .transaction import Transaction
+from .transaction_risk_scoring_result import TransactionRiskScoringResult
class TransactionEventMonitoringResult(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_event_with_rules_result.py b/src/flagright/types/transaction_event_with_rules_result.py
index ad48d11..8400fdd 100644
--- a/src/flagright/types/transaction_event_with_rules_result.py
+++ b/src/flagright/types/transaction_event_with_rules_result.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
-from .transaction_state import TransactionState
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-import typing
-from .transaction_updatable import TransactionUpdatable
from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
from .rule_action import RuleAction
from .transaction_risk_scoring_result import TransactionRiskScoringResult
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .transaction_state import TransactionState
+from .transaction_updatable import TransactionUpdatable
class TransactionEventWithRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_limit.py b/src/flagright/types/transaction_limit.py
index 84ec1a1..05cdc23 100644
--- a/src/flagright/types/transaction_limit.py
+++ b/src/flagright/types/transaction_limit.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .transaction_count_limit import TransactionCountLimit
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .transaction_amount_limit import TransactionAmountLimit
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .transaction_count_limit import TransactionCountLimit
class TransactionLimit(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_limits.py b/src/flagright/types/transaction_limits.py
index 9b86972..99829fe 100644
--- a/src/flagright/types/transaction_limits.py
+++ b/src/flagright/types/transaction_limits.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .amount import Amount
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
+from .amount import Amount
from .transaction_limits_payment_method_limits import TransactionLimitsPaymentMethodLimits
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
class TransactionLimits(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_limits_payment_method_limits.py b/src/flagright/types/transaction_limits_payment_method_limits.py
index 6c66097..8c95669 100644
--- a/src/flagright/types/transaction_limits_payment_method_limits.py
+++ b/src/flagright/types/transaction_limits_payment_method_limits.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .transaction_limit import TransactionLimit
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .transaction_limit import TransactionLimit
class TransactionLimitsPaymentMethodLimits(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_monitoring_result.py b/src/flagright/types/transaction_monitoring_result.py
index a19603d..58fd80a 100644
--- a/src/flagright/types/transaction_monitoring_result.py
+++ b/src/flagright/types/transaction_monitoring_result.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-from .rule_action import RuleAction
-import typing
-from .transaction_risk_scoring_result import TransactionRiskScoringResult
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .rule_action import RuleAction
+from .transaction_risk_scoring_result import TransactionRiskScoringResult
class TransactionMonitoringResult(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index bac0456..113f6a3 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
-from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
+from .tag import Tag
from .wallet_network import WalletNetwork
-from .check_delivery_status import CheckDeliveryStatus
class TransactionOriginPaymentDetails_Card(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_risk_scoring_result.py b/src/flagright/types/transaction_risk_scoring_result.py
index 5107848..b8e640c 100644
--- a/src/flagright/types/transaction_risk_scoring_result.py
+++ b/src/flagright/types/transaction_risk_scoring_result.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
from .risk_level import RiskLevel
-import typing
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class TransactionRiskScoringResult(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_status_details.py b/src/flagright/types/transaction_status_details.py
index f64e331..129e13b 100644
--- a/src/flagright/types/transaction_status_details.py
+++ b/src/flagright/types/transaction_status_details.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
from .rule_action import RuleAction
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
class TransactionStatusDetails(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_updatable.py b/src/flagright/types/transaction_updatable.py
index 9cacca6..dacf279 100644
--- a/src/flagright/types/transaction_updatable.py
+++ b/src/flagright/types/transaction_updatable.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .transaction_amount_details import TransactionAmountDetails
-from ..core.serialization import FieldMetadata
-from .transaction_updatable_origin_payment_details import TransactionUpdatableOriginPaymentDetails
+
import pydantic
-from .transaction_updatable_destination_payment_details import TransactionUpdatableDestinationPaymentDetails
-from .origin_funds_info import OriginFundsInfo
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
from .device_data import DeviceData
+from .origin_funds_info import OriginFundsInfo
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .transaction_amount_details import TransactionAmountDetails
+from .transaction_updatable_destination_payment_details import TransactionUpdatableDestinationPaymentDetails
+from .transaction_updatable_origin_payment_details import TransactionUpdatableOriginPaymentDetails
class TransactionUpdatable(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index dc7c2f7..a1584ec 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
+from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
from .wallet_network import WalletNetwork
-from .mpesa_transaction_type import MpesaTransactionType
-from .check_delivery_status import CheckDeliveryStatus
class TransactionUpdatableDestinationPaymentDetails_Card(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 27d1ebd..54a4f87 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
-from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
+from .tag import Tag
from .wallet_network import WalletNetwork
-from .check_delivery_status import CheckDeliveryStatus
class TransactionUpdatableOriginPaymentDetails_Card(UniversalBaseModel):
diff --git a/src/flagright/types/transaction_with_rules_result.py b/src/flagright/types/transaction_with_rules_result.py
index 7dbc9d7..e3b5fbd 100644
--- a/src/flagright/types/transaction_with_rules_result.py
+++ b/src/flagright/types/transaction_with_rules_result.py
@@ -1,24 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import typing
-from .transaction_state import TransactionState
-from .transaction_amount_details import TransactionAmountDetails
-from .transaction_with_rules_result_origin_payment_details import TransactionWithRulesResultOriginPaymentDetails
-from .transaction_with_rules_result_destination_payment_details import (
- TransactionWithRulesResultDestinationPaymentDetails,
-)
-from .origin_funds_info import OriginFundsInfo
from .device_data import DeviceData
-from .tag import Tag
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
+from .origin_funds_info import OriginFundsInfo
from .rule_action import RuleAction
+from .tag import Tag
+from .transaction_amount_details import TransactionAmountDetails
from .transaction_risk_scoring_result import TransactionRiskScoringResult
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .transaction_state import TransactionState
+from .transaction_with_rules_result_destination_payment_details import (
+ TransactionWithRulesResultDestinationPaymentDetails,
+)
+from .transaction_with_rules_result_origin_payment_details import TransactionWithRulesResultOriginPaymentDetails
class TransactionWithRulesResult(UniversalBaseModel):
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 04c3a9c..9059e84 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
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
+from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
from .wallet_network import WalletNetwork
-from .mpesa_transaction_type import MpesaTransactionType
-from .check_delivery_status import CheckDeliveryStatus
class TransactionWithRulesResultDestinationPaymentDetails_Card(UniversalBaseModel):
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 7d1e972..3f06639 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
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
-from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
+from .tag import Tag
from .wallet_network import WalletNetwork
-from .check_delivery_status import CheckDeliveryStatus
class TransactionWithRulesResultOriginPaymentDetails_Card(UniversalBaseModel):
diff --git a/src/flagright/types/upi_details.py b/src/flagright/types/upi_details.py
index 4031980..2ad087b 100644
--- a/src/flagright/types/upi_details.py
+++ b/src/flagright/types/upi_details.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-import typing
from .email_id import EmailId
from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class UpiDetails(UniversalBaseModel):
diff --git a/src/flagright/types/user.py b/src/flagright/types/user.py
index 86d4a68..6570137 100644
--- a/src/flagright/types/user.py
+++ b/src/flagright/types/user.py
@@ -1,32 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-import typing
-from .user_details import UserDetails
-from .user_state_details import UserStateDetails
-from .kyc_status_details import KycStatusDetails
-from .employment_status import EmploymentStatus
-from .legal_document import LegalDocument
+from .acquisition_channel import AcquisitionChannel
+from .adverse_media_status import AdverseMediaStatus
+from .consumer_user_segment import ConsumerUserSegment
from .contact_details import ContactDetails
+from .device_data import DeviceData
from .employment_details import EmploymentDetails
-from .transaction_limits import TransactionLimits
+from .employment_status import EmploymentStatus
from .expected_income import ExpectedIncome
-from .risk_level import RiskLevel
-from .acquisition_channel import AcquisitionChannel
-from .source_of_funds import SourceOfFunds
-from .consumer_user_segment import ConsumerUserSegment
+from .kyc_status_details import KycStatusDetails
+from .legal_document import LegalDocument
from .pep_status import PepStatus
+from .person_attachment import PersonAttachment
+from .risk_level import RiskLevel
from .sanctions_status import SanctionsStatus
-from .adverse_media_status import AdverseMediaStatus
+from .source_of_funds import SourceOfFunds
+from .transaction_limits import TransactionLimits
+from .user_details import UserDetails
from .user_entity_link import UserEntityLink
from .user_saved_payment_details_item import UserSavedPaymentDetailsItem
+from .user_state_details import UserStateDetails
from .user_tag import UserTag
-from .person_attachment import PersonAttachment
-from .device_data import DeviceData
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class User(UniversalBaseModel):
diff --git a/src/flagright/types/user_base.py b/src/flagright/types/user_base.py
index e069905..24cbb95 100644
--- a/src/flagright/types/user_base.py
+++ b/src/flagright/types/user_base.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import typing
class UserBase(UniversalBaseModel):
diff --git a/src/flagright/types/user_details.py b/src/flagright/types/user_details.py
index 5a1c920..979a7b7 100644
--- a/src/flagright/types/user_details.py
+++ b/src/flagright/types/user_details.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .consumer_name import ConsumerName
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
+from .consumer_name import ConsumerName
from .country_code import CountryCode
from .gender import Gender
from .marital_status import MaritalStatus
from .place_of_birth import PlaceOfBirth
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class UserDetails(UniversalBaseModel):
diff --git a/src/flagright/types/user_entity_link.py b/src/flagright/types/user_entity_link.py
index 4cbe4f9..aacf970 100644
--- a/src/flagright/types/user_entity_link.py
+++ b/src/flagright/types/user_entity_link.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
class UserEntityLink(UniversalBaseModel):
diff --git a/src/flagright/types/user_optional.py b/src/flagright/types/user_optional.py
index f277d06..786405c 100644
--- a/src/flagright/types/user_optional.py
+++ b/src/flagright/types/user_optional.py
@@ -1,32 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
-from .user_details import UserDetails
-from .user_state_details import UserStateDetails
-from .kyc_status_details import KycStatusDetails
-from .employment_status import EmploymentStatus
-from .legal_document import LegalDocument
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .acquisition_channel import AcquisitionChannel
+from .adverse_media_status import AdverseMediaStatus
+from .consumer_user_segment import ConsumerUserSegment
from .contact_details import ContactDetails
+from .device_data import DeviceData
from .employment_details import EmploymentDetails
-from .transaction_limits import TransactionLimits
+from .employment_status import EmploymentStatus
from .expected_income import ExpectedIncome
-from .risk_level import RiskLevel
-from .acquisition_channel import AcquisitionChannel
-from .source_of_funds import SourceOfFunds
-from .consumer_user_segment import ConsumerUserSegment
+from .kyc_status_details import KycStatusDetails
+from .legal_document import LegalDocument
from .pep_status import PepStatus
+from .person_attachment import PersonAttachment
+from .risk_level import RiskLevel
from .sanctions_status import SanctionsStatus
-from .adverse_media_status import AdverseMediaStatus
+from .source_of_funds import SourceOfFunds
+from .transaction_limits import TransactionLimits
+from .user_details import UserDetails
from .user_entity_link import UserEntityLink
from .user_optional_saved_payment_details_item import UserOptionalSavedPaymentDetailsItem
+from .user_state_details import UserStateDetails
from .user_tag import UserTag
-from .person_attachment import PersonAttachment
-from .device_data import DeviceData
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class UserOptional(UniversalBaseModel):
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 2b21439..f380c73 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
-from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
+from .tag import Tag
from .wallet_network import WalletNetwork
-from .check_delivery_status import CheckDeliveryStatus
class UserOptionalSavedPaymentDetailsItem_Card(UniversalBaseModel):
diff --git a/src/flagright/types/user_risk_score_details.py b/src/flagright/types/user_risk_score_details.py
index 1fa8d7f..c0c6e89 100644
--- a/src/flagright/types/user_risk_score_details.py
+++ b/src/flagright/types/user_risk_score_details.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .risk_level import RiskLevel
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
class UserRiskScoreDetails(UniversalBaseModel):
diff --git a/src/flagright/types/user_rules_result.py b/src/flagright/types/user_rules_result.py
index 9f50da1..f9338f4 100644
--- a/src/flagright/types/user_rules_result.py
+++ b/src/flagright/types/user_rules_result.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from .executed_rules_result import ExecutedRulesResult
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
+from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
from .user_risk_score_details import UserRiskScoreDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
class UserRulesResult(UniversalBaseModel):
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 7124162..d8a3dff 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
-from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
+from .tag import Tag
from .wallet_network import WalletNetwork
-from .check_delivery_status import CheckDeliveryStatus
class UserSavedPaymentDetailsItem_Card(UniversalBaseModel):
diff --git a/src/flagright/types/user_state_details.py b/src/flagright/types/user_state_details.py
index 6988225..3a1a87e 100644
--- a/src/flagright/types/user_state_details.py
+++ b/src/flagright/types/user_state_details.py
@@ -1,10 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .user_state import UserState
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .user_state import UserState
class UserStateDetails(UniversalBaseModel):
diff --git a/src/flagright/types/user_tag.py b/src/flagright/types/user_tag.py
index 52cb08d..ccc0040 100644
--- a/src/flagright/types/user_tag.py
+++ b/src/flagright/types/user_tag.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
-import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class UserTag(UniversalBaseModel):
diff --git a/src/flagright/types/user_tags_update.py b/src/flagright/types/user_tags_update.py
index 0c9045d..adceaba 100644
--- a/src/flagright/types/user_tags_update.py
+++ b/src/flagright/types/user_tags_update.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .user_tag import UserTag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
class UserTagsUpdate(UniversalBaseModel):
diff --git a/src/flagright/types/user_with_rules_result.py b/src/flagright/types/user_with_rules_result.py
index b956c05..6fd4899 100644
--- a/src/flagright/types/user_with_rules_result.py
+++ b/src/flagright/types/user_with_rules_result.py
@@ -1,35 +1,35 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-import pydantic
-import typing
-from .user_details import UserDetails
-from .user_state_details import UserStateDetails
-from .kyc_status_details import KycStatusDetails
-from .employment_status import EmploymentStatus
-from .legal_document import LegalDocument
+from .acquisition_channel import AcquisitionChannel
+from .adverse_media_status import AdverseMediaStatus
+from .consumer_user_segment import ConsumerUserSegment
from .contact_details import ContactDetails
+from .device_data import DeviceData
from .employment_details import EmploymentDetails
-from .transaction_limits import TransactionLimits
+from .employment_status import EmploymentStatus
+from .executed_rules_result import ExecutedRulesResult
from .expected_income import ExpectedIncome
-from .risk_level import RiskLevel
-from .acquisition_channel import AcquisitionChannel
-from .source_of_funds import SourceOfFunds
-from .consumer_user_segment import ConsumerUserSegment
+from .hit_rules_details import HitRulesDetails
+from .kyc_status_details import KycStatusDetails
+from .legal_document import LegalDocument
from .pep_status import PepStatus
+from .person_attachment import PersonAttachment
+from .risk_level import RiskLevel
from .sanctions_status import SanctionsStatus
-from .adverse_media_status import AdverseMediaStatus
+from .source_of_funds import SourceOfFunds
+from .transaction_limits import TransactionLimits
+from .user_details import UserDetails
from .user_entity_link import UserEntityLink
-from .user_with_rules_result_saved_payment_details_item import UserWithRulesResultSavedPaymentDetailsItem
-from .user_tag import UserTag
-from .person_attachment import PersonAttachment
-from .device_data import DeviceData
-from .executed_rules_result import ExecutedRulesResult
-from .hit_rules_details import HitRulesDetails
from .user_risk_score_details import UserRiskScoreDetails
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from .user_state_details import UserStateDetails
+from .user_tag import UserTag
+from .user_with_rules_result_saved_payment_details_item import UserWithRulesResultSavedPaymentDetailsItem
class UserWithRulesResult(UniversalBaseModel):
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 0046473..7cd12df 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
@@ -1,28 +1,29 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-from ..core.pydantic_utilities import UniversalBaseModel
+
import typing
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .email_id import EmailId
-from .card_status import CardStatus
-from .country_code import CountryCode
-from .consumer_name import ConsumerName
-from .card_expiry import CardExpiry
-from .pos_details import PosDetails
+from .address import Address
+from .amount import Amount
from .card_brand import CardBrand
+from .card_expiry import CardExpiry
from .card_funding import CardFunding
-from .card_type import CardType
-from .amount import Amount
from .card_merchant_details import CardMerchantDetails
-from .address import Address
-from .tag import Tag
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .card_status import CardStatus
+from .card_type import CardType
+from .check_delivery_status import CheckDeliveryStatus
+from .consumer_name import ConsumerName
+from .country_code import CountryCode
+from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
+from .pos_details import PosDetails
+from .tag import Tag
from .wallet_network import WalletNetwork
-from .check_delivery_status import CheckDeliveryStatus
class UserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
diff --git a/src/flagright/types/wallet_details.py b/src/flagright/types/wallet_details.py
index 3eb11a5..60e1797 100644
--- a/src/flagright/types/wallet_details.py
+++ b/src/flagright/types/wallet_details.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
-from ..core.serialization import FieldMetadata
+
import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .address import Address
+from .amount import Amount
+from .country_code import CountryCode
from .email_id import EmailId
from .tag import Tag
-from .amount import Amount
from .wallet_network import WalletNetwork
-from .address import Address
-from .country_code import CountryCode
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
class WalletDetails(UniversalBaseModel):
diff --git a/src/flagright/types/webhook_event.py b/src/flagright/types/webhook_event.py
index dbb6d95..4adfb73 100644
--- a/src/flagright/types/webhook_event.py
+++ b/src/flagright/types/webhook_event.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
-from .webhook_event_triggered_by import WebhookEventTriggeredBy
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .webhook_event_type import WebhookEventType
from .webhook_event_data import WebhookEventData
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import typing
+from .webhook_event_triggered_by import WebhookEventTriggeredBy
+from .webhook_event_type import WebhookEventType
class WebhookEvent(UniversalBaseModel):
diff --git a/src/flagright/types/webhook_event_base.py b/src/flagright/types/webhook_event_base.py
index 6e82614..a4d006f 100644
--- a/src/flagright/types/webhook_event_base.py
+++ b/src/flagright/types/webhook_event_base.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+
import pydantic
import typing_extensions
-from .webhook_event_base_triggered_by import WebhookEventBaseTriggeredBy
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import typing
+from .webhook_event_base_triggered_by import WebhookEventBaseTriggeredBy
class WebhookEventBase(UniversalBaseModel):
diff --git a/src/flagright/types/webhook_event_data.py b/src/flagright/types/webhook_event_data.py
index a2e70a1..a7515cb 100644
--- a/src/flagright/types/webhook_event_data.py
+++ b/src/flagright/types/webhook_event_data.py
@@ -1,15 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from .user_state_details import UserStateDetails
-from .case_status_details import CaseStatusDetails
-from .case_opened_details import CaseOpenedDetails
-from .alert_status_details import AlertStatusDetails
+
from .alert_opened_details import AlertOpenedDetails
-from .transaction_status_details import TransactionStatusDetails
+from .alert_status_details import AlertStatusDetails
+from .case_opened_details import CaseOpenedDetails
+from .case_status_details import CaseStatusDetails
+from .cra_risk_level_updated_details import CraRiskLevelUpdatedDetails
from .kyc_status_details import KycStatusDetails
+from .transaction_status_details import TransactionStatusDetails
+from .user_state_details import UserStateDetails
from .user_tags_update import UserTagsUpdate
-from .cra_risk_level_updated_details import CraRiskLevelUpdatedDetails
WebhookEventData = typing.Union[
UserStateDetails,
diff --git a/src/flagright/types/webhook_kyc_status_details.py b/src/flagright/types/webhook_kyc_status_details.py
index fcb4412..d0c409f 100644
--- a/src/flagright/types/webhook_kyc_status_details.py
+++ b/src/flagright/types/webhook_kyc_status_details.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .kyc_status import KycStatus
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .kyc_status import KycStatus
class WebhookKycStatusDetails(UniversalBaseModel):
diff --git a/src/flagright/types/webhook_user_state_details.py b/src/flagright/types/webhook_user_state_details.py
index c750fbe..71f42ab 100644
--- a/src/flagright/types/webhook_user_state_details.py
+++ b/src/flagright/types/webhook_user_state_details.py
@@ -1,12 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .user_state import UserState
+
+import pydantic
import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from ..core.pydantic_utilities import IS_PYDANTIC_V2
-import pydantic
+from .user_state import UserState
class WebhookUserStateDetails(UniversalBaseModel):
diff --git a/tests/custom/test_client.py b/tests/custom/test_client.py
index 73f811f..ab04ce6 100644
--- a/tests/custom/test_client.py
+++ b/tests/custom/test_client.py
@@ -4,4 +4,4 @@
# Get started with writing tests with pytest at https://docs.pytest.org
@pytest.mark.skip(reason="Unimplemented")
def test_client() -> None:
- assert True == True
+ assert True
diff --git a/tests/utils/assets/models/__init__.py b/tests/utils/assets/models/__init__.py
index 3a1c852..2cf0126 100644
--- a/tests/utils/assets/models/__init__.py
+++ b/tests/utils/assets/models/__init__.py
@@ -5,7 +5,7 @@
from .circle import CircleParams
from .object_with_defaults import ObjectWithDefaultsParams
from .object_with_optional_field import ObjectWithOptionalFieldParams
-from .shape import ShapeParams, Shape_CircleParams, Shape_SquareParams
+from .shape import Shape_CircleParams, Shape_SquareParams, ShapeParams
from .square import SquareParams
from .undiscriminated_shape import UndiscriminatedShapeParams
diff --git a/tests/utils/assets/models/circle.py b/tests/utils/assets/models/circle.py
index d2869df..ecab08d 100644
--- a/tests/utils/assets/models/circle.py
+++ b/tests/utils/assets/models/circle.py
@@ -3,7 +3,7 @@
# This file was auto-generated by Fern from our API Definition.
import typing_extensions
-import typing_extensions
+
from flagright.core.serialization import FieldMetadata
diff --git a/tests/utils/assets/models/object_with_defaults.py b/tests/utils/assets/models/object_with_defaults.py
index ef14f7b..a977b1d 100644
--- a/tests/utils/assets/models/object_with_defaults.py
+++ b/tests/utils/assets/models/object_with_defaults.py
@@ -3,7 +3,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing_extensions
-import typing_extensions
class ObjectWithDefaultsParams(typing_extensions.TypedDict):
diff --git a/tests/utils/assets/models/object_with_optional_field.py b/tests/utils/assets/models/object_with_optional_field.py
index 7fe55ae..4b7b652 100644
--- a/tests/utils/assets/models/object_with_optional_field.py
+++ b/tests/utils/assets/models/object_with_optional_field.py
@@ -2,16 +2,17 @@
# This file was auto-generated by Fern from our API Definition.
-import typing_extensions
-import typing
-import typing_extensions
-from flagright.core.serialization import FieldMetadata
import datetime as dt
+import typing
import uuid
+
+import typing_extensions
from .color import Color
from .shape import ShapeParams
from .undiscriminated_shape import UndiscriminatedShapeParams
+from flagright.core.serialization import FieldMetadata
+
class ObjectWithOptionalFieldParams(typing_extensions.TypedDict):
literal: typing.Literal["lit_one"]
diff --git a/tests/utils/assets/models/shape.py b/tests/utils/assets/models/shape.py
index 846f63c..91054ed 100644
--- a/tests/utils/assets/models/shape.py
+++ b/tests/utils/assets/models/shape.py
@@ -3,9 +3,11 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-import typing_extensions
-import typing_extensions
+
import typing
+
+import typing_extensions
+
from flagright.core.serialization import FieldMetadata
diff --git a/tests/utils/assets/models/square.py b/tests/utils/assets/models/square.py
index 2ea3768..1d11145 100644
--- a/tests/utils/assets/models/square.py
+++ b/tests/utils/assets/models/square.py
@@ -3,7 +3,7 @@
# This file was auto-generated by Fern from our API Definition.
import typing_extensions
-import typing_extensions
+
from flagright.core.serialization import FieldMetadata
diff --git a/tests/utils/assets/models/undiscriminated_shape.py b/tests/utils/assets/models/undiscriminated_shape.py
index 68876a2..99f12b3 100644
--- a/tests/utils/assets/models/undiscriminated_shape.py
+++ b/tests/utils/assets/models/undiscriminated_shape.py
@@ -3,6 +3,7 @@
# This file was auto-generated by Fern from our API Definition.
import typing
+
from .circle import CircleParams
from .square import SquareParams
diff --git a/tests/utils/test_query_encoding.py b/tests/utils/test_query_encoding.py
index a250b9e..3bcfd4c 100644
--- a/tests/utils/test_query_encoding.py
+++ b/tests/utils/test_query_encoding.py
@@ -1,6 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-
from flagright.core.query_encoder import encode_query
@@ -34,4 +33,4 @@ def test_query_encoding_deep_object_arrays() -> None:
def test_encode_query_with_none() -> None:
encoded = encode_query(None)
- assert encoded == None
+ assert encoded is None
diff --git a/tests/utils/test_serialization.py b/tests/utils/test_serialization.py
index beb9440..e96c69d 100644
--- a/tests/utils/test_serialization.py
+++ b/tests/utils/test_serialization.py
@@ -1,10 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-from typing import List, Any
+from typing import Any, List
-from flagright.core.serialization import convert_and_respect_annotation_metadata
-from .assets.models import ShapeParams, ObjectWithOptionalFieldParams
+from .assets.models import ObjectWithOptionalFieldParams, ShapeParams
+from flagright.core.serialization import convert_and_respect_annotation_metadata
UNION_TEST: ShapeParams = {"radius_measurement": 1.0, "shape_type": "circle", "id": "1"}
UNION_TEST_CONVERTED = {"shapeType": "circle", "radiusMeasurement": 1.0, "id": "1"}
From 79c49ca1ba935805b6bf209868a5c7656bdfb32c Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Fri, 26 Sep 2025 20:16:07 +0000
Subject: [PATCH 45/81] Release 1.8.8
From 6647fff4fc045fa387d772af84e5ae4a014648a0 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 29 Sep 2025 14:21:58 +0000
Subject: [PATCH 46/81] Release 1.8.9
---
pyproject.toml | 2 +-
src/flagright/__init__.py | 3 ++
src/flagright/core/client_wrapper.py | 4 +-
src/flagright/types/__init__.py | 3 ++
src/flagright/types/executed_rules_result.py | 4 ++
.../types/rule_execution_sanctions_details.py | 39 +++++++++++++++++++
6 files changed, 52 insertions(+), 3 deletions(-)
create mode 100644 src/flagright/types/rule_execution_sanctions_details.py
diff --git a/pyproject.toml b/pyproject.toml
index cc0ce3c..b4b7090 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.8"
+version = "1.8.9"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 44513d8..fa08a62 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -187,6 +187,7 @@
PosEntryMode,
RiskLevel,
RuleAction,
+ RuleExecutionSanctionsDetails,
RuleFailureException,
RuleHitDirection,
RuleHitMeta,
@@ -559,6 +560,7 @@
"PosEntryMode": ".types",
"RiskLevel": ".types",
"RuleAction": ".types",
+ "RuleExecutionSanctionsDetails": ".types",
"RuleFailureException": ".types",
"RuleHitDirection": ".types",
"RuleHitMeta": ".types",
@@ -949,6 +951,7 @@ def __dir__():
"PosEntryMode",
"RiskLevel",
"RuleAction",
+ "RuleExecutionSanctionsDetails",
"RuleFailureException",
"RuleHitDirection",
"RuleHitMeta",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 8ba0952..8bbe60f 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.8",
+ "User-Agent": "flagright/1.8.9",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.8",
+ "X-Fern-SDK-Version": "1.8.9",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 4d763a3..19626fb 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -196,6 +196,7 @@
from .pos_entry_mode import PosEntryMode
from .risk_level import RiskLevel
from .rule_action import RuleAction
+ from .rule_execution_sanctions_details import RuleExecutionSanctionsDetails
from .rule_failure_exception import RuleFailureException
from .rule_hit_direction import RuleHitDirection
from .rule_hit_meta import RuleHitMeta
@@ -561,6 +562,7 @@
"PosEntryMode": ".pos_entry_mode",
"RiskLevel": ".risk_level",
"RuleAction": ".rule_action",
+ "RuleExecutionSanctionsDetails": ".rule_execution_sanctions_details",
"RuleFailureException": ".rule_failure_exception",
"RuleHitDirection": ".rule_hit_direction",
"RuleHitMeta": ".rule_hit_meta",
@@ -932,6 +934,7 @@ def __dir__():
"PosEntryMode",
"RiskLevel",
"RuleAction",
+ "RuleExecutionSanctionsDetails",
"RuleFailureException",
"RuleHitDirection",
"RuleHitMeta",
diff --git a/src/flagright/types/executed_rules_result.py b/src/flagright/types/executed_rules_result.py
index 2a8163c..9fda566 100644
--- a/src/flagright/types/executed_rules_result.py
+++ b/src/flagright/types/executed_rules_result.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .executed_logic_vars import ExecutedLogicVars
from .rule_action import RuleAction
+from .rule_execution_sanctions_details import RuleExecutionSanctionsDetails
from .rule_hit_meta import RuleHitMeta
from .rule_labels import RuleLabels
from .rule_nature import RuleNature
@@ -50,6 +51,9 @@ class ExecutedRulesResult(UniversalBaseModel):
labels: typing.Optional[typing.List[RuleLabels]] = None
nature: typing.Optional[RuleNature] = None
is_shadow: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isShadow")] = None
+ sanctions_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[RuleExecutionSanctionsDetails]], FieldMetadata(alias="sanctionsDetails")
+ ] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/rule_execution_sanctions_details.py b/src/flagright/types/rule_execution_sanctions_details.py
new file mode 100644
index 0000000..de70a68
--- /dev/null
+++ b/src/flagright/types/rule_execution_sanctions_details.py
@@ -0,0 +1,39 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .rule_hit_direction import RuleHitDirection
+from .sanctions_details_entity_type import SanctionsDetailsEntityType
+from .sanctions_hit_context import SanctionsHitContext
+
+
+class RuleExecutionSanctionsDetails(UniversalBaseModel):
+ name: str
+ search_id: typing_extensions.Annotated[str, FieldMetadata(alias="searchId")]
+ iban: typing.Optional[str] = None
+ entity_type: typing_extensions.Annotated[
+ typing.Optional[SanctionsDetailsEntityType], FieldMetadata(alias="entityType")
+ ] = None
+ sanction_hit_ids: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="sanctionHitIds")
+ ] = None
+ hit_context: typing_extensions.Annotated[
+ typing.Optional[SanctionsHitContext], FieldMetadata(alias="hitContext")
+ ] = None
+ hit_direction: typing_extensions.Annotated[
+ typing.Optional[RuleHitDirection], FieldMetadata(alias="hitDirection")
+ ] = None
+ is_rule_hit: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isRuleHit")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
From b63be37dbbaffc348129cf058ba66b06bbd5ec67 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 29 Sep 2025 19:26:27 +0000
Subject: [PATCH 47/81] Release 1.8.10
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
...ss_user_with_rules_result_saved_payment_details_item.py | 1 +
...er_user_with_rules_result_saved_payment_details_item.py | 1 +
.../types/business_optional_saved_payment_details_item.py | 1 +
src/flagright/types/business_saved_payment_details_item.py | 1 +
...usiness_with_rules_result_saved_payment_details_item.py | 1 +
.../types/transaction_destination_payment_details.py | 1 +
src/flagright/types/transaction_origin_payment_details.py | 1 +
.../transaction_updatable_destination_payment_details.py | 1 +
.../types/transaction_updatable_origin_payment_details.py | 1 +
...action_with_rules_result_destination_payment_details.py | 1 +
...transaction_with_rules_result_origin_payment_details.py | 1 +
.../types/user_optional_saved_payment_details_item.py | 1 +
src/flagright/types/user_saved_payment_details_item.py | 1 +
.../user_with_rules_result_saved_payment_details_item.py | 1 +
src/flagright/types/wallet_details.py | 7 +++++++
17 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index b4b7090..e6f94ec 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.9"
+version = "1.8.10"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 8bbe60f..d126d22 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.9",
+ "User-Agent": "flagright/1.8.10",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.9",
+ "X-Fern-SDK-Version": "1.8.10",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index 792ca1a..ae0859e 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -237,6 +237,7 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBa
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index 8592fbc..6032a28 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -237,6 +237,7 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBa
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 e25dd3a..ce569f9 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -237,6 +237,7 @@ class BusinessOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index c556113..6cfc377 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -237,6 +237,7 @@ class BusinessSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 723ba6e..1cfb603 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
@@ -237,6 +237,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index 8e318e7..3d89cce 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -190,6 +190,7 @@ class TransactionDestinationPaymentDetails_Wallet(UniversalBaseModel):
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index 113f6a3..5229417 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -269,6 +269,7 @@ class TransactionOriginPaymentDetails_Wallet(UniversalBaseModel):
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index a1584ec..7689f7f 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -190,6 +190,7 @@ class TransactionUpdatableDestinationPaymentDetails_Wallet(UniversalBaseModel):
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 54a4f87..bbfccc1 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -269,6 +269,7 @@ class TransactionUpdatableOriginPaymentDetails_Wallet(UniversalBaseModel):
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 9059e84..a291de7 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
@@ -190,6 +190,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_Wallet(UniversalBaseMo
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 3f06639..19e4280 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
@@ -269,6 +269,7 @@ class TransactionWithRulesResultOriginPaymentDetails_Wallet(UniversalBaseModel):
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 f380c73..bd74935 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -237,6 +237,7 @@ class UserOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index d8a3dff..00c2785 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -237,6 +237,7 @@ class UserSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 7cd12df..e0b5485 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
@@ -237,6 +237,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/wallet_details.py b/src/flagright/types/wallet_details.py
index 60e1797..a696a6d 100644
--- a/src/flagright/types/wallet_details.py
+++ b/src/flagright/types/wallet_details.py
@@ -71,6 +71,13 @@ class WalletDetails(UniversalBaseModel):
Date of birth of the account holder (YYYY-MM-DD)
"""
+ transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ A hash is a cryptographic fingerprint that uniquely identifies a blockchain transaction on the network, whereas a transactionId is just an internal reference used by a wallet or platform to track the transaction in its own system.
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
From 270471595569ab33b99e11d4378b476dc698988a Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 30 Sep 2025 10:05:59 +0000
Subject: [PATCH 48/81] Release 1.8.11
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
...iness_user_with_rules_result_saved_payment_details_item.py | 1 +
...sumer_user_with_rules_result_saved_payment_details_item.py | 1 +
.../types/business_optional_saved_payment_details_item.py | 1 +
src/flagright/types/business_saved_payment_details_item.py | 1 +
.../business_with_rules_result_saved_payment_details_item.py | 1 +
.../types/transaction_destination_payment_details.py | 1 +
src/flagright/types/transaction_origin_payment_details.py | 1 +
.../transaction_updatable_destination_payment_details.py | 1 +
.../types/transaction_updatable_origin_payment_details.py | 1 +
...ansaction_with_rules_result_destination_payment_details.py | 1 +
.../transaction_with_rules_result_origin_payment_details.py | 1 +
src/flagright/types/upi_details.py | 2 ++
.../types/user_optional_saved_payment_details_item.py | 1 +
src/flagright/types/user_saved_payment_details_item.py | 1 +
.../user_with_rules_result_saved_payment_details_item.py | 1 +
17 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index e6f94ec..0bf2364 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.10"
+version = "1.8.11"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index d126d22..a948edf 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.10",
+ "User-Agent": "flagright/1.8.11",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.10",
+ "X-Fern-SDK-Version": "1.8.11",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index ae0859e..67c4f54 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -206,6 +206,7 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi(UniversalBaseM
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index 6032a28..aa3038f 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -206,6 +206,7 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi(UniversalBaseM
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
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 ce569f9..28ae772 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -206,6 +206,7 @@ class BusinessOptionalSavedPaymentDetailsItem_Upi(UniversalBaseModel):
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index 6cfc377..89f2491 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -206,6 +206,7 @@ class BusinessSavedPaymentDetailsItem_Upi(UniversalBaseModel):
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
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 1cfb603..e16b0a5 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
@@ -206,6 +206,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Upi(UniversalBaseModel):
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index 3d89cce..a7330be 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -159,6 +159,7 @@ class TransactionDestinationPaymentDetails_Upi(UniversalBaseModel):
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index 5229417..5c1e3b9 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -234,6 +234,7 @@ class TransactionOriginPaymentDetails_Upi(UniversalBaseModel):
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index 7689f7f..a5d8e41 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -159,6 +159,7 @@ class TransactionUpdatableDestinationPaymentDetails_Upi(UniversalBaseModel):
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index bbfccc1..103885f 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -234,6 +234,7 @@ class TransactionUpdatableOriginPaymentDetails_Upi(UniversalBaseModel):
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
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 a291de7..6a43ed2 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
@@ -159,6 +159,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_Upi(UniversalBaseModel
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
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 19e4280..e5e9e97 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
@@ -234,6 +234,7 @@ class TransactionWithRulesResultOriginPaymentDetails_Upi(UniversalBaseModel):
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/upi_details.py b/src/flagright/types/upi_details.py
index 2ad087b..b76f43b 100644
--- a/src/flagright/types/upi_details.py
+++ b/src/flagright/types/upi_details.py
@@ -6,6 +6,7 @@
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
+from .address import Address
from .email_id import EmailId
from .tag import Tag
@@ -39,6 +40,7 @@ class UpiDetails(UniversalBaseModel):
Name of the account holder
"""
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
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 bd74935..44087cc 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -206,6 +206,7 @@ class UserOptionalSavedPaymentDetailsItem_Upi(UniversalBaseModel):
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 00c2785..118d3dc 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -206,6 +206,7 @@ class UserSavedPaymentDetailsItem_Upi(UniversalBaseModel):
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
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 e0b5485..3ef6630 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
@@ -206,6 +206,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_Upi(UniversalBaseModel):
None
)
name: typing.Optional[str] = None
+ address: typing.Optional[Address] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
From b22525e83a0d291895add4e3eb54e231eef4bade Mon Sep 17 00:00:00 2001
From: Aman Dugar <55328714+amandugar@users.noreply.github.com>
Date: Tue, 30 Sep 2025 17:03:42 +0530
Subject: [PATCH 49/81] Update Token For Python (#5)
---
.github/workflows/ci.yml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9818c03..37518e8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -55,7 +55,6 @@ jobs:
- name: Publish to pypi
run: |
poetry config repositories.remote https://upload.pypi.org/legacy/
- poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
+ poetry --no-interaction -v publish --build --repository remote --username __token__ --password ${{ secrets.PYPI_TOKEN }}
env:
- PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
- PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
+ PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
From f025e1524539c71e63085776fb54369a03e5dfb2 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 30 Sep 2025 11:44:03 +0000
Subject: [PATCH 50/81] Release 1.8.12
---
.github/workflows/ci.yml | 5 +++--
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 37518e8..9818c03 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -55,6 +55,7 @@ jobs:
- name: Publish to pypi
run: |
poetry config repositories.remote https://upload.pypi.org/legacy/
- poetry --no-interaction -v publish --build --repository remote --username __token__ --password ${{ secrets.PYPI_TOKEN }}
+ poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
env:
- PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
+ PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
+ PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
diff --git a/pyproject.toml b/pyproject.toml
index 0bf2364..a12627d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.11"
+version = "1.8.12"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index a948edf..4d21a27 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.11",
+ "User-Agent": "flagright/1.8.12",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.11",
+ "X-Fern-SDK-Version": "1.8.12",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
From af75161a5dbf63748be189900d9b5e9927db1927 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 30 Sep 2025 11:55:13 +0000
Subject: [PATCH 51/81] Release 1.8.13
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index a12627d..80a036d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.12"
+version = "1.8.13"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 4d21a27..63a4438 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.12",
+ "User-Agent": "flagright/1.8.13",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.12",
+ "X-Fern-SDK-Version": "1.8.13",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
From a2e9346bff78c2ec23f46af3b67bac649e5eddff Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 6 Oct 2025 13:21:08 +0000
Subject: [PATCH 52/81] Release 1.8.14
---
poetry.lock | 6 ++--
pyproject.toml | 2 +-
src/flagright/__init__.py | 3 ++
src/flagright/core/client_wrapper.py | 4 +--
src/flagright/types/__init__.py | 3 ++
...rules_result_saved_payment_details_item.py | 8 +++++
...rules_result_saved_payment_details_item.py | 8 +++++
...ess_optional_saved_payment_details_item.py | 8 +++++
.../business_saved_payment_details_item.py | 8 +++++
...rules_result_saved_payment_details_item.py | 8 +++++
.../types/correspondence_bank_details.py | 36 +++++++++++++++++++
src/flagright/types/currency_code.py | 7 ++++
src/flagright/types/swift_details.py | 4 +++
...transaction_destination_payment_details.py | 8 +++++
.../transaction_origin_payment_details.py | 8 +++++
...n_updatable_destination_payment_details.py | 8 +++++
...action_updatable_origin_payment_details.py | 8 +++++
...ules_result_destination_payment_details.py | 8 +++++
...ith_rules_result_origin_payment_details.py | 8 +++++
...ser_optional_saved_payment_details_item.py | 8 +++++
.../types/user_saved_payment_details_item.py | 8 +++++
...rules_result_saved_payment_details_item.py | 8 +++++
src/flagright/types/wallet_details.py | 4 +++
23 files changed, 175 insertions(+), 6 deletions(-)
create mode 100644 src/flagright/types/correspondence_bank_details.py
diff --git a/poetry.lock b/poetry.lock
index c2ddd86..9a8863c 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"]
[[package]]
name = "certifi"
-version = "2025.8.3"
+version = "2025.10.5"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.7"
files = [
- {file = "certifi-2025.8.3-py3-none-any.whl", hash = "sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5"},
- {file = "certifi-2025.8.3.tar.gz", hash = "sha256:e564105f78ded564e3ae7c923924435e1daa7463faeab5bb932bc53ffae63407"},
+ {file = "certifi-2025.10.5-py3-none-any.whl", hash = "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de"},
+ {file = "certifi-2025.10.5.tar.gz", hash = "sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 80a036d..8fbe6e6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.13"
+version = "1.8.14"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index fa08a62..68c0779 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -129,6 +129,7 @@
ConsumerUserMonitoringResult,
ConsumerUserSegment,
ContactDetails,
+ CorrespondenceBankDetails,
CountryCode,
CraRiskLevelUpdatedDetails,
CurrencyCode,
@@ -499,6 +500,7 @@
"ConsumerUserSegment": ".types",
"ConsumerUsersCreateResponse": ".consumer_users",
"ContactDetails": ".types",
+ "CorrespondenceBankDetails": ".types",
"CountryCode": ".types",
"CraRiskLevelUpdatedDetails": ".types",
"CurrencyCode": ".types",
@@ -890,6 +892,7 @@ def __dir__():
"ConsumerUserSegment",
"ConsumerUsersCreateResponse",
"ContactDetails",
+ "CorrespondenceBankDetails",
"CountryCode",
"CraRiskLevelUpdatedDetails",
"CurrencyCode",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 63a4438..83dc03f 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.13",
+ "User-Agent": "flagright/1.8.14",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.13",
+ "X-Fern-SDK-Version": "1.8.14",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 19626fb..531107a 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -138,6 +138,7 @@
from .consumer_user_monitoring_result import ConsumerUserMonitoringResult
from .consumer_user_segment import ConsumerUserSegment
from .contact_details import ContactDetails
+ from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .cra_risk_level_updated_details import CraRiskLevelUpdatedDetails
from .currency_code import CurrencyCode
@@ -504,6 +505,7 @@
"ConsumerUserMonitoringResult": ".consumer_user_monitoring_result",
"ConsumerUserSegment": ".consumer_user_segment",
"ContactDetails": ".contact_details",
+ "CorrespondenceBankDetails": ".correspondence_bank_details",
"CountryCode": ".country_code",
"CraRiskLevelUpdatedDetails": ".cra_risk_level_updated_details",
"CurrencyCode": ".currency_code",
@@ -876,6 +878,7 @@ def __dir__():
"ConsumerUserMonitoringResult",
"ConsumerUserSegment",
"ContactDetails",
+ "CorrespondenceBankDetails",
"CountryCode",
"CraRiskLevelUpdatedDetails",
"CurrencyCode",
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index 67c4f54..598f0f0 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -166,6 +168,9 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBas
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -237,6 +242,9 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBa
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index aa3038f..b4a7323 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -166,6 +168,9 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBas
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -237,6 +242,9 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBa
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
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 28ae772..c213284 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -166,6 +168,9 @@ class BusinessOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -237,6 +242,9 @@ class BusinessOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index 89f2491..472be75 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -166,6 +168,9 @@ class BusinessSavedPaymentDetailsItem_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -237,6 +242,9 @@ class BusinessSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
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 e16b0a5..1b911f7 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
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -166,6 +168,9 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -237,6 +242,9 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
diff --git a/src/flagright/types/correspondence_bank_details.py b/src/flagright/types/correspondence_bank_details.py
new file mode 100644
index 0000000..7c1f049
--- /dev/null
+++ b/src/flagright/types/correspondence_bank_details.py
@@ -0,0 +1,36 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .tag import Tag
+
+
+class CorrespondenceBankDetails(UniversalBaseModel):
+ """
+ Model for Correspondence bank details
+ """
+
+ bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = pydantic.Field(
+ default=None
+ )
+ """
+ Name of the bank
+ """
+
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/currency_code.py b/src/flagright/types/currency_code.py
index f06c20a..0f9e2b3 100644
--- a/src/flagright/types/currency_code.py
+++ b/src/flagright/types/currency_code.py
@@ -125,6 +125,7 @@
"DOP",
"DOT",
"DREP",
+ "DYDX",
"DYP",
"DZD",
"EEK",
@@ -204,6 +205,7 @@
"INJ",
"INR",
"INV",
+ "IOTA",
"IOTX",
"ISLM",
"IQD",
@@ -221,6 +223,7 @@
"KES",
"KGS",
"KHR",
+ "KLAY",
"KMF",
"KNC",
"KPW",
@@ -247,6 +250,7 @@
"LSL",
"LTC",
"LTL",
+ "LUNA2",
"LVL",
"LYD",
"MAD",
@@ -289,6 +293,7 @@
"NAD",
"NCT",
"NEAR",
+ "NEO",
"NEST",
"NGN",
"NIO",
@@ -444,6 +449,7 @@
"VTHO",
"VUV",
"WAMPL",
+ "WAVES",
"WAXL",
"WBTC",
"WCFG",
@@ -471,6 +477,7 @@
"ZEC",
"ZEN",
"ZETA",
+ "ZIL",
"ZMK",
"ZMW",
"ZRX",
diff --git a/src/flagright/types/swift_details.py b/src/flagright/types/swift_details.py
index 21f1c9e..73c9c29 100644
--- a/src/flagright/types/swift_details.py
+++ b/src/flagright/types/swift_details.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .address import Address
from .amount import Amount
+from .correspondence_bank_details import CorrespondenceBankDetails
from .email_id import EmailId
from .tag import Tag
@@ -68,6 +69,9 @@ class SwiftDetails(UniversalBaseModel):
"""
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
Additional information that can be added via tags
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index a7330be..79b8051 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -190,6 +192,9 @@ class TransactionDestinationPaymentDetails_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
@@ -218,6 +223,9 @@ class TransactionDestinationPaymentDetails_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index 5c1e3b9..4f01eb4 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -186,6 +188,9 @@ class TransactionOriginPaymentDetails_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -269,6 +274,9 @@ class TransactionOriginPaymentDetails_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index a5d8e41..074a3b8 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -190,6 +192,9 @@ class TransactionUpdatableDestinationPaymentDetails_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
@@ -218,6 +223,9 @@ class TransactionUpdatableDestinationPaymentDetails_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 103885f..c50cccc 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -186,6 +188,9 @@ class TransactionUpdatableOriginPaymentDetails_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -269,6 +274,9 @@ class TransactionUpdatableOriginPaymentDetails_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
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 6a43ed2..4e2af0f 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
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -190,6 +192,9 @@ class TransactionWithRulesResultDestinationPaymentDetails_Wallet(UniversalBaseMo
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
@@ -218,6 +223,9 @@ class TransactionWithRulesResultDestinationPaymentDetails_Swift(UniversalBaseMod
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 e5e9e97..1a912f8 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
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -186,6 +188,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -269,6 +274,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
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 44087cc..9e68281 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -166,6 +168,9 @@ class UserOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -237,6 +242,9 @@ class UserOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 118d3dc..40fb009 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -166,6 +168,9 @@ class UserSavedPaymentDetailsItem_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -237,6 +242,9 @@ class UserSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
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 3ef6630..5e01c91 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
@@ -18,11 +18,13 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
+from .correspondence_bank_details import CorrespondenceBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .pos_details import PosDetails
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -166,6 +168,9 @@ class UserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
+ correspondence_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -237,6 +242,9 @@ class UserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
transaction_hash: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="transactionHash")] = None
diff --git a/src/flagright/types/wallet_details.py b/src/flagright/types/wallet_details.py
index a696a6d..c372114 100644
--- a/src/flagright/types/wallet_details.py
+++ b/src/flagright/types/wallet_details.py
@@ -11,6 +11,7 @@
from .country_code import CountryCode
from .email_id import EmailId
from .tag import Tag
+from .user_details import UserDetails
from .wallet_network import WalletNetwork
@@ -64,6 +65,9 @@ class WalletDetails(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ authorized_representative: typing_extensions.Annotated[
+ typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = (
pydantic.Field(default=None)
)
From d43e44199afd6dd84148d29e457a8fd9b0c37663 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 20 Oct 2025 10:45:42 +0000
Subject: [PATCH 53/81] Release 1.8.15
---
poetry.lock | 84 ++++++++++++++++------------
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 +-
3 files changed, 50 insertions(+), 40 deletions(-)
diff --git a/poetry.lock b/poetry.lock
index 9a8863c..fef3795 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -133,13 +133,13 @@ zstd = ["zstandard (>=0.18.0)"]
[[package]]
name = "idna"
-version = "3.10"
+version = "3.11"
description = "Internationalized Domain Names in Applications (IDNA)"
optional = false
-python-versions = ">=3.6"
+python-versions = ">=3.8"
files = [
- {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"},
- {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"},
+ {file = "idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea"},
+ {file = "idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"},
]
[package.extras]
@@ -483,43 +483,53 @@ files = [
[[package]]
name = "tomli"
-version = "2.2.1"
+version = "2.3.0"
description = "A lil' TOML parser"
optional = false
python-versions = ">=3.8"
files = [
- {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"},
- {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"},
- {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"},
- {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"},
- {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"},
- {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"},
- {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"},
- {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"},
- {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"},
- {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"},
- {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"},
- {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"},
- {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"},
- {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"},
- {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"},
- {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"},
- {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"},
- {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"},
- {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"},
- {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"},
- {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"},
- {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"},
- {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"},
- {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"},
- {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"},
- {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"},
- {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"},
- {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"},
- {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"},
- {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"},
- {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"},
- {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"},
+ {file = "tomli-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:88bd15eb972f3664f5ed4b57c1634a97153b4bac4479dcb6a495f41921eb7f45"},
+ {file = "tomli-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:883b1c0d6398a6a9d29b508c331fa56adbcdff647f6ace4dfca0f50e90dfd0ba"},
+ {file = "tomli-2.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1381caf13ab9f300e30dd8feadb3de072aeb86f1d34a8569453ff32a7dea4bf"},
+ {file = "tomli-2.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0e285d2649b78c0d9027570d4da3425bdb49830a6156121360b3f8511ea3441"},
+ {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a154a9ae14bfcf5d8917a59b51ffd5a3ac1fd149b71b47a3a104ca4edcfa845"},
+ {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:74bf8464ff93e413514fefd2be591c3b0b23231a77f901db1eb30d6f712fc42c"},
+ {file = "tomli-2.3.0-cp311-cp311-win32.whl", hash = "sha256:00b5f5d95bbfc7d12f91ad8c593a1659b6387b43f054104cda404be6bda62456"},
+ {file = "tomli-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:4dc4ce8483a5d429ab602f111a93a6ab1ed425eae3122032db7e9acf449451be"},
+ {file = "tomli-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7d86942e56ded512a594786a5ba0a5e521d02529b3826e7761a05138341a2ac"},
+ {file = "tomli-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:73ee0b47d4dad1c5e996e3cd33b8a76a50167ae5f96a2607cbe8cc773506ab22"},
+ {file = "tomli-2.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:792262b94d5d0a466afb5bc63c7daa9d75520110971ee269152083270998316f"},
+ {file = "tomli-2.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f195fe57ecceac95a66a75ac24d9d5fbc98ef0962e09b2eddec5d39375aae52"},
+ {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e31d432427dcbf4d86958c184b9bfd1e96b5b71f8eb17e6d02531f434fd335b8"},
+ {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b0882799624980785240ab732537fcfc372601015c00f7fc367c55308c186f6"},
+ {file = "tomli-2.3.0-cp312-cp312-win32.whl", hash = "sha256:ff72b71b5d10d22ecb084d345fc26f42b5143c5533db5e2eaba7d2d335358876"},
+ {file = "tomli-2.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:1cb4ed918939151a03f33d4242ccd0aa5f11b3547d0cf30f7c74a408a5b99878"},
+ {file = "tomli-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5192f562738228945d7b13d4930baffda67b69425a7f0da96d360b0a3888136b"},
+ {file = "tomli-2.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:be71c93a63d738597996be9528f4abe628d1adf5e6eb11607bc8fe1a510b5dae"},
+ {file = "tomli-2.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4665508bcbac83a31ff8ab08f424b665200c0e1e645d2bd9ab3d3e557b6185b"},
+ {file = "tomli-2.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4021923f97266babc6ccab9f5068642a0095faa0a51a246a6a02fccbb3514eaf"},
+ {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4ea38c40145a357d513bffad0ed869f13c1773716cf71ccaa83b0fa0cc4e42f"},
+ {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ad805ea85eda330dbad64c7ea7a4556259665bdf9d2672f5dccc740eb9d3ca05"},
+ {file = "tomli-2.3.0-cp313-cp313-win32.whl", hash = "sha256:97d5eec30149fd3294270e889b4234023f2c69747e555a27bd708828353ab606"},
+ {file = "tomli-2.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:0c95ca56fbe89e065c6ead5b593ee64b84a26fca063b5d71a1122bf26e533999"},
+ {file = "tomli-2.3.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:cebc6fe843e0733ee827a282aca4999b596241195f43b4cc371d64fc6639da9e"},
+ {file = "tomli-2.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4c2ef0244c75aba9355561272009d934953817c49f47d768070c3c94355c2aa3"},
+ {file = "tomli-2.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c22a8bf253bacc0cf11f35ad9808b6cb75ada2631c2d97c971122583b129afbc"},
+ {file = "tomli-2.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0eea8cc5c5e9f89c9b90c4896a8deefc74f518db5927d0e0e8d4a80953d774d0"},
+ {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b74a0e59ec5d15127acdabd75ea17726ac4c5178ae51b85bfe39c4f8a278e879"},
+ {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b5870b50c9db823c595983571d1296a6ff3e1b88f734a4c8f6fc6188397de005"},
+ {file = "tomli-2.3.0-cp314-cp314-win32.whl", hash = "sha256:feb0dacc61170ed7ab602d3d972a58f14ee3ee60494292d384649a3dc38ef463"},
+ {file = "tomli-2.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:b273fcbd7fc64dc3600c098e39136522650c49bca95df2d11cf3b626422392c8"},
+ {file = "tomli-2.3.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:940d56ee0410fa17ee1f12b817b37a4d4e4dc4d27340863cc67236c74f582e77"},
+ {file = "tomli-2.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f85209946d1fe94416debbb88d00eb92ce9cd5266775424ff81bc959e001acaf"},
+ {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a56212bdcce682e56b0aaf79e869ba5d15a6163f88d5451cbde388d48b13f530"},
+ {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c5f3ffd1e098dfc032d4d3af5c0ac64f6d286d98bc148698356847b80fa4de1b"},
+ {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e01decd096b1530d97d5d85cb4dff4af2d8347bd35686654a004f8dea20fc67"},
+ {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8a35dd0e643bb2610f156cca8db95d213a90015c11fee76c946aa62b7ae7e02f"},
+ {file = "tomli-2.3.0-cp314-cp314t-win32.whl", hash = "sha256:a1f7f282fe248311650081faafa5f4732bdbfef5d45fe3f2e702fbc6f2d496e0"},
+ {file = "tomli-2.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:70a251f8d4ba2d9ac2542eecf008b3c8a9fc5c3f9f02c56a9d7952612be2fdba"},
+ {file = "tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b"},
+ {file = "tomli-2.3.0.tar.gz", hash = "sha256:64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 8fbe6e6..f554b32 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.14"
+version = "1.8.15"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 83dc03f..af28bb3 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.14",
+ "User-Agent": "flagright/1.8.15",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.14",
+ "X-Fern-SDK-Version": "1.8.15",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
From 2f6322cf4e9dae5325743c7128bed6e8ee79633d Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 21 Oct 2025 07:08:39 +0000
Subject: [PATCH 54/81] Release 1.8.16
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/currency_code.py | 1 +
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index f554b32..f6c23b6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.15"
+version = "1.8.16"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index af28bb3..c884517 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.15",
+ "User-Agent": "flagright/1.8.16",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.15",
+ "X-Fern-SDK-Version": "1.8.16",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/currency_code.py b/src/flagright/types/currency_code.py
index 0f9e2b3..dc79788 100644
--- a/src/flagright/types/currency_code.py
+++ b/src/flagright/types/currency_code.py
@@ -500,6 +500,7 @@
"VIC",
"XAI",
"SLE",
+ "UDI",
],
typing.Any,
]
From 2548b740d37be13ef79571f69de87ee1e3358cdb Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Fri, 24 Oct 2025 13:03:17 +0000
Subject: [PATCH 55/81] Release 1.8.17
---
pyproject.toml | 2 +-
reference.md | 8 ++++++++
src/flagright/__init__.py | 6 +++---
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/transactions/client.py | 8 ++++++++
src/flagright/transactions/raw_client.py | 8 ++++++++
src/flagright/types/__init__.py | 6 +++---
...s_user_with_rules_result_saved_payment_details_item.py | 6 +++---
...r_user_with_rules_result_saved_payment_details_item.py | 6 +++---
.../types/business_optional_saved_payment_details_item.py | 6 +++---
.../types/business_saved_payment_details_item.py | 6 +++---
...siness_with_rules_result_saved_payment_details_item.py | 6 +++---
...ence_bank_details.py => correspondent_bank_details.py} | 4 ++--
src/flagright/types/swift_details.py | 6 +++---
src/flagright/types/transaction.py | 3 +++
.../types/transaction_destination_payment_details.py | 6 +++---
src/flagright/types/transaction_origin_payment_details.py | 6 +++---
src/flagright/types/transaction_updatable.py | 3 +++
.../transaction_updatable_destination_payment_details.py | 6 +++---
.../types/transaction_updatable_origin_payment_details.py | 6 +++---
src/flagright/types/transaction_with_rules_result.py | 3 +++
...ction_with_rules_result_destination_payment_details.py | 6 +++---
...ransaction_with_rules_result_origin_payment_details.py | 6 +++---
.../types/user_optional_saved_payment_details_item.py | 6 +++---
src/flagright/types/user_saved_payment_details_item.py | 6 +++---
.../user_with_rules_result_saved_payment_details_item.py | 6 +++---
26 files changed, 89 insertions(+), 56 deletions(-)
rename src/flagright/types/{correspondence_bank_details.py => correspondent_bank_details.py} (90%)
diff --git a/pyproject.toml b/pyproject.toml
index f6c23b6..e24934f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.16"
+version = "1.8.17"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index f2ca804..a3c8849 100644
--- a/reference.md
+++ b/reference.md
@@ -307,6 +307,14 @@ client.transactions.verify(
-
+**payment_approval_timestamp:** `typing.Optional[float]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 68c0779..d5bfc66 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -129,7 +129,7 @@
ConsumerUserMonitoringResult,
ConsumerUserSegment,
ContactDetails,
- CorrespondenceBankDetails,
+ CorrespondentBankDetails,
CountryCode,
CraRiskLevelUpdatedDetails,
CurrencyCode,
@@ -500,7 +500,7 @@
"ConsumerUserSegment": ".types",
"ConsumerUsersCreateResponse": ".consumer_users",
"ContactDetails": ".types",
- "CorrespondenceBankDetails": ".types",
+ "CorrespondentBankDetails": ".types",
"CountryCode": ".types",
"CraRiskLevelUpdatedDetails": ".types",
"CurrencyCode": ".types",
@@ -892,7 +892,7 @@ def __dir__():
"ConsumerUserSegment",
"ConsumerUsersCreateResponse",
"ContactDetails",
- "CorrespondenceBankDetails",
+ "CorrespondentBankDetails",
"CountryCode",
"CraRiskLevelUpdatedDetails",
"CurrencyCode",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index c884517..2b87fe3 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.16",
+ "User-Agent": "flagright/1.8.17",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.16",
+ "X-Fern-SDK-Version": "1.8.17",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index 6d182c2..22284cc 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -59,6 +59,7 @@ def verify(
destination_device_data: typing.Optional[DeviceData] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
update_count: typing.Optional[float] = OMIT,
+ payment_approval_timestamp: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TransactionsVerifyResponse:
"""
@@ -141,6 +142,8 @@ def verify(
update_count : typing.Optional[float]
+ payment_approval_timestamp : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -251,6 +254,7 @@ def verify(
destination_device_data=destination_device_data,
tags=tags,
update_count=update_count,
+ payment_approval_timestamp=payment_approval_timestamp,
request_options=request_options,
)
return _response.data
@@ -332,6 +336,7 @@ async def verify(
destination_device_data: typing.Optional[DeviceData] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
update_count: typing.Optional[float] = OMIT,
+ payment_approval_timestamp: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TransactionsVerifyResponse:
"""
@@ -414,6 +419,8 @@ async def verify(
update_count : typing.Optional[float]
+ payment_approval_timestamp : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -532,6 +539,7 @@ async def main() -> None:
destination_device_data=destination_device_data,
tags=tags,
update_count=update_count,
+ payment_approval_timestamp=payment_approval_timestamp,
request_options=request_options,
)
return _response.data
diff --git a/src/flagright/transactions/raw_client.py b/src/flagright/transactions/raw_client.py
index 19110ba..c2b0d79 100644
--- a/src/flagright/transactions/raw_client.py
+++ b/src/flagright/transactions/raw_client.py
@@ -57,6 +57,7 @@ def verify(
destination_device_data: typing.Optional[DeviceData] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
update_count: typing.Optional[float] = OMIT,
+ payment_approval_timestamp: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[TransactionsVerifyResponse]:
"""
@@ -139,6 +140,8 @@ def verify(
update_count : typing.Optional[float]
+ payment_approval_timestamp : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -192,6 +195,7 @@ def verify(
object_=tags, annotation=typing.Sequence[Tag], direction="write"
),
"updateCount": update_count,
+ "paymentApprovalTimestamp": payment_approval_timestamp,
},
headers={
"content-type": "application/json",
@@ -352,6 +356,7 @@ async def verify(
destination_device_data: typing.Optional[DeviceData] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
update_count: typing.Optional[float] = OMIT,
+ payment_approval_timestamp: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[TransactionsVerifyResponse]:
"""
@@ -434,6 +439,8 @@ async def verify(
update_count : typing.Optional[float]
+ payment_approval_timestamp : typing.Optional[float]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -487,6 +494,7 @@ async def verify(
object_=tags, annotation=typing.Sequence[Tag], direction="write"
),
"updateCount": update_count,
+ "paymentApprovalTimestamp": payment_approval_timestamp,
},
headers={
"content-type": "application/json",
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 531107a..4bd28cd 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -138,7 +138,7 @@
from .consumer_user_monitoring_result import ConsumerUserMonitoringResult
from .consumer_user_segment import ConsumerUserSegment
from .contact_details import ContactDetails
- from .correspondence_bank_details import CorrespondenceBankDetails
+ from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .cra_risk_level_updated_details import CraRiskLevelUpdatedDetails
from .currency_code import CurrencyCode
@@ -505,7 +505,7 @@
"ConsumerUserMonitoringResult": ".consumer_user_monitoring_result",
"ConsumerUserSegment": ".consumer_user_segment",
"ContactDetails": ".contact_details",
- "CorrespondenceBankDetails": ".correspondence_bank_details",
+ "CorrespondentBankDetails": ".correspondent_bank_details",
"CountryCode": ".country_code",
"CraRiskLevelUpdatedDetails": ".cra_risk_level_updated_details",
"CurrencyCode": ".currency_code",
@@ -878,7 +878,7 @@ def __dir__():
"ConsumerUserMonitoringResult",
"ConsumerUserSegment",
"ContactDetails",
- "CorrespondenceBankDetails",
+ "CorrespondentBankDetails",
"CountryCode",
"CraRiskLevelUpdatedDetails",
"CurrencyCode",
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index 598f0f0..01464e6 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -168,8 +168,8 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBas
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index b4a7323..c3ad202 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -168,8 +168,8 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBas
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
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 c213284..7a83dce 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -168,8 +168,8 @@ class BusinessOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index 472be75..ab69a25 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -168,8 +168,8 @@ class BusinessSavedPaymentDetailsItem_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
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 1b911f7..3c1f182 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
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -168,8 +168,8 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/correspondence_bank_details.py b/src/flagright/types/correspondent_bank_details.py
similarity index 90%
rename from src/flagright/types/correspondence_bank_details.py
rename to src/flagright/types/correspondent_bank_details.py
index 7c1f049..eb5b5a6 100644
--- a/src/flagright/types/correspondence_bank_details.py
+++ b/src/flagright/types/correspondent_bank_details.py
@@ -9,9 +9,9 @@
from .tag import Tag
-class CorrespondenceBankDetails(UniversalBaseModel):
+class CorrespondentBankDetails(UniversalBaseModel):
"""
- Model for Correspondence bank details
+ Model for Correspondent bank details
"""
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = pydantic.Field(
diff --git a/src/flagright/types/swift_details.py b/src/flagright/types/swift_details.py
index 73c9c29..7eb3e35 100644
--- a/src/flagright/types/swift_details.py
+++ b/src/flagright/types/swift_details.py
@@ -8,7 +8,7 @@
from ..core.serialization import FieldMetadata
from .address import Address
from .amount import Amount
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .email_id import EmailId
from .tag import Tag
@@ -69,8 +69,8 @@ class SwiftDetails(UniversalBaseModel):
"""
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
diff --git a/src/flagright/types/transaction.py b/src/flagright/types/transaction.py
index 860e90b..7516729 100644
--- a/src/flagright/types/transaction.py
+++ b/src/flagright/types/transaction.py
@@ -105,6 +105,9 @@ class Transaction(UniversalBaseModel):
"""
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+ payment_approval_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="paymentApprovalTimestamp")
+ ] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index 79b8051..9133af0 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -223,8 +223,8 @@ class TransactionDestinationPaymentDetails_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index 4f01eb4..3c9c5b1 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -188,8 +188,8 @@ class TransactionOriginPaymentDetails_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/transaction_updatable.py b/src/flagright/types/transaction_updatable.py
index dacf279..947c9b6 100644
--- a/src/flagright/types/transaction_updatable.py
+++ b/src/flagright/types/transaction_updatable.py
@@ -76,6 +76,9 @@ class TransactionUpdatable(UniversalBaseModel):
"""
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+ payment_approval_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="paymentApprovalTimestamp")
+ ] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index 074a3b8..a24d1af 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -223,8 +223,8 @@ class TransactionUpdatableDestinationPaymentDetails_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index c50cccc..c5b8d66 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -188,8 +188,8 @@ class TransactionUpdatableOriginPaymentDetails_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/transaction_with_rules_result.py b/src/flagright/types/transaction_with_rules_result.py
index e3b5fbd..1f0e4c9 100644
--- a/src/flagright/types/transaction_with_rules_result.py
+++ b/src/flagright/types/transaction_with_rules_result.py
@@ -112,6 +112,9 @@ class TransactionWithRulesResult(UniversalBaseModel):
"""
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+ payment_approval_timestamp: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="paymentApprovalTimestamp")
+ ] = None
executed_rules: typing_extensions.Annotated[typing.List[ExecutedRulesResult], FieldMetadata(alias="executedRules")]
hit_rules: typing_extensions.Annotated[typing.List[HitRulesDetails], FieldMetadata(alias="hitRules")]
status: RuleAction
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 4e2af0f..41bf7e2 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
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -223,8 +223,8 @@ class TransactionWithRulesResultDestinationPaymentDetails_Swift(UniversalBaseMod
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
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 1a912f8..91fbb13 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
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -188,8 +188,8 @@ class TransactionWithRulesResultOriginPaymentDetails_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
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 9e68281..8b29d0b 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -168,8 +168,8 @@ class UserOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 40fb009..3b39bc6 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -168,8 +168,8 @@ class UserSavedPaymentDetailsItem_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
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 5e01c91..140e88b 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
@@ -18,7 +18,7 @@
from .card_type import CardType
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
-from .correspondence_bank_details import CorrespondenceBankDetails
+from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -168,8 +168,8 @@ class UserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
typing.Optional[str], FieldMetadata(alias="specialInstructions")
] = None
address: typing.Optional[Address] = None
- correspondence_bank_details: typing_extensions.Annotated[
- typing.Optional[typing.List[CorrespondenceBankDetails]], FieldMetadata(alias="correspondenceBankDetails")
+ correspondent_bank_details: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorrespondentBankDetails]], FieldMetadata(alias="correspondentBankDetails")
] = None
tags: typing.Optional[typing.List[Tag]] = None
From 6f23f540f5bcd3fce65aae1e2b1132c5b6e3523b Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Sun, 26 Oct 2025 18:10:50 +0000
Subject: [PATCH 56/81] Release 1.8.18
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/transaction_status_details.py | 5 +++++
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index e24934f..8364014 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.17"
+version = "1.8.18"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 2b87fe3..671005b 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.17",
+ "User-Agent": "flagright/1.8.18",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.17",
+ "X-Fern-SDK-Version": "1.8.18",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/transaction_status_details.py b/src/flagright/types/transaction_status_details.py
index 129e13b..c9f83d1 100644
--- a/src/flagright/types/transaction_status_details.py
+++ b/src/flagright/types/transaction_status_details.py
@@ -11,6 +11,11 @@
class TransactionStatusDetails(UniversalBaseModel):
transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")]
+ type: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Type of transaction (ex: DEPOSIT, WITHDRAWAL, TRANSFER, EXTERNAL_PAYMENT, REFUND, OTHER)
+ """
+
reasons: typing.List[str]
status: RuleAction
comment: typing.Optional[str] = None
From 4dd2dd67564f82b7ed523c2a3c9890daf4ff49f0 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 27 Oct 2025 08:35:39 +0000
Subject: [PATCH 57/81] Release 1.8.19
---
pyproject.toml | 2 +-
reference.md | 47 ++++++++--------
src/flagright/batch/client.py | 56 ++++++++++----------
src/flagright/business_user_events/client.py | 14 +++--
src/flagright/business_users/client.py | 12 ++---
src/flagright/consumer_user_events/client.py | 8 +--
src/flagright/consumer_users/client.py | 4 +-
src/flagright/core/client_wrapper.py | 4 +-
8 files changed, 78 insertions(+), 69 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 8364014..398e4a5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.18"
+version = "1.8.19"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index a3c8849..9e3f1e2 100644
--- a/reference.md
+++ b/reference.md
@@ -425,9 +425,9 @@ client.batch.verify_transaction(
validate_destination_user_id="true",
data=[
Transaction(
- type="type",
- transaction_id="transactionId",
- timestamp=1.1,
+ type="DEPOSIT",
+ transaction_id="7b80a539eea6e78acbd6d458e5971482",
+ timestamp=1641654664000.0,
)
],
)
@@ -585,9 +585,9 @@ client = Flagright(
client.batch.create_transaction_events(
data=[
TransactionEvent(
- transaction_state="CREATED",
- timestamp=1.1,
- transaction_id="transactionId",
+ transaction_state="SUCCESSFUL",
+ timestamp=1641654664000.0,
+ transaction_id="443dea26147a406b957d9ee3a1247b11",
)
],
)
@@ -657,8 +657,8 @@ client.batch.create_consumer_users(
lock_kyc_risk_level="true",
data=[
User(
- user_id="userId",
- created_timestamp=1.1,
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ created_timestamp=1641654664000.0,
)
],
)
@@ -744,8 +744,8 @@ client.batch.create_business_users(
lock_kyc_risk_level="true",
data=[
Business(
- user_id="userId",
- created_timestamp=1.1,
+ user_id="BU-1",
+ created_timestamp=1641654664000.0,
legal_entity=LegalEntity(
company_general_details=CompanyGeneralDetails(
legal_name="Ozkan Hazelnut Export JSC",
@@ -838,8 +838,8 @@ client.batch.create_consumer_user_events(
lock_kyc_risk_level="true",
data=[
ConsumerUserEvent(
- timestamp=1.1,
- user_id="userId",
+ timestamp=1641654664000.0,
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
)
],
)
@@ -925,8 +925,8 @@ client.batch.create_business_user_events(
lock_kyc_risk_level="true",
data=[
BusinessUserEvent(
- timestamp=1.1,
- user_id="userId",
+ timestamp=1641654664000.0,
+ user_id="BU-1",
)
],
)
@@ -1667,7 +1667,7 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.consumer_users.get(
- user_id="userId",
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
)
```
@@ -1754,8 +1754,8 @@ client.business_users.create(
lock_cra_risk_level="true",
lock_kyc_risk_level="true",
validate_user_id="true",
- user_id="userId",
- created_timestamp=1.1,
+ user_id="BU-1",
+ created_timestamp=1641654664000.0,
legal_entity=LegalEntity(
company_general_details=CompanyGeneralDetails(
legal_name="Ozkan Hazelnut Export JSC",
@@ -2020,7 +2020,7 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.business_users.get(
- user_id="userId",
+ user_id="BU-1",
)
```
@@ -2112,8 +2112,8 @@ client.consumer_user_events.create(
allow_user_type_conversion="true",
lock_kyc_risk_level="true",
lock_cra_risk_level="true",
- timestamp=1.1,
- user_id="userId",
+ timestamp=1641654664000.0,
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
)
```
@@ -2348,8 +2348,11 @@ client.business_user_events.create(
allow_user_type_conversion="true",
lock_kyc_risk_level="true",
lock_cra_risk_level="true",
- timestamp=1.1,
- user_id="userId",
+ timestamp=1641654664000.0,
+ user_id="BU-1",
+ event_id="event-123",
+ reason="User status update",
+ event_description="Business user status changed",
)
```
diff --git a/src/flagright/batch/client.py b/src/flagright/batch/client.py
index 9c622db..3365088 100644
--- a/src/flagright/batch/client.py
+++ b/src/flagright/batch/client.py
@@ -78,9 +78,9 @@ def verify_transaction(
validate_destination_user_id="true",
data=[
Transaction(
- type="type",
- transaction_id="transactionId",
- timestamp=1.1,
+ type="DEPOSIT",
+ transaction_id="7b80a539eea6e78acbd6d458e5971482",
+ timestamp=1641654664000.0,
)
],
)
@@ -170,9 +170,9 @@ def create_transaction_events(
client.batch.create_transaction_events(
data=[
TransactionEvent(
- transaction_state="CREATED",
- timestamp=1.1,
- transaction_id="transactionId",
+ transaction_state="SUCCESSFUL",
+ timestamp=1641654664000.0,
+ transaction_id="443dea26147a406b957d9ee3a1247b11",
)
],
)
@@ -224,8 +224,8 @@ def create_consumer_users(
lock_kyc_risk_level="true",
data=[
User(
- user_id="userId",
- created_timestamp=1.1,
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ created_timestamp=1641654664000.0,
)
],
)
@@ -281,8 +281,8 @@ def create_business_users(
lock_kyc_risk_level="true",
data=[
Business(
- user_id="userId",
- created_timestamp=1.1,
+ user_id="BU-1",
+ created_timestamp=1641654664000.0,
legal_entity=LegalEntity(
company_general_details=CompanyGeneralDetails(
legal_name="Ozkan Hazelnut Export JSC",
@@ -345,8 +345,8 @@ def create_consumer_user_events(
lock_kyc_risk_level="true",
data=[
ConsumerUserEvent(
- timestamp=1.1,
- user_id="userId",
+ timestamp=1641654664000.0,
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
)
],
)
@@ -402,8 +402,8 @@ def create_business_user_events(
lock_kyc_risk_level="true",
data=[
BusinessUserEvent(
- timestamp=1.1,
- user_id="userId",
+ timestamp=1641654664000.0,
+ user_id="BU-1",
)
],
)
@@ -480,9 +480,9 @@ async def main() -> None:
validate_destination_user_id="true",
data=[
Transaction(
- type="type",
- transaction_id="transactionId",
- timestamp=1.1,
+ type="DEPOSIT",
+ transaction_id="7b80a539eea6e78acbd6d458e5971482",
+ timestamp=1641654664000.0,
)
],
)
@@ -590,9 +590,9 @@ async def main() -> None:
await client.batch.create_transaction_events(
data=[
TransactionEvent(
- transaction_state="CREATED",
- timestamp=1.1,
- transaction_id="transactionId",
+ transaction_state="SUCCESSFUL",
+ timestamp=1641654664000.0,
+ transaction_id="443dea26147a406b957d9ee3a1247b11",
)
],
)
@@ -652,8 +652,8 @@ async def main() -> None:
lock_kyc_risk_level="true",
data=[
User(
- user_id="userId",
- created_timestamp=1.1,
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ created_timestamp=1641654664000.0,
)
],
)
@@ -722,8 +722,8 @@ async def main() -> None:
lock_kyc_risk_level="true",
data=[
Business(
- user_id="userId",
- created_timestamp=1.1,
+ user_id="BU-1",
+ created_timestamp=1641654664000.0,
legal_entity=LegalEntity(
company_general_details=CompanyGeneralDetails(
legal_name="Ozkan Hazelnut Export JSC",
@@ -794,8 +794,8 @@ async def main() -> None:
lock_kyc_risk_level="true",
data=[
ConsumerUserEvent(
- timestamp=1.1,
- user_id="userId",
+ timestamp=1641654664000.0,
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
)
],
)
@@ -859,8 +859,8 @@ async def main() -> None:
lock_kyc_risk_level="true",
data=[
BusinessUserEvent(
- timestamp=1.1,
- user_id="userId",
+ timestamp=1641654664000.0,
+ user_id="BU-1",
)
],
)
diff --git a/src/flagright/business_user_events/client.py b/src/flagright/business_user_events/client.py
index 1b94587..d490cc5 100644
--- a/src/flagright/business_user_events/client.py
+++ b/src/flagright/business_user_events/client.py
@@ -114,8 +114,11 @@ def create(
allow_user_type_conversion="true",
lock_kyc_risk_level="true",
lock_cra_risk_level="true",
- timestamp=1.1,
- user_id="userId",
+ timestamp=1641654664000.0,
+ user_id="BU-1",
+ event_id="event-123",
+ reason="User status update",
+ event_description="Business user status changed",
)
"""
_response = self._raw_client.create(
@@ -273,8 +276,11 @@ async def main() -> None:
allow_user_type_conversion="true",
lock_kyc_risk_level="true",
lock_cra_risk_level="true",
- timestamp=1.1,
- user_id="userId",
+ timestamp=1641654664000.0,
+ user_id="BU-1",
+ event_id="event-123",
+ reason="User status update",
+ event_description="Business user status changed",
)
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index 4d44a7f..b08ea83 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -167,8 +167,8 @@ def create(
lock_cra_risk_level="true",
lock_kyc_risk_level="true",
validate_user_id="true",
- user_id="userId",
- created_timestamp=1.1,
+ user_id="BU-1",
+ created_timestamp=1641654664000.0,
legal_entity=LegalEntity(
company_general_details=CompanyGeneralDetails(
legal_name="Ozkan Hazelnut Export JSC",
@@ -236,7 +236,7 @@ def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions]
api_key="YOUR_API_KEY",
)
client.business_users.get(
- user_id="userId",
+ user_id="BU-1",
)
"""
_response = self._raw_client.get(user_id, request_options=request_options)
@@ -388,8 +388,8 @@ async def main() -> None:
lock_cra_risk_level="true",
lock_kyc_risk_level="true",
validate_user_id="true",
- user_id="userId",
- created_timestamp=1.1,
+ user_id="BU-1",
+ created_timestamp=1641654664000.0,
legal_entity=LegalEntity(
company_general_details=CompanyGeneralDetails(
legal_name="Ozkan Hazelnut Export JSC",
@@ -467,7 +467,7 @@ async def get(
async def main() -> None:
await client.business_users.get(
- user_id="userId",
+ user_id="BU-1",
)
diff --git a/src/flagright/consumer_user_events/client.py b/src/flagright/consumer_user_events/client.py
index 8148a4b..c52e675 100644
--- a/src/flagright/consumer_user_events/client.py
+++ b/src/flagright/consumer_user_events/client.py
@@ -114,8 +114,8 @@ def create(
allow_user_type_conversion="true",
lock_kyc_risk_level="true",
lock_cra_risk_level="true",
- timestamp=1.1,
- user_id="userId",
+ timestamp=1641654664000.0,
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
)
"""
_response = self._raw_client.create(
@@ -273,8 +273,8 @@ async def main() -> None:
allow_user_type_conversion="true",
lock_kyc_risk_level="true",
lock_cra_risk_level="true",
- timestamp=1.1,
- user_id="userId",
+ timestamp=1641654664000.0,
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
)
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
index 8713373..79e4ce7 100644
--- a/src/flagright/consumer_users/client.py
+++ b/src/flagright/consumer_users/client.py
@@ -329,7 +329,7 @@ def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions]
api_key="YOUR_API_KEY",
)
client.consumer_users.get(
- user_id="userId",
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
)
"""
_response = self._raw_client.get(user_id, request_options=request_options)
@@ -646,7 +646,7 @@ async def get(
async def main() -> None:
await client.consumer_users.get(
- user_id="userId",
+ user_id="96647cfd9e8fe66ee0f3362e011e34e8",
)
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 671005b..693ccdd 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.18",
+ "User-Agent": "flagright/1.8.19",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.18",
+ "X-Fern-SDK-Version": "1.8.19",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
From 8ac0ea6f6fd7a74b81edc68755f7e76226159acd Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 11 Nov 2025 08:23:22 +0000
Subject: [PATCH 58/81] Release 1.8.20
---
pyproject.toml | 2 +-
reference.md | 71 ++++++++++++-------
src/flagright/batch/client.py | 56 +++++++--------
src/flagright/business_user_events/client.py | 14 ++--
src/flagright/business_users/client.py | 22 ++++--
src/flagright/business_users/raw_client.py | 10 +++
src/flagright/consumer_user_events/client.py | 8 +--
src/flagright/consumer_users/client.py | 14 +++-
src/flagright/consumer_users/raw_client.py | 10 +++
src/flagright/core/client_wrapper.py | 4 +-
src/flagright/transactions/client.py | 10 +++
src/flagright/transactions/raw_client.py | 10 +++
.../batch_business_user_with_rules_result.py | 5 ++
.../batch_consumer_user_with_rules_result.py | 5 ++
src/flagright/types/business.py | 5 ++
src/flagright/types/business_optional.py | 5 ++
.../types/business_with_rules_result.py | 5 ++
src/flagright/types/transaction.py | 5 ++
.../types/transaction_status_details.py | 7 +-
src/flagright/types/transaction_updatable.py | 5 ++
.../types/transaction_with_rules_result.py | 5 ++
src/flagright/types/user.py | 5 ++
src/flagright/types/user_optional.py | 5 ++
src/flagright/types/user_with_rules_result.py | 5 ++
src/flagright/types/webhook_event.py | 5 ++
src/flagright/types/webhook_event_base.py | 5 ++
26 files changed, 221 insertions(+), 82 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 398e4a5..933a6b9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.19"
+version = "1.8.20"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 9e3f1e2..729b350 100644
--- a/reference.md
+++ b/reference.md
@@ -299,6 +299,14 @@ client.transactions.verify(
-
+**jurisdiction:** `typing.Optional[str]` — Legal authority or region governing the transaction
+
+
+
+
+
+-
+
**update_count:** `typing.Optional[float]`
@@ -425,9 +433,9 @@ client.batch.verify_transaction(
validate_destination_user_id="true",
data=[
Transaction(
- type="DEPOSIT",
- transaction_id="7b80a539eea6e78acbd6d458e5971482",
- timestamp=1641654664000.0,
+ type="type",
+ transaction_id="transactionId",
+ timestamp=1.1,
)
],
)
@@ -585,9 +593,9 @@ client = Flagright(
client.batch.create_transaction_events(
data=[
TransactionEvent(
- transaction_state="SUCCESSFUL",
- timestamp=1641654664000.0,
- transaction_id="443dea26147a406b957d9ee3a1247b11",
+ transaction_state="CREATED",
+ timestamp=1.1,
+ transaction_id="transactionId",
)
],
)
@@ -657,8 +665,8 @@ client.batch.create_consumer_users(
lock_kyc_risk_level="true",
data=[
User(
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
- created_timestamp=1641654664000.0,
+ user_id="userId",
+ created_timestamp=1.1,
)
],
)
@@ -744,8 +752,8 @@ client.batch.create_business_users(
lock_kyc_risk_level="true",
data=[
Business(
- user_id="BU-1",
- created_timestamp=1641654664000.0,
+ user_id="userId",
+ created_timestamp=1.1,
legal_entity=LegalEntity(
company_general_details=CompanyGeneralDetails(
legal_name="Ozkan Hazelnut Export JSC",
@@ -838,8 +846,8 @@ client.batch.create_consumer_user_events(
lock_kyc_risk_level="true",
data=[
ConsumerUserEvent(
- timestamp=1641654664000.0,
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ timestamp=1.1,
+ user_id="userId",
)
],
)
@@ -925,8 +933,8 @@ client.batch.create_business_user_events(
lock_kyc_risk_level="true",
data=[
BusinessUserEvent(
- timestamp=1641654664000.0,
- user_id="BU-1",
+ timestamp=1.1,
+ user_id="userId",
)
],
)
@@ -1610,6 +1618,14 @@ client.consumer_users.create(
-
+**jurisdiction:** `typing.Optional[str]` — Legal authority or region governing the transaction
+
+
+
+
+
+-
+
**update_count:** `typing.Optional[float]`
@@ -1667,7 +1683,7 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.consumer_users.get(
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ user_id="userId",
)
```
@@ -1754,8 +1770,8 @@ client.business_users.create(
lock_cra_risk_level="true",
lock_kyc_risk_level="true",
validate_user_id="true",
- user_id="BU-1",
- created_timestamp=1641654664000.0,
+ user_id="userId",
+ created_timestamp=1.1,
legal_entity=LegalEntity(
company_general_details=CompanyGeneralDetails(
legal_name="Ozkan Hazelnut Export JSC",
@@ -1963,6 +1979,14 @@ client.business_users.create(
-
+**jurisdiction:** `typing.Optional[str]` — Legal authority or region governing the transaction
+
+
+
+
+
+-
+
**update_count:** `typing.Optional[float]`
@@ -2020,7 +2044,7 @@ client = Flagright(
api_key="YOUR_API_KEY",
)
client.business_users.get(
- user_id="BU-1",
+ user_id="userId",
)
```
@@ -2112,8 +2136,8 @@ client.consumer_user_events.create(
allow_user_type_conversion="true",
lock_kyc_risk_level="true",
lock_cra_risk_level="true",
- timestamp=1641654664000.0,
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ timestamp=1.1,
+ user_id="userId",
)
```
@@ -2348,11 +2372,8 @@ client.business_user_events.create(
allow_user_type_conversion="true",
lock_kyc_risk_level="true",
lock_cra_risk_level="true",
- timestamp=1641654664000.0,
- user_id="BU-1",
- event_id="event-123",
- reason="User status update",
- event_description="Business user status changed",
+ timestamp=1.1,
+ user_id="userId",
)
```
diff --git a/src/flagright/batch/client.py b/src/flagright/batch/client.py
index 3365088..9c622db 100644
--- a/src/flagright/batch/client.py
+++ b/src/flagright/batch/client.py
@@ -78,9 +78,9 @@ def verify_transaction(
validate_destination_user_id="true",
data=[
Transaction(
- type="DEPOSIT",
- transaction_id="7b80a539eea6e78acbd6d458e5971482",
- timestamp=1641654664000.0,
+ type="type",
+ transaction_id="transactionId",
+ timestamp=1.1,
)
],
)
@@ -170,9 +170,9 @@ def create_transaction_events(
client.batch.create_transaction_events(
data=[
TransactionEvent(
- transaction_state="SUCCESSFUL",
- timestamp=1641654664000.0,
- transaction_id="443dea26147a406b957d9ee3a1247b11",
+ transaction_state="CREATED",
+ timestamp=1.1,
+ transaction_id="transactionId",
)
],
)
@@ -224,8 +224,8 @@ def create_consumer_users(
lock_kyc_risk_level="true",
data=[
User(
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
- created_timestamp=1641654664000.0,
+ user_id="userId",
+ created_timestamp=1.1,
)
],
)
@@ -281,8 +281,8 @@ def create_business_users(
lock_kyc_risk_level="true",
data=[
Business(
- user_id="BU-1",
- created_timestamp=1641654664000.0,
+ user_id="userId",
+ created_timestamp=1.1,
legal_entity=LegalEntity(
company_general_details=CompanyGeneralDetails(
legal_name="Ozkan Hazelnut Export JSC",
@@ -345,8 +345,8 @@ def create_consumer_user_events(
lock_kyc_risk_level="true",
data=[
ConsumerUserEvent(
- timestamp=1641654664000.0,
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ timestamp=1.1,
+ user_id="userId",
)
],
)
@@ -402,8 +402,8 @@ def create_business_user_events(
lock_kyc_risk_level="true",
data=[
BusinessUserEvent(
- timestamp=1641654664000.0,
- user_id="BU-1",
+ timestamp=1.1,
+ user_id="userId",
)
],
)
@@ -480,9 +480,9 @@ async def main() -> None:
validate_destination_user_id="true",
data=[
Transaction(
- type="DEPOSIT",
- transaction_id="7b80a539eea6e78acbd6d458e5971482",
- timestamp=1641654664000.0,
+ type="type",
+ transaction_id="transactionId",
+ timestamp=1.1,
)
],
)
@@ -590,9 +590,9 @@ async def main() -> None:
await client.batch.create_transaction_events(
data=[
TransactionEvent(
- transaction_state="SUCCESSFUL",
- timestamp=1641654664000.0,
- transaction_id="443dea26147a406b957d9ee3a1247b11",
+ transaction_state="CREATED",
+ timestamp=1.1,
+ transaction_id="transactionId",
)
],
)
@@ -652,8 +652,8 @@ async def main() -> None:
lock_kyc_risk_level="true",
data=[
User(
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
- created_timestamp=1641654664000.0,
+ user_id="userId",
+ created_timestamp=1.1,
)
],
)
@@ -722,8 +722,8 @@ async def main() -> None:
lock_kyc_risk_level="true",
data=[
Business(
- user_id="BU-1",
- created_timestamp=1641654664000.0,
+ user_id="userId",
+ created_timestamp=1.1,
legal_entity=LegalEntity(
company_general_details=CompanyGeneralDetails(
legal_name="Ozkan Hazelnut Export JSC",
@@ -794,8 +794,8 @@ async def main() -> None:
lock_kyc_risk_level="true",
data=[
ConsumerUserEvent(
- timestamp=1641654664000.0,
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ timestamp=1.1,
+ user_id="userId",
)
],
)
@@ -859,8 +859,8 @@ async def main() -> None:
lock_kyc_risk_level="true",
data=[
BusinessUserEvent(
- timestamp=1641654664000.0,
- user_id="BU-1",
+ timestamp=1.1,
+ user_id="userId",
)
],
)
diff --git a/src/flagright/business_user_events/client.py b/src/flagright/business_user_events/client.py
index d490cc5..1b94587 100644
--- a/src/flagright/business_user_events/client.py
+++ b/src/flagright/business_user_events/client.py
@@ -114,11 +114,8 @@ def create(
allow_user_type_conversion="true",
lock_kyc_risk_level="true",
lock_cra_risk_level="true",
- timestamp=1641654664000.0,
- user_id="BU-1",
- event_id="event-123",
- reason="User status update",
- event_description="Business user status changed",
+ timestamp=1.1,
+ user_id="userId",
)
"""
_response = self._raw_client.create(
@@ -276,11 +273,8 @@ async def main() -> None:
allow_user_type_conversion="true",
lock_kyc_risk_level="true",
lock_cra_risk_level="true",
- timestamp=1641654664000.0,
- user_id="BU-1",
- event_id="event-123",
- reason="User status update",
- event_description="Business user status changed",
+ timestamp=1.1,
+ user_id="userId",
)
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index b08ea83..1755f3d 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -68,6 +68,7 @@ def create(
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
+ jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessUsersCreateResponse:
@@ -146,6 +147,9 @@ def create(
meta_data : typing.Optional[DeviceData]
+ jurisdiction : typing.Optional[str]
+ Legal authority or region governing the transaction
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -167,8 +171,8 @@ def create(
lock_cra_risk_level="true",
lock_kyc_risk_level="true",
validate_user_id="true",
- user_id="BU-1",
- created_timestamp=1641654664000.0,
+ user_id="userId",
+ created_timestamp=1.1,
legal_entity=LegalEntity(
company_general_details=CompanyGeneralDetails(
legal_name="Ozkan Hazelnut Export JSC",
@@ -202,6 +206,7 @@ def create(
tags=tags,
attachments=attachments,
meta_data=meta_data,
+ jurisdiction=jurisdiction,
update_count=update_count,
request_options=request_options,
)
@@ -236,7 +241,7 @@ def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions]
api_key="YOUR_API_KEY",
)
client.business_users.get(
- user_id="BU-1",
+ user_id="userId",
)
"""
_response = self._raw_client.get(user_id, request_options=request_options)
@@ -284,6 +289,7 @@ async def create(
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
+ jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessUsersCreateResponse:
@@ -362,6 +368,9 @@ async def create(
meta_data : typing.Optional[DeviceData]
+ jurisdiction : typing.Optional[str]
+ Legal authority or region governing the transaction
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -388,8 +397,8 @@ async def main() -> None:
lock_cra_risk_level="true",
lock_kyc_risk_level="true",
validate_user_id="true",
- user_id="BU-1",
- created_timestamp=1641654664000.0,
+ user_id="userId",
+ created_timestamp=1.1,
legal_entity=LegalEntity(
company_general_details=CompanyGeneralDetails(
legal_name="Ozkan Hazelnut Export JSC",
@@ -426,6 +435,7 @@ async def main() -> None:
tags=tags,
attachments=attachments,
meta_data=meta_data,
+ jurisdiction=jurisdiction,
update_count=update_count,
request_options=request_options,
)
@@ -467,7 +477,7 @@ async def get(
async def main() -> None:
await client.business_users.get(
- user_id="BU-1",
+ user_id="userId",
)
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index e639f37..0dd03b4 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -66,6 +66,7 @@ def create(
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
+ jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BusinessUsersCreateResponse]:
@@ -144,6 +145,9 @@ def create(
meta_data : typing.Optional[DeviceData]
+ jurisdiction : typing.Optional[str]
+ Legal authority or region governing the transaction
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -209,6 +213,7 @@ def create(
"metaData": convert_and_respect_annotation_metadata(
object_=meta_data, annotation=DeviceData, direction="write"
),
+ "jurisdiction": jurisdiction,
"updateCount": update_count,
},
headers={
@@ -372,6 +377,7 @@ async def create(
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
+ jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BusinessUsersCreateResponse]:
@@ -450,6 +456,9 @@ async def create(
meta_data : typing.Optional[DeviceData]
+ jurisdiction : typing.Optional[str]
+ Legal authority or region governing the transaction
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -515,6 +524,7 @@ async def create(
"metaData": convert_and_respect_annotation_metadata(
object_=meta_data, annotation=DeviceData, direction="write"
),
+ "jurisdiction": jurisdiction,
"updateCount": update_count,
},
headers={
diff --git a/src/flagright/consumer_user_events/client.py b/src/flagright/consumer_user_events/client.py
index c52e675..8148a4b 100644
--- a/src/flagright/consumer_user_events/client.py
+++ b/src/flagright/consumer_user_events/client.py
@@ -114,8 +114,8 @@ def create(
allow_user_type_conversion="true",
lock_kyc_risk_level="true",
lock_cra_risk_level="true",
- timestamp=1641654664000.0,
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ timestamp=1.1,
+ user_id="userId",
)
"""
_response = self._raw_client.create(
@@ -273,8 +273,8 @@ async def main() -> None:
allow_user_type_conversion="true",
lock_kyc_risk_level="true",
lock_cra_risk_level="true",
- timestamp=1641654664000.0,
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ timestamp=1.1,
+ user_id="userId",
)
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
index 79e4ce7..a251c31 100644
--- a/src/flagright/consumer_users/client.py
+++ b/src/flagright/consumer_users/client.py
@@ -84,6 +84,7 @@ def create(
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
+ jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ConsumerUsersCreateResponse:
@@ -177,6 +178,9 @@ def create(
meta_data : typing.Optional[DeviceData]
+ jurisdiction : typing.Optional[str]
+ Legal authority or region governing the transaction
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -295,6 +299,7 @@ def create(
tags=tags,
attachments=attachments,
meta_data=meta_data,
+ jurisdiction=jurisdiction,
update_count=update_count,
request_options=request_options,
)
@@ -329,7 +334,7 @@ def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions]
api_key="YOUR_API_KEY",
)
client.consumer_users.get(
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ user_id="userId",
)
"""
_response = self._raw_client.get(user_id, request_options=request_options)
@@ -386,6 +391,7 @@ async def create(
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
+ jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ConsumerUsersCreateResponse:
@@ -479,6 +485,9 @@ async def create(
meta_data : typing.Optional[DeviceData]
+ jurisdiction : typing.Optional[str]
+ Legal authority or region governing the transaction
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -605,6 +614,7 @@ async def main() -> None:
tags=tags,
attachments=attachments,
meta_data=meta_data,
+ jurisdiction=jurisdiction,
update_count=update_count,
request_options=request_options,
)
@@ -646,7 +656,7 @@ async def get(
async def main() -> None:
await client.consumer_users.get(
- user_id="96647cfd9e8fe66ee0f3362e011e34e8",
+ user_id="userId",
)
diff --git a/src/flagright/consumer_users/raw_client.py b/src/flagright/consumer_users/raw_client.py
index 151f5d6..e72741e 100644
--- a/src/flagright/consumer_users/raw_client.py
+++ b/src/flagright/consumer_users/raw_client.py
@@ -82,6 +82,7 @@ def create(
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
+ jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[ConsumerUsersCreateResponse]:
@@ -175,6 +176,9 @@ def create(
meta_data : typing.Optional[DeviceData]
+ jurisdiction : typing.Optional[str]
+ Legal authority or region governing the transaction
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -253,6 +257,7 @@ def create(
"metaData": convert_and_respect_annotation_metadata(
object_=meta_data, annotation=DeviceData, direction="write"
),
+ "jurisdiction": jurisdiction,
"updateCount": update_count,
},
headers={
@@ -425,6 +430,7 @@ async def create(
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
+ jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[ConsumerUsersCreateResponse]:
@@ -518,6 +524,9 @@ async def create(
meta_data : typing.Optional[DeviceData]
+ jurisdiction : typing.Optional[str]
+ Legal authority or region governing the transaction
+
update_count : typing.Optional[float]
request_options : typing.Optional[RequestOptions]
@@ -596,6 +605,7 @@ async def create(
"metaData": convert_and_respect_annotation_metadata(
object_=meta_data, annotation=DeviceData, direction="write"
),
+ "jurisdiction": jurisdiction,
"updateCount": update_count,
},
headers={
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 693ccdd..33c1568 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.19",
+ "User-Agent": "flagright/1.8.20",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.19",
+ "X-Fern-SDK-Version": "1.8.20",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index 22284cc..12058a8 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -58,6 +58,7 @@ def verify(
origin_device_data: typing.Optional[DeviceData] = OMIT,
destination_device_data: typing.Optional[DeviceData] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
+ jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
payment_approval_timestamp: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -140,6 +141,9 @@ def verify(
tags : typing.Optional[typing.Sequence[Tag]]
Additional information that can be added via tags
+ jurisdiction : typing.Optional[str]
+ Legal authority or region governing the transaction
+
update_count : typing.Optional[float]
payment_approval_timestamp : typing.Optional[float]
@@ -253,6 +257,7 @@ def verify(
origin_device_data=origin_device_data,
destination_device_data=destination_device_data,
tags=tags,
+ jurisdiction=jurisdiction,
update_count=update_count,
payment_approval_timestamp=payment_approval_timestamp,
request_options=request_options,
@@ -335,6 +340,7 @@ async def verify(
origin_device_data: typing.Optional[DeviceData] = OMIT,
destination_device_data: typing.Optional[DeviceData] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
+ jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
payment_approval_timestamp: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -417,6 +423,9 @@ async def verify(
tags : typing.Optional[typing.Sequence[Tag]]
Additional information that can be added via tags
+ jurisdiction : typing.Optional[str]
+ Legal authority or region governing the transaction
+
update_count : typing.Optional[float]
payment_approval_timestamp : typing.Optional[float]
@@ -538,6 +547,7 @@ async def main() -> None:
origin_device_data=origin_device_data,
destination_device_data=destination_device_data,
tags=tags,
+ jurisdiction=jurisdiction,
update_count=update_count,
payment_approval_timestamp=payment_approval_timestamp,
request_options=request_options,
diff --git a/src/flagright/transactions/raw_client.py b/src/flagright/transactions/raw_client.py
index c2b0d79..4795f3c 100644
--- a/src/flagright/transactions/raw_client.py
+++ b/src/flagright/transactions/raw_client.py
@@ -56,6 +56,7 @@ def verify(
origin_device_data: typing.Optional[DeviceData] = OMIT,
destination_device_data: typing.Optional[DeviceData] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
+ jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
payment_approval_timestamp: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -138,6 +139,9 @@ def verify(
tags : typing.Optional[typing.Sequence[Tag]]
Additional information that can be added via tags
+ jurisdiction : typing.Optional[str]
+ Legal authority or region governing the transaction
+
update_count : typing.Optional[float]
payment_approval_timestamp : typing.Optional[float]
@@ -194,6 +198,7 @@ def verify(
"tags": convert_and_respect_annotation_metadata(
object_=tags, annotation=typing.Sequence[Tag], direction="write"
),
+ "jurisdiction": jurisdiction,
"updateCount": update_count,
"paymentApprovalTimestamp": payment_approval_timestamp,
},
@@ -355,6 +360,7 @@ async def verify(
origin_device_data: typing.Optional[DeviceData] = OMIT,
destination_device_data: typing.Optional[DeviceData] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
+ jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
payment_approval_timestamp: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -437,6 +443,9 @@ async def verify(
tags : typing.Optional[typing.Sequence[Tag]]
Additional information that can be added via tags
+ jurisdiction : typing.Optional[str]
+ Legal authority or region governing the transaction
+
update_count : typing.Optional[float]
payment_approval_timestamp : typing.Optional[float]
@@ -493,6 +502,7 @@ async def verify(
"tags": convert_and_respect_annotation_metadata(
object_=tags, annotation=typing.Sequence[Tag], direction="write"
),
+ "jurisdiction": jurisdiction,
"updateCount": update_count,
"paymentApprovalTimestamp": payment_approval_timestamp,
},
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index bccef99..0358392 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -100,6 +100,11 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
"""
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ jurisdiction: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Legal authority or region governing the transaction
+ """
+
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result.py b/src/flagright/types/batch_consumer_user_with_rules_result.py
index f9a885d..c4890eb 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result.py
@@ -130,6 +130,11 @@ class BatchConsumerUserWithRulesResult(UniversalBaseModel):
"""
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ jurisdiction: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Legal authority or region governing the transaction
+ """
+
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index e5ef3f4..bb2db4b 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -95,6 +95,11 @@ class Business(UniversalBaseModel):
"""
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ jurisdiction: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Legal authority or region governing the transaction
+ """
+
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index 6f3b1eb..66c47bc 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -90,6 +90,11 @@ class BusinessOptional(UniversalBaseModel):
"""
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ jurisdiction: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Legal authority or region governing the transaction
+ """
+
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 0b0cc19..bf74ec3 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -99,6 +99,11 @@ class BusinessWithRulesResult(UniversalBaseModel):
"""
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ jurisdiction: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Legal authority or region governing the transaction
+ """
+
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
diff --git a/src/flagright/types/transaction.py b/src/flagright/types/transaction.py
index 7516729..184503b 100644
--- a/src/flagright/types/transaction.py
+++ b/src/flagright/types/transaction.py
@@ -104,6 +104,11 @@ class Transaction(UniversalBaseModel):
Additional information that can be added via tags
"""
+ jurisdiction: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Legal authority or region governing the transaction
+ """
+
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
payment_approval_timestamp: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="paymentApprovalTimestamp")
diff --git a/src/flagright/types/transaction_status_details.py b/src/flagright/types/transaction_status_details.py
index c9f83d1..394c569 100644
--- a/src/flagright/types/transaction_status_details.py
+++ b/src/flagright/types/transaction_status_details.py
@@ -11,15 +11,14 @@
class TransactionStatusDetails(UniversalBaseModel):
transaction_id: typing_extensions.Annotated[str, FieldMetadata(alias="transactionId")]
+ reasons: typing.List[str]
+ status: RuleAction
+ comment: typing.Optional[str] = None
type: typing.Optional[str] = pydantic.Field(default=None)
"""
Type of transaction (ex: DEPOSIT, WITHDRAWAL, TRANSFER, EXTERNAL_PAYMENT, REFUND, OTHER)
"""
- reasons: typing.List[str]
- status: RuleAction
- comment: typing.Optional[str] = None
-
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/transaction_updatable.py b/src/flagright/types/transaction_updatable.py
index 947c9b6..e7a0903 100644
--- a/src/flagright/types/transaction_updatable.py
+++ b/src/flagright/types/transaction_updatable.py
@@ -75,6 +75,11 @@ class TransactionUpdatable(UniversalBaseModel):
Additional information that can be added via tags
"""
+ jurisdiction: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Legal authority or region governing the transaction
+ """
+
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
payment_approval_timestamp: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="paymentApprovalTimestamp")
diff --git a/src/flagright/types/transaction_with_rules_result.py b/src/flagright/types/transaction_with_rules_result.py
index 1f0e4c9..4595ff6 100644
--- a/src/flagright/types/transaction_with_rules_result.py
+++ b/src/flagright/types/transaction_with_rules_result.py
@@ -111,6 +111,11 @@ class TransactionWithRulesResult(UniversalBaseModel):
Additional information that can be added via tags
"""
+ jurisdiction: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Legal authority or region governing the transaction
+ """
+
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
payment_approval_timestamp: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="paymentApprovalTimestamp")
diff --git a/src/flagright/types/user.py b/src/flagright/types/user.py
index 6570137..3c9f9f9 100644
--- a/src/flagright/types/user.py
+++ b/src/flagright/types/user.py
@@ -125,6 +125,11 @@ class User(UniversalBaseModel):
"""
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ jurisdiction: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Legal authority or region governing the transaction
+ """
+
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/user_optional.py b/src/flagright/types/user_optional.py
index 786405c..0536f1b 100644
--- a/src/flagright/types/user_optional.py
+++ b/src/flagright/types/user_optional.py
@@ -119,6 +119,11 @@ class UserOptional(UniversalBaseModel):
"""
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ jurisdiction: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Legal authority or region governing the transaction
+ """
+
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/user_with_rules_result.py b/src/flagright/types/user_with_rules_result.py
index 6fd4899..51ecb06 100644
--- a/src/flagright/types/user_with_rules_result.py
+++ b/src/flagright/types/user_with_rules_result.py
@@ -129,6 +129,11 @@ class UserWithRulesResult(UniversalBaseModel):
"""
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
+ jurisdiction: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Legal authority or region governing the transaction
+ """
+
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
diff --git a/src/flagright/types/webhook_event.py b/src/flagright/types/webhook_event.py
index 4adfb73..83c8758 100644
--- a/src/flagright/types/webhook_event.py
+++ b/src/flagright/types/webhook_event.py
@@ -29,6 +29,11 @@ class WebhookEvent(UniversalBaseModel):
Time at which the event was created. Measured in ms since the Unix epoch.
"""
+ account: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Email ID associated with the event
+ """
+
type: WebhookEventType
data: WebhookEventData
diff --git a/src/flagright/types/webhook_event_base.py b/src/flagright/types/webhook_event_base.py
index a4d006f..bbafcaf 100644
--- a/src/flagright/types/webhook_event_base.py
+++ b/src/flagright/types/webhook_event_base.py
@@ -27,6 +27,11 @@ class WebhookEventBase(UniversalBaseModel):
Time at which the event was created. Measured in ms since the Unix epoch.
"""
+ account: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Email ID associated with the event
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
From 242871287b3f4f31c6e137cfb224d1f59999e1f0 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 12 Nov 2025 11:30:14 +0000
Subject: [PATCH 59/81] Release 1.8.21
---
poetry.lock | 6 +++---
pyproject.toml | 2 +-
reference.md | 16 ++++++++++++++
src/flagright/__init__.py | 3 +++
src/flagright/business_users/client.py | 9 ++++++++
src/flagright/business_users/raw_client.py | 13 ++++++++++++
src/flagright/consumer_users/client.py | 9 ++++++++
src/flagright/consumer_users/raw_client.py | 13 ++++++++++++
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/__init__.py | 3 +++
.../batch_business_user_with_rules_result.py | 4 ++++
.../batch_consumer_user_with_rules_result.py | 4 ++++
src/flagright/types/business.py | 4 ++++
src/flagright/types/business_optional.py | 4 ++++
.../types/business_with_rules_result.py | 4 ++++
src/flagright/types/products_enabled.py | 21 +++++++++++++++++++
src/flagright/types/user.py | 4 ++++
src/flagright/types/user_optional.py | 4 ++++
src/flagright/types/user_with_rules_result.py | 4 ++++
19 files changed, 125 insertions(+), 6 deletions(-)
create mode 100644 src/flagright/types/products_enabled.py
diff --git a/poetry.lock b/poetry.lock
index fef3795..794340b 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"]
[[package]]
name = "certifi"
-version = "2025.10.5"
+version = "2025.11.12"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.7"
files = [
- {file = "certifi-2025.10.5-py3-none-any.whl", hash = "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de"},
- {file = "certifi-2025.10.5.tar.gz", hash = "sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43"},
+ {file = "certifi-2025.11.12-py3-none-any.whl", hash = "sha256:97de8790030bbd5c2d96b7ec782fc2f7820ef8dba6db909ccf95449f2d062d4b"},
+ {file = "certifi-2025.11.12.tar.gz", hash = "sha256:d8ab5478f2ecd78af242878415affce761ca6bc54a22a27e026d7c25357c3316"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 933a6b9..220045a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.20"
+version = "1.8.21"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 729b350..64e3cdc 100644
--- a/reference.md
+++ b/reference.md
@@ -1634,6 +1634,14 @@ client.consumer_users.create(
-
+**products_enabled:** `typing.Optional[typing.Sequence[ProductsEnabled]]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1995,6 +2003,14 @@ client.business_users.create(
-
+**products_enabled:** `typing.Optional[typing.Sequence[ProductsEnabled]]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index d5bfc66..2ef1185 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -186,6 +186,7 @@
PlaceOfBirth,
PosDetails,
PosEntryMode,
+ ProductsEnabled,
RiskLevel,
RuleAction,
RuleExecutionSanctionsDetails,
@@ -560,6 +561,7 @@
"PlaceOfBirth": ".types",
"PosDetails": ".types",
"PosEntryMode": ".types",
+ "ProductsEnabled": ".types",
"RiskLevel": ".types",
"RuleAction": ".types",
"RuleExecutionSanctionsDetails": ".types",
@@ -952,6 +954,7 @@ def __dir__():
"PlaceOfBirth",
"PosDetails",
"PosEntryMode",
+ "ProductsEnabled",
"RiskLevel",
"RuleAction",
"RuleExecutionSanctionsDetails",
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index 1755f3d..33152f4 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -15,6 +15,7 @@
from ..types.payment_method import PaymentMethod
from ..types.person import Person
from ..types.person_attachment import PersonAttachment
+from ..types.products_enabled import ProductsEnabled
from ..types.risk_level import RiskLevel
from ..types.transaction_limits import TransactionLimits
from ..types.user_entity_link import UserEntityLink
@@ -70,6 +71,7 @@ def create(
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
+ products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessUsersCreateResponse:
"""
@@ -152,6 +154,8 @@ def create(
update_count : typing.Optional[float]
+ products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -208,6 +212,7 @@ def create(
meta_data=meta_data,
jurisdiction=jurisdiction,
update_count=update_count,
+ products_enabled=products_enabled,
request_options=request_options,
)
return _response.data
@@ -291,6 +296,7 @@ async def create(
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
+ products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessUsersCreateResponse:
"""
@@ -373,6 +379,8 @@ async def create(
update_count : typing.Optional[float]
+ products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -437,6 +445,7 @@ async def main() -> None:
meta_data=meta_data,
jurisdiction=jurisdiction,
update_count=update_count,
+ products_enabled=products_enabled,
request_options=request_options,
)
return _response.data
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index 0dd03b4..ac2c3c7 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -25,6 +25,7 @@
from ..types.payment_method import PaymentMethod
from ..types.person import Person
from ..types.person_attachment import PersonAttachment
+from ..types.products_enabled import ProductsEnabled
from ..types.risk_level import RiskLevel
from ..types.transaction_limits import TransactionLimits
from ..types.user_entity_link import UserEntityLink
@@ -68,6 +69,7 @@ def create(
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
+ products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BusinessUsersCreateResponse]:
"""
@@ -150,6 +152,8 @@ def create(
update_count : typing.Optional[float]
+ products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -215,6 +219,9 @@ def create(
),
"jurisdiction": jurisdiction,
"updateCount": update_count,
+ "productsEnabled": convert_and_respect_annotation_metadata(
+ object_=products_enabled, annotation=typing.Sequence[ProductsEnabled], direction="write"
+ ),
},
headers={
"content-type": "application/json",
@@ -379,6 +386,7 @@ async def create(
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
+ products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BusinessUsersCreateResponse]:
"""
@@ -461,6 +469,8 @@ async def create(
update_count : typing.Optional[float]
+ products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -526,6 +536,9 @@ async def create(
),
"jurisdiction": jurisdiction,
"updateCount": update_count,
+ "productsEnabled": convert_and_respect_annotation_metadata(
+ object_=products_enabled, annotation=typing.Sequence[ProductsEnabled], direction="write"
+ ),
},
headers={
"content-type": "application/json",
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
index a251c31..31d5b2c 100644
--- a/src/flagright/consumer_users/client.py
+++ b/src/flagright/consumer_users/client.py
@@ -17,6 +17,7 @@
from ..types.legal_document import LegalDocument
from ..types.pep_status import PepStatus
from ..types.person_attachment import PersonAttachment
+from ..types.products_enabled import ProductsEnabled
from ..types.risk_level import RiskLevel
from ..types.sanctions_status import SanctionsStatus
from ..types.source_of_funds import SourceOfFunds
@@ -86,6 +87,7 @@ def create(
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
+ products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ConsumerUsersCreateResponse:
"""
@@ -183,6 +185,8 @@ def create(
update_count : typing.Optional[float]
+ products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -301,6 +305,7 @@ def create(
meta_data=meta_data,
jurisdiction=jurisdiction,
update_count=update_count,
+ products_enabled=products_enabled,
request_options=request_options,
)
return _response.data
@@ -393,6 +398,7 @@ async def create(
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
+ products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ConsumerUsersCreateResponse:
"""
@@ -490,6 +496,8 @@ async def create(
update_count : typing.Optional[float]
+ products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -616,6 +624,7 @@ async def main() -> None:
meta_data=meta_data,
jurisdiction=jurisdiction,
update_count=update_count,
+ products_enabled=products_enabled,
request_options=request_options,
)
return _response.data
diff --git a/src/flagright/consumer_users/raw_client.py b/src/flagright/consumer_users/raw_client.py
index e72741e..a164661 100644
--- a/src/flagright/consumer_users/raw_client.py
+++ b/src/flagright/consumer_users/raw_client.py
@@ -27,6 +27,7 @@
from ..types.legal_document import LegalDocument
from ..types.pep_status import PepStatus
from ..types.person_attachment import PersonAttachment
+from ..types.products_enabled import ProductsEnabled
from ..types.risk_level import RiskLevel
from ..types.sanctions_status import SanctionsStatus
from ..types.source_of_funds import SourceOfFunds
@@ -84,6 +85,7 @@ def create(
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
+ products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[ConsumerUsersCreateResponse]:
"""
@@ -181,6 +183,8 @@ def create(
update_count : typing.Optional[float]
+ products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -259,6 +263,9 @@ def create(
),
"jurisdiction": jurisdiction,
"updateCount": update_count,
+ "productsEnabled": convert_and_respect_annotation_metadata(
+ object_=products_enabled, annotation=typing.Sequence[ProductsEnabled], direction="write"
+ ),
},
headers={
"content-type": "application/json",
@@ -432,6 +439,7 @@ async def create(
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
+ products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[ConsumerUsersCreateResponse]:
"""
@@ -529,6 +537,8 @@ async def create(
update_count : typing.Optional[float]
+ products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -607,6 +617,9 @@ async def create(
),
"jurisdiction": jurisdiction,
"updateCount": update_count,
+ "productsEnabled": convert_and_respect_annotation_metadata(
+ object_=products_enabled, annotation=typing.Sequence[ProductsEnabled], direction="write"
+ ),
},
headers={
"content-type": "application/json",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 33c1568..e9803d1 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.20",
+ "User-Agent": "flagright/1.8.21",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.20",
+ "X-Fern-SDK-Version": "1.8.21",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 4bd28cd..e596956 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -195,6 +195,7 @@
from .place_of_birth import PlaceOfBirth
from .pos_details import PosDetails
from .pos_entry_mode import PosEntryMode
+ from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
from .rule_action import RuleAction
from .rule_execution_sanctions_details import RuleExecutionSanctionsDetails
@@ -562,6 +563,7 @@
"PlaceOfBirth": ".place_of_birth",
"PosDetails": ".pos_details",
"PosEntryMode": ".pos_entry_mode",
+ "ProductsEnabled": ".products_enabled",
"RiskLevel": ".risk_level",
"RuleAction": ".rule_action",
"RuleExecutionSanctionsDetails": ".rule_execution_sanctions_details",
@@ -935,6 +937,7 @@ def __dir__():
"PlaceOfBirth",
"PosDetails",
"PosEntryMode",
+ "ProductsEnabled",
"RiskLevel",
"RuleAction",
"RuleExecutionSanctionsDetails",
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index 0358392..520055c 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -18,6 +18,7 @@
from .payment_method import PaymentMethod
from .person import Person
from .person_attachment import PersonAttachment
+from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
from .transaction_limits import TransactionLimits
from .user_entity_link import UserEntityLink
@@ -106,6 +107,9 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
"""
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+ products_enabled: typing_extensions.Annotated[
+ typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
+ ] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result.py b/src/flagright/types/batch_consumer_user_with_rules_result.py
index c4890eb..3eaafa9 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result.py
@@ -22,6 +22,7 @@
from .legal_document import LegalDocument
from .pep_status import PepStatus
from .person_attachment import PersonAttachment
+from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
from .sanctions_status import SanctionsStatus
from .source_of_funds import SourceOfFunds
@@ -136,6 +137,9 @@ class BatchConsumerUserWithRulesResult(UniversalBaseModel):
"""
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+ products_enabled: typing_extensions.Annotated[
+ typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
+ ] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index bb2db4b..f454bfa 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -15,6 +15,7 @@
from .payment_method import PaymentMethod
from .person import Person
from .person_attachment import PersonAttachment
+from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
from .transaction_limits import TransactionLimits
from .user_entity_link import UserEntityLink
@@ -101,6 +102,9 @@ class Business(UniversalBaseModel):
"""
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+ products_enabled: typing_extensions.Annotated[
+ typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
+ ] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index 66c47bc..b3c7f20 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -15,6 +15,7 @@
from .payment_method import PaymentMethod
from .person import Person
from .person_attachment import PersonAttachment
+from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
from .transaction_limits import TransactionLimits
from .user_entity_link import UserEntityLink
@@ -96,6 +97,9 @@ class BusinessOptional(UniversalBaseModel):
"""
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+ products_enabled: typing_extensions.Annotated[
+ typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
+ ] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index bf74ec3..2159927 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -17,6 +17,7 @@
from .payment_method import PaymentMethod
from .person import Person
from .person_attachment import PersonAttachment
+from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
from .transaction_limits import TransactionLimits
from .user_entity_link import UserEntityLink
@@ -105,6 +106,9 @@ class BusinessWithRulesResult(UniversalBaseModel):
"""
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+ products_enabled: typing_extensions.Annotated[
+ typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
+ ] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/products_enabled.py b/src/flagright/types/products_enabled.py
new file mode 100644
index 0000000..717b511
--- /dev/null
+++ b/src/flagright/types/products_enabled.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+
+
+class ProductsEnabled(UniversalBaseModel):
+ product_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="productName")] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/user.py b/src/flagright/types/user.py
index 3c9f9f9..783e892 100644
--- a/src/flagright/types/user.py
+++ b/src/flagright/types/user.py
@@ -18,6 +18,7 @@
from .legal_document import LegalDocument
from .pep_status import PepStatus
from .person_attachment import PersonAttachment
+from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
from .sanctions_status import SanctionsStatus
from .source_of_funds import SourceOfFunds
@@ -131,6 +132,9 @@ class User(UniversalBaseModel):
"""
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+ products_enabled: typing_extensions.Annotated[
+ typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
+ ] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/user_optional.py b/src/flagright/types/user_optional.py
index 0536f1b..fd73eb8 100644
--- a/src/flagright/types/user_optional.py
+++ b/src/flagright/types/user_optional.py
@@ -18,6 +18,7 @@
from .legal_document import LegalDocument
from .pep_status import PepStatus
from .person_attachment import PersonAttachment
+from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
from .sanctions_status import SanctionsStatus
from .source_of_funds import SourceOfFunds
@@ -125,6 +126,9 @@ class UserOptional(UniversalBaseModel):
"""
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+ products_enabled: typing_extensions.Annotated[
+ typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
+ ] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/user_with_rules_result.py b/src/flagright/types/user_with_rules_result.py
index 51ecb06..217c156 100644
--- a/src/flagright/types/user_with_rules_result.py
+++ b/src/flagright/types/user_with_rules_result.py
@@ -20,6 +20,7 @@
from .legal_document import LegalDocument
from .pep_status import PepStatus
from .person_attachment import PersonAttachment
+from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
from .sanctions_status import SanctionsStatus
from .source_of_funds import SourceOfFunds
@@ -135,6 +136,9 @@ class UserWithRulesResult(UniversalBaseModel):
"""
update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
+ products_enabled: typing_extensions.Annotated[
+ typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
+ ] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
From 3fb023d6b911ae77625c9a554201263452bc3139 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Fri, 14 Nov 2025 17:45:48 +0000
Subject: [PATCH 60/81] Release 1.8.21
From e0074fe0adadc39a3afeb1817bc7405c3c1f49cd Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 17 Nov 2025 10:36:17 +0000
Subject: [PATCH 61/81] Release 1.8.22
---
pyproject.toml | 2 +-
reference.md | 2 +-
src/flagright/__init__.py | 12 ++++++++++++
src/flagright/business_users/client.py | 9 +++++----
src/flagright/business_users/raw_client.py | 13 +++++++------
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/__init__.py | 14 ++++++++++++++
.../types/batch_business_user_with_rules_result.py | 4 +++-
...ss_user_with_rules_result_share_holders_item.py | 8 ++++++++
src/flagright/types/business.py | 3 ++-
src/flagright/types/business_optional.py | 3 ++-
.../types/business_optional_share_holders_item.py | 8 ++++++++
src/flagright/types/business_share_holders_item.py | 8 ++++++++
src/flagright/types/business_with_rules_result.py | 3 ++-
...usiness_with_rules_result_share_holders_item.py | 8 ++++++++
15 files changed, 83 insertions(+), 18 deletions(-)
create mode 100644 src/flagright/types/batch_business_user_with_rules_result_share_holders_item.py
create mode 100644 src/flagright/types/business_optional_share_holders_item.py
create mode 100644 src/flagright/types/business_share_holders_item.py
create mode 100644 src/flagright/types/business_with_rules_result_share_holders_item.py
diff --git a/pyproject.toml b/pyproject.toml
index 220045a..af3e6ab 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.21"
+version = "1.8.22"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 64e3cdc..c96756f 100644
--- a/reference.md
+++ b/reference.md
@@ -1875,7 +1875,7 @@ client.business_users.create(
-
-**share_holders:** `typing.Optional[typing.Sequence[Person]]` — Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
+**share_holders:** `typing.Optional[typing.Sequence[BusinessShareHoldersItem]]` — Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 2ef1185..1f4e252 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -31,6 +31,7 @@
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift,
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi,
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet,
+ BatchBusinessUserWithRulesResultShareHoldersItem,
BatchBusinessUsersWithRulesResults,
BatchConsumerUserEventWithRulesResult,
BatchConsumerUserEventsRulesResult,
@@ -72,6 +73,7 @@
BusinessOptionalSavedPaymentDetailsItem_Swift,
BusinessOptionalSavedPaymentDetailsItem_Upi,
BusinessOptionalSavedPaymentDetailsItem_Wallet,
+ BusinessOptionalShareHoldersItem,
BusinessSavedPaymentDetailsItem,
BusinessSavedPaymentDetailsItem_Ach,
BusinessSavedPaymentDetailsItem_Card,
@@ -84,6 +86,7 @@
BusinessSavedPaymentDetailsItem_Swift,
BusinessSavedPaymentDetailsItem_Upi,
BusinessSavedPaymentDetailsItem_Wallet,
+ BusinessShareHoldersItem,
BusinessUserEvent,
BusinessUserEventWithRulesResult,
BusinessUserMonitoringResult,
@@ -101,6 +104,7 @@
BusinessWithRulesResultSavedPaymentDetailsItem_Swift,
BusinessWithRulesResultSavedPaymentDetailsItem_Upi,
BusinessWithRulesResultSavedPaymentDetailsItem_Wallet,
+ BusinessWithRulesResultShareHoldersItem,
CardBrand,
CardDetails,
CardExpiry,
@@ -400,6 +404,7 @@
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift": ".types",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi": ".types",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet": ".types",
+ "BatchBusinessUserWithRulesResultShareHoldersItem": ".types",
"BatchBusinessUsersWithRulesResults": ".types",
"BatchConsumerUserEventWithRulesResult": ".types",
"BatchConsumerUserEventsRulesResult": ".types",
@@ -441,6 +446,7 @@
"BusinessOptionalSavedPaymentDetailsItem_Swift": ".types",
"BusinessOptionalSavedPaymentDetailsItem_Upi": ".types",
"BusinessOptionalSavedPaymentDetailsItem_Wallet": ".types",
+ "BusinessOptionalShareHoldersItem": ".types",
"BusinessSavedPaymentDetailsItem": ".types",
"BusinessSavedPaymentDetailsItem_Ach": ".types",
"BusinessSavedPaymentDetailsItem_Card": ".types",
@@ -453,6 +459,7 @@
"BusinessSavedPaymentDetailsItem_Swift": ".types",
"BusinessSavedPaymentDetailsItem_Upi": ".types",
"BusinessSavedPaymentDetailsItem_Wallet": ".types",
+ "BusinessShareHoldersItem": ".types",
"BusinessUserEvent": ".types",
"BusinessUserEventWithRulesResult": ".types",
"BusinessUserMonitoringResult": ".types",
@@ -471,6 +478,7 @@
"BusinessWithRulesResultSavedPaymentDetailsItem_Swift": ".types",
"BusinessWithRulesResultSavedPaymentDetailsItem_Upi": ".types",
"BusinessWithRulesResultSavedPaymentDetailsItem_Wallet": ".types",
+ "BusinessWithRulesResultShareHoldersItem": ".types",
"CardBrand": ".types",
"CardDetails": ".types",
"CardExpiry": ".types",
@@ -793,6 +801,7 @@ def __dir__():
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet",
+ "BatchBusinessUserWithRulesResultShareHoldersItem",
"BatchBusinessUsersWithRulesResults",
"BatchConsumerUserEventWithRulesResult",
"BatchConsumerUserEventsRulesResult",
@@ -834,6 +843,7 @@ def __dir__():
"BusinessOptionalSavedPaymentDetailsItem_Swift",
"BusinessOptionalSavedPaymentDetailsItem_Upi",
"BusinessOptionalSavedPaymentDetailsItem_Wallet",
+ "BusinessOptionalShareHoldersItem",
"BusinessSavedPaymentDetailsItem",
"BusinessSavedPaymentDetailsItem_Ach",
"BusinessSavedPaymentDetailsItem_Card",
@@ -846,6 +856,7 @@ def __dir__():
"BusinessSavedPaymentDetailsItem_Swift",
"BusinessSavedPaymentDetailsItem_Upi",
"BusinessSavedPaymentDetailsItem_Wallet",
+ "BusinessShareHoldersItem",
"BusinessUserEvent",
"BusinessUserEventWithRulesResult",
"BusinessUserMonitoringResult",
@@ -864,6 +875,7 @@ def __dir__():
"BusinessWithRulesResultSavedPaymentDetailsItem_Swift",
"BusinessWithRulesResultSavedPaymentDetailsItem_Upi",
"BusinessWithRulesResultSavedPaymentDetailsItem_Wallet",
+ "BusinessWithRulesResultShareHoldersItem",
"CardBrand",
"CardDetails",
"CardExpiry",
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index 33152f4..1abaed2 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -7,6 +7,7 @@
from ..types.acquisition_channel import AcquisitionChannel
from ..types.boolean_string import BooleanString
from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
+from ..types.business_share_holders_item import BusinessShareHoldersItem
from ..types.business_with_rules_result import BusinessWithRulesResult
from ..types.device_data import DeviceData
from ..types.kyc_status_details import KycStatusDetails
@@ -55,7 +56,7 @@ def create(
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
- share_holders: typing.Optional[typing.Sequence[Person]] = OMIT,
+ share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
@@ -116,7 +117,7 @@ def create(
kyc_status_details : typing.Optional[KycStatusDetails]
- share_holders : typing.Optional[typing.Sequence[Person]]
+ share_holders : typing.Optional[typing.Sequence[BusinessShareHoldersItem]]
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
directors : typing.Optional[typing.Sequence[Person]]
@@ -280,7 +281,7 @@ async def create(
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
- share_holders: typing.Optional[typing.Sequence[Person]] = OMIT,
+ share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
@@ -341,7 +342,7 @@ async def create(
kyc_status_details : typing.Optional[KycStatusDetails]
- share_holders : typing.Optional[typing.Sequence[Person]]
+ share_holders : typing.Optional[typing.Sequence[BusinessShareHoldersItem]]
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
directors : typing.Optional[typing.Sequence[Person]]
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index ac2c3c7..01c0375 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -17,6 +17,7 @@
from ..types.api_error_response import ApiErrorResponse
from ..types.boolean_string import BooleanString
from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
+from ..types.business_share_holders_item import BusinessShareHoldersItem
from ..types.business_with_rules_result import BusinessWithRulesResult
from ..types.device_data import DeviceData
from ..types.kyc_status_details import KycStatusDetails
@@ -53,7 +54,7 @@ def create(
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
- share_holders: typing.Optional[typing.Sequence[Person]] = OMIT,
+ share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
@@ -114,7 +115,7 @@ def create(
kyc_status_details : typing.Optional[KycStatusDetails]
- share_holders : typing.Optional[typing.Sequence[Person]]
+ share_holders : typing.Optional[typing.Sequence[BusinessShareHoldersItem]]
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
directors : typing.Optional[typing.Sequence[Person]]
@@ -184,7 +185,7 @@ def create(
object_=kyc_status_details, annotation=KycStatusDetails, direction="write"
),
"shareHolders": convert_and_respect_annotation_metadata(
- object_=share_holders, annotation=typing.Sequence[Person], direction="write"
+ object_=share_holders, annotation=typing.Sequence[BusinessShareHoldersItem], direction="write"
),
"directors": convert_and_respect_annotation_metadata(
object_=directors, annotation=typing.Sequence[Person], direction="write"
@@ -370,7 +371,7 @@ async def create(
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
- share_holders: typing.Optional[typing.Sequence[Person]] = OMIT,
+ share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
@@ -431,7 +432,7 @@ async def create(
kyc_status_details : typing.Optional[KycStatusDetails]
- share_holders : typing.Optional[typing.Sequence[Person]]
+ share_holders : typing.Optional[typing.Sequence[BusinessShareHoldersItem]]
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
directors : typing.Optional[typing.Sequence[Person]]
@@ -501,7 +502,7 @@ async def create(
object_=kyc_status_details, annotation=KycStatusDetails, direction="write"
),
"shareHolders": convert_and_respect_annotation_metadata(
- object_=share_holders, annotation=typing.Sequence[Person], direction="write"
+ object_=share_holders, annotation=typing.Sequence[BusinessShareHoldersItem], direction="write"
),
"directors": convert_and_respect_annotation_metadata(
object_=directors, annotation=typing.Sequence[Person], direction="write"
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index e9803d1..830f6d8 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.21",
+ "User-Agent": "flagright/1.8.22",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.21",
+ "X-Fern-SDK-Version": "1.8.22",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index e596956..bc71703 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -32,6 +32,9 @@
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi,
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet,
)
+ from .batch_business_user_with_rules_result_share_holders_item import (
+ BatchBusinessUserWithRulesResultShareHoldersItem,
+ )
from .batch_business_users_with_rules_results import BatchBusinessUsersWithRulesResults
from .batch_consumer_user_event_with_rules_result import BatchConsumerUserEventWithRulesResult
from .batch_consumer_user_events_rules_result import BatchConsumerUserEventsRulesResult
@@ -77,6 +80,7 @@
BusinessOptionalSavedPaymentDetailsItem_Upi,
BusinessOptionalSavedPaymentDetailsItem_Wallet,
)
+ from .business_optional_share_holders_item import BusinessOptionalShareHoldersItem
from .business_saved_payment_details_item import (
BusinessSavedPaymentDetailsItem,
BusinessSavedPaymentDetailsItem_Ach,
@@ -91,6 +95,7 @@
BusinessSavedPaymentDetailsItem_Upi,
BusinessSavedPaymentDetailsItem_Wallet,
)
+ from .business_share_holders_item import BusinessShareHoldersItem
from .business_user_event import BusinessUserEvent
from .business_user_event_with_rules_result import BusinessUserEventWithRulesResult
from .business_user_monitoring_result import BusinessUserMonitoringResult
@@ -110,6 +115,7 @@
BusinessWithRulesResultSavedPaymentDetailsItem_Upi,
BusinessWithRulesResultSavedPaymentDetailsItem_Wallet,
)
+ from .business_with_rules_result_share_holders_item import BusinessWithRulesResultShareHoldersItem
from .card_brand import CardBrand
from .card_details import CardDetails
from .card_expiry import CardExpiry
@@ -408,6 +414,7 @@
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift": ".batch_business_user_with_rules_result_saved_payment_details_item",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi": ".batch_business_user_with_rules_result_saved_payment_details_item",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet": ".batch_business_user_with_rules_result_saved_payment_details_item",
+ "BatchBusinessUserWithRulesResultShareHoldersItem": ".batch_business_user_with_rules_result_share_holders_item",
"BatchBusinessUsersWithRulesResults": ".batch_business_users_with_rules_results",
"BatchConsumerUserEventWithRulesResult": ".batch_consumer_user_event_with_rules_result",
"BatchConsumerUserEventsRulesResult": ".batch_consumer_user_events_rules_result",
@@ -449,6 +456,7 @@
"BusinessOptionalSavedPaymentDetailsItem_Swift": ".business_optional_saved_payment_details_item",
"BusinessOptionalSavedPaymentDetailsItem_Upi": ".business_optional_saved_payment_details_item",
"BusinessOptionalSavedPaymentDetailsItem_Wallet": ".business_optional_saved_payment_details_item",
+ "BusinessOptionalShareHoldersItem": ".business_optional_share_holders_item",
"BusinessSavedPaymentDetailsItem": ".business_saved_payment_details_item",
"BusinessSavedPaymentDetailsItem_Ach": ".business_saved_payment_details_item",
"BusinessSavedPaymentDetailsItem_Card": ".business_saved_payment_details_item",
@@ -461,6 +469,7 @@
"BusinessSavedPaymentDetailsItem_Swift": ".business_saved_payment_details_item",
"BusinessSavedPaymentDetailsItem_Upi": ".business_saved_payment_details_item",
"BusinessSavedPaymentDetailsItem_Wallet": ".business_saved_payment_details_item",
+ "BusinessShareHoldersItem": ".business_share_holders_item",
"BusinessUserEvent": ".business_user_event",
"BusinessUserEventWithRulesResult": ".business_user_event_with_rules_result",
"BusinessUserMonitoringResult": ".business_user_monitoring_result",
@@ -478,6 +487,7 @@
"BusinessWithRulesResultSavedPaymentDetailsItem_Swift": ".business_with_rules_result_saved_payment_details_item",
"BusinessWithRulesResultSavedPaymentDetailsItem_Upi": ".business_with_rules_result_saved_payment_details_item",
"BusinessWithRulesResultSavedPaymentDetailsItem_Wallet": ".business_with_rules_result_saved_payment_details_item",
+ "BusinessWithRulesResultShareHoldersItem": ".business_with_rules_result_share_holders_item",
"CardBrand": ".card_brand",
"CardDetails": ".card_details",
"CardExpiry": ".card_expiry",
@@ -782,6 +792,7 @@ def __dir__():
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet",
+ "BatchBusinessUserWithRulesResultShareHoldersItem",
"BatchBusinessUsersWithRulesResults",
"BatchConsumerUserEventWithRulesResult",
"BatchConsumerUserEventsRulesResult",
@@ -823,6 +834,7 @@ def __dir__():
"BusinessOptionalSavedPaymentDetailsItem_Swift",
"BusinessOptionalSavedPaymentDetailsItem_Upi",
"BusinessOptionalSavedPaymentDetailsItem_Wallet",
+ "BusinessOptionalShareHoldersItem",
"BusinessSavedPaymentDetailsItem",
"BusinessSavedPaymentDetailsItem_Ach",
"BusinessSavedPaymentDetailsItem_Card",
@@ -835,6 +847,7 @@ def __dir__():
"BusinessSavedPaymentDetailsItem_Swift",
"BusinessSavedPaymentDetailsItem_Upi",
"BusinessSavedPaymentDetailsItem_Wallet",
+ "BusinessShareHoldersItem",
"BusinessUserEvent",
"BusinessUserEventWithRulesResult",
"BusinessUserMonitoringResult",
@@ -852,6 +865,7 @@ def __dir__():
"BusinessWithRulesResultSavedPaymentDetailsItem_Swift",
"BusinessWithRulesResultSavedPaymentDetailsItem_Upi",
"BusinessWithRulesResultSavedPaymentDetailsItem_Wallet",
+ "BusinessWithRulesResultShareHoldersItem",
"CardBrand",
"CardDetails",
"CardExpiry",
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index 520055c..12b2caa 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -10,6 +10,7 @@
from .batch_business_user_with_rules_result_saved_payment_details_item import (
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
)
+from .batch_business_user_with_rules_result_share_holders_item import BatchBusinessUserWithRulesResultShareHoldersItem
from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
from .kyc_status_details import KycStatusDetails
@@ -53,7 +54,8 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
] = None
share_holders: typing_extensions.Annotated[
- typing.Optional[typing.List[Person]], FieldMetadata(alias="shareHolders")
+ typing.Optional[typing.List[BatchBusinessUserWithRulesResultShareHoldersItem]],
+ FieldMetadata(alias="shareHolders"),
] = pydantic.Field(default=None)
"""
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
diff --git a/src/flagright/types/batch_business_user_with_rules_result_share_holders_item.py b/src/flagright/types/batch_business_user_with_rules_result_share_holders_item.py
new file mode 100644
index 0000000..997eeba
--- /dev/null
+++ b/src/flagright/types/batch_business_user_with_rules_result_share_holders_item.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from .legal_entity import LegalEntity
+from .person import Person
+
+BatchBusinessUserWithRulesResultShareHoldersItem = typing.Union[Person, LegalEntity]
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index f454bfa..00ea084 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .acquisition_channel import AcquisitionChannel
from .business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
+from .business_share_holders_item import BusinessShareHoldersItem
from .device_data import DeviceData
from .kyc_status_details import KycStatusDetails
from .legal_entity import LegalEntity
@@ -49,7 +50,7 @@ class Business(UniversalBaseModel):
typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
] = None
share_holders: typing_extensions.Annotated[
- typing.Optional[typing.List[Person]], FieldMetadata(alias="shareHolders")
+ typing.Optional[typing.List[BusinessShareHoldersItem]], FieldMetadata(alias="shareHolders")
] = pydantic.Field(default=None)
"""
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index b3c7f20..c831bac 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .acquisition_channel import AcquisitionChannel
from .business_optional_saved_payment_details_item import BusinessOptionalSavedPaymentDetailsItem
+from .business_optional_share_holders_item import BusinessOptionalShareHoldersItem
from .device_data import DeviceData
from .kyc_status_details import KycStatusDetails
from .legal_entity import LegalEntity
@@ -43,7 +44,7 @@ class BusinessOptional(UniversalBaseModel):
] = None
legal_entity: typing_extensions.Annotated[typing.Optional[LegalEntity], FieldMetadata(alias="legalEntity")] = None
share_holders: typing_extensions.Annotated[
- typing.Optional[typing.List[Person]], FieldMetadata(alias="shareHolders")
+ typing.Optional[typing.List[BusinessOptionalShareHoldersItem]], FieldMetadata(alias="shareHolders")
] = pydantic.Field(default=None)
"""
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
diff --git a/src/flagright/types/business_optional_share_holders_item.py b/src/flagright/types/business_optional_share_holders_item.py
new file mode 100644
index 0000000..f66c6b6
--- /dev/null
+++ b/src/flagright/types/business_optional_share_holders_item.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from .legal_entity import LegalEntity
+from .person import Person
+
+BusinessOptionalShareHoldersItem = typing.Union[Person, LegalEntity]
diff --git a/src/flagright/types/business_share_holders_item.py b/src/flagright/types/business_share_holders_item.py
new file mode 100644
index 0000000..ea74128
--- /dev/null
+++ b/src/flagright/types/business_share_holders_item.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from .legal_entity import LegalEntity
+from .person import Person
+
+BusinessShareHoldersItem = typing.Union[Person, LegalEntity]
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 2159927..a7d99dc 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .acquisition_channel import AcquisitionChannel
from .business_with_rules_result_saved_payment_details_item import BusinessWithRulesResultSavedPaymentDetailsItem
+from .business_with_rules_result_share_holders_item import BusinessWithRulesResultShareHoldersItem
from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
@@ -52,7 +53,7 @@ class BusinessWithRulesResult(UniversalBaseModel):
typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
] = None
share_holders: typing_extensions.Annotated[
- typing.Optional[typing.List[Person]], FieldMetadata(alias="shareHolders")
+ typing.Optional[typing.List[BusinessWithRulesResultShareHoldersItem]], FieldMetadata(alias="shareHolders")
] = pydantic.Field(default=None)
"""
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
diff --git a/src/flagright/types/business_with_rules_result_share_holders_item.py b/src/flagright/types/business_with_rules_result_share_holders_item.py
new file mode 100644
index 0000000..8bd1f57
--- /dev/null
+++ b/src/flagright/types/business_with_rules_result_share_holders_item.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from .legal_entity import LegalEntity
+from .person import Person
+
+BusinessWithRulesResultShareHoldersItem = typing.Union[Person, LegalEntity]
From de7c572d3d37c92380362a2713fdd4612638b366 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 20 Nov 2025 05:24:15 +0000
Subject: [PATCH 62/81] Release 1.8.23
---
pyproject.toml | 2 +-
reference.md | 24 ++++++++++++++
src/flagright/business_users/client.py | 29 ++++++++++++++++
src/flagright/business_users/raw_client.py | 33 +++++++++++++++++++
src/flagright/core/client_wrapper.py | 4 +--
.../batch_business_user_with_rules_result.py | 18 ++++++++++
src/flagright/types/business.py | 17 ++++++++++
src/flagright/types/business_optional.py | 17 ++++++++++
.../types/business_with_rules_result.py | 18 ++++++++++
9 files changed, 159 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index af3e6ab..ba34502 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.22"
+version = "1.8.23"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index c96756f..c30cfeb 100644
--- a/reference.md
+++ b/reference.md
@@ -2011,6 +2011,30 @@ client.business_users.create(
-
+**pep_status:** `typing.Optional[typing.Sequence[PepStatus]]`
+
+
+
+
+
+-
+
+**sanctions_status:** `typing.Optional[bool]` — Whether the user is sanctioned
+
+
+
+
+
+-
+
+**adverse_media_status:** `typing.Optional[bool]` — Whether the user is in the adverse media list
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index 1abaed2..7429171 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -14,6 +14,7 @@
from ..types.legal_entity import LegalEntity
from ..types.mcc_details import MccDetails
from ..types.payment_method import PaymentMethod
+from ..types.pep_status import PepStatus
from ..types.person import Person
from ..types.person_attachment import PersonAttachment
from ..types.products_enabled import ProductsEnabled
@@ -73,6 +74,9 @@ def create(
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
+ pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
+ sanctions_status: typing.Optional[bool] = OMIT,
+ adverse_media_status: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessUsersCreateResponse:
"""
@@ -157,6 +161,14 @@ def create(
products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
+ pep_status : typing.Optional[typing.Sequence[PepStatus]]
+
+ sanctions_status : typing.Optional[bool]
+ Whether the user is sanctioned
+
+ adverse_media_status : typing.Optional[bool]
+ Whether the user is in the adverse media list
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -214,6 +226,9 @@ def create(
jurisdiction=jurisdiction,
update_count=update_count,
products_enabled=products_enabled,
+ pep_status=pep_status,
+ sanctions_status=sanctions_status,
+ adverse_media_status=adverse_media_status,
request_options=request_options,
)
return _response.data
@@ -298,6 +313,9 @@ async def create(
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
+ pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
+ sanctions_status: typing.Optional[bool] = OMIT,
+ adverse_media_status: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessUsersCreateResponse:
"""
@@ -382,6 +400,14 @@ async def create(
products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
+ pep_status : typing.Optional[typing.Sequence[PepStatus]]
+
+ sanctions_status : typing.Optional[bool]
+ Whether the user is sanctioned
+
+ adverse_media_status : typing.Optional[bool]
+ Whether the user is in the adverse media list
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -447,6 +473,9 @@ async def main() -> None:
jurisdiction=jurisdiction,
update_count=update_count,
products_enabled=products_enabled,
+ pep_status=pep_status,
+ sanctions_status=sanctions_status,
+ adverse_media_status=adverse_media_status,
request_options=request_options,
)
return _response.data
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index 01c0375..15c38dd 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -24,6 +24,7 @@
from ..types.legal_entity import LegalEntity
from ..types.mcc_details import MccDetails
from ..types.payment_method import PaymentMethod
+from ..types.pep_status import PepStatus
from ..types.person import Person
from ..types.person_attachment import PersonAttachment
from ..types.products_enabled import ProductsEnabled
@@ -71,6 +72,9 @@ def create(
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
+ pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
+ sanctions_status: typing.Optional[bool] = OMIT,
+ adverse_media_status: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BusinessUsersCreateResponse]:
"""
@@ -155,6 +159,14 @@ def create(
products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
+ pep_status : typing.Optional[typing.Sequence[PepStatus]]
+
+ sanctions_status : typing.Optional[bool]
+ Whether the user is sanctioned
+
+ adverse_media_status : typing.Optional[bool]
+ Whether the user is in the adverse media list
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -223,6 +235,11 @@ def create(
"productsEnabled": convert_and_respect_annotation_metadata(
object_=products_enabled, annotation=typing.Sequence[ProductsEnabled], direction="write"
),
+ "pepStatus": convert_and_respect_annotation_metadata(
+ object_=pep_status, annotation=typing.Sequence[PepStatus], direction="write"
+ ),
+ "sanctionsStatus": sanctions_status,
+ "adverseMediaStatus": adverse_media_status,
},
headers={
"content-type": "application/json",
@@ -388,6 +405,9 @@ async def create(
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
+ pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
+ sanctions_status: typing.Optional[bool] = OMIT,
+ adverse_media_status: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BusinessUsersCreateResponse]:
"""
@@ -472,6 +492,14 @@ async def create(
products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
+ pep_status : typing.Optional[typing.Sequence[PepStatus]]
+
+ sanctions_status : typing.Optional[bool]
+ Whether the user is sanctioned
+
+ adverse_media_status : typing.Optional[bool]
+ Whether the user is in the adverse media list
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -540,6 +568,11 @@ async def create(
"productsEnabled": convert_and_respect_annotation_metadata(
object_=products_enabled, annotation=typing.Sequence[ProductsEnabled], direction="write"
),
+ "pepStatus": convert_and_respect_annotation_metadata(
+ object_=pep_status, annotation=typing.Sequence[PepStatus], direction="write"
+ ),
+ "sanctionsStatus": sanctions_status,
+ "adverseMediaStatus": adverse_media_status,
},
headers={
"content-type": "application/json",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 830f6d8..c3e25c8 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.22",
+ "User-Agent": "flagright/1.8.23",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.22",
+ "X-Fern-SDK-Version": "1.8.23",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index 12b2caa..1c3aeb7 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -17,6 +17,7 @@
from .legal_entity import LegalEntity
from .mcc_details import MccDetails
from .payment_method import PaymentMethod
+from .pep_status import PepStatus
from .person import Person
from .person_attachment import PersonAttachment
from .products_enabled import ProductsEnabled
@@ -112,6 +113,23 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
products_enabled: typing_extensions.Annotated[
typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
] = None
+ pep_status: typing_extensions.Annotated[
+ typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
+ ] = None
+ sanctions_status: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="sanctionsStatus")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Whether the user is sanctioned
+ """
+
+ adverse_media_status: typing_extensions.Annotated[
+ typing.Optional[bool], FieldMetadata(alias="adverseMediaStatus")
+ ] = pydantic.Field(default=None)
+ """
+ Whether the user is in the adverse media list
+ """
+
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index 00ea084..d160f7e 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -14,6 +14,7 @@
from .legal_entity import LegalEntity
from .mcc_details import MccDetails
from .payment_method import PaymentMethod
+from .pep_status import PepStatus
from .person import Person
from .person_attachment import PersonAttachment
from .products_enabled import ProductsEnabled
@@ -106,6 +107,22 @@ class Business(UniversalBaseModel):
products_enabled: typing_extensions.Annotated[
typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
] = None
+ pep_status: typing_extensions.Annotated[
+ typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
+ ] = None
+ sanctions_status: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="sanctionsStatus")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Whether the user is sanctioned
+ """
+
+ adverse_media_status: typing_extensions.Annotated[
+ typing.Optional[bool], FieldMetadata(alias="adverseMediaStatus")
+ ] = pydantic.Field(default=None)
+ """
+ Whether the user is in the adverse media list
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index c831bac..aab0853 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -14,6 +14,7 @@
from .legal_entity import LegalEntity
from .mcc_details import MccDetails
from .payment_method import PaymentMethod
+from .pep_status import PepStatus
from .person import Person
from .person_attachment import PersonAttachment
from .products_enabled import ProductsEnabled
@@ -101,6 +102,22 @@ class BusinessOptional(UniversalBaseModel):
products_enabled: typing_extensions.Annotated[
typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
] = None
+ pep_status: typing_extensions.Annotated[
+ typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
+ ] = None
+ sanctions_status: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="sanctionsStatus")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Whether the user is sanctioned
+ """
+
+ adverse_media_status: typing_extensions.Annotated[
+ typing.Optional[bool], FieldMetadata(alias="adverseMediaStatus")
+ ] = pydantic.Field(default=None)
+ """
+ Whether the user is in the adverse media list
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index a7d99dc..9227508 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -16,6 +16,7 @@
from .legal_entity import LegalEntity
from .mcc_details import MccDetails
from .payment_method import PaymentMethod
+from .pep_status import PepStatus
from .person import Person
from .person_attachment import PersonAttachment
from .products_enabled import ProductsEnabled
@@ -110,6 +111,23 @@ class BusinessWithRulesResult(UniversalBaseModel):
products_enabled: typing_extensions.Annotated[
typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
] = None
+ pep_status: typing_extensions.Annotated[
+ typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
+ ] = None
+ sanctions_status: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="sanctionsStatus")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Whether the user is sanctioned
+ """
+
+ adverse_media_status: typing_extensions.Annotated[
+ typing.Optional[bool], FieldMetadata(alias="adverseMediaStatus")
+ ] = pydantic.Field(default=None)
+ """
+ Whether the user is in the adverse media list
+ """
+
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
From 1093d3c5b63fc7315d10e108ef088c342b503397 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 20 Nov 2025 18:09:30 +0000
Subject: [PATCH 63/81] Release 1.8.24
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 +--
src/flagright/types/ach_details.py | 7 ++++
...rules_result_saved_payment_details_item.py | 36 +++++++++++++++++++
...rules_result_saved_payment_details_item.py | 36 +++++++++++++++++++
...ess_optional_saved_payment_details_item.py | 36 +++++++++++++++++++
.../business_saved_payment_details_item.py | 36 +++++++++++++++++++
...rules_result_saved_payment_details_item.py | 36 +++++++++++++++++++
src/flagright/types/card_details.py | 7 ++++
src/flagright/types/check_details.py | 8 +++++
src/flagright/types/iban_details.py | 6 ++++
src/flagright/types/swift_details.py | 7 ++++
...transaction_destination_payment_details.py | 36 +++++++++++++++++++
.../transaction_origin_payment_details.py | 36 +++++++++++++++++++
...n_updatable_destination_payment_details.py | 36 +++++++++++++++++++
...action_updatable_origin_payment_details.py | 36 +++++++++++++++++++
...ules_result_destination_payment_details.py | 36 +++++++++++++++++++
...ith_rules_result_origin_payment_details.py | 36 +++++++++++++++++++
...ser_optional_saved_payment_details_item.py | 36 +++++++++++++++++++
.../types/user_saved_payment_details_item.py | 36 +++++++++++++++++++
...rules_result_saved_payment_details_item.py | 36 +++++++++++++++++++
src/flagright/types/wallet_details.py | 4 +++
22 files changed, 546 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index ba34502..8d08ffb 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.23"
+version = "1.8.24"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index c3e25c8..0b0dd47 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.23",
+ "User-Agent": "flagright/1.8.24",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.23",
+ "X-Fern-SDK-Version": "1.8.24",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/ach_details.py b/src/flagright/types/ach_details.py
index 22f82e3..a4d850f 100644
--- a/src/flagright/types/ach_details.py
+++ b/src/flagright/types/ach_details.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .address import Address
from .amount import Amount
+from .country_code import CountryCode
from .email_id import EmailId
from .tag import Tag
@@ -45,6 +46,12 @@ class AchDetails(UniversalBaseModel):
"""
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = (
pydantic.Field(default=None)
)
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index 01464e6..0d895cc 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -61,6 +61,13 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBase
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -119,6 +126,12 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBase
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -139,6 +152,12 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseM
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -163,6 +182,12 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBas
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -242,6 +267,10 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBa
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -272,6 +301,13 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBas
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index c3ad202..513a7ea 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -61,6 +61,13 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBase
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -119,6 +126,12 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBase
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -139,6 +152,12 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseM
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -163,6 +182,12 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBas
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -242,6 +267,10 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBa
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -272,6 +301,13 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBas
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 7a83dce..b3198a5 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -61,6 +61,13 @@ class BusinessOptionalSavedPaymentDetailsItem_Card(UniversalBaseModel):
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -119,6 +126,12 @@ class BusinessOptionalSavedPaymentDetailsItem_Iban(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -139,6 +152,12 @@ class BusinessOptionalSavedPaymentDetailsItem_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -163,6 +182,12 @@ class BusinessOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -242,6 +267,10 @@ class BusinessOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -272,6 +301,13 @@ class BusinessOptionalSavedPaymentDetailsItem_Check(UniversalBaseModel):
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index ab69a25..3229ecf 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -61,6 +61,13 @@ class BusinessSavedPaymentDetailsItem_Card(UniversalBaseModel):
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -119,6 +126,12 @@ class BusinessSavedPaymentDetailsItem_Iban(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -139,6 +152,12 @@ class BusinessSavedPaymentDetailsItem_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -163,6 +182,12 @@ class BusinessSavedPaymentDetailsItem_Swift(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -242,6 +267,10 @@ class BusinessSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -272,6 +301,13 @@ class BusinessSavedPaymentDetailsItem_Check(UniversalBaseModel):
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 3c1f182..49f3f29 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
@@ -61,6 +61,13 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -119,6 +126,12 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -139,6 +152,12 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -163,6 +182,12 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -242,6 +267,10 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -272,6 +301,13 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/card_details.py b/src/flagright/types/card_details.py
index d9f3cdd..97171e3 100644
--- a/src/flagright/types/card_details.py
+++ b/src/flagright/types/card_details.py
@@ -99,6 +99,13 @@ class CardDetails(UniversalBaseModel):
"""
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
Additional information that can be added via tags
diff --git a/src/flagright/types/check_details.py b/src/flagright/types/check_details.py
index 4d3168f..7c09bad 100644
--- a/src/flagright/types/check_details.py
+++ b/src/flagright/types/check_details.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .address import Address
from .check_delivery_status import CheckDeliveryStatus
+from .country_code import CountryCode
from .tag import Tag
@@ -30,6 +31,13 @@ class CheckDetails(UniversalBaseModel):
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
Additional information that can be added via tags
diff --git a/src/flagright/types/iban_details.py b/src/flagright/types/iban_details.py
index 331423f..16d76fc 100644
--- a/src/flagright/types/iban_details.py
+++ b/src/flagright/types/iban_details.py
@@ -52,6 +52,12 @@ class IbanDetails(UniversalBaseModel):
"""
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
Additional information that can be added via tags
diff --git a/src/flagright/types/swift_details.py b/src/flagright/types/swift_details.py
index 7eb3e35..45e2c87 100644
--- a/src/flagright/types/swift_details.py
+++ b/src/flagright/types/swift_details.py
@@ -9,6 +9,7 @@
from .address import Address
from .amount import Amount
from .correspondent_bank_details import CorrespondentBankDetails
+from .country_code import CountryCode
from .email_id import EmailId
from .tag import Tag
@@ -60,6 +61,12 @@ class SwiftDetails(UniversalBaseModel):
"""
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index 9133af0..f4fc14c 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -61,6 +61,13 @@ class TransactionDestinationPaymentDetails_Card(UniversalBaseModel):
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -119,6 +126,12 @@ class TransactionDestinationPaymentDetails_Iban(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -139,6 +152,12 @@ class TransactionDestinationPaymentDetails_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -192,6 +211,10 @@ class TransactionDestinationPaymentDetails_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -218,6 +241,12 @@ class TransactionDestinationPaymentDetails_Swift(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -272,6 +301,13 @@ class TransactionDestinationPaymentDetails_Check(UniversalBaseModel):
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index 3c9c5b1..3441749 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -65,6 +65,13 @@ class TransactionOriginPaymentDetails_Card(UniversalBaseModel):
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -131,6 +138,12 @@ class TransactionOriginPaymentDetails_Iban(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -155,6 +168,12 @@ class TransactionOriginPaymentDetails_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -183,6 +202,12 @@ class TransactionOriginPaymentDetails_Swift(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -274,6 +299,10 @@ class TransactionOriginPaymentDetails_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -308,6 +337,13 @@ class TransactionOriginPaymentDetails_Check(UniversalBaseModel):
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index a24d1af..bf53c6e 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -61,6 +61,13 @@ class TransactionUpdatableDestinationPaymentDetails_Card(UniversalBaseModel):
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -119,6 +126,12 @@ class TransactionUpdatableDestinationPaymentDetails_Iban(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -139,6 +152,12 @@ class TransactionUpdatableDestinationPaymentDetails_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -192,6 +211,10 @@ class TransactionUpdatableDestinationPaymentDetails_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -218,6 +241,12 @@ class TransactionUpdatableDestinationPaymentDetails_Swift(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -272,6 +301,13 @@ class TransactionUpdatableDestinationPaymentDetails_Check(UniversalBaseModel):
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index c5b8d66..1ee471d 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -65,6 +65,13 @@ class TransactionUpdatableOriginPaymentDetails_Card(UniversalBaseModel):
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -131,6 +138,12 @@ class TransactionUpdatableOriginPaymentDetails_Iban(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -155,6 +168,12 @@ class TransactionUpdatableOriginPaymentDetails_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -183,6 +202,12 @@ class TransactionUpdatableOriginPaymentDetails_Swift(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -274,6 +299,10 @@ class TransactionUpdatableOriginPaymentDetails_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -308,6 +337,13 @@ class TransactionUpdatableOriginPaymentDetails_Check(UniversalBaseModel):
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 41bf7e2..2822a5f 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
@@ -61,6 +61,13 @@ class TransactionWithRulesResultDestinationPaymentDetails_Card(UniversalBaseMode
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -119,6 +126,12 @@ class TransactionWithRulesResultDestinationPaymentDetails_Iban(UniversalBaseMode
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -139,6 +152,12 @@ class TransactionWithRulesResultDestinationPaymentDetails_Ach(UniversalBaseModel
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -192,6 +211,10 @@ class TransactionWithRulesResultDestinationPaymentDetails_Wallet(UniversalBaseMo
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -218,6 +241,12 @@ class TransactionWithRulesResultDestinationPaymentDetails_Swift(UniversalBaseMod
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -272,6 +301,13 @@ class TransactionWithRulesResultDestinationPaymentDetails_Check(UniversalBaseMod
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 91fbb13..6c7915a 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
@@ -65,6 +65,13 @@ class TransactionWithRulesResultOriginPaymentDetails_Card(UniversalBaseModel):
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -131,6 +138,12 @@ class TransactionWithRulesResultOriginPaymentDetails_Iban(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -155,6 +168,12 @@ class TransactionWithRulesResultOriginPaymentDetails_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -183,6 +202,12 @@ class TransactionWithRulesResultOriginPaymentDetails_Swift(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -274,6 +299,10 @@ class TransactionWithRulesResultOriginPaymentDetails_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -308,6 +337,13 @@ class TransactionWithRulesResultOriginPaymentDetails_Check(UniversalBaseModel):
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 8b29d0b..427c9d4 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -61,6 +61,13 @@ class UserOptionalSavedPaymentDetailsItem_Card(UniversalBaseModel):
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -119,6 +126,12 @@ class UserOptionalSavedPaymentDetailsItem_Iban(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -139,6 +152,12 @@ class UserOptionalSavedPaymentDetailsItem_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -163,6 +182,12 @@ class UserOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -242,6 +267,10 @@ class UserOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -272,6 +301,13 @@ class UserOptionalSavedPaymentDetailsItem_Check(UniversalBaseModel):
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 3b39bc6..7aa53a6 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -61,6 +61,13 @@ class UserSavedPaymentDetailsItem_Card(UniversalBaseModel):
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -119,6 +126,12 @@ class UserSavedPaymentDetailsItem_Iban(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -139,6 +152,12 @@ class UserSavedPaymentDetailsItem_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -163,6 +182,12 @@ class UserSavedPaymentDetailsItem_Swift(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -242,6 +267,10 @@ class UserSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -272,6 +301,13 @@ class UserSavedPaymentDetailsItem_Check(UniversalBaseModel):
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
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 140e88b..7f214f8 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
@@ -61,6 +61,13 @@ class UserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
typing.Optional[float], FieldMetadata(alias="networkProviderRiskScore")
] = None
address: typing.Optional[Address] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -119,6 +126,12 @@ class UserWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBaseModel):
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
bank_branch_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankBranchCode")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
@@ -139,6 +152,12 @@ class UserWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
beneficiary_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="beneficiaryName")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
tags: typing.Optional[typing.List[Tag]] = None
@@ -163,6 +182,12 @@ class UserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
special_instructions: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="specialInstructions")
@@ -242,6 +267,10 @@ class UserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
@@ -272,6 +301,13 @@ class UserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
None
)
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ country_of_nationality: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
+ ] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
tags: typing.Optional[typing.List[Tag]] = None
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/wallet_details.py b/src/flagright/types/wallet_details.py
index c372114..52379eb 100644
--- a/src/flagright/types/wallet_details.py
+++ b/src/flagright/types/wallet_details.py
@@ -65,6 +65,10 @@ class WalletDetails(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
authorized_representative: typing_extensions.Annotated[
typing.Optional[typing.List[UserDetails]], FieldMetadata(alias="authorizedRepresentative")
] = None
From 7a839c53c46698918e1f3adc3cfd5839a3afa6cf Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 24 Nov 2025 09:02:11 +0000
Subject: [PATCH 64/81] Release 1.8.25
---
poetry.lock | 6 +++---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/ach_details.py | 5 +++++
...r_with_rules_result_saved_payment_details_item.py | 5 +++++
...r_with_rules_result_saved_payment_details_item.py | 5 +++++
.../business_optional_saved_payment_details_item.py | 5 +++++
.../types/business_saved_payment_details_item.py | 5 +++++
...s_with_rules_result_saved_payment_details_item.py | 5 +++++
src/flagright/types/cash_details.py | 4 ++++
src/flagright/types/check_details.py | 12 ++++++++++++
src/flagright/types/iban_details.py | 5 +++++
.../types/transaction_destination_payment_details.py | 5 +++++
.../types/transaction_origin_payment_details.py | 5 +++++
...nsaction_updatable_destination_payment_details.py | 5 +++++
.../transaction_updatable_origin_payment_details.py | 5 +++++
..._with_rules_result_destination_payment_details.py | 5 +++++
...ction_with_rules_result_origin_payment_details.py | 5 +++++
.../user_optional_saved_payment_details_item.py | 5 +++++
.../types/user_saved_payment_details_item.py | 5 +++++
...r_with_rules_result_saved_payment_details_item.py | 5 +++++
21 files changed, 102 insertions(+), 6 deletions(-)
diff --git a/poetry.lock b/poetry.lock
index 794340b..a19d7e2 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -60,13 +60,13 @@ files = [
[[package]]
name = "exceptiongroup"
-version = "1.3.0"
+version = "1.3.1"
description = "Backport of PEP 654 (exception groups)"
optional = false
python-versions = ">=3.7"
files = [
- {file = "exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10"},
- {file = "exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88"},
+ {file = "exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598"},
+ {file = "exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219"},
]
[package.dependencies]
diff --git a/pyproject.toml b/pyproject.toml
index 8d08ffb..72b90bd 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.24"
+version = "1.8.25"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 0b0dd47..00525ae 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.24",
+ "User-Agent": "flagright/1.8.25",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.24",
+ "X-Fern-SDK-Version": "1.8.25",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/ach_details.py b/src/flagright/types/ach_details.py
index a4d850f..3a88e2d 100644
--- a/src/flagright/types/ach_details.py
+++ b/src/flagright/types/ach_details.py
@@ -46,6 +46,11 @@ class AchDetails(UniversalBaseModel):
"""
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = pydantic.Field(default=None)
+ """
+ Address of the account holder
+ """
+
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index 0d895cc..1886531 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -119,6 +119,7 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBase
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -152,6 +153,7 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseM
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -300,7 +302,9 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBas
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -325,6 +329,7 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBase
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index 513a7ea..8b024c8 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -119,6 +119,7 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBase
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -152,6 +153,7 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseM
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -300,7 +302,9 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBas
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -325,6 +329,7 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBase
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 b3198a5..dca8f8c 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -119,6 +119,7 @@ class BusinessOptionalSavedPaymentDetailsItem_Iban(UniversalBaseModel):
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -152,6 +153,7 @@ class BusinessOptionalSavedPaymentDetailsItem_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -300,7 +302,9 @@ class BusinessOptionalSavedPaymentDetailsItem_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -325,6 +329,7 @@ class BusinessOptionalSavedPaymentDetailsItem_Cash(UniversalBaseModel):
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index 3229ecf..b25690c 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -119,6 +119,7 @@ class BusinessSavedPaymentDetailsItem_Iban(UniversalBaseModel):
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -152,6 +153,7 @@ class BusinessSavedPaymentDetailsItem_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -300,7 +302,9 @@ class BusinessSavedPaymentDetailsItem_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -325,6 +329,7 @@ class BusinessSavedPaymentDetailsItem_Cash(UniversalBaseModel):
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 49f3f29..af9fa13 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
@@ -119,6 +119,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBaseModel):
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -152,6 +153,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -300,7 +302,9 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -325,6 +329,7 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/cash_details.py b/src/flagright/types/cash_details.py
index b970c8d..6001863 100644
--- a/src/flagright/types/cash_details.py
+++ b/src/flagright/types/cash_details.py
@@ -3,8 +3,11 @@
import typing
import pydantic
+import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
from .address import Address
+from .email_id import EmailId
class CashDetails(UniversalBaseModel):
@@ -15,6 +18,7 @@ class CashDetails(UniversalBaseModel):
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/check_details.py b/src/flagright/types/check_details.py
index 7c09bad..bb7ce12 100644
--- a/src/flagright/types/check_details.py
+++ b/src/flagright/types/check_details.py
@@ -30,7 +30,19 @@ class CheckDetails(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = pydantic.Field(default=None)
+ """
+ Address of the account holder
+ """
+
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = pydantic.Field(
+ default=None
+ )
+ """
+ Email ID of the account holder
+ """
+
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
diff --git a/src/flagright/types/iban_details.py b/src/flagright/types/iban_details.py
index 16d76fc..2b13a60 100644
--- a/src/flagright/types/iban_details.py
+++ b/src/flagright/types/iban_details.py
@@ -31,6 +31,11 @@ class IbanDetails(UniversalBaseModel):
"""
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = pydantic.Field(default=None)
+ """
+ Address of the account holder
+ """
+
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = pydantic.Field(default=None)
"""
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index f4fc14c..77c8533 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -119,6 +119,7 @@ class TransactionDestinationPaymentDetails_Iban(UniversalBaseModel):
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -152,6 +153,7 @@ class TransactionDestinationPaymentDetails_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -300,7 +302,9 @@ class TransactionDestinationPaymentDetails_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -325,6 +329,7 @@ class TransactionDestinationPaymentDetails_Cash(UniversalBaseModel):
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index 3441749..9afcfdc 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -131,6 +131,7 @@ class TransactionOriginPaymentDetails_Iban(UniversalBaseModel):
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -168,6 +169,7 @@ class TransactionOriginPaymentDetails_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -336,7 +338,9 @@ class TransactionOriginPaymentDetails_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -365,6 +369,7 @@ class TransactionOriginPaymentDetails_Cash(UniversalBaseModel):
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index bf53c6e..a3b9172 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -119,6 +119,7 @@ class TransactionUpdatableDestinationPaymentDetails_Iban(UniversalBaseModel):
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -152,6 +153,7 @@ class TransactionUpdatableDestinationPaymentDetails_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -300,7 +302,9 @@ class TransactionUpdatableDestinationPaymentDetails_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -325,6 +329,7 @@ class TransactionUpdatableDestinationPaymentDetails_Cash(UniversalBaseModel):
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 1ee471d..72a55a3 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -131,6 +131,7 @@ class TransactionUpdatableOriginPaymentDetails_Iban(UniversalBaseModel):
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -168,6 +169,7 @@ class TransactionUpdatableOriginPaymentDetails_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -336,7 +338,9 @@ class TransactionUpdatableOriginPaymentDetails_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -365,6 +369,7 @@ class TransactionUpdatableOriginPaymentDetails_Cash(UniversalBaseModel):
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 2822a5f..1ff4691 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
@@ -119,6 +119,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_Iban(UniversalBaseMode
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -152,6 +153,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_Ach(UniversalBaseModel
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -300,7 +302,9 @@ class TransactionWithRulesResultDestinationPaymentDetails_Check(UniversalBaseMod
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -325,6 +329,7 @@ class TransactionWithRulesResultDestinationPaymentDetails_Cash(UniversalBaseMode
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 6c7915a..9d04b06 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
@@ -131,6 +131,7 @@ class TransactionWithRulesResultOriginPaymentDetails_Iban(UniversalBaseModel):
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -168,6 +169,7 @@ class TransactionWithRulesResultOriginPaymentDetails_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -336,7 +338,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -365,6 +369,7 @@ class TransactionWithRulesResultOriginPaymentDetails_Cash(UniversalBaseModel):
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 427c9d4..0ac6859 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -119,6 +119,7 @@ class UserOptionalSavedPaymentDetailsItem_Iban(UniversalBaseModel):
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -152,6 +153,7 @@ class UserOptionalSavedPaymentDetailsItem_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -300,7 +302,9 @@ class UserOptionalSavedPaymentDetailsItem_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -325,6 +329,7 @@ class UserOptionalSavedPaymentDetailsItem_Cash(UniversalBaseModel):
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 7aa53a6..9277482 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -119,6 +119,7 @@ class UserSavedPaymentDetailsItem_Iban(UniversalBaseModel):
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -152,6 +153,7 @@ class UserSavedPaymentDetailsItem_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -300,7 +302,9 @@ class UserSavedPaymentDetailsItem_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -325,6 +329,7 @@ class UserSavedPaymentDetailsItem_Cash(UniversalBaseModel):
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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 7f214f8..ab08d25 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
@@ -119,6 +119,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBaseModel):
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country: typing.Optional[CountryCode] = None
iban: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IBAN")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -152,6 +153,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseModel):
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
name: typing.Optional[str] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ address: typing.Optional[Address] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -300,7 +302,9 @@ class UserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
shipping_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="shippingAddress")] = (
None
)
+ address: typing.Optional[Address] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
+ email_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emailId")] = None
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
@@ -325,6 +329,7 @@ class UserWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
+ email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
From 21cab6b43ab3abef80d059fdf6d3f407ae00c26a Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 27 Nov 2025 12:53:36 +0000
Subject: [PATCH 65/81] Release 1.8.26
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
...ss_user_with_rules_result_saved_payment_details_item.py | 3 +++
...er_user_with_rules_result_saved_payment_details_item.py | 3 +++
.../types/business_optional_saved_payment_details_item.py | 3 +++
src/flagright/types/business_saved_payment_details_item.py | 3 +++
...usiness_with_rules_result_saved_payment_details_item.py | 3 +++
src/flagright/types/generic_bank_account_details.py | 7 +++++++
.../types/transaction_destination_payment_details.py | 3 +++
src/flagright/types/transaction_origin_payment_details.py | 3 +++
.../transaction_updatable_destination_payment_details.py | 3 +++
.../types/transaction_updatable_origin_payment_details.py | 3 +++
...action_with_rules_result_destination_payment_details.py | 3 +++
...transaction_with_rules_result_origin_payment_details.py | 3 +++
.../types/user_optional_saved_payment_details_item.py | 3 +++
src/flagright/types/user_saved_payment_details_item.py | 3 +++
.../user_with_rules_result_saved_payment_details_item.py | 3 +++
17 files changed, 52 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 72b90bd..b82680a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.25"
+version = "1.8.26"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 00525ae..af1770a 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.25",
+ "User-Agent": "flagright/1.8.26",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.25",
+ "X-Fern-SDK-Version": "1.8.26",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index 1886531..86d169a 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -92,6 +92,9 @@ class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index 8b024c8..28476a0 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -92,6 +92,9 @@ class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
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 dca8f8c..bdf8c73 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -92,6 +92,9 @@ class BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseMo
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index b25690c..e0c9bbb 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -92,6 +92,9 @@ class BusinessSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
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 af9fa13..75e850c 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
@@ -92,6 +92,9 @@ class BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(Universa
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/generic_bank_account_details.py b/src/flagright/types/generic_bank_account_details.py
index d6437ee..c89ba80 100644
--- a/src/flagright/types/generic_bank_account_details.py
+++ b/src/flagright/types/generic_bank_account_details.py
@@ -60,6 +60,13 @@ class GenericBankAccountDetails(UniversalBaseModel):
Country of nationality of the account holder
"""
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = pydantic.Field(default=None)
+ """
+ Country of residence of the account holder
+ """
+
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = (
pydantic.Field(default=None)
)
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index 77c8533..e43200c 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -92,6 +92,9 @@ class TransactionDestinationPaymentDetails_GenericBankAccount(UniversalBaseModel
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index 9afcfdc..e1a9aec 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -100,6 +100,9 @@ class TransactionOriginPaymentDetails_GenericBankAccount(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index a3b9172..faa8a0e 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -92,6 +92,9 @@ class TransactionUpdatableDestinationPaymentDetails_GenericBankAccount(Universal
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 72a55a3..96995cd 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -100,6 +100,9 @@ class TransactionUpdatableOriginPaymentDetails_GenericBankAccount(UniversalBaseM
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
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 1ff4691..b5a4895 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
@@ -92,6 +92,9 @@ class TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount(Uni
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
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 9d04b06..6ff86e6 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
@@ -100,6 +100,9 @@ class TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount(Universa
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
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 0ac6859..cc96152 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -92,6 +92,9 @@ class UserOptionalSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel)
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index 9277482..eec9bdb 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -92,6 +92,9 @@ class UserSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
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 ab08d25..b1e5ad2 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
@@ -92,6 +92,9 @@ class UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(UniversalBas
country_of_nationality: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="countryOfNationality")
] = None
+ country_of_residence: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="countryOfResidence")
+ ] = None
date_of_birth: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dateOfBirth")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
From be2b4ba76b25a1f2549c76c5c2c986f81c9e8895 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 2 Dec 2025 19:39:52 +0000
Subject: [PATCH 66/81] Release 1.8.27
---
pyproject.toml | 2 +-
reference.md | 24 ++++++++++++++++
src/flagright/__init__.py | 3 ++
src/flagright/business_users/client.py | 11 ++++++++
src/flagright/business_users/raw_client.py | 15 ++++++++++
src/flagright/consumer_users/client.py | 11 ++++++++
src/flagright/consumer_users/raw_client.py | 15 ++++++++++
src/flagright/core/client_wrapper.py | 4 +--
src/flagright/transactions/client.py | 9 ++++++
src/flagright/transactions/raw_client.py | 13 +++++++++
src/flagright/types/__init__.py | 3 ++
.../batch_business_user_with_rules_result.py | 8 ++++++
.../batch_consumer_user_with_rules_result.py | 8 ++++++
src/flagright/types/business.py | 8 ++++++
src/flagright/types/business_optional.py | 8 ++++++
.../types/business_with_rules_result.py | 8 ++++++
.../types/company_registration_details.py | 10 ++++---
.../types/corporate_entity_details.py | 28 +++++++++++++++++++
src/flagright/types/transaction.py | 4 +++
src/flagright/types/transaction_updatable.py | 4 +++
.../types/transaction_with_rules_result.py | 4 +++
src/flagright/types/user.py | 8 ++++++
src/flagright/types/user_optional.py | 8 ++++++
src/flagright/types/user_with_rules_result.py | 8 ++++++
24 files changed, 217 insertions(+), 7 deletions(-)
create mode 100644 src/flagright/types/corporate_entity_details.py
diff --git a/pyproject.toml b/pyproject.toml
index b82680a..b8b7abe 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.26"
+version = "1.8.27"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index c30cfeb..2928ee7 100644
--- a/reference.md
+++ b/reference.md
@@ -243,6 +243,14 @@ client.transactions.verify(
-
+**origin_corporate_entity:** `typing.Optional[CorporateEntityDetails]`
+
+
+
+
+
+-
+
**related_transaction_ids:** `typing.Optional[typing.Sequence[str]]` — IDs of transactions related to this transaction. Ex: refund, split bills
@@ -1578,6 +1586,14 @@ client.consumer_users.create(
-
+**corporate_entities:** `typing.Optional[typing.Sequence[CorporateEntityDetails]]` — Corporate entities of the user
+
+
+
+
+
+-
+
**linked_entities:** `typing.Optional[UserEntityLink]`
@@ -1875,6 +1891,14 @@ client.business_users.create(
-
+**corporate_entities:** `typing.Optional[typing.Sequence[CorporateEntityDetails]]` — Corporate entities of the user
+
+
+
+
+
+-
+
**share_holders:** `typing.Optional[typing.Sequence[BusinessShareHoldersItem]]` — Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 1f4e252..8f2d0fb 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -133,6 +133,7 @@
ConsumerUserMonitoringResult,
ConsumerUserSegment,
ContactDetails,
+ CorporateEntityDetails,
CorrespondentBankDetails,
CountryCode,
CraRiskLevelUpdatedDetails,
@@ -509,6 +510,7 @@
"ConsumerUserSegment": ".types",
"ConsumerUsersCreateResponse": ".consumer_users",
"ContactDetails": ".types",
+ "CorporateEntityDetails": ".types",
"CorrespondentBankDetails": ".types",
"CountryCode": ".types",
"CraRiskLevelUpdatedDetails": ".types",
@@ -906,6 +908,7 @@ def __dir__():
"ConsumerUserSegment",
"ConsumerUsersCreateResponse",
"ContactDetails",
+ "CorporateEntityDetails",
"CorrespondentBankDetails",
"CountryCode",
"CraRiskLevelUpdatedDetails",
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index 7429171..3b68a5e 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -9,6 +9,7 @@
from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
from ..types.business_share_holders_item import BusinessShareHoldersItem
from ..types.business_with_rules_result import BusinessWithRulesResult
+from ..types.corporate_entity_details import CorporateEntityDetails
from ..types.device_data import DeviceData
from ..types.kyc_status_details import KycStatusDetails
from ..types.legal_entity import LegalEntity
@@ -57,6 +58,7 @@ def create(
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
@@ -121,6 +123,9 @@ def create(
kyc_status_details : typing.Optional[KycStatusDetails]
+ corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
+ Corporate entities of the user
+
share_holders : typing.Optional[typing.Sequence[BusinessShareHoldersItem]]
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
@@ -209,6 +214,7 @@ def create(
activated_timestamp=activated_timestamp,
user_state_details=user_state_details,
kyc_status_details=kyc_status_details,
+ corporate_entities=corporate_entities,
share_holders=share_holders,
directors=directors,
transaction_limits=transaction_limits,
@@ -296,6 +302,7 @@ async def create(
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
@@ -360,6 +367,9 @@ async def create(
kyc_status_details : typing.Optional[KycStatusDetails]
+ corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
+ Corporate entities of the user
+
share_holders : typing.Optional[typing.Sequence[BusinessShareHoldersItem]]
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
@@ -456,6 +466,7 @@ async def main() -> None:
activated_timestamp=activated_timestamp,
user_state_details=user_state_details,
kyc_status_details=kyc_status_details,
+ corporate_entities=corporate_entities,
share_holders=share_holders,
directors=directors,
transaction_limits=transaction_limits,
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index 15c38dd..10ee3eb 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -19,6 +19,7 @@
from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
from ..types.business_share_holders_item import BusinessShareHoldersItem
from ..types.business_with_rules_result import BusinessWithRulesResult
+from ..types.corporate_entity_details import CorporateEntityDetails
from ..types.device_data import DeviceData
from ..types.kyc_status_details import KycStatusDetails
from ..types.legal_entity import LegalEntity
@@ -55,6 +56,7 @@ def create(
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
@@ -119,6 +121,9 @@ def create(
kyc_status_details : typing.Optional[KycStatusDetails]
+ corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
+ Corporate entities of the user
+
share_holders : typing.Optional[typing.Sequence[BusinessShareHoldersItem]]
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
@@ -196,6 +201,9 @@ def create(
"kycStatusDetails": convert_and_respect_annotation_metadata(
object_=kyc_status_details, annotation=KycStatusDetails, direction="write"
),
+ "corporateEntities": convert_and_respect_annotation_metadata(
+ object_=corporate_entities, annotation=typing.Sequence[CorporateEntityDetails], direction="write"
+ ),
"shareHolders": convert_and_respect_annotation_metadata(
object_=share_holders, annotation=typing.Sequence[BusinessShareHoldersItem], direction="write"
),
@@ -388,6 +396,7 @@ async def create(
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
@@ -452,6 +461,9 @@ async def create(
kyc_status_details : typing.Optional[KycStatusDetails]
+ corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
+ Corporate entities of the user
+
share_holders : typing.Optional[typing.Sequence[BusinessShareHoldersItem]]
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
@@ -529,6 +541,9 @@ async def create(
"kycStatusDetails": convert_and_respect_annotation_metadata(
object_=kyc_status_details, annotation=KycStatusDetails, direction="write"
),
+ "corporateEntities": convert_and_respect_annotation_metadata(
+ object_=corporate_entities, annotation=typing.Sequence[CorporateEntityDetails], direction="write"
+ ),
"shareHolders": convert_and_respect_annotation_metadata(
object_=share_holders, annotation=typing.Sequence[BusinessShareHoldersItem], direction="write"
),
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
index 31d5b2c..44c02ef 100644
--- a/src/flagright/consumer_users/client.py
+++ b/src/flagright/consumer_users/client.py
@@ -9,6 +9,7 @@
from ..types.boolean_string import BooleanString
from ..types.consumer_user_segment import ConsumerUserSegment
from ..types.contact_details import ContactDetails
+from ..types.corporate_entity_details import CorporateEntityDetails
from ..types.device_data import DeviceData
from ..types.employment_details import EmploymentDetails
from ..types.employment_status import EmploymentStatus
@@ -80,6 +81,7 @@ def create(
sanctions_status: typing.Optional[SanctionsStatus] = OMIT,
adverse_media_status: typing.Optional[AdverseMediaStatus] = OMIT,
last_transaction_timestamp: typing.Optional[float] = OMIT,
+ corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
@@ -168,6 +170,9 @@ def create(
last_transaction_timestamp : typing.Optional[float]
Timestamp of the last successful transaction of the user
+ corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
+ Corporate entities of the user
+
linked_entities : typing.Optional[UserEntityLink]
saved_payment_details : typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]]
@@ -298,6 +303,7 @@ def create(
sanctions_status=sanctions_status,
adverse_media_status=adverse_media_status,
last_transaction_timestamp=last_transaction_timestamp,
+ corporate_entities=corporate_entities,
linked_entities=linked_entities,
saved_payment_details=saved_payment_details,
tags=tags,
@@ -391,6 +397,7 @@ async def create(
sanctions_status: typing.Optional[SanctionsStatus] = OMIT,
adverse_media_status: typing.Optional[AdverseMediaStatus] = OMIT,
last_transaction_timestamp: typing.Optional[float] = OMIT,
+ corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
@@ -479,6 +486,9 @@ async def create(
last_transaction_timestamp : typing.Optional[float]
Timestamp of the last successful transaction of the user
+ corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
+ Corporate entities of the user
+
linked_entities : typing.Optional[UserEntityLink]
saved_payment_details : typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]]
@@ -617,6 +627,7 @@ async def main() -> None:
sanctions_status=sanctions_status,
adverse_media_status=adverse_media_status,
last_transaction_timestamp=last_transaction_timestamp,
+ corporate_entities=corporate_entities,
linked_entities=linked_entities,
saved_payment_details=saved_payment_details,
tags=tags,
diff --git a/src/flagright/consumer_users/raw_client.py b/src/flagright/consumer_users/raw_client.py
index a164661..6978af6 100644
--- a/src/flagright/consumer_users/raw_client.py
+++ b/src/flagright/consumer_users/raw_client.py
@@ -19,6 +19,7 @@
from ..types.boolean_string import BooleanString
from ..types.consumer_user_segment import ConsumerUserSegment
from ..types.contact_details import ContactDetails
+from ..types.corporate_entity_details import CorporateEntityDetails
from ..types.device_data import DeviceData
from ..types.employment_details import EmploymentDetails
from ..types.employment_status import EmploymentStatus
@@ -78,6 +79,7 @@ def create(
sanctions_status: typing.Optional[SanctionsStatus] = OMIT,
adverse_media_status: typing.Optional[AdverseMediaStatus] = OMIT,
last_transaction_timestamp: typing.Optional[float] = OMIT,
+ corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
@@ -166,6 +168,9 @@ def create(
last_transaction_timestamp : typing.Optional[float]
Timestamp of the last successful transaction of the user
+ corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
+ Corporate entities of the user
+
linked_entities : typing.Optional[UserEntityLink]
saved_payment_details : typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]]
@@ -244,6 +249,9 @@ def create(
"sanctionsStatus": sanctions_status,
"adverseMediaStatus": adverse_media_status,
"lastTransactionTimestamp": last_transaction_timestamp,
+ "corporateEntities": convert_and_respect_annotation_metadata(
+ object_=corporate_entities, annotation=typing.Sequence[CorporateEntityDetails], direction="write"
+ ),
"linkedEntities": convert_and_respect_annotation_metadata(
object_=linked_entities, annotation=UserEntityLink, direction="write"
),
@@ -432,6 +440,7 @@ async def create(
sanctions_status: typing.Optional[SanctionsStatus] = OMIT,
adverse_media_status: typing.Optional[AdverseMediaStatus] = OMIT,
last_transaction_timestamp: typing.Optional[float] = OMIT,
+ corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
tags: typing.Optional[typing.Sequence[UserTag]] = OMIT,
@@ -520,6 +529,9 @@ async def create(
last_transaction_timestamp : typing.Optional[float]
Timestamp of the last successful transaction of the user
+ corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
+ Corporate entities of the user
+
linked_entities : typing.Optional[UserEntityLink]
saved_payment_details : typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]]
@@ -598,6 +610,9 @@ async def create(
"sanctionsStatus": sanctions_status,
"adverseMediaStatus": adverse_media_status,
"lastTransactionTimestamp": last_transaction_timestamp,
+ "corporateEntities": convert_and_respect_annotation_metadata(
+ object_=corporate_entities, annotation=typing.Sequence[CorporateEntityDetails], direction="write"
+ ),
"linkedEntities": convert_and_respect_annotation_metadata(
object_=linked_entities, annotation=UserEntityLink, direction="write"
),
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index af1770a..83b7d5c 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.26",
+ "User-Agent": "flagright/1.8.27",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.26",
+ "X-Fern-SDK-Version": "1.8.27",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index 12058a8..5aa92e2 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -5,6 +5,7 @@
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.boolean_string import BooleanString
+from ..types.corporate_entity_details import CorporateEntityDetails
from ..types.device_data import DeviceData
from ..types.origin_funds_info import OriginFundsInfo
from ..types.tag import Tag
@@ -51,6 +52,7 @@ def verify(
origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = OMIT,
destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = OMIT,
origin_funds_info: typing.Optional[OriginFundsInfo] = OMIT,
+ origin_corporate_entity: typing.Optional[CorporateEntityDetails] = OMIT,
related_transaction_ids: typing.Optional[typing.Sequence[str]] = OMIT,
product_type: typing.Optional[str] = OMIT,
promotion_code_used: typing.Optional[bool] = OMIT,
@@ -122,6 +124,8 @@ def verify(
origin_funds_info : typing.Optional[OriginFundsInfo]
+ origin_corporate_entity : typing.Optional[CorporateEntityDetails]
+
related_transaction_ids : typing.Optional[typing.Sequence[str]]
IDs of transactions related to this transaction. Ex: refund, split bills
@@ -250,6 +254,7 @@ def verify(
origin_payment_details=origin_payment_details,
destination_payment_details=destination_payment_details,
origin_funds_info=origin_funds_info,
+ origin_corporate_entity=origin_corporate_entity,
related_transaction_ids=related_transaction_ids,
product_type=product_type,
promotion_code_used=promotion_code_used,
@@ -333,6 +338,7 @@ async def verify(
origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = OMIT,
destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = OMIT,
origin_funds_info: typing.Optional[OriginFundsInfo] = OMIT,
+ origin_corporate_entity: typing.Optional[CorporateEntityDetails] = OMIT,
related_transaction_ids: typing.Optional[typing.Sequence[str]] = OMIT,
product_type: typing.Optional[str] = OMIT,
promotion_code_used: typing.Optional[bool] = OMIT,
@@ -404,6 +410,8 @@ async def verify(
origin_funds_info : typing.Optional[OriginFundsInfo]
+ origin_corporate_entity : typing.Optional[CorporateEntityDetails]
+
related_transaction_ids : typing.Optional[typing.Sequence[str]]
IDs of transactions related to this transaction. Ex: refund, split bills
@@ -540,6 +548,7 @@ async def main() -> None:
origin_payment_details=origin_payment_details,
destination_payment_details=destination_payment_details,
origin_funds_info=origin_funds_info,
+ origin_corporate_entity=origin_corporate_entity,
related_transaction_ids=related_transaction_ids,
product_type=product_type,
promotion_code_used=promotion_code_used,
diff --git a/src/flagright/transactions/raw_client.py b/src/flagright/transactions/raw_client.py
index 4795f3c..c585db5 100644
--- a/src/flagright/transactions/raw_client.py
+++ b/src/flagright/transactions/raw_client.py
@@ -15,6 +15,7 @@
from ..errors.unauthorized_error import UnauthorizedError
from ..types.api_error_response import ApiErrorResponse
from ..types.boolean_string import BooleanString
+from ..types.corporate_entity_details import CorporateEntityDetails
from ..types.device_data import DeviceData
from ..types.origin_funds_info import OriginFundsInfo
from ..types.tag import Tag
@@ -49,6 +50,7 @@ def verify(
origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = OMIT,
destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = OMIT,
origin_funds_info: typing.Optional[OriginFundsInfo] = OMIT,
+ origin_corporate_entity: typing.Optional[CorporateEntityDetails] = OMIT,
related_transaction_ids: typing.Optional[typing.Sequence[str]] = OMIT,
product_type: typing.Optional[str] = OMIT,
promotion_code_used: typing.Optional[bool] = OMIT,
@@ -120,6 +122,8 @@ def verify(
origin_funds_info : typing.Optional[OriginFundsInfo]
+ origin_corporate_entity : typing.Optional[CorporateEntityDetails]
+
related_transaction_ids : typing.Optional[typing.Sequence[str]]
IDs of transactions related to this transaction. Ex: refund, split bills
@@ -185,6 +189,9 @@ def verify(
"originFundsInfo": convert_and_respect_annotation_metadata(
object_=origin_funds_info, annotation=OriginFundsInfo, direction="write"
),
+ "originCorporateEntity": convert_and_respect_annotation_metadata(
+ object_=origin_corporate_entity, annotation=CorporateEntityDetails, direction="write"
+ ),
"relatedTransactionIds": related_transaction_ids,
"productType": product_type,
"promotionCodeUsed": promotion_code_used,
@@ -353,6 +360,7 @@ async def verify(
origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = OMIT,
destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = OMIT,
origin_funds_info: typing.Optional[OriginFundsInfo] = OMIT,
+ origin_corporate_entity: typing.Optional[CorporateEntityDetails] = OMIT,
related_transaction_ids: typing.Optional[typing.Sequence[str]] = OMIT,
product_type: typing.Optional[str] = OMIT,
promotion_code_used: typing.Optional[bool] = OMIT,
@@ -424,6 +432,8 @@ async def verify(
origin_funds_info : typing.Optional[OriginFundsInfo]
+ origin_corporate_entity : typing.Optional[CorporateEntityDetails]
+
related_transaction_ids : typing.Optional[typing.Sequence[str]]
IDs of transactions related to this transaction. Ex: refund, split bills
@@ -489,6 +499,9 @@ async def verify(
"originFundsInfo": convert_and_respect_annotation_metadata(
object_=origin_funds_info, annotation=OriginFundsInfo, direction="write"
),
+ "originCorporateEntity": convert_and_respect_annotation_metadata(
+ object_=origin_corporate_entity, annotation=CorporateEntityDetails, direction="write"
+ ),
"relatedTransactionIds": related_transaction_ids,
"productType": product_type,
"promotionCodeUsed": promotion_code_used,
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index bc71703..979ca01 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -144,6 +144,7 @@
from .consumer_user_monitoring_result import ConsumerUserMonitoringResult
from .consumer_user_segment import ConsumerUserSegment
from .contact_details import ContactDetails
+ from .corporate_entity_details import CorporateEntityDetails
from .correspondent_bank_details import CorrespondentBankDetails
from .country_code import CountryCode
from .cra_risk_level_updated_details import CraRiskLevelUpdatedDetails
@@ -516,6 +517,7 @@
"ConsumerUserMonitoringResult": ".consumer_user_monitoring_result",
"ConsumerUserSegment": ".consumer_user_segment",
"ContactDetails": ".contact_details",
+ "CorporateEntityDetails": ".corporate_entity_details",
"CorrespondentBankDetails": ".correspondent_bank_details",
"CountryCode": ".country_code",
"CraRiskLevelUpdatedDetails": ".cra_risk_level_updated_details",
@@ -894,6 +896,7 @@ def __dir__():
"ConsumerUserMonitoringResult",
"ConsumerUserSegment",
"ContactDetails",
+ "CorporateEntityDetails",
"CorrespondentBankDetails",
"CountryCode",
"CraRiskLevelUpdatedDetails",
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index 1c3aeb7..86905ab 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -11,6 +11,7 @@
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
)
from .batch_business_user_with_rules_result_share_holders_item import BatchBusinessUserWithRulesResultShareHoldersItem
+from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
from .kyc_status_details import KycStatusDetails
@@ -54,6 +55,13 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
kyc_status_details: typing_extensions.Annotated[
typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
] = None
+ corporate_entities: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
+ ] = pydantic.Field(default=None)
+ """
+ Corporate entities of the user
+ """
+
share_holders: typing_extensions.Annotated[
typing.Optional[typing.List[BatchBusinessUserWithRulesResultShareHoldersItem]],
FieldMetadata(alias="shareHolders"),
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result.py b/src/flagright/types/batch_consumer_user_with_rules_result.py
index 3eaafa9..339a3e3 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result.py
@@ -13,6 +13,7 @@
)
from .consumer_user_segment import ConsumerUserSegment
from .contact_details import ContactDetails
+from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .employment_details import EmploymentDetails
from .employment_status import EmploymentStatus
@@ -113,6 +114,13 @@ class BatchConsumerUserWithRulesResult(UniversalBaseModel):
Timestamp of the last successful transaction of the user
"""
+ corporate_entities: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
+ ] = pydantic.Field(default=None)
+ """
+ Corporate entities of the user
+ """
+
linked_entities: typing_extensions.Annotated[
typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
] = None
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index d160f7e..246b692 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -9,6 +9,7 @@
from .acquisition_channel import AcquisitionChannel
from .business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
from .business_share_holders_item import BusinessShareHoldersItem
+from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .kyc_status_details import KycStatusDetails
from .legal_entity import LegalEntity
@@ -50,6 +51,13 @@ class Business(UniversalBaseModel):
kyc_status_details: typing_extensions.Annotated[
typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
] = None
+ corporate_entities: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
+ ] = pydantic.Field(default=None)
+ """
+ Corporate entities of the user
+ """
+
share_holders: typing_extensions.Annotated[
typing.Optional[typing.List[BusinessShareHoldersItem]], FieldMetadata(alias="shareHolders")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index aab0853..b109878 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -9,6 +9,7 @@
from .acquisition_channel import AcquisitionChannel
from .business_optional_saved_payment_details_item import BusinessOptionalSavedPaymentDetailsItem
from .business_optional_share_holders_item import BusinessOptionalShareHoldersItem
+from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .kyc_status_details import KycStatusDetails
from .legal_entity import LegalEntity
@@ -44,6 +45,13 @@ class BusinessOptional(UniversalBaseModel):
typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
] = None
legal_entity: typing_extensions.Annotated[typing.Optional[LegalEntity], FieldMetadata(alias="legalEntity")] = None
+ corporate_entities: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
+ ] = pydantic.Field(default=None)
+ """
+ Corporate entities of the user
+ """
+
share_holders: typing_extensions.Annotated[
typing.Optional[typing.List[BusinessOptionalShareHoldersItem]], FieldMetadata(alias="shareHolders")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 9227508..25d839b 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -9,6 +9,7 @@
from .acquisition_channel import AcquisitionChannel
from .business_with_rules_result_saved_payment_details_item import BusinessWithRulesResultSavedPaymentDetailsItem
from .business_with_rules_result_share_holders_item import BusinessWithRulesResultShareHoldersItem
+from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
@@ -53,6 +54,13 @@ class BusinessWithRulesResult(UniversalBaseModel):
kyc_status_details: typing_extensions.Annotated[
typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
] = None
+ corporate_entities: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
+ ] = pydantic.Field(default=None)
+ """
+ Corporate entities of the user
+ """
+
share_holders: typing_extensions.Annotated[
typing.Optional[typing.List[BusinessWithRulesResultShareHoldersItem]], FieldMetadata(alias="shareHolders")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/company_registration_details.py b/src/flagright/types/company_registration_details.py
index ba2ff28..5b1f4dd 100644
--- a/src/flagright/types/company_registration_details.py
+++ b/src/flagright/types/company_registration_details.py
@@ -15,14 +15,16 @@ class CompanyRegistrationDetails(UniversalBaseModel):
Model for business user company registration details
"""
- registration_identifier: typing_extensions.Annotated[str, FieldMetadata(alias="registrationIdentifier")] = (
- pydantic.Field()
- )
+ registration_identifier: typing_extensions.Annotated[
+ typing.Optional[str], FieldMetadata(alias="registrationIdentifier")
+ ] = pydantic.Field(default=None)
"""
Commercial registry registration number for the company in its registration country
"""
- registration_country: typing_extensions.Annotated[CountryCode, FieldMetadata(alias="registrationCountry")]
+ registration_country: typing_extensions.Annotated[
+ typing.Optional[CountryCode], FieldMetadata(alias="registrationCountry")
+ ] = None
tax_residence_country: typing_extensions.Annotated[
typing.Optional[CountryCode], FieldMetadata(alias="taxResidenceCountry")
] = None
diff --git a/src/flagright/types/corporate_entity_details.py b/src/flagright/types/corporate_entity_details.py
new file mode 100644
index 0000000..9f1efbf
--- /dev/null
+++ b/src/flagright/types/corporate_entity_details.py
@@ -0,0 +1,28 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+
+
+class CorporateEntityDetails(UniversalBaseModel):
+ """
+ Model for corporate entity details
+ """
+
+ legal_name: typing_extensions.Annotated[str, FieldMetadata(alias="legalName")] = pydantic.Field()
+ """
+ Legal name of the corporate entity
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction.py b/src/flagright/types/transaction.py
index 184503b..71e2a8f 100644
--- a/src/flagright/types/transaction.py
+++ b/src/flagright/types/transaction.py
@@ -6,6 +6,7 @@
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
+from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .origin_funds_info import OriginFundsInfo
from .tag import Tag
@@ -67,6 +68,9 @@ class Transaction(UniversalBaseModel):
origin_funds_info: typing_extensions.Annotated[
typing.Optional[OriginFundsInfo], FieldMetadata(alias="originFundsInfo")
] = None
+ origin_corporate_entity: typing_extensions.Annotated[
+ typing.Optional[CorporateEntityDetails], FieldMetadata(alias="originCorporateEntity")
+ ] = None
related_transaction_ids: typing_extensions.Annotated[
typing.Optional[typing.List[str]], FieldMetadata(alias="relatedTransactionIds")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/transaction_updatable.py b/src/flagright/types/transaction_updatable.py
index e7a0903..eb1a24e 100644
--- a/src/flagright/types/transaction_updatable.py
+++ b/src/flagright/types/transaction_updatable.py
@@ -6,6 +6,7 @@
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
+from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .origin_funds_info import OriginFundsInfo
from .tag import Tag
@@ -38,6 +39,9 @@ class TransactionUpdatable(UniversalBaseModel):
origin_funds_info: typing_extensions.Annotated[
typing.Optional[OriginFundsInfo], FieldMetadata(alias="originFundsInfo")
] = None
+ origin_corporate_entity: typing_extensions.Annotated[
+ typing.Optional[CorporateEntityDetails], FieldMetadata(alias="originCorporateEntity")
+ ] = None
related_transaction_ids: typing_extensions.Annotated[
typing.Optional[typing.List[str]], FieldMetadata(alias="relatedTransactionIds")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/transaction_with_rules_result.py b/src/flagright/types/transaction_with_rules_result.py
index 4595ff6..c9f303a 100644
--- a/src/flagright/types/transaction_with_rules_result.py
+++ b/src/flagright/types/transaction_with_rules_result.py
@@ -6,6 +6,7 @@
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
+from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
@@ -74,6 +75,9 @@ class TransactionWithRulesResult(UniversalBaseModel):
origin_funds_info: typing_extensions.Annotated[
typing.Optional[OriginFundsInfo], FieldMetadata(alias="originFundsInfo")
] = None
+ origin_corporate_entity: typing_extensions.Annotated[
+ typing.Optional[CorporateEntityDetails], FieldMetadata(alias="originCorporateEntity")
+ ] = None
related_transaction_ids: typing_extensions.Annotated[
typing.Optional[typing.List[str]], FieldMetadata(alias="relatedTransactionIds")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/user.py b/src/flagright/types/user.py
index 783e892..9f3b3dc 100644
--- a/src/flagright/types/user.py
+++ b/src/flagright/types/user.py
@@ -10,6 +10,7 @@
from .adverse_media_status import AdverseMediaStatus
from .consumer_user_segment import ConsumerUserSegment
from .contact_details import ContactDetails
+from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .employment_details import EmploymentDetails
from .employment_status import EmploymentStatus
@@ -109,6 +110,13 @@ class User(UniversalBaseModel):
Timestamp of the last successful transaction of the user
"""
+ corporate_entities: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
+ ] = pydantic.Field(default=None)
+ """
+ Corporate entities of the user
+ """
+
linked_entities: typing_extensions.Annotated[
typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
] = None
diff --git a/src/flagright/types/user_optional.py b/src/flagright/types/user_optional.py
index fd73eb8..d62f7c3 100644
--- a/src/flagright/types/user_optional.py
+++ b/src/flagright/types/user_optional.py
@@ -10,6 +10,7 @@
from .adverse_media_status import AdverseMediaStatus
from .consumer_user_segment import ConsumerUserSegment
from .contact_details import ContactDetails
+from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .employment_details import EmploymentDetails
from .employment_status import EmploymentStatus
@@ -103,6 +104,13 @@ class UserOptional(UniversalBaseModel):
Timestamp of the last successful transaction of the user
"""
+ corporate_entities: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
+ ] = pydantic.Field(default=None)
+ """
+ Corporate entities of the user
+ """
+
linked_entities: typing_extensions.Annotated[
typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
] = None
diff --git a/src/flagright/types/user_with_rules_result.py b/src/flagright/types/user_with_rules_result.py
index 217c156..c41bfb9 100644
--- a/src/flagright/types/user_with_rules_result.py
+++ b/src/flagright/types/user_with_rules_result.py
@@ -10,6 +10,7 @@
from .adverse_media_status import AdverseMediaStatus
from .consumer_user_segment import ConsumerUserSegment
from .contact_details import ContactDetails
+from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .employment_details import EmploymentDetails
from .employment_status import EmploymentStatus
@@ -112,6 +113,13 @@ class UserWithRulesResult(UniversalBaseModel):
Timestamp of the last successful transaction of the user
"""
+ corporate_entities: typing_extensions.Annotated[
+ typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
+ ] = pydantic.Field(default=None)
+ """
+ Corporate entities of the user
+ """
+
linked_entities: typing_extensions.Annotated[
typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
] = None
From 96c44e79f09ba5094763674011deb84f90b2c4d6 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 2 Dec 2025 20:05:37 +0000
Subject: [PATCH 67/81] Release 1.8.28
---
pyproject.toml | 2 +-
reference.md | 8 ++
src/flagright/__init__.py | 24 ++++++
src/flagright/core/client_wrapper.py | 4 +-
src/flagright/transactions/client.py | 9 +++
src/flagright/transactions/raw_client.py | 13 +++
src/flagright/types/__init__.py | 24 ++++++
.../types/blockchain_counterparty.py | 35 ++++++++
src/flagright/types/blockchain_risk.py | 61 ++++++++++++++
src/flagright/types/blockchain_risk_detail.py | 80 +++++++++++++++++++
.../types/blockchain_risk_subject.py | 38 +++++++++
.../blockchain_risk_subject_direction.py | 5 ++
.../types/blockchain_risk_subject_type.py | 7 ++
src/flagright/types/risk_exposure_type.py | 5 ++
src/flagright/types/transaction.py | 2 +
src/flagright/types/transaction_metadata.py | 31 +++++++
src/flagright/types/transaction_updatable.py | 2 +
.../types/transaction_with_rules_result.py | 2 +
18 files changed, 349 insertions(+), 3 deletions(-)
create mode 100644 src/flagright/types/blockchain_counterparty.py
create mode 100644 src/flagright/types/blockchain_risk.py
create mode 100644 src/flagright/types/blockchain_risk_detail.py
create mode 100644 src/flagright/types/blockchain_risk_subject.py
create mode 100644 src/flagright/types/blockchain_risk_subject_direction.py
create mode 100644 src/flagright/types/blockchain_risk_subject_type.py
create mode 100644 src/flagright/types/risk_exposure_type.py
create mode 100644 src/flagright/types/transaction_metadata.py
diff --git a/pyproject.toml b/pyproject.toml
index b8b7abe..20cf598 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.27"
+version = "1.8.28"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 2928ee7..1877c92 100644
--- a/reference.md
+++ b/reference.md
@@ -299,6 +299,14 @@ client.transactions.verify(
-
+**metadata:** `typing.Optional[TransactionMetadata]`
+
+
+
+
+
+-
+
**tags:** `typing.Optional[typing.Sequence[Tag]]` — Additional information that can be added via tags
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 8f2d0fb..faa6ff1 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -57,6 +57,12 @@
BatchTransactionMonitoringResult,
BatchTransactionMonitoringResults,
BatchUserRulesResult,
+ BlockchainCounterparty,
+ BlockchainRisk,
+ BlockchainRiskDetail,
+ BlockchainRiskSubject,
+ BlockchainRiskSubjectDirection,
+ BlockchainRiskSubjectType,
BooleanString,
Business,
BusinessBase,
@@ -192,6 +198,7 @@
PosDetails,
PosEntryMode,
ProductsEnabled,
+ RiskExposureType,
RiskLevel,
RuleAction,
RuleExecutionSanctionsDetails,
@@ -233,6 +240,7 @@
TransactionLimit,
TransactionLimits,
TransactionLimitsPaymentMethodLimits,
+ TransactionMetadata,
TransactionMonitoringResult,
TransactionOriginPaymentDetails,
TransactionOriginPaymentDetails_Ach,
@@ -431,6 +439,12 @@
"BatchTransactionMonitoringResult": ".types",
"BatchTransactionMonitoringResults": ".types",
"BatchUserRulesResult": ".types",
+ "BlockchainCounterparty": ".types",
+ "BlockchainRisk": ".types",
+ "BlockchainRiskDetail": ".types",
+ "BlockchainRiskSubject": ".types",
+ "BlockchainRiskSubjectDirection": ".types",
+ "BlockchainRiskSubjectType": ".types",
"BooleanString": ".types",
"Business": ".types",
"BusinessBase": ".types",
@@ -572,6 +586,7 @@
"PosDetails": ".types",
"PosEntryMode": ".types",
"ProductsEnabled": ".types",
+ "RiskExposureType": ".types",
"RiskLevel": ".types",
"RuleAction": ".types",
"RuleExecutionSanctionsDetails": ".types",
@@ -614,6 +629,7 @@
"TransactionLimit": ".types",
"TransactionLimits": ".types",
"TransactionLimitsPaymentMethodLimits": ".types",
+ "TransactionMetadata": ".types",
"TransactionMonitoringResult": ".types",
"TransactionOriginPaymentDetails": ".types",
"TransactionOriginPaymentDetails_Ach": ".types",
@@ -829,6 +845,12 @@ def __dir__():
"BatchTransactionMonitoringResult",
"BatchTransactionMonitoringResults",
"BatchUserRulesResult",
+ "BlockchainCounterparty",
+ "BlockchainRisk",
+ "BlockchainRiskDetail",
+ "BlockchainRiskSubject",
+ "BlockchainRiskSubjectDirection",
+ "BlockchainRiskSubjectType",
"BooleanString",
"Business",
"BusinessBase",
@@ -970,6 +992,7 @@ def __dir__():
"PosDetails",
"PosEntryMode",
"ProductsEnabled",
+ "RiskExposureType",
"RiskLevel",
"RuleAction",
"RuleExecutionSanctionsDetails",
@@ -1012,6 +1035,7 @@ def __dir__():
"TransactionLimit",
"TransactionLimits",
"TransactionLimitsPaymentMethodLimits",
+ "TransactionMetadata",
"TransactionMonitoringResult",
"TransactionOriginPaymentDetails",
"TransactionOriginPaymentDetails_Ach",
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 83b7d5c..65f66a9 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.27",
+ "User-Agent": "flagright/1.8.28",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.27",
+ "X-Fern-SDK-Version": "1.8.28",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index 5aa92e2..c5690c6 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -11,6 +11,7 @@
from ..types.tag import Tag
from ..types.transaction_amount_details import TransactionAmountDetails
from ..types.transaction_destination_payment_details import TransactionDestinationPaymentDetails
+from ..types.transaction_metadata import TransactionMetadata
from ..types.transaction_origin_payment_details import TransactionOriginPaymentDetails
from ..types.transaction_state import TransactionState
from ..types.transaction_with_rules_result import TransactionWithRulesResult
@@ -59,6 +60,7 @@ def verify(
reference: typing.Optional[str] = OMIT,
origin_device_data: typing.Optional[DeviceData] = OMIT,
destination_device_data: typing.Optional[DeviceData] = OMIT,
+ metadata: typing.Optional[TransactionMetadata] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
@@ -142,6 +144,8 @@ def verify(
destination_device_data : typing.Optional[DeviceData]
+ metadata : typing.Optional[TransactionMetadata]
+
tags : typing.Optional[typing.Sequence[Tag]]
Additional information that can be added via tags
@@ -261,6 +265,7 @@ def verify(
reference=reference,
origin_device_data=origin_device_data,
destination_device_data=destination_device_data,
+ metadata=metadata,
tags=tags,
jurisdiction=jurisdiction,
update_count=update_count,
@@ -345,6 +350,7 @@ async def verify(
reference: typing.Optional[str] = OMIT,
origin_device_data: typing.Optional[DeviceData] = OMIT,
destination_device_data: typing.Optional[DeviceData] = OMIT,
+ metadata: typing.Optional[TransactionMetadata] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
@@ -428,6 +434,8 @@ async def verify(
destination_device_data : typing.Optional[DeviceData]
+ metadata : typing.Optional[TransactionMetadata]
+
tags : typing.Optional[typing.Sequence[Tag]]
Additional information that can be added via tags
@@ -555,6 +563,7 @@ async def main() -> None:
reference=reference,
origin_device_data=origin_device_data,
destination_device_data=destination_device_data,
+ metadata=metadata,
tags=tags,
jurisdiction=jurisdiction,
update_count=update_count,
diff --git a/src/flagright/transactions/raw_client.py b/src/flagright/transactions/raw_client.py
index c585db5..84bbd5b 100644
--- a/src/flagright/transactions/raw_client.py
+++ b/src/flagright/transactions/raw_client.py
@@ -21,6 +21,7 @@
from ..types.tag import Tag
from ..types.transaction_amount_details import TransactionAmountDetails
from ..types.transaction_destination_payment_details import TransactionDestinationPaymentDetails
+from ..types.transaction_metadata import TransactionMetadata
from ..types.transaction_origin_payment_details import TransactionOriginPaymentDetails
from ..types.transaction_state import TransactionState
from ..types.transaction_with_rules_result import TransactionWithRulesResult
@@ -57,6 +58,7 @@ def verify(
reference: typing.Optional[str] = OMIT,
origin_device_data: typing.Optional[DeviceData] = OMIT,
destination_device_data: typing.Optional[DeviceData] = OMIT,
+ metadata: typing.Optional[TransactionMetadata] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
@@ -140,6 +142,8 @@ def verify(
destination_device_data : typing.Optional[DeviceData]
+ metadata : typing.Optional[TransactionMetadata]
+
tags : typing.Optional[typing.Sequence[Tag]]
Additional information that can be added via tags
@@ -202,6 +206,9 @@ def verify(
"destinationDeviceData": convert_and_respect_annotation_metadata(
object_=destination_device_data, annotation=DeviceData, direction="write"
),
+ "metadata": convert_and_respect_annotation_metadata(
+ object_=metadata, annotation=TransactionMetadata, direction="write"
+ ),
"tags": convert_and_respect_annotation_metadata(
object_=tags, annotation=typing.Sequence[Tag], direction="write"
),
@@ -367,6 +374,7 @@ async def verify(
reference: typing.Optional[str] = OMIT,
origin_device_data: typing.Optional[DeviceData] = OMIT,
destination_device_data: typing.Optional[DeviceData] = OMIT,
+ metadata: typing.Optional[TransactionMetadata] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
update_count: typing.Optional[float] = OMIT,
@@ -450,6 +458,8 @@ async def verify(
destination_device_data : typing.Optional[DeviceData]
+ metadata : typing.Optional[TransactionMetadata]
+
tags : typing.Optional[typing.Sequence[Tag]]
Additional information that can be added via tags
@@ -512,6 +522,9 @@ async def verify(
"destinationDeviceData": convert_and_respect_annotation_metadata(
object_=destination_device_data, annotation=DeviceData, direction="write"
),
+ "metadata": convert_and_respect_annotation_metadata(
+ object_=metadata, annotation=TransactionMetadata, direction="write"
+ ),
"tags": convert_and_respect_annotation_metadata(
object_=tags, annotation=typing.Sequence[Tag], direction="write"
),
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 979ca01..e05a1e5 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -62,6 +62,12 @@
from .batch_transaction_monitoring_result import BatchTransactionMonitoringResult
from .batch_transaction_monitoring_results import BatchTransactionMonitoringResults
from .batch_user_rules_result import BatchUserRulesResult
+ from .blockchain_counterparty import BlockchainCounterparty
+ from .blockchain_risk import BlockchainRisk
+ from .blockchain_risk_detail import BlockchainRiskDetail
+ from .blockchain_risk_subject import BlockchainRiskSubject
+ from .blockchain_risk_subject_direction import BlockchainRiskSubjectDirection
+ from .blockchain_risk_subject_type import BlockchainRiskSubjectType
from .boolean_string import BooleanString
from .business import Business
from .business_base import BusinessBase
@@ -203,6 +209,7 @@
from .pos_details import PosDetails
from .pos_entry_mode import PosEntryMode
from .products_enabled import ProductsEnabled
+ from .risk_exposure_type import RiskExposureType
from .risk_level import RiskLevel
from .rule_action import RuleAction
from .rule_execution_sanctions_details import RuleExecutionSanctionsDetails
@@ -246,6 +253,7 @@
from .transaction_limit import TransactionLimit
from .transaction_limits import TransactionLimits
from .transaction_limits_payment_method_limits import TransactionLimitsPaymentMethodLimits
+ from .transaction_metadata import TransactionMetadata
from .transaction_monitoring_result import TransactionMonitoringResult
from .transaction_origin_payment_details import (
TransactionOriginPaymentDetails,
@@ -441,6 +449,12 @@
"BatchTransactionMonitoringResult": ".batch_transaction_monitoring_result",
"BatchTransactionMonitoringResults": ".batch_transaction_monitoring_results",
"BatchUserRulesResult": ".batch_user_rules_result",
+ "BlockchainCounterparty": ".blockchain_counterparty",
+ "BlockchainRisk": ".blockchain_risk",
+ "BlockchainRiskDetail": ".blockchain_risk_detail",
+ "BlockchainRiskSubject": ".blockchain_risk_subject",
+ "BlockchainRiskSubjectDirection": ".blockchain_risk_subject_direction",
+ "BlockchainRiskSubjectType": ".blockchain_risk_subject_type",
"BooleanString": ".boolean_string",
"Business": ".business",
"BusinessBase": ".business_base",
@@ -576,6 +590,7 @@
"PosDetails": ".pos_details",
"PosEntryMode": ".pos_entry_mode",
"ProductsEnabled": ".products_enabled",
+ "RiskExposureType": ".risk_exposure_type",
"RiskLevel": ".risk_level",
"RuleAction": ".rule_action",
"RuleExecutionSanctionsDetails": ".rule_execution_sanctions_details",
@@ -617,6 +632,7 @@
"TransactionLimit": ".transaction_limit",
"TransactionLimits": ".transaction_limits",
"TransactionLimitsPaymentMethodLimits": ".transaction_limits_payment_method_limits",
+ "TransactionMetadata": ".transaction_metadata",
"TransactionMonitoringResult": ".transaction_monitoring_result",
"TransactionOriginPaymentDetails": ".transaction_origin_payment_details",
"TransactionOriginPaymentDetails_Ach": ".transaction_origin_payment_details",
@@ -820,6 +836,12 @@ def __dir__():
"BatchTransactionMonitoringResult",
"BatchTransactionMonitoringResults",
"BatchUserRulesResult",
+ "BlockchainCounterparty",
+ "BlockchainRisk",
+ "BlockchainRiskDetail",
+ "BlockchainRiskSubject",
+ "BlockchainRiskSubjectDirection",
+ "BlockchainRiskSubjectType",
"BooleanString",
"Business",
"BusinessBase",
@@ -955,6 +977,7 @@ def __dir__():
"PosDetails",
"PosEntryMode",
"ProductsEnabled",
+ "RiskExposureType",
"RiskLevel",
"RuleAction",
"RuleExecutionSanctionsDetails",
@@ -996,6 +1019,7 @@ def __dir__():
"TransactionLimit",
"TransactionLimits",
"TransactionLimitsPaymentMethodLimits",
+ "TransactionMetadata",
"TransactionMonitoringResult",
"TransactionOriginPaymentDetails",
"TransactionOriginPaymentDetails_Ach",
diff --git a/src/flagright/types/blockchain_counterparty.py b/src/flagright/types/blockchain_counterparty.py
new file mode 100644
index 0000000..b83aa2e
--- /dev/null
+++ b/src/flagright/types/blockchain_counterparty.py
@@ -0,0 +1,35 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+
+
+class BlockchainCounterparty(UniversalBaseModel):
+ """
+ Information about a counterparty in a blockchain transaction
+ """
+
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Name of the counterparty (e.g., exchange name)
+ """
+
+ category_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="categoryId")] = pydantic.Field(
+ default=None
+ )
+ """
+ Category identifier for the counterparty
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/blockchain_risk.py b/src/flagright/types/blockchain_risk.py
new file mode 100644
index 0000000..aad74ee
--- /dev/null
+++ b/src/flagright/types/blockchain_risk.py
@@ -0,0 +1,61 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .blockchain_counterparty import BlockchainCounterparty
+from .blockchain_risk_detail import BlockchainRiskDetail
+from .blockchain_risk_subject import BlockchainRiskSubject
+from .risk_level import RiskLevel
+
+
+class BlockchainRisk(UniversalBaseModel):
+ """
+ Blockchain-specific risk analysis from a provider including risk assessment and counterparty information
+ """
+
+ provider: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Risk analysis provider (e.g., chainalysis)
+ """
+
+ risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Overall risk level of the transaction
+ """
+
+ risk_score: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="riskScore")] = pydantic.Field(
+ default=None
+ )
+ """
+ Numeric risk score from 0 to 100
+ """
+
+ counterparties: typing.Optional[typing.List[BlockchainCounterparty]] = pydantic.Field(default=None)
+ """
+ List of counterparties involved in the transaction
+ """
+
+ subject: typing.Optional[BlockchainRiskSubject] = pydantic.Field(default=None)
+ """
+ Subject of the risk analysis (address, transaction, entity, or smart contract)
+ """
+
+ risks: typing.Optional[typing.List[BlockchainRiskDetail]] = pydantic.Field(default=None)
+ """
+ Detailed risk categories and their analysis
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/blockchain_risk_detail.py b/src/flagright/types/blockchain_risk_detail.py
new file mode 100644
index 0000000..adf5ed5
--- /dev/null
+++ b/src/flagright/types/blockchain_risk_detail.py
@@ -0,0 +1,80 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .risk_exposure_type import RiskExposureType
+from .risk_level import RiskLevel
+from .transaction_amount_details import TransactionAmountDetails
+
+
+class BlockchainRiskDetail(UniversalBaseModel):
+ """
+ Detailed risk category analysis for a specific risk type
+ """
+
+ alert_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="alertId")] = pydantic.Field(
+ default=None
+ )
+ """
+ Optional alert identifier (alerts don't always exist)
+ """
+
+ category_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="categoryId")] = pydantic.Field(
+ default=None
+ )
+ """
+ Unique identifier for the risk category
+ """
+
+ category_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="categoryName")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Human-readable name of the risk category
+ """
+
+ category_risk_level: typing_extensions.Annotated[
+ typing.Optional[RiskLevel], FieldMetadata(alias="categoryRiskLevel")
+ ] = pydantic.Field(default=None)
+ """
+ Risk level specific to this category
+ """
+
+ category_risk_score: typing_extensions.Annotated[
+ typing.Optional[float], FieldMetadata(alias="categoryRiskScore")
+ ] = pydantic.Field(default=None)
+ """
+ Numeric risk score for this specific category
+ """
+
+ exposure_type: typing_extensions.Annotated[
+ typing.Optional[RiskExposureType], FieldMetadata(alias="exposureType")
+ ] = pydantic.Field(default=None)
+ """
+ Type of exposure to the risk entity
+ """
+
+ entity: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Name of the specific entity that poses the risk
+ """
+
+ exposure_amount: typing_extensions.Annotated[
+ typing.Optional[TransactionAmountDetails], FieldMetadata(alias="exposureAmount")
+ ] = pydantic.Field(default=None)
+ """
+ Amount of the transaction exposed to this risk
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/blockchain_risk_subject.py b/src/flagright/types/blockchain_risk_subject.py
new file mode 100644
index 0000000..b1b5a7e
--- /dev/null
+++ b/src/flagright/types/blockchain_risk_subject.py
@@ -0,0 +1,38 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .blockchain_risk_subject_direction import BlockchainRiskSubjectDirection
+from .blockchain_risk_subject_type import BlockchainRiskSubjectType
+
+
+class BlockchainRiskSubject(UniversalBaseModel):
+ """
+ Subject of the blockchain risk analysis
+ """
+
+ type: typing.Optional[BlockchainRiskSubjectType] = pydantic.Field(default=None)
+ """
+ Type of the subject being analyzed
+ """
+
+ value: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Single canonical value for the subject (e.g., address hash)
+ """
+
+ direction: typing.Optional[BlockchainRiskSubjectDirection] = pydantic.Field(default=None)
+ """
+ Direction of the subject in the transaction (maps to origin/destination)
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/blockchain_risk_subject_direction.py b/src/flagright/types/blockchain_risk_subject_direction.py
new file mode 100644
index 0000000..e76871d
--- /dev/null
+++ b/src/flagright/types/blockchain_risk_subject_direction.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+BlockchainRiskSubjectDirection = typing.Union[typing.Literal["ORIGIN", "DESTINATION"], typing.Any]
diff --git a/src/flagright/types/blockchain_risk_subject_type.py b/src/flagright/types/blockchain_risk_subject_type.py
new file mode 100644
index 0000000..f9d2112
--- /dev/null
+++ b/src/flagright/types/blockchain_risk_subject_type.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+BlockchainRiskSubjectType = typing.Union[
+ typing.Literal["ADDRESS", "TRANSACTION", "SMART_CONTRACT", "ENTITY"], typing.Any
+]
diff --git a/src/flagright/types/risk_exposure_type.py b/src/flagright/types/risk_exposure_type.py
new file mode 100644
index 0000000..93f2adc
--- /dev/null
+++ b/src/flagright/types/risk_exposure_type.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+RiskExposureType = typing.Union[typing.Literal["DIRECT", "INDIRECT"], typing.Any]
diff --git a/src/flagright/types/transaction.py b/src/flagright/types/transaction.py
index 71e2a8f..0478d00 100644
--- a/src/flagright/types/transaction.py
+++ b/src/flagright/types/transaction.py
@@ -12,6 +12,7 @@
from .tag import Tag
from .transaction_amount_details import TransactionAmountDetails
from .transaction_destination_payment_details import TransactionDestinationPaymentDetails
+from .transaction_metadata import TransactionMetadata
from .transaction_origin_payment_details import TransactionOriginPaymentDetails
from .transaction_state import TransactionState
@@ -103,6 +104,7 @@ class Transaction(UniversalBaseModel):
destination_device_data: typing_extensions.Annotated[
typing.Optional[DeviceData], FieldMetadata(alias="destinationDeviceData")
] = None
+ metadata: typing.Optional[TransactionMetadata] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
Additional information that can be added via tags
diff --git a/src/flagright/types/transaction_metadata.py b/src/flagright/types/transaction_metadata.py
new file mode 100644
index 0000000..8f5bcbe
--- /dev/null
+++ b/src/flagright/types/transaction_metadata.py
@@ -0,0 +1,31 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .blockchain_risk import BlockchainRisk
+
+
+class TransactionMetadata(UniversalBaseModel):
+ """
+ Additional metadata for transactions including risk analysis and counterparty information
+ """
+
+ blockchain_risk: typing_extensions.Annotated[
+ typing.Optional[typing.List[BlockchainRisk]], FieldMetadata(alias="blockchainRisk")
+ ] = pydantic.Field(default=None)
+ """
+ List of blockchain risk analyses from different providers
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/transaction_updatable.py b/src/flagright/types/transaction_updatable.py
index eb1a24e..38a9375 100644
--- a/src/flagright/types/transaction_updatable.py
+++ b/src/flagright/types/transaction_updatable.py
@@ -11,6 +11,7 @@
from .origin_funds_info import OriginFundsInfo
from .tag import Tag
from .transaction_amount_details import TransactionAmountDetails
+from .transaction_metadata import TransactionMetadata
from .transaction_updatable_destination_payment_details import TransactionUpdatableDestinationPaymentDetails
from .transaction_updatable_origin_payment_details import TransactionUpdatableOriginPaymentDetails
@@ -74,6 +75,7 @@ class TransactionUpdatable(UniversalBaseModel):
destination_device_data: typing_extensions.Annotated[
typing.Optional[DeviceData], FieldMetadata(alias="destinationDeviceData")
] = None
+ metadata: typing.Optional[TransactionMetadata] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
Additional information that can be added via tags
diff --git a/src/flagright/types/transaction_with_rules_result.py b/src/flagright/types/transaction_with_rules_result.py
index c9f303a..e2781df 100644
--- a/src/flagright/types/transaction_with_rules_result.py
+++ b/src/flagright/types/transaction_with_rules_result.py
@@ -14,6 +14,7 @@
from .rule_action import RuleAction
from .tag import Tag
from .transaction_amount_details import TransactionAmountDetails
+from .transaction_metadata import TransactionMetadata
from .transaction_risk_scoring_result import TransactionRiskScoringResult
from .transaction_state import TransactionState
from .transaction_with_rules_result_destination_payment_details import (
@@ -110,6 +111,7 @@ class TransactionWithRulesResult(UniversalBaseModel):
destination_device_data: typing_extensions.Annotated[
typing.Optional[DeviceData], FieldMetadata(alias="destinationDeviceData")
] = None
+ metadata: typing.Optional[TransactionMetadata] = None
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
Additional information that can be added via tags
From 82e1c53028e0c7062cd6476972aed8f8241d9951 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 4 Dec 2025 11:43:23 +0000
Subject: [PATCH 68/81] Release 1.8.29
---
pyproject.toml | 2 +-
reference.md | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/transactions/client.py | 12 ++++++------
src/flagright/transactions/raw_client.py | 16 ++++++++--------
src/flagright/types/currency_code.py | 9 +++++++++
src/flagright/types/transaction.py | 4 ++--
src/flagright/types/transaction_updatable.py | 4 ++--
.../types/transaction_with_rules_result.py | 4 ++--
9 files changed, 33 insertions(+), 24 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 20cf598..f980f04 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.28"
+version = "1.8.29"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 1877c92..942cb41 100644
--- a/reference.md
+++ b/reference.md
@@ -243,7 +243,7 @@ client.transactions.verify(
-
-**origin_corporate_entity:** `typing.Optional[CorporateEntityDetails]`
+**corporate_entity:** `typing.Optional[CorporateEntityDetails]`
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 65f66a9..281cb0d 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.28",
+ "User-Agent": "flagright/1.8.29",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.28",
+ "X-Fern-SDK-Version": "1.8.29",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index c5690c6..85cb053 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -53,7 +53,7 @@ def verify(
origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = OMIT,
destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = OMIT,
origin_funds_info: typing.Optional[OriginFundsInfo] = OMIT,
- origin_corporate_entity: typing.Optional[CorporateEntityDetails] = OMIT,
+ corporate_entity: typing.Optional[CorporateEntityDetails] = OMIT,
related_transaction_ids: typing.Optional[typing.Sequence[str]] = OMIT,
product_type: typing.Optional[str] = OMIT,
promotion_code_used: typing.Optional[bool] = OMIT,
@@ -126,7 +126,7 @@ def verify(
origin_funds_info : typing.Optional[OriginFundsInfo]
- origin_corporate_entity : typing.Optional[CorporateEntityDetails]
+ corporate_entity : typing.Optional[CorporateEntityDetails]
related_transaction_ids : typing.Optional[typing.Sequence[str]]
IDs of transactions related to this transaction. Ex: refund, split bills
@@ -258,7 +258,7 @@ def verify(
origin_payment_details=origin_payment_details,
destination_payment_details=destination_payment_details,
origin_funds_info=origin_funds_info,
- origin_corporate_entity=origin_corporate_entity,
+ corporate_entity=corporate_entity,
related_transaction_ids=related_transaction_ids,
product_type=product_type,
promotion_code_used=promotion_code_used,
@@ -343,7 +343,7 @@ async def verify(
origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = OMIT,
destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = OMIT,
origin_funds_info: typing.Optional[OriginFundsInfo] = OMIT,
- origin_corporate_entity: typing.Optional[CorporateEntityDetails] = OMIT,
+ corporate_entity: typing.Optional[CorporateEntityDetails] = OMIT,
related_transaction_ids: typing.Optional[typing.Sequence[str]] = OMIT,
product_type: typing.Optional[str] = OMIT,
promotion_code_used: typing.Optional[bool] = OMIT,
@@ -416,7 +416,7 @@ async def verify(
origin_funds_info : typing.Optional[OriginFundsInfo]
- origin_corporate_entity : typing.Optional[CorporateEntityDetails]
+ corporate_entity : typing.Optional[CorporateEntityDetails]
related_transaction_ids : typing.Optional[typing.Sequence[str]]
IDs of transactions related to this transaction. Ex: refund, split bills
@@ -556,7 +556,7 @@ async def main() -> None:
origin_payment_details=origin_payment_details,
destination_payment_details=destination_payment_details,
origin_funds_info=origin_funds_info,
- origin_corporate_entity=origin_corporate_entity,
+ corporate_entity=corporate_entity,
related_transaction_ids=related_transaction_ids,
product_type=product_type,
promotion_code_used=promotion_code_used,
diff --git a/src/flagright/transactions/raw_client.py b/src/flagright/transactions/raw_client.py
index 84bbd5b..1d4ac98 100644
--- a/src/flagright/transactions/raw_client.py
+++ b/src/flagright/transactions/raw_client.py
@@ -51,7 +51,7 @@ def verify(
origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = OMIT,
destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = OMIT,
origin_funds_info: typing.Optional[OriginFundsInfo] = OMIT,
- origin_corporate_entity: typing.Optional[CorporateEntityDetails] = OMIT,
+ corporate_entity: typing.Optional[CorporateEntityDetails] = OMIT,
related_transaction_ids: typing.Optional[typing.Sequence[str]] = OMIT,
product_type: typing.Optional[str] = OMIT,
promotion_code_used: typing.Optional[bool] = OMIT,
@@ -124,7 +124,7 @@ def verify(
origin_funds_info : typing.Optional[OriginFundsInfo]
- origin_corporate_entity : typing.Optional[CorporateEntityDetails]
+ corporate_entity : typing.Optional[CorporateEntityDetails]
related_transaction_ids : typing.Optional[typing.Sequence[str]]
IDs of transactions related to this transaction. Ex: refund, split bills
@@ -193,8 +193,8 @@ def verify(
"originFundsInfo": convert_and_respect_annotation_metadata(
object_=origin_funds_info, annotation=OriginFundsInfo, direction="write"
),
- "originCorporateEntity": convert_and_respect_annotation_metadata(
- object_=origin_corporate_entity, annotation=CorporateEntityDetails, direction="write"
+ "corporateEntity": convert_and_respect_annotation_metadata(
+ object_=corporate_entity, annotation=CorporateEntityDetails, direction="write"
),
"relatedTransactionIds": related_transaction_ids,
"productType": product_type,
@@ -367,7 +367,7 @@ async def verify(
origin_payment_details: typing.Optional[TransactionOriginPaymentDetails] = OMIT,
destination_payment_details: typing.Optional[TransactionDestinationPaymentDetails] = OMIT,
origin_funds_info: typing.Optional[OriginFundsInfo] = OMIT,
- origin_corporate_entity: typing.Optional[CorporateEntityDetails] = OMIT,
+ corporate_entity: typing.Optional[CorporateEntityDetails] = OMIT,
related_transaction_ids: typing.Optional[typing.Sequence[str]] = OMIT,
product_type: typing.Optional[str] = OMIT,
promotion_code_used: typing.Optional[bool] = OMIT,
@@ -440,7 +440,7 @@ async def verify(
origin_funds_info : typing.Optional[OriginFundsInfo]
- origin_corporate_entity : typing.Optional[CorporateEntityDetails]
+ corporate_entity : typing.Optional[CorporateEntityDetails]
related_transaction_ids : typing.Optional[typing.Sequence[str]]
IDs of transactions related to this transaction. Ex: refund, split bills
@@ -509,8 +509,8 @@ async def verify(
"originFundsInfo": convert_and_respect_annotation_metadata(
object_=origin_funds_info, annotation=OriginFundsInfo, direction="write"
),
- "originCorporateEntity": convert_and_respect_annotation_metadata(
- object_=origin_corporate_entity, annotation=CorporateEntityDetails, direction="write"
+ "corporateEntity": convert_and_respect_annotation_metadata(
+ object_=corporate_entity, annotation=CorporateEntityDetails, direction="write"
),
"relatedTransactionIds": related_transaction_ids,
"productType": product_type,
diff --git a/src/flagright/types/currency_code.py b/src/flagright/types/currency_code.py
index dc79788..9a6115d 100644
--- a/src/flagright/types/currency_code.py
+++ b/src/flagright/types/currency_code.py
@@ -288,6 +288,8 @@
"MWK",
"MXC",
"MXN",
+ "MXNB",
+ "MXND",
"MYR",
"MZN",
"NAD",
@@ -358,6 +360,7 @@
"RGT",
"RLC",
"RLY",
+ "RLUSD",
"RNDR",
"RON",
"ROSE",
@@ -403,6 +406,7 @@
"SYLO",
"SYN",
"SYP",
+ "SYRUPUSDC",
"SZL",
"T",
"THB",
@@ -433,8 +437,13 @@
"UNI",
"UPI",
"USD",
+ "USDG",
+ "USDAI",
+ "USDE",
+ "USDH",
"USDC",
"USDT",
+ "USYC",
"UST",
"UYU",
"UZS",
diff --git a/src/flagright/types/transaction.py b/src/flagright/types/transaction.py
index 0478d00..ae23114 100644
--- a/src/flagright/types/transaction.py
+++ b/src/flagright/types/transaction.py
@@ -69,8 +69,8 @@ class Transaction(UniversalBaseModel):
origin_funds_info: typing_extensions.Annotated[
typing.Optional[OriginFundsInfo], FieldMetadata(alias="originFundsInfo")
] = None
- origin_corporate_entity: typing_extensions.Annotated[
- typing.Optional[CorporateEntityDetails], FieldMetadata(alias="originCorporateEntity")
+ corporate_entity: typing_extensions.Annotated[
+ typing.Optional[CorporateEntityDetails], FieldMetadata(alias="corporateEntity")
] = None
related_transaction_ids: typing_extensions.Annotated[
typing.Optional[typing.List[str]], FieldMetadata(alias="relatedTransactionIds")
diff --git a/src/flagright/types/transaction_updatable.py b/src/flagright/types/transaction_updatable.py
index 38a9375..8efb136 100644
--- a/src/flagright/types/transaction_updatable.py
+++ b/src/flagright/types/transaction_updatable.py
@@ -40,8 +40,8 @@ class TransactionUpdatable(UniversalBaseModel):
origin_funds_info: typing_extensions.Annotated[
typing.Optional[OriginFundsInfo], FieldMetadata(alias="originFundsInfo")
] = None
- origin_corporate_entity: typing_extensions.Annotated[
- typing.Optional[CorporateEntityDetails], FieldMetadata(alias="originCorporateEntity")
+ corporate_entity: typing_extensions.Annotated[
+ typing.Optional[CorporateEntityDetails], FieldMetadata(alias="corporateEntity")
] = None
related_transaction_ids: typing_extensions.Annotated[
typing.Optional[typing.List[str]], FieldMetadata(alias="relatedTransactionIds")
diff --git a/src/flagright/types/transaction_with_rules_result.py b/src/flagright/types/transaction_with_rules_result.py
index e2781df..52d1456 100644
--- a/src/flagright/types/transaction_with_rules_result.py
+++ b/src/flagright/types/transaction_with_rules_result.py
@@ -76,8 +76,8 @@ class TransactionWithRulesResult(UniversalBaseModel):
origin_funds_info: typing_extensions.Annotated[
typing.Optional[OriginFundsInfo], FieldMetadata(alias="originFundsInfo")
] = None
- origin_corporate_entity: typing_extensions.Annotated[
- typing.Optional[CorporateEntityDetails], FieldMetadata(alias="originCorporateEntity")
+ corporate_entity: typing_extensions.Annotated[
+ typing.Optional[CorporateEntityDetails], FieldMetadata(alias="corporateEntity")
] = None
related_transaction_ids: typing_extensions.Annotated[
typing.Optional[typing.List[str]], FieldMetadata(alias="relatedTransactionIds")
From 6a293d6d37a6567f2499edb31be6944989551a25 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 8 Dec 2025 09:23:24 +0000
Subject: [PATCH 69/81] Release 1.8.30
---
pyproject.toml | 2 +-
reference.md | 8 +++
src/flagright/__init__.py | 9 +++
src/flagright/business_users/client.py | 10 ++++
src/flagright/business_users/raw_client.py | 14 +++++
src/flagright/core/client_wrapper.py | 4 +-
src/flagright/types/__init__.py | 9 +++
.../batch_business_user_with_rules_result.py | 7 +++
src/flagright/types/block_chain_entity.py | 32 ++++++++++
.../types/blockchain_counterparty.py | 6 ++
src/flagright/types/blockchain_risk.py | 11 ++++
.../types/blockchain_risk_category.py | 59 +++++++++++++++++++
src/flagright/types/blockchain_risk_detail.py | 54 ++++-------------
.../types/blockchain_risk_exposure.py | 44 ++++++++++++++
.../types/blockchain_risk_subject.py | 6 ++
src/flagright/types/business.py | 7 +++
src/flagright/types/business_optional.py | 7 +++
.../types/business_with_rules_result.py | 7 +++
.../types/transaction_risk_scoring_result.py | 6 +-
19 files changed, 253 insertions(+), 49 deletions(-)
create mode 100644 src/flagright/types/block_chain_entity.py
create mode 100644 src/flagright/types/blockchain_risk_category.py
create mode 100644 src/flagright/types/blockchain_risk_exposure.py
diff --git a/pyproject.toml b/pyproject.toml
index f980f04..e9b25bb 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.29"
+version = "1.8.30"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 942cb41..807534b 100644
--- a/reference.md
+++ b/reference.md
@@ -1923,6 +1923,14 @@ client.business_users.create(
-
+**business_partners:** `typing.Optional[typing.Sequence[LegalEntity]]` — Business partners of the company
+
+
+
+
+
+-
+
**transaction_limits:** `typing.Optional[TransactionLimits]`
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index faa6ff1..c51ad91 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -57,9 +57,12 @@
BatchTransactionMonitoringResult,
BatchTransactionMonitoringResults,
BatchUserRulesResult,
+ BlockChainEntity,
BlockchainCounterparty,
BlockchainRisk,
+ BlockchainRiskCategory,
BlockchainRiskDetail,
+ BlockchainRiskExposure,
BlockchainRiskSubject,
BlockchainRiskSubjectDirection,
BlockchainRiskSubjectType,
@@ -439,9 +442,12 @@
"BatchTransactionMonitoringResult": ".types",
"BatchTransactionMonitoringResults": ".types",
"BatchUserRulesResult": ".types",
+ "BlockChainEntity": ".types",
"BlockchainCounterparty": ".types",
"BlockchainRisk": ".types",
+ "BlockchainRiskCategory": ".types",
"BlockchainRiskDetail": ".types",
+ "BlockchainRiskExposure": ".types",
"BlockchainRiskSubject": ".types",
"BlockchainRiskSubjectDirection": ".types",
"BlockchainRiskSubjectType": ".types",
@@ -845,9 +851,12 @@ def __dir__():
"BatchTransactionMonitoringResult",
"BatchTransactionMonitoringResults",
"BatchUserRulesResult",
+ "BlockChainEntity",
"BlockchainCounterparty",
"BlockchainRisk",
+ "BlockchainRiskCategory",
"BlockchainRiskDetail",
+ "BlockchainRiskExposure",
"BlockchainRiskSubject",
"BlockchainRiskSubjectDirection",
"BlockchainRiskSubjectType",
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index 3b68a5e..504ff10 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -61,6 +61,7 @@ def create(
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
@@ -132,6 +133,9 @@ def create(
directors : typing.Optional[typing.Sequence[Person]]
Director(s) of the company. Must be at least one
+ business_partners : typing.Optional[typing.Sequence[LegalEntity]]
+ Business partners of the company
+
transaction_limits : typing.Optional[TransactionLimits]
risk_level : typing.Optional[RiskLevel]
@@ -217,6 +221,7 @@ def create(
corporate_entities=corporate_entities,
share_holders=share_holders,
directors=directors,
+ business_partners=business_partners,
transaction_limits=transaction_limits,
risk_level=risk_level,
kyc_risk_level=kyc_risk_level,
@@ -305,6 +310,7 @@ async def create(
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
@@ -376,6 +382,9 @@ async def create(
directors : typing.Optional[typing.Sequence[Person]]
Director(s) of the company. Must be at least one
+ business_partners : typing.Optional[typing.Sequence[LegalEntity]]
+ Business partners of the company
+
transaction_limits : typing.Optional[TransactionLimits]
risk_level : typing.Optional[RiskLevel]
@@ -469,6 +478,7 @@ async def main() -> None:
corporate_entities=corporate_entities,
share_holders=share_holders,
directors=directors,
+ business_partners=business_partners,
transaction_limits=transaction_limits,
risk_level=risk_level,
kyc_risk_level=kyc_risk_level,
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index 10ee3eb..2f65679 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -59,6 +59,7 @@ def create(
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
@@ -130,6 +131,9 @@ def create(
directors : typing.Optional[typing.Sequence[Person]]
Director(s) of the company. Must be at least one
+ business_partners : typing.Optional[typing.Sequence[LegalEntity]]
+ Business partners of the company
+
transaction_limits : typing.Optional[TransactionLimits]
risk_level : typing.Optional[RiskLevel]
@@ -210,6 +214,9 @@ def create(
"directors": convert_and_respect_annotation_metadata(
object_=directors, annotation=typing.Sequence[Person], direction="write"
),
+ "businessPartners": convert_and_respect_annotation_metadata(
+ object_=business_partners, annotation=typing.Sequence[LegalEntity], direction="write"
+ ),
"transactionLimits": convert_and_respect_annotation_metadata(
object_=transaction_limits, annotation=TransactionLimits, direction="write"
),
@@ -399,6 +406,7 @@ async def create(
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
@@ -470,6 +478,9 @@ async def create(
directors : typing.Optional[typing.Sequence[Person]]
Director(s) of the company. Must be at least one
+ business_partners : typing.Optional[typing.Sequence[LegalEntity]]
+ Business partners of the company
+
transaction_limits : typing.Optional[TransactionLimits]
risk_level : typing.Optional[RiskLevel]
@@ -550,6 +561,9 @@ async def create(
"directors": convert_and_respect_annotation_metadata(
object_=directors, annotation=typing.Sequence[Person], direction="write"
),
+ "businessPartners": convert_and_respect_annotation_metadata(
+ object_=business_partners, annotation=typing.Sequence[LegalEntity], direction="write"
+ ),
"transactionLimits": convert_and_respect_annotation_metadata(
object_=transaction_limits, annotation=TransactionLimits, direction="write"
),
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 281cb0d..3111575 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.29",
+ "User-Agent": "flagright/1.8.30",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.29",
+ "X-Fern-SDK-Version": "1.8.30",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index e05a1e5..219d3de 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -62,9 +62,12 @@
from .batch_transaction_monitoring_result import BatchTransactionMonitoringResult
from .batch_transaction_monitoring_results import BatchTransactionMonitoringResults
from .batch_user_rules_result import BatchUserRulesResult
+ from .block_chain_entity import BlockChainEntity
from .blockchain_counterparty import BlockchainCounterparty
from .blockchain_risk import BlockchainRisk
+ from .blockchain_risk_category import BlockchainRiskCategory
from .blockchain_risk_detail import BlockchainRiskDetail
+ from .blockchain_risk_exposure import BlockchainRiskExposure
from .blockchain_risk_subject import BlockchainRiskSubject
from .blockchain_risk_subject_direction import BlockchainRiskSubjectDirection
from .blockchain_risk_subject_type import BlockchainRiskSubjectType
@@ -449,9 +452,12 @@
"BatchTransactionMonitoringResult": ".batch_transaction_monitoring_result",
"BatchTransactionMonitoringResults": ".batch_transaction_monitoring_results",
"BatchUserRulesResult": ".batch_user_rules_result",
+ "BlockChainEntity": ".block_chain_entity",
"BlockchainCounterparty": ".blockchain_counterparty",
"BlockchainRisk": ".blockchain_risk",
+ "BlockchainRiskCategory": ".blockchain_risk_category",
"BlockchainRiskDetail": ".blockchain_risk_detail",
+ "BlockchainRiskExposure": ".blockchain_risk_exposure",
"BlockchainRiskSubject": ".blockchain_risk_subject",
"BlockchainRiskSubjectDirection": ".blockchain_risk_subject_direction",
"BlockchainRiskSubjectType": ".blockchain_risk_subject_type",
@@ -836,9 +842,12 @@ def __dir__():
"BatchTransactionMonitoringResult",
"BatchTransactionMonitoringResults",
"BatchUserRulesResult",
+ "BlockChainEntity",
"BlockchainCounterparty",
"BlockchainRisk",
+ "BlockchainRiskCategory",
"BlockchainRiskDetail",
+ "BlockchainRiskExposure",
"BlockchainRiskSubject",
"BlockchainRiskSubjectDirection",
"BlockchainRiskSubjectType",
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index 86905ab..2fda4c1 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -75,6 +75,13 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
Director(s) of the company. Must be at least one
"""
+ business_partners: typing_extensions.Annotated[
+ typing.Optional[typing.List[LegalEntity]], FieldMetadata(alias="businessPartners")
+ ] = pydantic.Field(default=None)
+ """
+ Business partners of the company
+ """
+
transaction_limits: typing_extensions.Annotated[
typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
] = None
diff --git a/src/flagright/types/block_chain_entity.py b/src/flagright/types/block_chain_entity.py
new file mode 100644
index 0000000..e68926f
--- /dev/null
+++ b/src/flagright/types/block_chain_entity.py
@@ -0,0 +1,32 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .tag import Tag
+
+
+class BlockChainEntity(UniversalBaseModel):
+ """
+ Entity of the blockchain risk
+ """
+
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Name of the entity
+ """
+
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/blockchain_counterparty.py b/src/flagright/types/blockchain_counterparty.py
index b83aa2e..d9531b7 100644
--- a/src/flagright/types/blockchain_counterparty.py
+++ b/src/flagright/types/blockchain_counterparty.py
@@ -6,6 +6,7 @@
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
+from .tag import Tag
class BlockchainCounterparty(UniversalBaseModel):
@@ -25,6 +26,11 @@ class BlockchainCounterparty(UniversalBaseModel):
Category identifier for the counterparty
"""
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/blockchain_risk.py b/src/flagright/types/blockchain_risk.py
index aad74ee..3fc9c91 100644
--- a/src/flagright/types/blockchain_risk.py
+++ b/src/flagright/types/blockchain_risk.py
@@ -10,6 +10,7 @@
from .blockchain_risk_detail import BlockchainRiskDetail
from .blockchain_risk_subject import BlockchainRiskSubject
from .risk_level import RiskLevel
+from .tag import Tag
class BlockchainRisk(UniversalBaseModel):
@@ -22,6 +23,11 @@ class BlockchainRisk(UniversalBaseModel):
Risk analysis provider (e.g., chainalysis)
"""
+ timestamp: typing.Optional[float] = pydantic.Field(default=None)
+ """
+ Unix timestamp of when the risk analysis was performed
+ """
+
risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = (
pydantic.Field(default=None)
)
@@ -51,6 +57,11 @@ class BlockchainRisk(UniversalBaseModel):
Detailed risk categories and their analysis
"""
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/blockchain_risk_category.py b/src/flagright/types/blockchain_risk_category.py
new file mode 100644
index 0000000..ba084b8
--- /dev/null
+++ b/src/flagright/types/blockchain_risk_category.py
@@ -0,0 +1,59 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .risk_level import RiskLevel
+from .tag import Tag
+
+
+class BlockchainRiskCategory(UniversalBaseModel):
+ """
+ Category of the blockchain risk
+ """
+
+ id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Unique identifier for the risk category
+ """
+
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Human-readable name of the risk category
+ """
+
+ description: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Description of the risk category
+ """
+
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ risk_score: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="riskScore")] = pydantic.Field(
+ default=None
+ )
+ """
+ Numeric risk score for this category
+ """
+
+ risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = (
+ pydantic.Field(default=None)
+ )
+ """
+ Risk level of this category
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/blockchain_risk_detail.py b/src/flagright/types/blockchain_risk_detail.py
index adf5ed5..f772a34 100644
--- a/src/flagright/types/blockchain_risk_detail.py
+++ b/src/flagright/types/blockchain_risk_detail.py
@@ -6,9 +6,10 @@
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
-from .risk_exposure_type import RiskExposureType
-from .risk_level import RiskLevel
-from .transaction_amount_details import TransactionAmountDetails
+from .block_chain_entity import BlockChainEntity
+from .blockchain_risk_category import BlockchainRiskCategory
+from .blockchain_risk_exposure import BlockchainRiskExposure
+from .tag import Tag
class BlockchainRiskDetail(UniversalBaseModel):
@@ -23,51 +24,16 @@ class BlockchainRiskDetail(UniversalBaseModel):
Optional alert identifier (alerts don't always exist)
"""
- category_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="categoryId")] = pydantic.Field(
- default=None
- )
- """
- Unique identifier for the risk category
- """
-
- category_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="categoryName")] = (
- pydantic.Field(default=None)
- )
- """
- Human-readable name of the risk category
- """
-
- category_risk_level: typing_extensions.Annotated[
- typing.Optional[RiskLevel], FieldMetadata(alias="categoryRiskLevel")
- ] = pydantic.Field(default=None)
- """
- Risk level specific to this category
- """
-
- category_risk_score: typing_extensions.Annotated[
- typing.Optional[float], FieldMetadata(alias="categoryRiskScore")
- ] = pydantic.Field(default=None)
- """
- Numeric risk score for this specific category
- """
-
- exposure_type: typing_extensions.Annotated[
- typing.Optional[RiskExposureType], FieldMetadata(alias="exposureType")
- ] = pydantic.Field(default=None)
- """
- Type of exposure to the risk entity
- """
-
- entity: typing.Optional[str] = pydantic.Field(default=None)
+ category: typing.Optional[BlockchainRiskCategory] = None
+ entity: typing.Optional[BlockChainEntity] = None
+ exposure: typing.Optional[BlockchainRiskExposure] = pydantic.Field(default=None)
"""
- Name of the specific entity that poses the risk
+ Exposure details for this risk category
"""
- exposure_amount: typing_extensions.Annotated[
- typing.Optional[TransactionAmountDetails], FieldMetadata(alias="exposureAmount")
- ] = pydantic.Field(default=None)
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
- Amount of the transaction exposed to this risk
+ Additional information that can be added via tags
"""
if IS_PYDANTIC_V2:
diff --git a/src/flagright/types/blockchain_risk_exposure.py b/src/flagright/types/blockchain_risk_exposure.py
new file mode 100644
index 0000000..8f69939
--- /dev/null
+++ b/src/flagright/types/blockchain_risk_exposure.py
@@ -0,0 +1,44 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .currency_code import CurrencyCode
+from .risk_exposure_type import RiskExposureType
+from .tag import Tag
+
+
+class BlockchainRiskExposure(UniversalBaseModel):
+ """
+ Exposure information for a blockchain risk category
+ """
+
+ amount: typing.Optional[float] = pydantic.Field(default=None)
+ """
+ Amount exposed to this risk (fraction of transaction amount)
+ """
+
+ currency: typing.Optional[CurrencyCode] = None
+ exposure_type: typing_extensions.Annotated[
+ typing.Optional[RiskExposureType], FieldMetadata(alias="exposureType")
+ ] = pydantic.Field(default=None)
+ """
+ Type of exposure (direct or indirect)
+ """
+
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/blockchain_risk_subject.py b/src/flagright/types/blockchain_risk_subject.py
index b1b5a7e..eb01acf 100644
--- a/src/flagright/types/blockchain_risk_subject.py
+++ b/src/flagright/types/blockchain_risk_subject.py
@@ -6,6 +6,7 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .blockchain_risk_subject_direction import BlockchainRiskSubjectDirection
from .blockchain_risk_subject_type import BlockchainRiskSubjectType
+from .tag import Tag
class BlockchainRiskSubject(UniversalBaseModel):
@@ -28,6 +29,11 @@ class BlockchainRiskSubject(UniversalBaseModel):
Direction of the subject in the transaction (maps to origin/destination)
"""
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index 246b692..2aaf471 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -70,6 +70,13 @@ class Business(UniversalBaseModel):
Director(s) of the company. Must be at least one
"""
+ business_partners: typing_extensions.Annotated[
+ typing.Optional[typing.List[LegalEntity]], FieldMetadata(alias="businessPartners")
+ ] = pydantic.Field(default=None)
+ """
+ Business partners of the company
+ """
+
transaction_limits: typing_extensions.Annotated[
typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
] = None
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index b109878..61b8ab7 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -64,6 +64,13 @@ class BusinessOptional(UniversalBaseModel):
Director(s) of the company. Must be at least one
"""
+ business_partners: typing_extensions.Annotated[
+ typing.Optional[typing.List[LegalEntity]], FieldMetadata(alias="businessPartners")
+ ] = pydantic.Field(default=None)
+ """
+ Business partners of the company
+ """
+
transaction_limits: typing_extensions.Annotated[
typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
] = None
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 25d839b..131de46 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -73,6 +73,13 @@ class BusinessWithRulesResult(UniversalBaseModel):
Director(s) of the company. Must be at least one
"""
+ business_partners: typing_extensions.Annotated[
+ typing.Optional[typing.List[LegalEntity]], FieldMetadata(alias="businessPartners")
+ ] = pydantic.Field(default=None)
+ """
+ Business partners of the company
+ """
+
transaction_limits: typing_extensions.Annotated[
typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
] = None
diff --git a/src/flagright/types/transaction_risk_scoring_result.py b/src/flagright/types/transaction_risk_scoring_result.py
index b8e640c..5311ea7 100644
--- a/src/flagright/types/transaction_risk_scoring_result.py
+++ b/src/flagright/types/transaction_risk_scoring_result.py
@@ -10,12 +10,14 @@
class TransactionRiskScoringResult(UniversalBaseModel):
- trs_score: typing_extensions.Annotated[float, FieldMetadata(alias="trsScore")] = pydantic.Field()
+ trs_score: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="trsScore")] = pydantic.Field(
+ default=None
+ )
"""
Transaction risk scoring score
"""
- trs_risk_level: typing_extensions.Annotated[RiskLevel, FieldMetadata(alias="trsRiskLevel")]
+ trs_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="trsRiskLevel")] = None
origin_user_cra_risk_score: typing_extensions.Annotated[
typing.Optional[float], FieldMetadata(alias="originUserCraRiskScore")
] = pydantic.Field(default=None)
From f29937ab745ca5bf24d161126c4bfb6f09ec47d0 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 8 Dec 2025 18:13:16 +0000
Subject: [PATCH 70/81] Release 1.8.31
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/correspondent_bank_details.py | 9 +++++++++
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index e9b25bb..aa37594 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.30"
+version = "1.8.31"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 3111575..d548e67 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.30",
+ "User-Agent": "flagright/1.8.31",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.30",
+ "X-Fern-SDK-Version": "1.8.31",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/correspondent_bank_details.py b/src/flagright/types/correspondent_bank_details.py
index eb5b5a6..6890af6 100644
--- a/src/flagright/types/correspondent_bank_details.py
+++ b/src/flagright/types/correspondent_bank_details.py
@@ -6,6 +6,7 @@
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
+from .address import Address
from .tag import Tag
@@ -21,6 +22,14 @@ class CorrespondentBankDetails(UniversalBaseModel):
Name of the bank
"""
+ bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
+ swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = pydantic.Field(
+ default=None
+ )
+ """
+ SWIFT code of the correspondent bank
+ """
+
tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
"""
Additional information that can be added via tags
From a67a939e447d70fcf5fec7910d95dec708e8f581 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 11 Dec 2025 11:29:28 +0000
Subject: [PATCH 71/81] Release 1.8.32
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index aa37594..64ddb0c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.31"
+version = "1.8.32"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index d548e67..ce97a5d 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.31",
+ "User-Agent": "flagright/1.8.32",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.31",
+ "X-Fern-SDK-Version": "1.8.32",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
From c4d30b9bdcc5521f4c37dd87de30c61f00d1b60c Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Sat, 13 Dec 2025 08:24:23 +0000
Subject: [PATCH 72/81] Release 1.8.33
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/pep_status.py | 1 +
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 64ddb0c..4413aad 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.32"
+version = "1.8.33"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index ce97a5d..9a135b1 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.32",
+ "User-Agent": "flagright/1.8.33",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.32",
+ "X-Fern-SDK-Version": "1.8.33",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/pep_status.py b/src/flagright/types/pep_status.py
index c89f7fa..aa069ab 100644
--- a/src/flagright/types/pep_status.py
+++ b/src/flagright/types/pep_status.py
@@ -14,6 +14,7 @@ class PepStatus(UniversalBaseModel):
is_pep_hit: typing_extensions.Annotated[bool, FieldMetadata(alias="isPepHit")]
pep_country: typing_extensions.Annotated[typing.Optional[CountryCode], FieldMetadata(alias="pepCountry")] = None
pep_rank: typing_extensions.Annotated[typing.Optional[PepRank], FieldMetadata(alias="pepRank")] = None
+ category: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
From 0d5094afbccb45a3b4ab64f807e9286f878a088c Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 23 Dec 2025 09:05:54 +0000
Subject: [PATCH 73/81] Release 1.8.34
---
pyproject.toml | 2 +-
reference.md | 8 +++
src/flagright/__init__.py | 6 ++
src/flagright/business_users/client.py | 8 +++
src/flagright/business_users/raw_client.py | 8 +++
src/flagright/core/client_wrapper.py | 4 +-
src/flagright/types/__init__.py | 6 ++
.../batch_business_user_with_rules_result.py | 1 +
.../types/batch_completed_details.py | 55 +++++++++++++++++++
.../types/batch_completed_details_type.py | 7 +++
src/flagright/types/business.py | 1 +
src/flagright/types/business_optional.py | 1 +
.../types/business_with_rules_result.py | 1 +
src/flagright/types/webhook_event_data.py | 2 +
src/flagright/types/webhook_event_type.py | 1 +
15 files changed, 108 insertions(+), 3 deletions(-)
create mode 100644 src/flagright/types/batch_completed_details.py
create mode 100644 src/flagright/types/batch_completed_details_type.py
diff --git a/pyproject.toml b/pyproject.toml
index 4413aad..814b467 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.33"
+version = "1.8.34"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 807534b..79e46f4 100644
--- a/reference.md
+++ b/reference.md
@@ -1899,6 +1899,14 @@ client.business_users.create(
-
+**eodd_date:** `typing.Optional[float]`
+
+
+
+
+
+-
+
**corporate_entities:** `typing.Optional[typing.Sequence[CorporateEntityDetails]]` — Corporate entities of the user
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index c51ad91..bdb17f6 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -33,6 +33,8 @@
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet,
BatchBusinessUserWithRulesResultShareHoldersItem,
BatchBusinessUsersWithRulesResults,
+ BatchCompletedDetails,
+ BatchCompletedDetailsType,
BatchConsumerUserEventWithRulesResult,
BatchConsumerUserEventsRulesResult,
BatchConsumerUserWithRulesResult,
@@ -418,6 +420,8 @@
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet": ".types",
"BatchBusinessUserWithRulesResultShareHoldersItem": ".types",
"BatchBusinessUsersWithRulesResults": ".types",
+ "BatchCompletedDetails": ".types",
+ "BatchCompletedDetailsType": ".types",
"BatchConsumerUserEventWithRulesResult": ".types",
"BatchConsumerUserEventsRulesResult": ".types",
"BatchConsumerUserWithRulesResult": ".types",
@@ -827,6 +831,8 @@ def __dir__():
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet",
"BatchBusinessUserWithRulesResultShareHoldersItem",
"BatchBusinessUsersWithRulesResults",
+ "BatchCompletedDetails",
+ "BatchCompletedDetailsType",
"BatchConsumerUserEventWithRulesResult",
"BatchConsumerUserEventsRulesResult",
"BatchConsumerUserWithRulesResult",
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index 504ff10..085e5fb 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -58,6 +58,7 @@ def create(
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ eodd_date: typing.Optional[float] = OMIT,
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
@@ -124,6 +125,8 @@ def create(
kyc_status_details : typing.Optional[KycStatusDetails]
+ eodd_date : typing.Optional[float]
+
corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
Corporate entities of the user
@@ -218,6 +221,7 @@ def create(
activated_timestamp=activated_timestamp,
user_state_details=user_state_details,
kyc_status_details=kyc_status_details,
+ eodd_date=eodd_date,
corporate_entities=corporate_entities,
share_holders=share_holders,
directors=directors,
@@ -307,6 +311,7 @@ async def create(
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ eodd_date: typing.Optional[float] = OMIT,
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
@@ -373,6 +378,8 @@ async def create(
kyc_status_details : typing.Optional[KycStatusDetails]
+ eodd_date : typing.Optional[float]
+
corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
Corporate entities of the user
@@ -475,6 +482,7 @@ async def main() -> None:
activated_timestamp=activated_timestamp,
user_state_details=user_state_details,
kyc_status_details=kyc_status_details,
+ eodd_date=eodd_date,
corporate_entities=corporate_entities,
share_holders=share_holders,
directors=directors,
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index 2f65679..8e2cc64 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -56,6 +56,7 @@ def create(
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ eodd_date: typing.Optional[float] = OMIT,
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
@@ -122,6 +123,8 @@ def create(
kyc_status_details : typing.Optional[KycStatusDetails]
+ eodd_date : typing.Optional[float]
+
corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
Corporate entities of the user
@@ -205,6 +208,7 @@ def create(
"kycStatusDetails": convert_and_respect_annotation_metadata(
object_=kyc_status_details, annotation=KycStatusDetails, direction="write"
),
+ "eoddDate": eodd_date,
"corporateEntities": convert_and_respect_annotation_metadata(
object_=corporate_entities, annotation=typing.Sequence[CorporateEntityDetails], direction="write"
),
@@ -403,6 +407,7 @@ async def create(
activated_timestamp: typing.Optional[float] = OMIT,
user_state_details: typing.Optional[UserStateDetails] = OMIT,
kyc_status_details: typing.Optional[KycStatusDetails] = OMIT,
+ eodd_date: typing.Optional[float] = OMIT,
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
@@ -469,6 +474,8 @@ async def create(
kyc_status_details : typing.Optional[KycStatusDetails]
+ eodd_date : typing.Optional[float]
+
corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
Corporate entities of the user
@@ -552,6 +559,7 @@ async def create(
"kycStatusDetails": convert_and_respect_annotation_metadata(
object_=kyc_status_details, annotation=KycStatusDetails, direction="write"
),
+ "eoddDate": eodd_date,
"corporateEntities": convert_and_respect_annotation_metadata(
object_=corporate_entities, annotation=typing.Sequence[CorporateEntityDetails], direction="write"
),
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 9a135b1..f28f5d7 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.33",
+ "User-Agent": "flagright/1.8.34",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.33",
+ "X-Fern-SDK-Version": "1.8.34",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 219d3de..7457f2b 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -36,6 +36,8 @@
BatchBusinessUserWithRulesResultShareHoldersItem,
)
from .batch_business_users_with_rules_results import BatchBusinessUsersWithRulesResults
+ from .batch_completed_details import BatchCompletedDetails
+ from .batch_completed_details_type import BatchCompletedDetailsType
from .batch_consumer_user_event_with_rules_result import BatchConsumerUserEventWithRulesResult
from .batch_consumer_user_events_rules_result import BatchConsumerUserEventsRulesResult
from .batch_consumer_user_with_rules_result import BatchConsumerUserWithRulesResult
@@ -428,6 +430,8 @@
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet": ".batch_business_user_with_rules_result_saved_payment_details_item",
"BatchBusinessUserWithRulesResultShareHoldersItem": ".batch_business_user_with_rules_result_share_holders_item",
"BatchBusinessUsersWithRulesResults": ".batch_business_users_with_rules_results",
+ "BatchCompletedDetails": ".batch_completed_details",
+ "BatchCompletedDetailsType": ".batch_completed_details_type",
"BatchConsumerUserEventWithRulesResult": ".batch_consumer_user_event_with_rules_result",
"BatchConsumerUserEventsRulesResult": ".batch_consumer_user_events_rules_result",
"BatchConsumerUserWithRulesResult": ".batch_consumer_user_with_rules_result",
@@ -818,6 +822,8 @@ def __dir__():
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet",
"BatchBusinessUserWithRulesResultShareHoldersItem",
"BatchBusinessUsersWithRulesResults",
+ "BatchCompletedDetails",
+ "BatchCompletedDetailsType",
"BatchConsumerUserEventWithRulesResult",
"BatchConsumerUserEventsRulesResult",
"BatchConsumerUserWithRulesResult",
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index 2fda4c1..bc444bb 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -55,6 +55,7 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
kyc_status_details: typing_extensions.Annotated[
typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
] = None
+ eodd_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="eoddDate")] = None
corporate_entities: typing_extensions.Annotated[
typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/batch_completed_details.py b/src/flagright/types/batch_completed_details.py
new file mode 100644
index 0000000..acbc90e
--- /dev/null
+++ b/src/flagright/types/batch_completed_details.py
@@ -0,0 +1,55 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .batch_completed_details_type import BatchCompletedDetailsType
+
+
+class BatchCompletedDetails(UniversalBaseModel):
+ """
+ Payload sent when a batch import is fully processed
+ """
+
+ batch_id: typing_extensions.Annotated[str, FieldMetadata(alias="batchId")] = pydantic.Field()
+ """
+ Unique identifier of the batch
+ """
+
+ type: BatchCompletedDetailsType = pydantic.Field()
+ """
+ Type of batch entity
+ """
+
+ total_count: typing_extensions.Annotated[int, FieldMetadata(alias="totalCount")] = pydantic.Field()
+ """
+ Total number of successfully validated records in the batch
+ """
+
+ processed_count: typing_extensions.Annotated[int, FieldMetadata(alias="processedCount")] = pydantic.Field()
+ """
+ Number of records that were processed
+ """
+
+ status: typing.Literal["COMPLETED"] = "COMPLETED"
+ created_at: typing_extensions.Annotated[int, FieldMetadata(alias="createdAt")] = pydantic.Field()
+ """
+ Timestamp when the batch was created (in milliseconds)
+ """
+
+ completed_at: typing_extensions.Annotated[int, FieldMetadata(alias="completedAt")] = pydantic.Field()
+ """
+ Timestamp when the batch was completed (in milliseconds)
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/batch_completed_details_type.py b/src/flagright/types/batch_completed_details_type.py
new file mode 100644
index 0000000..91718e3
--- /dev/null
+++ b/src/flagright/types/batch_completed_details_type.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+BatchCompletedDetailsType = typing.Union[
+ typing.Literal["TRANSACTION_BATCH", "TRANSACTION_EVENT_BATCH", "USER_BATCH", "USER_EVENT_BATCH"], typing.Any
+]
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index 2aaf471..983e4df 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -51,6 +51,7 @@ class Business(UniversalBaseModel):
kyc_status_details: typing_extensions.Annotated[
typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
] = None
+ eodd_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="eoddDate")] = None
corporate_entities: typing_extensions.Annotated[
typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index 61b8ab7..7760702 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -44,6 +44,7 @@ class BusinessOptional(UniversalBaseModel):
kyc_status_details: typing_extensions.Annotated[
typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
] = None
+ eodd_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="eoddDate")] = None
legal_entity: typing_extensions.Annotated[typing.Optional[LegalEntity], FieldMetadata(alias="legalEntity")] = None
corporate_entities: typing_extensions.Annotated[
typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 131de46..e57f1ed 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -54,6 +54,7 @@ class BusinessWithRulesResult(UniversalBaseModel):
kyc_status_details: typing_extensions.Annotated[
typing.Optional[KycStatusDetails], FieldMetadata(alias="kycStatusDetails")
] = None
+ eodd_date: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="eoddDate")] = None
corporate_entities: typing_extensions.Annotated[
typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/webhook_event_data.py b/src/flagright/types/webhook_event_data.py
index a7515cb..b776522 100644
--- a/src/flagright/types/webhook_event_data.py
+++ b/src/flagright/types/webhook_event_data.py
@@ -4,6 +4,7 @@
from .alert_opened_details import AlertOpenedDetails
from .alert_status_details import AlertStatusDetails
+from .batch_completed_details import BatchCompletedDetails
from .case_opened_details import CaseOpenedDetails
from .case_status_details import CaseStatusDetails
from .cra_risk_level_updated_details import CraRiskLevelUpdatedDetails
@@ -22,4 +23,5 @@
KycStatusDetails,
UserTagsUpdate,
CraRiskLevelUpdatedDetails,
+ BatchCompletedDetails,
]
diff --git a/src/flagright/types/webhook_event_type.py b/src/flagright/types/webhook_event_type.py
index dc7f2bd..1a042af 100644
--- a/src/flagright/types/webhook_event_type.py
+++ b/src/flagright/types/webhook_event_type.py
@@ -20,6 +20,7 @@
"ADVERSE_MEDIA_STATUS_UPDATED",
"CASE_ESCALATED",
"ALERT_ESCALATED",
+ "BATCH_COMPLETED",
],
typing.Any,
]
From f06fb5e599ff31886617d6793830e90b147ff16c Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Fri, 26 Dec 2025 08:08:52 +0000
Subject: [PATCH 74/81] Release 1.8.35
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/types/webhook_event_type.py | 2 ++
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 814b467..e81faba 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.34"
+version = "1.8.35"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index f28f5d7..853951d 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.34",
+ "User-Agent": "flagright/1.8.35",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.34",
+ "X-Fern-SDK-Version": "1.8.35",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/webhook_event_type.py b/src/flagright/types/webhook_event_type.py
index 1a042af..bb2b5c4 100644
--- a/src/flagright/types/webhook_event_type.py
+++ b/src/flagright/types/webhook_event_type.py
@@ -21,6 +21,8 @@
"CASE_ESCALATED",
"ALERT_ESCALATED",
"BATCH_COMPLETED",
+ "CASE_INTERIM_STATUS_UPDATE",
+ "ALERT_INTERIM_STATUS_UPDATE",
],
typing.Any,
]
From 96fa27d1ded2f2d198dd15ef1bf4e67bd73a5cd8 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 31 Dec 2025 14:01:35 +0000
Subject: [PATCH 75/81] Release 1.8.36
---
pyproject.toml | 2 +-
reference.md | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
src/flagright/transactions/client.py | 4 ++--
src/flagright/types/legal_entity.py | 10 ++++++++++
5 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index e81faba..839bc7c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.35"
+version = "1.8.36"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 79e46f4..846ae10 100644
--- a/reference.md
+++ b/reference.md
@@ -68,7 +68,7 @@ client.transactions.verify(
origin_user_id="8650a2611d0771cba03310f74bf6",
destination_user_id="9350a2611e0771cba03310f74bf6",
origin_amount_details=TransactionAmountDetails(
- transaction_amount=800.0,
+ transaction_amount=2000.0,
transaction_currency="EUR",
country="DE",
),
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 853951d..58f4b6b 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.35",
+ "User-Agent": "flagright/1.8.36",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.35",
+ "X-Fern-SDK-Version": "1.8.36",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index 85cb053..cac33d3 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -187,7 +187,7 @@ def verify(
origin_user_id="8650a2611d0771cba03310f74bf6",
destination_user_id="9350a2611e0771cba03310f74bf6",
origin_amount_details=TransactionAmountDetails(
- transaction_amount=800.0,
+ transaction_amount=2000.0,
transaction_currency="EUR",
country="DE",
),
@@ -482,7 +482,7 @@ async def main() -> None:
origin_user_id="8650a2611d0771cba03310f74bf6",
destination_user_id="9350a2611e0771cba03310f74bf6",
origin_amount_details=TransactionAmountDetails(
- transaction_amount=800.0,
+ transaction_amount=2000.0,
transaction_currency="EUR",
country="DE",
),
diff --git a/src/flagright/types/legal_entity.py b/src/flagright/types/legal_entity.py
index 418bb5b..c0dd5f5 100644
--- a/src/flagright/types/legal_entity.py
+++ b/src/flagright/types/legal_entity.py
@@ -10,7 +10,9 @@
from .company_general_details import CompanyGeneralDetails
from .company_registration_details import CompanyRegistrationDetails
from .contact_details import ContactDetails
+from .pep_status import PepStatus
from .source_of_funds import SourceOfFunds
+from .tag import Tag
class LegalEntity(UniversalBaseModel):
@@ -36,6 +38,14 @@ class LegalEntity(UniversalBaseModel):
contact_details: typing_extensions.Annotated[
typing.Optional[ContactDetails], FieldMetadata(alias="contactDetails")
] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ pep_status: typing_extensions.Annotated[
+ typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
+ ] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
From e0b76ef0ee3d6d515942f7db74f476ad47a48e44 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 5 Jan 2026 09:30:45 +0000
Subject: [PATCH 76/81] Release 1.8.37
---
poetry.lock | 6 +-
pyproject.toml | 2 +-
reference.md | 8 +++
src/flagright/__init__.py | 18 ++++++
src/flagright/business_users/client.py | 11 ++++
src/flagright/business_users/raw_client.py | 19 ++++++
src/flagright/core/client_wrapper.py | 4 +-
src/flagright/types/__init__.py | 20 +++++++
.../batch_business_user_with_rules_result.py | 11 ++++
...th_rules_result_associated_parties_item.py | 8 +++
src/flagright/types/business.py | 8 +++
.../types/business_associated_parties_item.py | 8 +++
src/flagright/types/business_optional.py | 8 +++
...siness_optional_associated_parties_item.py | 8 +++
.../types/business_with_rules_result.py | 9 +++
...th_rules_result_associated_parties_item.py | 8 +++
src/flagright/types/legal_entity_with_role.py | 54 +++++++++++++++++
src/flagright/types/person_with_role.py | 58 +++++++++++++++++++
.../types/sanctions_details_entity_type.py | 2 +
19 files changed, 264 insertions(+), 6 deletions(-)
create mode 100644 src/flagright/types/batch_business_user_with_rules_result_associated_parties_item.py
create mode 100644 src/flagright/types/business_associated_parties_item.py
create mode 100644 src/flagright/types/business_optional_associated_parties_item.py
create mode 100644 src/flagright/types/business_with_rules_result_associated_parties_item.py
create mode 100644 src/flagright/types/legal_entity_with_role.py
create mode 100644 src/flagright/types/person_with_role.py
diff --git a/poetry.lock b/poetry.lock
index a19d7e2..c5e091a 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"]
[[package]]
name = "certifi"
-version = "2025.11.12"
+version = "2026.1.4"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.7"
files = [
- {file = "certifi-2025.11.12-py3-none-any.whl", hash = "sha256:97de8790030bbd5c2d96b7ec782fc2f7820ef8dba6db909ccf95449f2d062d4b"},
- {file = "certifi-2025.11.12.tar.gz", hash = "sha256:d8ab5478f2ecd78af242878415affce761ca6bc54a22a27e026d7c25357c3316"},
+ {file = "certifi-2026.1.4-py3-none-any.whl", hash = "sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c"},
+ {file = "certifi-2026.1.4.tar.gz", hash = "sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 839bc7c..4627ab3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.36"
+version = "1.8.37"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 846ae10..d3124d0 100644
--- a/reference.md
+++ b/reference.md
@@ -1931,6 +1931,14 @@ client.business_users.create(
-
+**associated_parties:** `typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]]` — Parties associated with the company. Can be another company or an individual
+
+
+
+
+
+-
+
**business_partners:** `typing.Optional[typing.Sequence[LegalEntity]]` — Business partners of the company
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index bdb17f6..91c4b2d 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -19,6 +19,7 @@
BatchBusinessUserEventWithRulesResult,
BatchBusinessUserEventsWithRulesResult,
BatchBusinessUserWithRulesResult,
+ BatchBusinessUserWithRulesResultAssociatedPartiesItem,
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach,
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card,
@@ -70,8 +71,10 @@
BlockchainRiskSubjectType,
BooleanString,
Business,
+ BusinessAssociatedPartiesItem,
BusinessBase,
BusinessOptional,
+ BusinessOptionalAssociatedPartiesItem,
BusinessOptionalSavedPaymentDetailsItem,
BusinessOptionalSavedPaymentDetailsItem_Ach,
BusinessOptionalSavedPaymentDetailsItem_Card,
@@ -103,6 +106,7 @@
BusinessUserMonitoringResult,
BusinessUserSegment,
BusinessWithRulesResult,
+ BusinessWithRulesResultAssociatedPartiesItem,
BusinessWithRulesResultSavedPaymentDetailsItem,
BusinessWithRulesResultSavedPaymentDetailsItem_Ach,
BusinessWithRulesResultSavedPaymentDetailsItem_Card,
@@ -172,6 +176,7 @@
KycStatusDetails,
LegalDocument,
LegalEntity,
+ LegalEntityWithRole,
ListData,
ListExisted,
ListHeader,
@@ -199,6 +204,7 @@
PepStatus,
Person,
PersonAttachment,
+ PersonWithRole,
PlaceOfBirth,
PosDetails,
PosEntryMode,
@@ -406,6 +412,7 @@
"BatchBusinessUserEventWithRulesResult": ".types",
"BatchBusinessUserEventsWithRulesResult": ".types",
"BatchBusinessUserWithRulesResult": ".types",
+ "BatchBusinessUserWithRulesResultAssociatedPartiesItem": ".types",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem": ".types",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach": ".types",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card": ".types",
@@ -457,8 +464,10 @@
"BlockchainRiskSubjectType": ".types",
"BooleanString": ".types",
"Business": ".types",
+ "BusinessAssociatedPartiesItem": ".types",
"BusinessBase": ".types",
"BusinessOptional": ".types",
+ "BusinessOptionalAssociatedPartiesItem": ".types",
"BusinessOptionalSavedPaymentDetailsItem": ".types",
"BusinessOptionalSavedPaymentDetailsItem_Ach": ".types",
"BusinessOptionalSavedPaymentDetailsItem_Card": ".types",
@@ -491,6 +500,7 @@
"BusinessUserSegment": ".types",
"BusinessUsersCreateResponse": ".business_users",
"BusinessWithRulesResult": ".types",
+ "BusinessWithRulesResultAssociatedPartiesItem": ".types",
"BusinessWithRulesResultSavedPaymentDetailsItem": ".types",
"BusinessWithRulesResultSavedPaymentDetailsItem_Ach": ".types",
"BusinessWithRulesResultSavedPaymentDetailsItem_Card": ".types",
@@ -564,6 +574,7 @@
"KycStatusDetails": ".types",
"LegalDocument": ".types",
"LegalEntity": ".types",
+ "LegalEntityWithRole": ".types",
"ListData": ".types",
"ListExisted": ".types",
"ListHeader": ".types",
@@ -592,6 +603,7 @@
"PepStatus": ".types",
"Person": ".types",
"PersonAttachment": ".types",
+ "PersonWithRole": ".types",
"PlaceOfBirth": ".types",
"PosDetails": ".types",
"PosEntryMode": ".types",
@@ -817,6 +829,7 @@ def __dir__():
"BatchBusinessUserEventWithRulesResult",
"BatchBusinessUserEventsWithRulesResult",
"BatchBusinessUserWithRulesResult",
+ "BatchBusinessUserWithRulesResultAssociatedPartiesItem",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card",
@@ -868,8 +881,10 @@ def __dir__():
"BlockchainRiskSubjectType",
"BooleanString",
"Business",
+ "BusinessAssociatedPartiesItem",
"BusinessBase",
"BusinessOptional",
+ "BusinessOptionalAssociatedPartiesItem",
"BusinessOptionalSavedPaymentDetailsItem",
"BusinessOptionalSavedPaymentDetailsItem_Ach",
"BusinessOptionalSavedPaymentDetailsItem_Card",
@@ -902,6 +917,7 @@ def __dir__():
"BusinessUserSegment",
"BusinessUsersCreateResponse",
"BusinessWithRulesResult",
+ "BusinessWithRulesResultAssociatedPartiesItem",
"BusinessWithRulesResultSavedPaymentDetailsItem",
"BusinessWithRulesResultSavedPaymentDetailsItem_Ach",
"BusinessWithRulesResultSavedPaymentDetailsItem_Card",
@@ -975,6 +991,7 @@ def __dir__():
"KycStatusDetails",
"LegalDocument",
"LegalEntity",
+ "LegalEntityWithRole",
"ListData",
"ListExisted",
"ListHeader",
@@ -1003,6 +1020,7 @@ def __dir__():
"PepStatus",
"Person",
"PersonAttachment",
+ "PersonWithRole",
"PlaceOfBirth",
"PosDetails",
"PosEntryMode",
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index 085e5fb..df4b4d2 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -6,6 +6,7 @@
from ..core.request_options import RequestOptions
from ..types.acquisition_channel import AcquisitionChannel
from ..types.boolean_string import BooleanString
+from ..types.business_associated_parties_item import BusinessAssociatedPartiesItem
from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
from ..types.business_share_holders_item import BusinessShareHoldersItem
from ..types.business_with_rules_result import BusinessWithRulesResult
@@ -62,6 +63,7 @@ def create(
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ associated_parties: typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]] = OMIT,
business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
@@ -136,6 +138,9 @@ def create(
directors : typing.Optional[typing.Sequence[Person]]
Director(s) of the company. Must be at least one
+ associated_parties : typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]]
+ Parties associated with the company. Can be another company or an individual
+
business_partners : typing.Optional[typing.Sequence[LegalEntity]]
Business partners of the company
@@ -225,6 +230,7 @@ def create(
corporate_entities=corporate_entities,
share_holders=share_holders,
directors=directors,
+ associated_parties=associated_parties,
business_partners=business_partners,
transaction_limits=transaction_limits,
risk_level=risk_level,
@@ -315,6 +321,7 @@ async def create(
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ associated_parties: typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]] = OMIT,
business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
@@ -389,6 +396,9 @@ async def create(
directors : typing.Optional[typing.Sequence[Person]]
Director(s) of the company. Must be at least one
+ associated_parties : typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]]
+ Parties associated with the company. Can be another company or an individual
+
business_partners : typing.Optional[typing.Sequence[LegalEntity]]
Business partners of the company
@@ -486,6 +496,7 @@ async def main() -> None:
corporate_entities=corporate_entities,
share_holders=share_holders,
directors=directors,
+ associated_parties=associated_parties,
business_partners=business_partners,
transaction_limits=transaction_limits,
risk_level=risk_level,
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index 8e2cc64..ea06ee5 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -16,6 +16,7 @@
from ..types.acquisition_channel import AcquisitionChannel
from ..types.api_error_response import ApiErrorResponse
from ..types.boolean_string import BooleanString
+from ..types.business_associated_parties_item import BusinessAssociatedPartiesItem
from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
from ..types.business_share_holders_item import BusinessShareHoldersItem
from ..types.business_with_rules_result import BusinessWithRulesResult
@@ -60,6 +61,7 @@ def create(
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ associated_parties: typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]] = OMIT,
business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
@@ -134,6 +136,9 @@ def create(
directors : typing.Optional[typing.Sequence[Person]]
Director(s) of the company. Must be at least one
+ associated_parties : typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]]
+ Parties associated with the company. Can be another company or an individual
+
business_partners : typing.Optional[typing.Sequence[LegalEntity]]
Business partners of the company
@@ -218,6 +223,11 @@ def create(
"directors": convert_and_respect_annotation_metadata(
object_=directors, annotation=typing.Sequence[Person], direction="write"
),
+ "associatedParties": convert_and_respect_annotation_metadata(
+ object_=associated_parties,
+ annotation=typing.Sequence[BusinessAssociatedPartiesItem],
+ direction="write",
+ ),
"businessPartners": convert_and_respect_annotation_metadata(
object_=business_partners, annotation=typing.Sequence[LegalEntity], direction="write"
),
@@ -411,6 +421,7 @@ async def create(
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ associated_parties: typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]] = OMIT,
business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
@@ -485,6 +496,9 @@ async def create(
directors : typing.Optional[typing.Sequence[Person]]
Director(s) of the company. Must be at least one
+ associated_parties : typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]]
+ Parties associated with the company. Can be another company or an individual
+
business_partners : typing.Optional[typing.Sequence[LegalEntity]]
Business partners of the company
@@ -569,6 +583,11 @@ async def create(
"directors": convert_and_respect_annotation_metadata(
object_=directors, annotation=typing.Sequence[Person], direction="write"
),
+ "associatedParties": convert_and_respect_annotation_metadata(
+ object_=associated_parties,
+ annotation=typing.Sequence[BusinessAssociatedPartiesItem],
+ direction="write",
+ ),
"businessPartners": convert_and_respect_annotation_metadata(
object_=business_partners, annotation=typing.Sequence[LegalEntity], direction="write"
),
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 58f4b6b..c608164 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.36",
+ "User-Agent": "flagright/1.8.37",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.36",
+ "X-Fern-SDK-Version": "1.8.37",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 7457f2b..2d2e515 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -18,6 +18,9 @@
from .batch_business_user_event_with_rules_result import BatchBusinessUserEventWithRulesResult
from .batch_business_user_events_with_rules_result import BatchBusinessUserEventsWithRulesResult
from .batch_business_user_with_rules_result import BatchBusinessUserWithRulesResult
+ from .batch_business_user_with_rules_result_associated_parties_item import (
+ BatchBusinessUserWithRulesResultAssociatedPartiesItem,
+ )
from .batch_business_user_with_rules_result_saved_payment_details_item import (
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach,
@@ -75,8 +78,10 @@
from .blockchain_risk_subject_type import BlockchainRiskSubjectType
from .boolean_string import BooleanString
from .business import Business
+ from .business_associated_parties_item import BusinessAssociatedPartiesItem
from .business_base import BusinessBase
from .business_optional import BusinessOptional
+ from .business_optional_associated_parties_item import BusinessOptionalAssociatedPartiesItem
from .business_optional_saved_payment_details_item import (
BusinessOptionalSavedPaymentDetailsItem,
BusinessOptionalSavedPaymentDetailsItem_Ach,
@@ -112,6 +117,7 @@
from .business_user_monitoring_result import BusinessUserMonitoringResult
from .business_user_segment import BusinessUserSegment
from .business_with_rules_result import BusinessWithRulesResult
+ from .business_with_rules_result_associated_parties_item import BusinessWithRulesResultAssociatedPartiesItem
from .business_with_rules_result_saved_payment_details_item import (
BusinessWithRulesResultSavedPaymentDetailsItem,
BusinessWithRulesResultSavedPaymentDetailsItem_Ach,
@@ -183,6 +189,7 @@
from .kyc_status_details import KycStatusDetails
from .legal_document import LegalDocument
from .legal_entity import LegalEntity
+ from .legal_entity_with_role import LegalEntityWithRole
from .list_data import ListData
from .list_existed import ListExisted
from .list_header import ListHeader
@@ -210,6 +217,7 @@
from .pep_status import PepStatus
from .person import Person
from .person_attachment import PersonAttachment
+ from .person_with_role import PersonWithRole
from .place_of_birth import PlaceOfBirth
from .pos_details import PosDetails
from .pos_entry_mode import PosEntryMode
@@ -416,6 +424,7 @@
"BatchBusinessUserEventWithRulesResult": ".batch_business_user_event_with_rules_result",
"BatchBusinessUserEventsWithRulesResult": ".batch_business_user_events_with_rules_result",
"BatchBusinessUserWithRulesResult": ".batch_business_user_with_rules_result",
+ "BatchBusinessUserWithRulesResultAssociatedPartiesItem": ".batch_business_user_with_rules_result_associated_parties_item",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem": ".batch_business_user_with_rules_result_saved_payment_details_item",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach": ".batch_business_user_with_rules_result_saved_payment_details_item",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card": ".batch_business_user_with_rules_result_saved_payment_details_item",
@@ -467,8 +476,10 @@
"BlockchainRiskSubjectType": ".blockchain_risk_subject_type",
"BooleanString": ".boolean_string",
"Business": ".business",
+ "BusinessAssociatedPartiesItem": ".business_associated_parties_item",
"BusinessBase": ".business_base",
"BusinessOptional": ".business_optional",
+ "BusinessOptionalAssociatedPartiesItem": ".business_optional_associated_parties_item",
"BusinessOptionalSavedPaymentDetailsItem": ".business_optional_saved_payment_details_item",
"BusinessOptionalSavedPaymentDetailsItem_Ach": ".business_optional_saved_payment_details_item",
"BusinessOptionalSavedPaymentDetailsItem_Card": ".business_optional_saved_payment_details_item",
@@ -500,6 +511,7 @@
"BusinessUserMonitoringResult": ".business_user_monitoring_result",
"BusinessUserSegment": ".business_user_segment",
"BusinessWithRulesResult": ".business_with_rules_result",
+ "BusinessWithRulesResultAssociatedPartiesItem": ".business_with_rules_result_associated_parties_item",
"BusinessWithRulesResultSavedPaymentDetailsItem": ".business_with_rules_result_saved_payment_details_item",
"BusinessWithRulesResultSavedPaymentDetailsItem_Ach": ".business_with_rules_result_saved_payment_details_item",
"BusinessWithRulesResultSavedPaymentDetailsItem_Card": ".business_with_rules_result_saved_payment_details_item",
@@ -569,6 +581,7 @@
"KycStatusDetails": ".kyc_status_details",
"LegalDocument": ".legal_document",
"LegalEntity": ".legal_entity",
+ "LegalEntityWithRole": ".legal_entity_with_role",
"ListData": ".list_data",
"ListExisted": ".list_existed",
"ListHeader": ".list_header",
@@ -596,6 +609,7 @@
"PepStatus": ".pep_status",
"Person": ".person",
"PersonAttachment": ".person_attachment",
+ "PersonWithRole": ".person_with_role",
"PlaceOfBirth": ".place_of_birth",
"PosDetails": ".pos_details",
"PosEntryMode": ".pos_entry_mode",
@@ -808,6 +822,7 @@ def __dir__():
"BatchBusinessUserEventWithRulesResult",
"BatchBusinessUserEventsWithRulesResult",
"BatchBusinessUserWithRulesResult",
+ "BatchBusinessUserWithRulesResultAssociatedPartiesItem",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card",
@@ -859,8 +874,10 @@ def __dir__():
"BlockchainRiskSubjectType",
"BooleanString",
"Business",
+ "BusinessAssociatedPartiesItem",
"BusinessBase",
"BusinessOptional",
+ "BusinessOptionalAssociatedPartiesItem",
"BusinessOptionalSavedPaymentDetailsItem",
"BusinessOptionalSavedPaymentDetailsItem_Ach",
"BusinessOptionalSavedPaymentDetailsItem_Card",
@@ -892,6 +909,7 @@ def __dir__():
"BusinessUserMonitoringResult",
"BusinessUserSegment",
"BusinessWithRulesResult",
+ "BusinessWithRulesResultAssociatedPartiesItem",
"BusinessWithRulesResultSavedPaymentDetailsItem",
"BusinessWithRulesResultSavedPaymentDetailsItem_Ach",
"BusinessWithRulesResultSavedPaymentDetailsItem_Card",
@@ -961,6 +979,7 @@ def __dir__():
"KycStatusDetails",
"LegalDocument",
"LegalEntity",
+ "LegalEntityWithRole",
"ListData",
"ListExisted",
"ListHeader",
@@ -988,6 +1007,7 @@ def __dir__():
"PepStatus",
"Person",
"PersonAttachment",
+ "PersonWithRole",
"PlaceOfBirth",
"PosDetails",
"PosEntryMode",
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index bc444bb..f4b4a04 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -7,6 +7,9 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .acquisition_channel import AcquisitionChannel
+from .batch_business_user_with_rules_result_associated_parties_item import (
+ BatchBusinessUserWithRulesResultAssociatedPartiesItem,
+)
from .batch_business_user_with_rules_result_saved_payment_details_item import (
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
)
@@ -76,6 +79,14 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
Director(s) of the company. Must be at least one
"""
+ associated_parties: typing_extensions.Annotated[
+ typing.Optional[typing.List[BatchBusinessUserWithRulesResultAssociatedPartiesItem]],
+ FieldMetadata(alias="associatedParties"),
+ ] = pydantic.Field(default=None)
+ """
+ Parties associated with the company. Can be another company or an individual
+ """
+
business_partners: typing_extensions.Annotated[
typing.Optional[typing.List[LegalEntity]], FieldMetadata(alias="businessPartners")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/batch_business_user_with_rules_result_associated_parties_item.py b/src/flagright/types/batch_business_user_with_rules_result_associated_parties_item.py
new file mode 100644
index 0000000..91b161b
--- /dev/null
+++ b/src/flagright/types/batch_business_user_with_rules_result_associated_parties_item.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from .legal_entity_with_role import LegalEntityWithRole
+from .person_with_role import PersonWithRole
+
+BatchBusinessUserWithRulesResultAssociatedPartiesItem = typing.Union[PersonWithRole, LegalEntityWithRole]
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index 983e4df..990d101 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -7,6 +7,7 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .acquisition_channel import AcquisitionChannel
+from .business_associated_parties_item import BusinessAssociatedPartiesItem
from .business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
from .business_share_holders_item import BusinessShareHoldersItem
from .corporate_entity_details import CorporateEntityDetails
@@ -71,6 +72,13 @@ class Business(UniversalBaseModel):
Director(s) of the company. Must be at least one
"""
+ associated_parties: typing_extensions.Annotated[
+ typing.Optional[typing.List[BusinessAssociatedPartiesItem]], FieldMetadata(alias="associatedParties")
+ ] = pydantic.Field(default=None)
+ """
+ Parties associated with the company. Can be another company or an individual
+ """
+
business_partners: typing_extensions.Annotated[
typing.Optional[typing.List[LegalEntity]], FieldMetadata(alias="businessPartners")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/business_associated_parties_item.py b/src/flagright/types/business_associated_parties_item.py
new file mode 100644
index 0000000..f98a1f8
--- /dev/null
+++ b/src/flagright/types/business_associated_parties_item.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from .legal_entity_with_role import LegalEntityWithRole
+from .person_with_role import PersonWithRole
+
+BusinessAssociatedPartiesItem = typing.Union[PersonWithRole, LegalEntityWithRole]
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index 7760702..14d2785 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -7,6 +7,7 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .acquisition_channel import AcquisitionChannel
+from .business_optional_associated_parties_item import BusinessOptionalAssociatedPartiesItem
from .business_optional_saved_payment_details_item import BusinessOptionalSavedPaymentDetailsItem
from .business_optional_share_holders_item import BusinessOptionalShareHoldersItem
from .corporate_entity_details import CorporateEntityDetails
@@ -65,6 +66,13 @@ class BusinessOptional(UniversalBaseModel):
Director(s) of the company. Must be at least one
"""
+ associated_parties: typing_extensions.Annotated[
+ typing.Optional[typing.List[BusinessOptionalAssociatedPartiesItem]], FieldMetadata(alias="associatedParties")
+ ] = pydantic.Field(default=None)
+ """
+ Parties associated with the company. Can be another company or an individual
+ """
+
business_partners: typing_extensions.Annotated[
typing.Optional[typing.List[LegalEntity]], FieldMetadata(alias="businessPartners")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/business_optional_associated_parties_item.py b/src/flagright/types/business_optional_associated_parties_item.py
new file mode 100644
index 0000000..d362b7e
--- /dev/null
+++ b/src/flagright/types/business_optional_associated_parties_item.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from .legal_entity_with_role import LegalEntityWithRole
+from .person_with_role import PersonWithRole
+
+BusinessOptionalAssociatedPartiesItem = typing.Union[PersonWithRole, LegalEntityWithRole]
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index e57f1ed..6134e70 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -7,6 +7,7 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .acquisition_channel import AcquisitionChannel
+from .business_with_rules_result_associated_parties_item import BusinessWithRulesResultAssociatedPartiesItem
from .business_with_rules_result_saved_payment_details_item import BusinessWithRulesResultSavedPaymentDetailsItem
from .business_with_rules_result_share_holders_item import BusinessWithRulesResultShareHoldersItem
from .corporate_entity_details import CorporateEntityDetails
@@ -74,6 +75,14 @@ class BusinessWithRulesResult(UniversalBaseModel):
Director(s) of the company. Must be at least one
"""
+ associated_parties: typing_extensions.Annotated[
+ typing.Optional[typing.List[BusinessWithRulesResultAssociatedPartiesItem]],
+ FieldMetadata(alias="associatedParties"),
+ ] = pydantic.Field(default=None)
+ """
+ Parties associated with the company. Can be another company or an individual
+ """
+
business_partners: typing_extensions.Annotated[
typing.Optional[typing.List[LegalEntity]], FieldMetadata(alias="businessPartners")
] = pydantic.Field(default=None)
diff --git a/src/flagright/types/business_with_rules_result_associated_parties_item.py b/src/flagright/types/business_with_rules_result_associated_parties_item.py
new file mode 100644
index 0000000..c10c12b
--- /dev/null
+++ b/src/flagright/types/business_with_rules_result_associated_parties_item.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from .legal_entity_with_role import LegalEntityWithRole
+from .person_with_role import PersonWithRole
+
+BusinessWithRulesResultAssociatedPartiesItem = typing.Union[PersonWithRole, LegalEntityWithRole]
diff --git a/src/flagright/types/legal_entity_with_role.py b/src/flagright/types/legal_entity_with_role.py
new file mode 100644
index 0000000..ce9e757
--- /dev/null
+++ b/src/flagright/types/legal_entity_with_role.py
@@ -0,0 +1,54 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .company_financial_details import CompanyFinancialDetails
+from .company_general_details import CompanyGeneralDetails
+from .company_registration_details import CompanyRegistrationDetails
+from .contact_details import ContactDetails
+from .pep_status import PepStatus
+from .source_of_funds import SourceOfFunds
+from .tag import Tag
+
+
+class LegalEntityWithRole(UniversalBaseModel):
+ company_general_details: typing_extensions.Annotated[
+ CompanyGeneralDetails, FieldMetadata(alias="companyGeneralDetails")
+ ]
+ company_financial_details: typing_extensions.Annotated[
+ typing.Optional[CompanyFinancialDetails], FieldMetadata(alias="companyFinancialDetails")
+ ] = None
+ company_registration_details: typing_extensions.Annotated[
+ typing.Optional[CompanyRegistrationDetails], FieldMetadata(alias="companyRegistrationDetails")
+ ] = None
+ reason_for_account_opening: typing_extensions.Annotated[
+ typing.Optional[typing.List[str]], FieldMetadata(alias="reasonForAccountOpening")
+ ] = None
+ source_of_funds: typing_extensions.Annotated[
+ typing.Optional[typing.List[SourceOfFunds]], FieldMetadata(alias="sourceOfFunds")
+ ] = None
+ contact_details: typing_extensions.Annotated[
+ typing.Optional[ContactDetails], FieldMetadata(alias="contactDetails")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ pep_status: typing_extensions.Annotated[
+ typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
+ ] = None
+ role: str
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/person_with_role.py b/src/flagright/types/person_with_role.py
new file mode 100644
index 0000000..8b5dbf9
--- /dev/null
+++ b/src/flagright/types/person_with_role.py
@@ -0,0 +1,58 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .contact_details import ContactDetails
+from .legal_document import LegalDocument
+from .pep_status import PepStatus
+from .person_attachment import PersonAttachment
+from .tag import Tag
+from .user_details import UserDetails
+
+
+class PersonWithRole(UniversalBaseModel):
+ user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userId")] = pydantic.Field(
+ default=None
+ )
+ """
+ Unique user ID for the person
+ """
+
+ general_details: typing_extensions.Annotated[UserDetails, FieldMetadata(alias="generalDetails")]
+ legal_documents: typing_extensions.Annotated[
+ typing.Optional[typing.List[LegalDocument]], FieldMetadata(alias="legalDocuments")
+ ] = pydantic.Field(default=None)
+ """
+ User's legal identity documents - See Document Model for details
+ """
+
+ contact_details: typing_extensions.Annotated[
+ typing.Optional[ContactDetails], FieldMetadata(alias="contactDetails")
+ ] = None
+ pep_status: typing_extensions.Annotated[
+ typing.Optional[typing.List[PepStatus]], FieldMetadata(alias="pepStatus")
+ ] = None
+ tags: typing.Optional[typing.List[Tag]] = pydantic.Field(default=None)
+ """
+ Additional information that can be added via tags
+ """
+
+ attachments: typing.Optional[typing.List[PersonAttachment]] = pydantic.Field(default=None)
+ """
+ User's attachments uploaded by business user
+ """
+
+ role: str
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/sanctions_details_entity_type.py b/src/flagright/types/sanctions_details_entity_type.py
index f29a017..780d619 100644
--- a/src/flagright/types/sanctions_details_entity_type.py
+++ b/src/flagright/types/sanctions_details_entity_type.py
@@ -13,6 +13,8 @@
"PAYMENT_BENEFICIARY_NAME",
"BANK_NAME",
"BANK_ACCOUNT_HOLDER_NAME",
+ "BUSINESS_PARTNER",
+ "ASSOCIATED_PARTY",
],
typing.Any,
]
From 9717dd25f3360011fcbc95f9dd65afb1fd768a42 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 21 Jan 2026 17:09:24 +0000
Subject: [PATCH 77/81] Release 1.8.38
---
poetry.lock | 91 +-
pyproject.toml | 2 +-
reference.md | 376 ++++-
src/flagright/__init__.py | 15 +
src/flagright/batch/client.py | 527 ++++++-
src/flagright/batch/raw_client.py | 1249 ++++++++++++++---
src/flagright/business_users/client.py | 10 +-
src/flagright/business_users/raw_client.py | 14 +-
src/flagright/core/client_wrapper.py | 4 +-
.../transaction_events/raw_client.py | 23 +
src/flagright/types/__init__.py | 15 +
src/flagright/types/ach_details.py | 4 +
.../batch_business_user_with_rules_result.py | 6 +-
...s_user_with_rules_result_directors_item.py | 8 +
...rules_result_saved_payment_details_item.py | 34 +
...rules_result_saved_payment_details_item.py | 34 +
src/flagright/types/business.py | 4 +-
.../types/business_directors_item.py | 8 +
src/flagright/types/business_optional.py | 4 +-
.../types/business_optional_directors_item.py | 8 +
...ess_optional_saved_payment_details_item.py | 34 +
.../business_saved_payment_details_item.py | 34 +
.../types/business_with_rules_result.py | 4 +-
...siness_with_rules_result_directors_item.py | 8 +
...rules_result_saved_payment_details_item.py | 34 +
src/flagright/types/card_details.py | 4 +
src/flagright/types/cash_details.py | 4 +
src/flagright/types/check_details.py | 4 +
src/flagright/types/counterparty_type.py | 5 +
src/flagright/types/executed_rules_result.py | 1 +
.../types/generic_bank_account_details.py | 4 +
src/flagright/types/hit_rules_details.py | 1 +
src/flagright/types/iban_details.py | 4 +
src/flagright/types/mpesa_details.py | 4 +
src/flagright/types/npp_details.py | 4 +
.../types/sanctions_details_entity_type.py | 1 +
src/flagright/types/swift_details.py | 4 +
...transaction_destination_payment_details.py | 34 +
.../transaction_origin_payment_details.py | 34 +
...n_updatable_destination_payment_details.py | 34 +
...action_updatable_origin_payment_details.py | 34 +
...ules_result_destination_payment_details.py | 34 +
...ith_rules_result_origin_payment_details.py | 34 +
src/flagright/types/upi_details.py | 4 +
...ser_optional_saved_payment_details_item.py | 34 +
.../types/user_saved_payment_details_item.py | 34 +
...rules_result_saved_payment_details_item.py | 34 +
src/flagright/types/wallet_details.py | 4 +
src/flagright/types/wallet_network.py | 1 +
49 files changed, 2629 insertions(+), 276 deletions(-)
create mode 100644 src/flagright/types/batch_business_user_with_rules_result_directors_item.py
create mode 100644 src/flagright/types/business_directors_item.py
create mode 100644 src/flagright/types/business_optional_directors_item.py
create mode 100644 src/flagright/types/business_with_rules_result_directors_item.py
create mode 100644 src/flagright/types/counterparty_type.py
diff --git a/poetry.lock b/poetry.lock
index c5e091a..69701ad 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -483,53 +483,58 @@ files = [
[[package]]
name = "tomli"
-version = "2.3.0"
+version = "2.4.0"
description = "A lil' TOML parser"
optional = false
python-versions = ">=3.8"
files = [
- {file = "tomli-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:88bd15eb972f3664f5ed4b57c1634a97153b4bac4479dcb6a495f41921eb7f45"},
- {file = "tomli-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:883b1c0d6398a6a9d29b508c331fa56adbcdff647f6ace4dfca0f50e90dfd0ba"},
- {file = "tomli-2.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1381caf13ab9f300e30dd8feadb3de072aeb86f1d34a8569453ff32a7dea4bf"},
- {file = "tomli-2.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0e285d2649b78c0d9027570d4da3425bdb49830a6156121360b3f8511ea3441"},
- {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a154a9ae14bfcf5d8917a59b51ffd5a3ac1fd149b71b47a3a104ca4edcfa845"},
- {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:74bf8464ff93e413514fefd2be591c3b0b23231a77f901db1eb30d6f712fc42c"},
- {file = "tomli-2.3.0-cp311-cp311-win32.whl", hash = "sha256:00b5f5d95bbfc7d12f91ad8c593a1659b6387b43f054104cda404be6bda62456"},
- {file = "tomli-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:4dc4ce8483a5d429ab602f111a93a6ab1ed425eae3122032db7e9acf449451be"},
- {file = "tomli-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7d86942e56ded512a594786a5ba0a5e521d02529b3826e7761a05138341a2ac"},
- {file = "tomli-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:73ee0b47d4dad1c5e996e3cd33b8a76a50167ae5f96a2607cbe8cc773506ab22"},
- {file = "tomli-2.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:792262b94d5d0a466afb5bc63c7daa9d75520110971ee269152083270998316f"},
- {file = "tomli-2.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f195fe57ecceac95a66a75ac24d9d5fbc98ef0962e09b2eddec5d39375aae52"},
- {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e31d432427dcbf4d86958c184b9bfd1e96b5b71f8eb17e6d02531f434fd335b8"},
- {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b0882799624980785240ab732537fcfc372601015c00f7fc367c55308c186f6"},
- {file = "tomli-2.3.0-cp312-cp312-win32.whl", hash = "sha256:ff72b71b5d10d22ecb084d345fc26f42b5143c5533db5e2eaba7d2d335358876"},
- {file = "tomli-2.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:1cb4ed918939151a03f33d4242ccd0aa5f11b3547d0cf30f7c74a408a5b99878"},
- {file = "tomli-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5192f562738228945d7b13d4930baffda67b69425a7f0da96d360b0a3888136b"},
- {file = "tomli-2.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:be71c93a63d738597996be9528f4abe628d1adf5e6eb11607bc8fe1a510b5dae"},
- {file = "tomli-2.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4665508bcbac83a31ff8ab08f424b665200c0e1e645d2bd9ab3d3e557b6185b"},
- {file = "tomli-2.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4021923f97266babc6ccab9f5068642a0095faa0a51a246a6a02fccbb3514eaf"},
- {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4ea38c40145a357d513bffad0ed869f13c1773716cf71ccaa83b0fa0cc4e42f"},
- {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ad805ea85eda330dbad64c7ea7a4556259665bdf9d2672f5dccc740eb9d3ca05"},
- {file = "tomli-2.3.0-cp313-cp313-win32.whl", hash = "sha256:97d5eec30149fd3294270e889b4234023f2c69747e555a27bd708828353ab606"},
- {file = "tomli-2.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:0c95ca56fbe89e065c6ead5b593ee64b84a26fca063b5d71a1122bf26e533999"},
- {file = "tomli-2.3.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:cebc6fe843e0733ee827a282aca4999b596241195f43b4cc371d64fc6639da9e"},
- {file = "tomli-2.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4c2ef0244c75aba9355561272009d934953817c49f47d768070c3c94355c2aa3"},
- {file = "tomli-2.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c22a8bf253bacc0cf11f35ad9808b6cb75ada2631c2d97c971122583b129afbc"},
- {file = "tomli-2.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0eea8cc5c5e9f89c9b90c4896a8deefc74f518db5927d0e0e8d4a80953d774d0"},
- {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b74a0e59ec5d15127acdabd75ea17726ac4c5178ae51b85bfe39c4f8a278e879"},
- {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b5870b50c9db823c595983571d1296a6ff3e1b88f734a4c8f6fc6188397de005"},
- {file = "tomli-2.3.0-cp314-cp314-win32.whl", hash = "sha256:feb0dacc61170ed7ab602d3d972a58f14ee3ee60494292d384649a3dc38ef463"},
- {file = "tomli-2.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:b273fcbd7fc64dc3600c098e39136522650c49bca95df2d11cf3b626422392c8"},
- {file = "tomli-2.3.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:940d56ee0410fa17ee1f12b817b37a4d4e4dc4d27340863cc67236c74f582e77"},
- {file = "tomli-2.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f85209946d1fe94416debbb88d00eb92ce9cd5266775424ff81bc959e001acaf"},
- {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a56212bdcce682e56b0aaf79e869ba5d15a6163f88d5451cbde388d48b13f530"},
- {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c5f3ffd1e098dfc032d4d3af5c0ac64f6d286d98bc148698356847b80fa4de1b"},
- {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e01decd096b1530d97d5d85cb4dff4af2d8347bd35686654a004f8dea20fc67"},
- {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8a35dd0e643bb2610f156cca8db95d213a90015c11fee76c946aa62b7ae7e02f"},
- {file = "tomli-2.3.0-cp314-cp314t-win32.whl", hash = "sha256:a1f7f282fe248311650081faafa5f4732bdbfef5d45fe3f2e702fbc6f2d496e0"},
- {file = "tomli-2.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:70a251f8d4ba2d9ac2542eecf008b3c8a9fc5c3f9f02c56a9d7952612be2fdba"},
- {file = "tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b"},
- {file = "tomli-2.3.0.tar.gz", hash = "sha256:64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549"},
+ {file = "tomli-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b5ef256a3fd497d4973c11bf142e9ed78b150d36f5773f1ca6088c230ffc5867"},
+ {file = "tomli-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5572e41282d5268eb09a697c89a7bee84fae66511f87533a6f88bd2f7b652da9"},
+ {file = "tomli-2.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:551e321c6ba03b55676970b47cb1b73f14a0a4dce6a3e1a9458fd6d921d72e95"},
+ {file = "tomli-2.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e3f639a7a8f10069d0e15408c0b96a2a828cfdec6fca05296ebcdcc28ca7c76"},
+ {file = "tomli-2.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b168f2731796b045128c45982d3a4874057626da0e2ef1fdd722848b741361d"},
+ {file = "tomli-2.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:133e93646ec4300d651839d382d63edff11d8978be23da4cc106f5a18b7d0576"},
+ {file = "tomli-2.4.0-cp311-cp311-win32.whl", hash = "sha256:b6c78bdf37764092d369722d9946cb65b8767bfa4110f902a1b2542d8d173c8a"},
+ {file = "tomli-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:d3d1654e11d724760cdb37a3d7691f0be9db5fbdaef59c9f532aabf87006dbaa"},
+ {file = "tomli-2.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:cae9c19ed12d4e8f3ebf46d1a75090e4c0dc16271c5bce1c833ac168f08fb614"},
+ {file = "tomli-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:920b1de295e72887bafa3ad9f7a792f811847d57ea6b1215154030cf131f16b1"},
+ {file = "tomli-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6d9a4aee98fac3eab4952ad1d73aee87359452d1c086b5ceb43ed02ddb16b8"},
+ {file = "tomli-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36b9d05b51e65b254ea6c2585b59d2c4cb91c8a3d91d0ed0f17591a29aaea54a"},
+ {file = "tomli-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c8a885b370751837c029ef9bc014f27d80840e48bac415f3412e6593bbc18c1"},
+ {file = "tomli-2.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8768715ffc41f0008abe25d808c20c3d990f42b6e2e58305d5da280ae7d1fa3b"},
+ {file = "tomli-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b438885858efd5be02a9a133caf5812b8776ee0c969fea02c45e8e3f296ba51"},
+ {file = "tomli-2.4.0-cp312-cp312-win32.whl", hash = "sha256:0408e3de5ec77cc7f81960c362543cbbd91ef883e3138e81b729fc3eea5b9729"},
+ {file = "tomli-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:685306e2cc7da35be4ee914fd34ab801a6acacb061b6a7abca922aaf9ad368da"},
+ {file = "tomli-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:5aa48d7c2356055feef06a43611fc401a07337d5b006be13a30f6c58f869e3c3"},
+ {file = "tomli-2.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84d081fbc252d1b6a982e1870660e7330fb8f90f676f6e78b052ad4e64714bf0"},
+ {file = "tomli-2.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9a08144fa4cba33db5255f9b74f0b89888622109bd2776148f2597447f92a94e"},
+ {file = "tomli-2.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c73add4bb52a206fd0c0723432db123c0c75c280cbd67174dd9d2db228ebb1b4"},
+ {file = "tomli-2.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fb2945cbe303b1419e2706e711b7113da57b7db31ee378d08712d678a34e51e"},
+ {file = "tomli-2.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bbb1b10aa643d973366dc2cb1ad94f99c1726a02343d43cbc011edbfac579e7c"},
+ {file = "tomli-2.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4cbcb367d44a1f0c2be408758b43e1ffb5308abe0ea222897d6bfc8e8281ef2f"},
+ {file = "tomli-2.4.0-cp313-cp313-win32.whl", hash = "sha256:7d49c66a7d5e56ac959cb6fc583aff0651094ec071ba9ad43df785abc2320d86"},
+ {file = "tomli-2.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:3cf226acb51d8f1c394c1b310e0e0e61fecdd7adcb78d01e294ac297dd2e7f87"},
+ {file = "tomli-2.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:d20b797a5c1ad80c516e41bc1fb0443ddb5006e9aaa7bda2d71978346aeb9132"},
+ {file = "tomli-2.4.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:26ab906a1eb794cd4e103691daa23d95c6919cc2fa9160000ac02370cc9dd3f6"},
+ {file = "tomli-2.4.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:20cedb4ee43278bc4f2fee6cb50daec836959aadaf948db5172e776dd3d993fc"},
+ {file = "tomli-2.4.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:39b0b5d1b6dd03684b3fb276407ebed7090bbec989fa55838c98560c01113b66"},
+ {file = "tomli-2.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a26d7ff68dfdb9f87a016ecfd1e1c2bacbe3108f4e0f8bcd2228ef9a766c787d"},
+ {file = "tomli-2.4.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:20ffd184fb1df76a66e34bd1b36b4a4641bd2b82954befa32fe8163e79f1a702"},
+ {file = "tomli-2.4.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:75c2f8bbddf170e8effc98f5e9084a8751f8174ea6ccf4fca5398436e0320bc8"},
+ {file = "tomli-2.4.0-cp314-cp314-win32.whl", hash = "sha256:31d556d079d72db7c584c0627ff3a24c5d3fb4f730221d3444f3efb1b2514776"},
+ {file = "tomli-2.4.0-cp314-cp314-win_amd64.whl", hash = "sha256:43e685b9b2341681907759cf3a04e14d7104b3580f808cfde1dfdb60ada85475"},
+ {file = "tomli-2.4.0-cp314-cp314-win_arm64.whl", hash = "sha256:3d895d56bd3f82ddd6faaff993c275efc2ff38e52322ea264122d72729dca2b2"},
+ {file = "tomli-2.4.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:5b5807f3999fb66776dbce568cc9a828544244a8eb84b84b9bafc080c99597b9"},
+ {file = "tomli-2.4.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c084ad935abe686bd9c898e62a02a19abfc9760b5a79bc29644463eaf2840cb0"},
+ {file = "tomli-2.4.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f2e3955efea4d1cfbcb87bc321e00dc08d2bcb737fd1d5e398af111d86db5df"},
+ {file = "tomli-2.4.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e0fe8a0b8312acf3a88077a0802565cb09ee34107813bba1c7cd591fa6cfc8d"},
+ {file = "tomli-2.4.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:413540dce94673591859c4c6f794dfeaa845e98bf35d72ed59636f869ef9f86f"},
+ {file = "tomli-2.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0dc56fef0e2c1c470aeac5b6ca8cc7b640bb93e92d9803ddaf9ea03e198f5b0b"},
+ {file = "tomli-2.4.0-cp314-cp314t-win32.whl", hash = "sha256:d878f2a6707cc9d53a1be1414bbb419e629c3d6e67f69230217bb663e76b5087"},
+ {file = "tomli-2.4.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2add28aacc7425117ff6364fe9e06a183bb0251b03f986df0e78e974047571fd"},
+ {file = "tomli-2.4.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2b1e3b80e1d5e52e40e9b924ec43d81570f0e7d09d11081b797bc4692765a3d4"},
+ {file = "tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a"},
+ {file = "tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 4627ab3..50a6a23 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.37"
+version = "1.8.38"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index d3124d0..bb2b138 100644
--- a/reference.md
+++ b/reference.md
@@ -514,7 +514,7 @@ client.batch.verify_transaction(
-client.batch.get(...)
+client.batch.get_transactions(...)
-
@@ -532,7 +532,7 @@ from flagright import Flagright
client = Flagright(
api_key="YOUR_API_KEY",
)
-client.batch.get(
+client.batch.get_transactions(
batch_id="batchId",
page_size=1.1,
page=1.1,
@@ -654,6 +654,80 @@ client.batch.create_transaction_events(
+
+
+
+
+client.batch.get_transaction_events(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.batch.get_transaction_events(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**batch_id:** `str` — Unique Batch Identifier
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[PageSize]` — Page size (default 20)
+
+
+
+
+
+-
+
+**page:** `typing.Optional[Page]` — Page
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -741,6 +815,154 @@ client.batch.create_consumer_users(
+
+
+
+
+client.batch.get_consumer_users(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.batch.get_consumer_users(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**batch_id:** `str` — Unique Batch Identifier
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[PageSize]` — Page size (default 20)
+
+
+
+
+
+-
+
+**page:** `typing.Optional[Page]` — Page
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.batch.get_business_users(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.batch.get_business_users(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**batch_id:** `str` — Unique Batch Identifier
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[PageSize]` — Page size (default 20)
+
+
+
+
+
+-
+
+**page:** `typing.Optional[Page]` — Page
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -835,6 +1057,154 @@ client.batch.create_business_users(
+
+
+
+
+client.batch.get_consumer_user_events(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.batch.get_consumer_user_events(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**batch_id:** `str` — Unique Batch Identifier
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[PageSize]` — Page size (default 20)
+
+
+
+
+
+-
+
+**page:** `typing.Optional[Page]` — Page
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.batch.get_business_user_events(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from flagright import Flagright
+
+client = Flagright(
+ api_key="YOUR_API_KEY",
+)
+client.batch.get_business_user_events(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**batch_id:** `str` — Unique Batch Identifier
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[PageSize]` — Page size (default 20)
+
+
+
+
+
+-
+
+**page:** `typing.Optional[Page]` — Page
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -1923,7 +2293,7 @@ client.business_users.create(
-
-**directors:** `typing.Optional[typing.Sequence[Person]]` — Director(s) of the company. Must be at least one
+**directors:** `typing.Optional[typing.Sequence[BusinessDirectorsItem]]` — Director(s) of the company. Must be at least one
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 91c4b2d..85284e1 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -20,6 +20,7 @@
BatchBusinessUserEventsWithRulesResult,
BatchBusinessUserWithRulesResult,
BatchBusinessUserWithRulesResultAssociatedPartiesItem,
+ BatchBusinessUserWithRulesResultDirectorsItem,
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach,
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card,
@@ -73,8 +74,10 @@
Business,
BusinessAssociatedPartiesItem,
BusinessBase,
+ BusinessDirectorsItem,
BusinessOptional,
BusinessOptionalAssociatedPartiesItem,
+ BusinessOptionalDirectorsItem,
BusinessOptionalSavedPaymentDetailsItem,
BusinessOptionalSavedPaymentDetailsItem_Ach,
BusinessOptionalSavedPaymentDetailsItem_Card,
@@ -107,6 +110,7 @@
BusinessUserSegment,
BusinessWithRulesResult,
BusinessWithRulesResultAssociatedPartiesItem,
+ BusinessWithRulesResultDirectorsItem,
BusinessWithRulesResultSavedPaymentDetailsItem,
BusinessWithRulesResultSavedPaymentDetailsItem_Ach,
BusinessWithRulesResultSavedPaymentDetailsItem_Card,
@@ -150,6 +154,7 @@
ContactDetails,
CorporateEntityDetails,
CorrespondentBankDetails,
+ CounterpartyType,
CountryCode,
CraRiskLevelUpdatedDetails,
CurrencyCode,
@@ -413,6 +418,7 @@
"BatchBusinessUserEventsWithRulesResult": ".types",
"BatchBusinessUserWithRulesResult": ".types",
"BatchBusinessUserWithRulesResultAssociatedPartiesItem": ".types",
+ "BatchBusinessUserWithRulesResultDirectorsItem": ".types",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem": ".types",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach": ".types",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card": ".types",
@@ -466,8 +472,10 @@
"Business": ".types",
"BusinessAssociatedPartiesItem": ".types",
"BusinessBase": ".types",
+ "BusinessDirectorsItem": ".types",
"BusinessOptional": ".types",
"BusinessOptionalAssociatedPartiesItem": ".types",
+ "BusinessOptionalDirectorsItem": ".types",
"BusinessOptionalSavedPaymentDetailsItem": ".types",
"BusinessOptionalSavedPaymentDetailsItem_Ach": ".types",
"BusinessOptionalSavedPaymentDetailsItem_Card": ".types",
@@ -501,6 +509,7 @@
"BusinessUsersCreateResponse": ".business_users",
"BusinessWithRulesResult": ".types",
"BusinessWithRulesResultAssociatedPartiesItem": ".types",
+ "BusinessWithRulesResultDirectorsItem": ".types",
"BusinessWithRulesResultSavedPaymentDetailsItem": ".types",
"BusinessWithRulesResultSavedPaymentDetailsItem_Ach": ".types",
"BusinessWithRulesResultSavedPaymentDetailsItem_Card": ".types",
@@ -546,6 +555,7 @@
"ContactDetails": ".types",
"CorporateEntityDetails": ".types",
"CorrespondentBankDetails": ".types",
+ "CounterpartyType": ".types",
"CountryCode": ".types",
"CraRiskLevelUpdatedDetails": ".types",
"CurrencyCode": ".types",
@@ -830,6 +840,7 @@ def __dir__():
"BatchBusinessUserEventsWithRulesResult",
"BatchBusinessUserWithRulesResult",
"BatchBusinessUserWithRulesResultAssociatedPartiesItem",
+ "BatchBusinessUserWithRulesResultDirectorsItem",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card",
@@ -883,8 +894,10 @@ def __dir__():
"Business",
"BusinessAssociatedPartiesItem",
"BusinessBase",
+ "BusinessDirectorsItem",
"BusinessOptional",
"BusinessOptionalAssociatedPartiesItem",
+ "BusinessOptionalDirectorsItem",
"BusinessOptionalSavedPaymentDetailsItem",
"BusinessOptionalSavedPaymentDetailsItem_Ach",
"BusinessOptionalSavedPaymentDetailsItem_Card",
@@ -918,6 +931,7 @@ def __dir__():
"BusinessUsersCreateResponse",
"BusinessWithRulesResult",
"BusinessWithRulesResultAssociatedPartiesItem",
+ "BusinessWithRulesResultDirectorsItem",
"BusinessWithRulesResultSavedPaymentDetailsItem",
"BusinessWithRulesResultSavedPaymentDetailsItem_Ach",
"BusinessWithRulesResultSavedPaymentDetailsItem_Card",
@@ -963,6 +977,7 @@ def __dir__():
"ContactDetails",
"CorporateEntityDetails",
"CorrespondentBankDetails",
+ "CounterpartyType",
"CountryCode",
"CraRiskLevelUpdatedDetails",
"CurrencyCode",
diff --git a/src/flagright/batch/client.py b/src/flagright/batch/client.py
index 9c622db..bb55fdb 100644
--- a/src/flagright/batch/client.py
+++ b/src/flagright/batch/client.py
@@ -5,7 +5,12 @@
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.batch_business_user_events_with_rules_result import BatchBusinessUserEventsWithRulesResult
+from ..types.batch_business_users_with_rules_results import BatchBusinessUsersWithRulesResults
+from ..types.batch_consumer_user_events_rules_result import BatchConsumerUserEventsRulesResult
+from ..types.batch_consumer_users_with_rules_result import BatchConsumerUsersWithRulesResult
from ..types.batch_response import BatchResponse
+from ..types.batch_transaction_event_monitoring_results import BatchTransactionEventMonitoringResults
+from ..types.batch_transaction_monitoring_results import BatchTransactionMonitoringResults
from ..types.boolean_string import BooleanString
from ..types.business import Business
from ..types.business_user_event import BusinessUserEvent
@@ -94,14 +99,14 @@ def verify_transaction(
)
return _response.data
- def get(
+ def get_transactions(
self,
batch_id: str,
*,
page_size: typing.Optional[PageSize] = None,
page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BatchBusinessUserEventsWithRulesResult:
+ ) -> BatchTransactionMonitoringResults:
"""
Parameters
----------
@@ -119,7 +124,7 @@ def get(
Returns
-------
- BatchBusinessUserEventsWithRulesResult
+ BatchTransactionMonitoringResults
OK
Examples
@@ -129,13 +134,15 @@ def get(
client = Flagright(
api_key="YOUR_API_KEY",
)
- client.batch.get(
+ client.batch.get_transactions(
batch_id="batchId",
page_size=1.1,
page=1.1,
)
"""
- _response = self._raw_client.get(batch_id, page_size=page_size, page=page, request_options=request_options)
+ _response = self._raw_client.get_transactions(
+ batch_id, page_size=page_size, page=page, request_options=request_options
+ )
return _response.data
def create_transaction_events(
@@ -182,6 +189,52 @@ def create_transaction_events(
)
return _response.data
+ def get_transaction_events(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchTransactionEventMonitoringResults:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchTransactionEventMonitoringResults
+ OK
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.get_transaction_events(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+ )
+ """
+ _response = self._raw_client.get_transaction_events(
+ batch_id, page_size=page_size, page=page, request_options=request_options
+ )
+ return _response.data
+
def create_consumer_users(
self,
*,
@@ -239,6 +292,98 @@ def create_consumer_users(
)
return _response.data
+ def get_consumer_users(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchConsumerUsersWithRulesResult:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchConsumerUsersWithRulesResult
+ OK
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.get_consumer_users(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+ )
+ """
+ _response = self._raw_client.get_consumer_users(
+ batch_id, page_size=page_size, page=page, request_options=request_options
+ )
+ return _response.data
+
+ def get_business_users(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchBusinessUsersWithRulesResults:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchBusinessUsersWithRulesResults
+ OK
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.get_business_users(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+ )
+ """
+ _response = self._raw_client.get_business_users(
+ batch_id, page_size=page_size, page=page, request_options=request_options
+ )
+ return _response.data
+
def create_business_users(
self,
*,
@@ -303,6 +448,98 @@ def create_business_users(
)
return _response.data
+ def get_consumer_user_events(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchConsumerUserEventsRulesResult:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchConsumerUserEventsRulesResult
+ OK
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.get_consumer_user_events(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+ )
+ """
+ _response = self._raw_client.get_consumer_user_events(
+ batch_id, page_size=page_size, page=page, request_options=request_options
+ )
+ return _response.data
+
+ def get_business_user_events(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchBusinessUserEventsWithRulesResult:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchBusinessUserEventsWithRulesResult
+ OK
+
+ Examples
+ --------
+ from flagright import Flagright
+
+ client = Flagright(
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.get_business_user_events(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+ )
+ """
+ _response = self._raw_client.get_business_user_events(
+ batch_id, page_size=page_size, page=page, request_options=request_options
+ )
+ return _response.data
+
def create_consumer_user_events(
self,
*,
@@ -499,14 +736,14 @@ async def main() -> None:
)
return _response.data
- async def get(
+ async def get_transactions(
self,
batch_id: str,
*,
page_size: typing.Optional[PageSize] = None,
page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BatchBusinessUserEventsWithRulesResult:
+ ) -> BatchTransactionMonitoringResults:
"""
Parameters
----------
@@ -524,7 +761,7 @@ async def get(
Returns
-------
- BatchBusinessUserEventsWithRulesResult
+ BatchTransactionMonitoringResults
OK
Examples
@@ -539,7 +776,7 @@ async def get(
async def main() -> None:
- await client.batch.get(
+ await client.batch.get_transactions(
batch_id="batchId",
page_size=1.1,
page=1.1,
@@ -548,7 +785,7 @@ async def main() -> None:
asyncio.run(main())
"""
- _response = await self._raw_client.get(
+ _response = await self._raw_client.get_transactions(
batch_id, page_size=page_size, page=page, request_options=request_options
)
return _response.data
@@ -605,6 +842,60 @@ async def main() -> None:
)
return _response.data
+ async def get_transaction_events(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchTransactionEventMonitoringResults:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchTransactionEventMonitoringResults
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.get_transaction_events(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_transaction_events(
+ batch_id, page_size=page_size, page=page, request_options=request_options
+ )
+ return _response.data
+
async def create_consumer_users(
self,
*,
@@ -670,6 +961,114 @@ async def main() -> None:
)
return _response.data
+ async def get_consumer_users(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchConsumerUsersWithRulesResult:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchConsumerUsersWithRulesResult
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.get_consumer_users(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_consumer_users(
+ batch_id, page_size=page_size, page=page, request_options=request_options
+ )
+ return _response.data
+
+ async def get_business_users(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchBusinessUsersWithRulesResults:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchBusinessUsersWithRulesResults
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.get_business_users(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_business_users(
+ batch_id, page_size=page_size, page=page, request_options=request_options
+ )
+ return _response.data
+
async def create_business_users(
self,
*,
@@ -747,6 +1146,114 @@ async def main() -> None:
)
return _response.data
+ async def get_consumer_user_events(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchConsumerUserEventsRulesResult:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchConsumerUserEventsRulesResult
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.get_consumer_user_events(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_consumer_user_events(
+ batch_id, page_size=page_size, page=page, request_options=request_options
+ )
+ return _response.data
+
+ async def get_business_user_events(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchBusinessUserEventsWithRulesResult:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchBusinessUserEventsWithRulesResult
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright
+
+ client = AsyncFlagright(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.get_business_user_events(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_business_user_events(
+ batch_id, page_size=page_size, page=page, request_options=request_options
+ )
+ return _response.data
+
async def create_consumer_user_events(
self,
*,
diff --git a/src/flagright/batch/raw_client.py b/src/flagright/batch/raw_client.py
index 9ed8048..77e9e7c 100644
--- a/src/flagright/batch/raw_client.py
+++ b/src/flagright/batch/raw_client.py
@@ -17,7 +17,12 @@
from ..errors.unauthorized_error import UnauthorizedError
from ..types.api_error_response import ApiErrorResponse
from ..types.batch_business_user_events_with_rules_result import BatchBusinessUserEventsWithRulesResult
+from ..types.batch_business_users_with_rules_results import BatchBusinessUsersWithRulesResults
+from ..types.batch_consumer_user_events_rules_result import BatchConsumerUserEventsRulesResult
+from ..types.batch_consumer_users_with_rules_result import BatchConsumerUsersWithRulesResult
from ..types.batch_response import BatchResponse
+from ..types.batch_transaction_event_monitoring_results import BatchTransactionEventMonitoringResults
+from ..types.batch_transaction_monitoring_results import BatchTransactionMonitoringResults
from ..types.boolean_string import BooleanString
from ..types.business import Business
from ..types.business_user_event import BusinessUserEvent
@@ -133,14 +138,14 @@ def verify_transaction(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def get(
+ def get_transactions(
self,
batch_id: str,
*,
page_size: typing.Optional[PageSize] = None,
page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[BatchBusinessUserEventsWithRulesResult]:
+ ) -> HttpResponse[BatchTransactionMonitoringResults]:
"""
Parameters
----------
@@ -158,11 +163,11 @@ def get(
Returns
-------
- HttpResponse[BatchBusinessUserEventsWithRulesResult]
+ HttpResponse[BatchTransactionMonitoringResults]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"batch/events/business/user/{jsonable_encoder(batch_id)}",
+ f"batch/transactions/{jsonable_encoder(batch_id)}",
method="GET",
params={
"pageSize": page_size,
@@ -173,9 +178,9 @@ def get(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchBusinessUserEventsWithRulesResult,
+ BatchTransactionMonitoringResults,
parse_obj_as(
- type_=BatchBusinessUserEventsWithRulesResult, # type: ignore
+ type_=BatchTransactionMonitoringResults, # type: ignore
object_=_response.json(),
),
)
@@ -314,67 +319,55 @@ def create_transaction_events(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def create_consumer_users(
+ def get_transaction_events(
self,
+ batch_id: str,
*,
- data: typing.Sequence[User],
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- batch_id: typing.Optional[str] = OMIT,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[BatchResponse]:
+ ) -> HttpResponse[BatchTransactionEventMonitoringResults]:
"""
Parameters
----------
- data : typing.Sequence[User]
-
- lock_cra_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the CRA risk level for the user.
+ batch_id : str
+ Unique Batch Identifier
- lock_kyc_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the KYC risk level for the user.
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
- batch_id : typing.Optional[str]
+ page : typing.Optional[Page]
+ Page
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- HttpResponse[BatchResponse]
- Created
+ HttpResponse[BatchTransactionEventMonitoringResults]
+ OK
"""
_response = self._client_wrapper.httpx_client.request(
- "batch/consumer/users",
- method="POST",
+ f"batch/events/transaction/{jsonable_encoder(batch_id)}",
+ method="GET",
params={
- "lockCraRiskLevel": lock_cra_risk_level,
- "lockKycRiskLevel": lock_kyc_risk_level,
- },
- json={
- "batchId": batch_id,
- "data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[User], direction="write"
- ),
- },
- headers={
- "content-type": "application/json",
+ "pageSize": page_size,
+ "page": page,
},
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchResponse,
+ BatchTransactionEventMonitoringResults,
parse_obj_as(
- type_=BatchResponse, # type: ignore
+ type_=BatchTransactionEventMonitoringResults, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
- if _response.status_code == 400:
- raise BadRequestError(
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -384,8 +377,8 @@ def create_consumer_users(
),
),
)
- if _response.status_code == 401:
- raise UnauthorizedError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -411,10 +404,10 @@ def create_consumer_users(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def create_business_users(
+ def create_consumer_users(
self,
*,
- data: typing.Sequence[Business],
+ data: typing.Sequence[User],
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
@@ -423,7 +416,7 @@ def create_business_users(
"""
Parameters
----------
- data : typing.Sequence[Business]
+ data : typing.Sequence[User]
lock_cra_risk_level : typing.Optional[BooleanString]
Boolean string whether Flagright should lock the CRA risk level for the user.
@@ -442,7 +435,7 @@ def create_business_users(
Created
"""
_response = self._client_wrapper.httpx_client.request(
- "batch/business/users",
+ "batch/consumer/users",
method="POST",
params={
"lockCraRiskLevel": lock_cra_risk_level,
@@ -451,7 +444,7 @@ def create_business_users(
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[Business], direction="write"
+ object_=data, annotation=typing.Sequence[User], direction="write"
),
},
headers={
@@ -508,67 +501,55 @@ def create_business_users(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def create_consumer_user_events(
+ def get_consumer_users(
self,
+ batch_id: str,
*,
- data: typing.Sequence[ConsumerUserEvent],
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- batch_id: typing.Optional[str] = OMIT,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[BatchResponse]:
+ ) -> HttpResponse[BatchConsumerUsersWithRulesResult]:
"""
Parameters
----------
- data : typing.Sequence[ConsumerUserEvent]
-
- lock_cra_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the CRA risk level for the user.
+ batch_id : str
+ Unique Batch Identifier
- lock_kyc_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the KYC risk level for the user.
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
- batch_id : typing.Optional[str]
+ page : typing.Optional[Page]
+ Page
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- HttpResponse[BatchResponse]
- Created
+ HttpResponse[BatchConsumerUsersWithRulesResult]
+ OK
"""
_response = self._client_wrapper.httpx_client.request(
- "batch/events/consumer/user",
- method="POST",
+ f"batch/consumer/users/{jsonable_encoder(batch_id)}",
+ method="GET",
params={
- "lockCraRiskLevel": lock_cra_risk_level,
- "lockKycRiskLevel": lock_kyc_risk_level,
- },
- json={
- "batchId": batch_id,
- "data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[ConsumerUserEvent], direction="write"
- ),
- },
- headers={
- "content-type": "application/json",
+ "pageSize": page_size,
+ "page": page,
},
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchResponse,
+ BatchConsumerUsersWithRulesResult,
parse_obj_as(
- type_=BatchResponse, # type: ignore
+ type_=BatchConsumerUsersWithRulesResult, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
- if _response.status_code == 400:
- raise BadRequestError(
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -578,8 +559,8 @@ def create_consumer_user_events(
),
),
)
- if _response.status_code == 401:
- raise UnauthorizedError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -605,67 +586,55 @@ def create_consumer_user_events(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def create_business_user_events(
+ def get_business_users(
self,
+ batch_id: str,
*,
- data: typing.Sequence[BusinessUserEvent],
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- batch_id: typing.Optional[str] = OMIT,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[BatchResponse]:
+ ) -> HttpResponse[BatchBusinessUsersWithRulesResults]:
"""
Parameters
----------
- data : typing.Sequence[BusinessUserEvent]
-
- lock_cra_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the CRA risk level for the user.
+ batch_id : str
+ Unique Batch Identifier
- lock_kyc_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the KYC risk level for the user.
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
- batch_id : typing.Optional[str]
+ page : typing.Optional[Page]
+ Page
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- HttpResponse[BatchResponse]
- Created
+ HttpResponse[BatchBusinessUsersWithRulesResults]
+ OK
"""
_response = self._client_wrapper.httpx_client.request(
- "batch/events/business/user",
- method="POST",
+ f"batch/business/users/{jsonable_encoder(batch_id)}",
+ method="GET",
params={
- "lockCraRiskLevel": lock_cra_risk_level,
- "lockKycRiskLevel": lock_kyc_risk_level,
- },
- json={
- "batchId": batch_id,
- "data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[BusinessUserEvent], direction="write"
- ),
- },
- headers={
- "content-type": "application/json",
+ "pageSize": page_size,
+ "page": page,
},
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchResponse,
+ BatchBusinessUsersWithRulesResults,
parse_obj_as(
- type_=BatchResponse, # type: ignore
+ type_=BatchBusinessUsersWithRulesResults, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
- if _response.status_code == 400:
- raise BadRequestError(
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -675,8 +644,8 @@ def create_business_user_events(
),
),
)
- if _response.status_code == 401:
- raise UnauthorizedError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -702,30 +671,25 @@ def create_business_user_events(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
-class AsyncRawBatchClient:
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- async def verify_transaction(
+ def create_business_users(
self,
*,
- data: typing.Sequence[Transaction],
- validate_origin_user_id: typing.Optional[BooleanString] = None,
- validate_destination_user_id: typing.Optional[BooleanString] = None,
+ data: typing.Sequence[Business],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[BatchResponse]:
+ ) -> HttpResponse[BatchResponse]:
"""
Parameters
----------
- data : typing.Sequence[Transaction]
+ data : typing.Sequence[Business]
- validate_origin_user_id : typing.Optional[BooleanString]
- Boolean string whether Flagright should validate if provided originUserId exist. True by default
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
- validate_destination_user_id : typing.Optional[BooleanString]
- Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
batch_id : typing.Optional[str]
@@ -734,20 +698,20 @@ async def verify_transaction(
Returns
-------
- AsyncHttpResponse[BatchResponse]
+ HttpResponse[BatchResponse]
Created
"""
- _response = await self._client_wrapper.httpx_client.request(
- "batch/transactions",
+ _response = self._client_wrapper.httpx_client.request(
+ "batch/business/users",
method="POST",
params={
- "validateOriginUserId": validate_origin_user_id,
- "validateDestinationUserId": validate_destination_user_id,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
},
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[Transaction], direction="write"
+ object_=data, annotation=typing.Sequence[Business], direction="write"
),
},
headers={
@@ -765,7 +729,7 @@ async def verify_transaction(
object_=_response.json(),
),
)
- return AsyncHttpResponse(response=_response, data=_data)
+ return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -804,14 +768,14 @@ async def verify_transaction(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get(
+ def get_consumer_user_events(
self,
batch_id: str,
*,
page_size: typing.Optional[PageSize] = None,
page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[BatchBusinessUserEventsWithRulesResult]:
+ ) -> HttpResponse[BatchConsumerUserEventsRulesResult]:
"""
Parameters
----------
@@ -829,11 +793,11 @@ async def get(
Returns
-------
- AsyncHttpResponse[BatchBusinessUserEventsWithRulesResult]
+ HttpResponse[BatchConsumerUserEventsRulesResult]
OK
"""
- _response = await self._client_wrapper.httpx_client.request(
- f"batch/events/business/user/{jsonable_encoder(batch_id)}",
+ _response = self._client_wrapper.httpx_client.request(
+ f"batch/events/consumer/user/{jsonable_encoder(batch_id)}",
method="GET",
params={
"pageSize": page_size,
@@ -844,13 +808,13 @@ async def get(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchBusinessUserEventsWithRulesResult,
+ BatchConsumerUserEventsRulesResult,
parse_obj_as(
- type_=BatchBusinessUserEventsWithRulesResult, # type: ignore
+ type_=BatchConsumerUserEventsRulesResult, # type: ignore
object_=_response.json(),
),
)
- return AsyncHttpResponse(response=_response, data=_data)
+ return HttpResponse(response=_response, data=_data)
if _response.status_code == 401:
raise UnauthorizedError(
headers=dict(_response.headers),
@@ -889,55 +853,55 @@ async def get(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def create_transaction_events(
+ def get_business_user_events(
self,
+ batch_id: str,
*,
- data: typing.Sequence[TransactionEvent],
- batch_id: typing.Optional[str] = OMIT,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[BatchResponse]:
+ ) -> HttpResponse[BatchBusinessUserEventsWithRulesResult]:
"""
Parameters
----------
- data : typing.Sequence[TransactionEvent]
+ batch_id : str
+ Unique Batch Identifier
- batch_id : typing.Optional[str]
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[BatchResponse]
- Created
+ HttpResponse[BatchBusinessUserEventsWithRulesResult]
+ OK
"""
- _response = await self._client_wrapper.httpx_client.request(
- "batch/events/transaction",
- method="POST",
- json={
- "batchId": batch_id,
- "data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[TransactionEvent], direction="write"
- ),
- },
- headers={
- "content-type": "application/json",
+ _response = self._client_wrapper.httpx_client.request(
+ f"batch/events/business/user/{jsonable_encoder(batch_id)}",
+ method="GET",
+ params={
+ "pageSize": page_size,
+ "page": page,
},
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchResponse,
+ BatchBusinessUserEventsWithRulesResult,
parse_obj_as(
- type_=BatchResponse, # type: ignore
+ type_=BatchBusinessUserEventsWithRulesResult, # type: ignore
object_=_response.json(),
),
)
- return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 400:
- raise BadRequestError(
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -947,8 +911,8 @@ async def create_transaction_events(
),
),
)
- if _response.status_code == 401:
- raise UnauthorizedError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -958,8 +922,94 @@ async def create_transaction_events(
),
),
)
- if _response.status_code == 409:
- raise ConflictError(
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ def create_consumer_user_events(
+ self,
+ *,
+ data: typing.Sequence[ConsumerUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[ConsumerUserEvent]
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[BatchResponse]
+ Created
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "batch/events/consumer/user",
+ method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[ConsumerUserEvent], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -985,19 +1035,19 @@ async def create_transaction_events(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def create_consumer_users(
+ def create_business_user_events(
self,
*,
- data: typing.Sequence[User],
+ data: typing.Sequence[BusinessUserEvent],
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[BatchResponse]:
+ ) -> HttpResponse[BatchResponse]:
"""
Parameters
----------
- data : typing.Sequence[User]
+ data : typing.Sequence[BusinessUserEvent]
lock_cra_risk_level : typing.Optional[BooleanString]
Boolean string whether Flagright should lock the CRA risk level for the user.
@@ -1012,11 +1062,11 @@ async def create_consumer_users(
Returns
-------
- AsyncHttpResponse[BatchResponse]
+ HttpResponse[BatchResponse]
Created
"""
- _response = await self._client_wrapper.httpx_client.request(
- "batch/consumer/users",
+ _response = self._client_wrapper.httpx_client.request(
+ "batch/events/business/user",
method="POST",
params={
"lockCraRiskLevel": lock_cra_risk_level,
@@ -1025,7 +1075,7 @@ async def create_consumer_users(
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[User], direction="write"
+ object_=data, annotation=typing.Sequence[BusinessUserEvent], direction="write"
),
},
headers={
@@ -1043,7 +1093,7 @@ async def create_consumer_users(
object_=_response.json(),
),
)
- return AsyncHttpResponse(response=_response, data=_data)
+ return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -1082,25 +1132,30 @@ async def create_consumer_users(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def create_business_users(
+
+class AsyncRawBatchClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def verify_transaction(
self,
*,
- data: typing.Sequence[Business],
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ data: typing.Sequence[Transaction],
+ validate_origin_user_id: typing.Optional[BooleanString] = None,
+ validate_destination_user_id: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BatchResponse]:
"""
Parameters
----------
- data : typing.Sequence[Business]
+ data : typing.Sequence[Transaction]
- lock_cra_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the CRA risk level for the user.
+ validate_origin_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided originUserId exist. True by default
- lock_kyc_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the KYC risk level for the user.
+ validate_destination_user_id : typing.Optional[BooleanString]
+ Boolean string whether Flagright should validate if provided destinationUserId exist. True by default
batch_id : typing.Optional[str]
@@ -1113,16 +1168,16 @@ async def create_business_users(
Created
"""
_response = await self._client_wrapper.httpx_client.request(
- "batch/business/users",
+ "batch/transactions",
method="POST",
params={
- "lockCraRiskLevel": lock_cra_risk_level,
- "lockKycRiskLevel": lock_kyc_risk_level,
+ "validateOriginUserId": validate_origin_user_id,
+ "validateDestinationUserId": validate_destination_user_id,
},
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[Business], direction="write"
+ object_=data, annotation=typing.Sequence[Transaction], direction="write"
),
},
headers={
@@ -1179,6 +1234,806 @@ async def create_business_users(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+ async def get_transactions(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchTransactionMonitoringResults]:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchTransactionMonitoringResults]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"batch/transactions/{jsonable_encoder(batch_id)}",
+ method="GET",
+ params={
+ "pageSize": page_size,
+ "page": page,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchTransactionMonitoringResults,
+ parse_obj_as(
+ type_=BatchTransactionMonitoringResults, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def create_transaction_events(
+ self,
+ *,
+ data: typing.Sequence[TransactionEvent],
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[TransactionEvent]
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchResponse]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "batch/events/transaction",
+ method="POST",
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[TransactionEvent], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def get_transaction_events(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchTransactionEventMonitoringResults]:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchTransactionEventMonitoringResults]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"batch/events/transaction/{jsonable_encoder(batch_id)}",
+ method="GET",
+ params={
+ "pageSize": page_size,
+ "page": page,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchTransactionEventMonitoringResults,
+ parse_obj_as(
+ type_=BatchTransactionEventMonitoringResults, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def create_consumer_users(
+ self,
+ *,
+ data: typing.Sequence[User],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[User]
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchResponse]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "batch/consumer/users",
+ method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[User], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def get_consumer_users(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchConsumerUsersWithRulesResult]:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchConsumerUsersWithRulesResult]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"batch/consumer/users/{jsonable_encoder(batch_id)}",
+ method="GET",
+ params={
+ "pageSize": page_size,
+ "page": page,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchConsumerUsersWithRulesResult,
+ parse_obj_as(
+ type_=BatchConsumerUsersWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def get_business_users(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchBusinessUsersWithRulesResults]:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchBusinessUsersWithRulesResults]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"batch/business/users/{jsonable_encoder(batch_id)}",
+ method="GET",
+ params={
+ "pageSize": page_size,
+ "page": page,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchBusinessUsersWithRulesResults,
+ parse_obj_as(
+ type_=BatchBusinessUsersWithRulesResults, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def create_business_users(
+ self,
+ *,
+ data: typing.Sequence[Business],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchResponse]:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[Business]
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchResponse]
+ Created
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "batch/business/users",
+ method="POST",
+ params={
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[Business], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchResponse,
+ parse_obj_as(
+ type_=BatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def get_consumer_user_events(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchConsumerUserEventsRulesResult]:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchConsumerUserEventsRulesResult]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"batch/events/consumer/user/{jsonable_encoder(batch_id)}",
+ method="GET",
+ params={
+ "pageSize": page_size,
+ "page": page,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchConsumerUserEventsRulesResult,
+ parse_obj_as(
+ type_=BatchConsumerUserEventsRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def get_business_user_events(
+ self,
+ batch_id: str,
+ *,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BatchBusinessUserEventsWithRulesResult]:
+ """
+ Parameters
+ ----------
+ batch_id : str
+ Unique Batch Identifier
+
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
+
+ page : typing.Optional[Page]
+ Page
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[BatchBusinessUserEventsWithRulesResult]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"batch/events/business/user/{jsonable_encoder(batch_id)}",
+ method="GET",
+ params={
+ "pageSize": page_size,
+ "page": page,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ BatchBusinessUserEventsWithRulesResult,
+ parse_obj_as(
+ type_=BatchBusinessUserEventsWithRulesResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
async def create_consumer_user_events(
self,
*,
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index df4b4d2..e1af272 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -7,6 +7,7 @@
from ..types.acquisition_channel import AcquisitionChannel
from ..types.boolean_string import BooleanString
from ..types.business_associated_parties_item import BusinessAssociatedPartiesItem
+from ..types.business_directors_item import BusinessDirectorsItem
from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
from ..types.business_share_holders_item import BusinessShareHoldersItem
from ..types.business_with_rules_result import BusinessWithRulesResult
@@ -17,7 +18,6 @@
from ..types.mcc_details import MccDetails
from ..types.payment_method import PaymentMethod
from ..types.pep_status import PepStatus
-from ..types.person import Person
from ..types.person_attachment import PersonAttachment
from ..types.products_enabled import ProductsEnabled
from ..types.risk_level import RiskLevel
@@ -62,7 +62,7 @@ def create(
eodd_date: typing.Optional[float] = OMIT,
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
- directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ directors: typing.Optional[typing.Sequence[BusinessDirectorsItem]] = OMIT,
associated_parties: typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]] = OMIT,
business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
@@ -135,7 +135,7 @@ def create(
share_holders : typing.Optional[typing.Sequence[BusinessShareHoldersItem]]
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
- directors : typing.Optional[typing.Sequence[Person]]
+ directors : typing.Optional[typing.Sequence[BusinessDirectorsItem]]
Director(s) of the company. Must be at least one
associated_parties : typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]]
@@ -320,7 +320,7 @@ async def create(
eodd_date: typing.Optional[float] = OMIT,
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
- directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ directors: typing.Optional[typing.Sequence[BusinessDirectorsItem]] = OMIT,
associated_parties: typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]] = OMIT,
business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
@@ -393,7 +393,7 @@ async def create(
share_holders : typing.Optional[typing.Sequence[BusinessShareHoldersItem]]
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
- directors : typing.Optional[typing.Sequence[Person]]
+ directors : typing.Optional[typing.Sequence[BusinessDirectorsItem]]
Director(s) of the company. Must be at least one
associated_parties : typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]]
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index ea06ee5..f867b65 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -17,6 +17,7 @@
from ..types.api_error_response import ApiErrorResponse
from ..types.boolean_string import BooleanString
from ..types.business_associated_parties_item import BusinessAssociatedPartiesItem
+from ..types.business_directors_item import BusinessDirectorsItem
from ..types.business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
from ..types.business_share_holders_item import BusinessShareHoldersItem
from ..types.business_with_rules_result import BusinessWithRulesResult
@@ -27,7 +28,6 @@
from ..types.mcc_details import MccDetails
from ..types.payment_method import PaymentMethod
from ..types.pep_status import PepStatus
-from ..types.person import Person
from ..types.person_attachment import PersonAttachment
from ..types.products_enabled import ProductsEnabled
from ..types.risk_level import RiskLevel
@@ -60,7 +60,7 @@ def create(
eodd_date: typing.Optional[float] = OMIT,
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
- directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ directors: typing.Optional[typing.Sequence[BusinessDirectorsItem]] = OMIT,
associated_parties: typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]] = OMIT,
business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
@@ -133,7 +133,7 @@ def create(
share_holders : typing.Optional[typing.Sequence[BusinessShareHoldersItem]]
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
- directors : typing.Optional[typing.Sequence[Person]]
+ directors : typing.Optional[typing.Sequence[BusinessDirectorsItem]]
Director(s) of the company. Must be at least one
associated_parties : typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]]
@@ -221,7 +221,7 @@ def create(
object_=share_holders, annotation=typing.Sequence[BusinessShareHoldersItem], direction="write"
),
"directors": convert_and_respect_annotation_metadata(
- object_=directors, annotation=typing.Sequence[Person], direction="write"
+ object_=directors, annotation=typing.Sequence[BusinessDirectorsItem], direction="write"
),
"associatedParties": convert_and_respect_annotation_metadata(
object_=associated_parties,
@@ -420,7 +420,7 @@ async def create(
eodd_date: typing.Optional[float] = OMIT,
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
share_holders: typing.Optional[typing.Sequence[BusinessShareHoldersItem]] = OMIT,
- directors: typing.Optional[typing.Sequence[Person]] = OMIT,
+ directors: typing.Optional[typing.Sequence[BusinessDirectorsItem]] = OMIT,
associated_parties: typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]] = OMIT,
business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
@@ -493,7 +493,7 @@ async def create(
share_holders : typing.Optional[typing.Sequence[BusinessShareHoldersItem]]
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
- directors : typing.Optional[typing.Sequence[Person]]
+ directors : typing.Optional[typing.Sequence[BusinessDirectorsItem]]
Director(s) of the company. Must be at least one
associated_parties : typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]]
@@ -581,7 +581,7 @@ async def create(
object_=share_holders, annotation=typing.Sequence[BusinessShareHoldersItem], direction="write"
),
"directors": convert_and_respect_annotation_metadata(
- object_=directors, annotation=typing.Sequence[Person], direction="write"
+ object_=directors, annotation=typing.Sequence[BusinessDirectorsItem], direction="write"
),
"associatedParties": convert_and_respect_annotation_metadata(
object_=associated_parties,
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index c608164..b39fc6a 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.37",
+ "User-Agent": "flagright/1.8.38",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.37",
+ "X-Fern-SDK-Version": "1.8.38",
**(self.get_custom_headers() or {}),
}
headers["x-api-key"] = self.api_key
diff --git a/src/flagright/transaction_events/raw_client.py b/src/flagright/transaction_events/raw_client.py
index 1d938bf..271ab67 100644
--- a/src/flagright/transaction_events/raw_client.py
+++ b/src/flagright/transaction_events/raw_client.py
@@ -11,6 +11,7 @@
from ..core.request_options import RequestOptions
from ..core.serialization import convert_and_respect_annotation_metadata
from ..errors.bad_request_error import BadRequestError
+from ..errors.conflict_error import ConflictError
from ..errors.too_many_requests_error import TooManyRequestsError
from ..errors.unauthorized_error import UnauthorizedError
from ..types.api_error_response import ApiErrorResponse
@@ -153,6 +154,17 @@ def create(
),
),
)
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 429:
raise TooManyRequestsError(
headers=dict(_response.headers),
@@ -375,6 +387,17 @@ async def create(
),
),
)
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ ApiErrorResponse,
+ parse_obj_as(
+ type_=ApiErrorResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 429:
raise TooManyRequestsError(
headers=dict(_response.headers),
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 2d2e515..33d1b43 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -21,6 +21,7 @@
from .batch_business_user_with_rules_result_associated_parties_item import (
BatchBusinessUserWithRulesResultAssociatedPartiesItem,
)
+ from .batch_business_user_with_rules_result_directors_item import BatchBusinessUserWithRulesResultDirectorsItem
from .batch_business_user_with_rules_result_saved_payment_details_item import (
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach,
@@ -80,8 +81,10 @@
from .business import Business
from .business_associated_parties_item import BusinessAssociatedPartiesItem
from .business_base import BusinessBase
+ from .business_directors_item import BusinessDirectorsItem
from .business_optional import BusinessOptional
from .business_optional_associated_parties_item import BusinessOptionalAssociatedPartiesItem
+ from .business_optional_directors_item import BusinessOptionalDirectorsItem
from .business_optional_saved_payment_details_item import (
BusinessOptionalSavedPaymentDetailsItem,
BusinessOptionalSavedPaymentDetailsItem_Ach,
@@ -118,6 +121,7 @@
from .business_user_segment import BusinessUserSegment
from .business_with_rules_result import BusinessWithRulesResult
from .business_with_rules_result_associated_parties_item import BusinessWithRulesResultAssociatedPartiesItem
+ from .business_with_rules_result_directors_item import BusinessWithRulesResultDirectorsItem
from .business_with_rules_result_saved_payment_details_item import (
BusinessWithRulesResultSavedPaymentDetailsItem,
BusinessWithRulesResultSavedPaymentDetailsItem_Ach,
@@ -163,6 +167,7 @@
from .contact_details import ContactDetails
from .corporate_entity_details import CorporateEntityDetails
from .correspondent_bank_details import CorrespondentBankDetails
+ from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .cra_risk_level_updated_details import CraRiskLevelUpdatedDetails
from .currency_code import CurrencyCode
@@ -425,6 +430,7 @@
"BatchBusinessUserEventsWithRulesResult": ".batch_business_user_events_with_rules_result",
"BatchBusinessUserWithRulesResult": ".batch_business_user_with_rules_result",
"BatchBusinessUserWithRulesResultAssociatedPartiesItem": ".batch_business_user_with_rules_result_associated_parties_item",
+ "BatchBusinessUserWithRulesResultDirectorsItem": ".batch_business_user_with_rules_result_directors_item",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem": ".batch_business_user_with_rules_result_saved_payment_details_item",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach": ".batch_business_user_with_rules_result_saved_payment_details_item",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card": ".batch_business_user_with_rules_result_saved_payment_details_item",
@@ -478,8 +484,10 @@
"Business": ".business",
"BusinessAssociatedPartiesItem": ".business_associated_parties_item",
"BusinessBase": ".business_base",
+ "BusinessDirectorsItem": ".business_directors_item",
"BusinessOptional": ".business_optional",
"BusinessOptionalAssociatedPartiesItem": ".business_optional_associated_parties_item",
+ "BusinessOptionalDirectorsItem": ".business_optional_directors_item",
"BusinessOptionalSavedPaymentDetailsItem": ".business_optional_saved_payment_details_item",
"BusinessOptionalSavedPaymentDetailsItem_Ach": ".business_optional_saved_payment_details_item",
"BusinessOptionalSavedPaymentDetailsItem_Card": ".business_optional_saved_payment_details_item",
@@ -512,6 +520,7 @@
"BusinessUserSegment": ".business_user_segment",
"BusinessWithRulesResult": ".business_with_rules_result",
"BusinessWithRulesResultAssociatedPartiesItem": ".business_with_rules_result_associated_parties_item",
+ "BusinessWithRulesResultDirectorsItem": ".business_with_rules_result_directors_item",
"BusinessWithRulesResultSavedPaymentDetailsItem": ".business_with_rules_result_saved_payment_details_item",
"BusinessWithRulesResultSavedPaymentDetailsItem_Ach": ".business_with_rules_result_saved_payment_details_item",
"BusinessWithRulesResultSavedPaymentDetailsItem_Card": ".business_with_rules_result_saved_payment_details_item",
@@ -555,6 +564,7 @@
"ContactDetails": ".contact_details",
"CorporateEntityDetails": ".corporate_entity_details",
"CorrespondentBankDetails": ".correspondent_bank_details",
+ "CounterpartyType": ".counterparty_type",
"CountryCode": ".country_code",
"CraRiskLevelUpdatedDetails": ".cra_risk_level_updated_details",
"CurrencyCode": ".currency_code",
@@ -823,6 +833,7 @@ def __dir__():
"BatchBusinessUserEventsWithRulesResult",
"BatchBusinessUserWithRulesResult",
"BatchBusinessUserWithRulesResultAssociatedPartiesItem",
+ "BatchBusinessUserWithRulesResultDirectorsItem",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach",
"BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card",
@@ -876,8 +887,10 @@ def __dir__():
"Business",
"BusinessAssociatedPartiesItem",
"BusinessBase",
+ "BusinessDirectorsItem",
"BusinessOptional",
"BusinessOptionalAssociatedPartiesItem",
+ "BusinessOptionalDirectorsItem",
"BusinessOptionalSavedPaymentDetailsItem",
"BusinessOptionalSavedPaymentDetailsItem_Ach",
"BusinessOptionalSavedPaymentDetailsItem_Card",
@@ -910,6 +923,7 @@ def __dir__():
"BusinessUserSegment",
"BusinessWithRulesResult",
"BusinessWithRulesResultAssociatedPartiesItem",
+ "BusinessWithRulesResultDirectorsItem",
"BusinessWithRulesResultSavedPaymentDetailsItem",
"BusinessWithRulesResultSavedPaymentDetailsItem_Ach",
"BusinessWithRulesResultSavedPaymentDetailsItem_Card",
@@ -953,6 +967,7 @@ def __dir__():
"ContactDetails",
"CorporateEntityDetails",
"CorrespondentBankDetails",
+ "CounterpartyType",
"CountryCode",
"CraRiskLevelUpdatedDetails",
"CurrencyCode",
diff --git a/src/flagright/types/ach_details.py b/src/flagright/types/ach_details.py
index 3a88e2d..e3a8554 100644
--- a/src/flagright/types/ach_details.py
+++ b/src/flagright/types/ach_details.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .address import Address
from .amount import Amount
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .tag import Tag
@@ -18,6 +19,9 @@ class AchDetails(UniversalBaseModel):
Model for ACH payment method
"""
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = (
pydantic.Field(default=None)
)
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index f4b4a04..1f6f0df 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -10,6 +10,7 @@
from .batch_business_user_with_rules_result_associated_parties_item import (
BatchBusinessUserWithRulesResultAssociatedPartiesItem,
)
+from .batch_business_user_with_rules_result_directors_item import BatchBusinessUserWithRulesResultDirectorsItem
from .batch_business_user_with_rules_result_saved_payment_details_item import (
BatchBusinessUserWithRulesResultSavedPaymentDetailsItem,
)
@@ -22,7 +23,6 @@
from .mcc_details import MccDetails
from .payment_method import PaymentMethod
from .pep_status import PepStatus
-from .person import Person
from .person_attachment import PersonAttachment
from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
@@ -74,7 +74,9 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
"""
- directors: typing.Optional[typing.List[Person]] = pydantic.Field(default=None)
+ directors: typing.Optional[typing.List[BatchBusinessUserWithRulesResultDirectorsItem]] = pydantic.Field(
+ default=None
+ )
"""
Director(s) of the company. Must be at least one
"""
diff --git a/src/flagright/types/batch_business_user_with_rules_result_directors_item.py b/src/flagright/types/batch_business_user_with_rules_result_directors_item.py
new file mode 100644
index 0000000..e3cd2d6
--- /dev/null
+++ b/src/flagright/types/batch_business_user_with_rules_result_directors_item.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from .legal_entity import LegalEntity
+from .person import Person
+
+BatchBusinessUserWithRulesResultDirectorsItem = typing.Union[Person, LegalEntity]
diff --git a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
index 86d169a..097a3fc 100644
--- a/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_business_user_with_rules_result_saved_payment_details_item.py
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -30,6 +31,9 @@
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -82,6 +86,9 @@ class Config:
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -119,6 +126,9 @@ class Config:
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBaseModel):
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -150,6 +160,9 @@ class Config:
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseModel):
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -179,6 +192,9 @@ class Config:
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -215,6 +231,9 @@ class Config:
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -235,6 +254,9 @@ class Config:
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Upi(UniversalBaseModel):
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -257,6 +279,9 @@ class Config:
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -294,6 +319,9 @@ class Config:
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -329,6 +357,9 @@ class Config:
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -346,6 +377,9 @@ class Config:
class BatchBusinessUserWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseModel):
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
index 28476a0..19f8584 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result_saved_payment_details_item.py
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -30,6 +31,9 @@
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -82,6 +86,9 @@ class Config:
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -119,6 +126,9 @@ class Config:
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBaseModel):
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -150,6 +160,9 @@ class Config:
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseModel):
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -179,6 +192,9 @@ class Config:
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -215,6 +231,9 @@ class Config:
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -235,6 +254,9 @@ class Config:
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Upi(UniversalBaseModel):
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -257,6 +279,9 @@ class Config:
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -294,6 +319,9 @@ class Config:
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -329,6 +357,9 @@ class Config:
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -346,6 +377,9 @@ class Config:
class BatchConsumerUserWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseModel):
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index 990d101..2b180fb 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .acquisition_channel import AcquisitionChannel
from .business_associated_parties_item import BusinessAssociatedPartiesItem
+from .business_directors_item import BusinessDirectorsItem
from .business_saved_payment_details_item import BusinessSavedPaymentDetailsItem
from .business_share_holders_item import BusinessShareHoldersItem
from .corporate_entity_details import CorporateEntityDetails
@@ -17,7 +18,6 @@
from .mcc_details import MccDetails
from .payment_method import PaymentMethod
from .pep_status import PepStatus
-from .person import Person
from .person_attachment import PersonAttachment
from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
@@ -67,7 +67,7 @@ class Business(UniversalBaseModel):
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
"""
- directors: typing.Optional[typing.List[Person]] = pydantic.Field(default=None)
+ directors: typing.Optional[typing.List[BusinessDirectorsItem]] = pydantic.Field(default=None)
"""
Director(s) of the company. Must be at least one
"""
diff --git a/src/flagright/types/business_directors_item.py b/src/flagright/types/business_directors_item.py
new file mode 100644
index 0000000..e06b2ad
--- /dev/null
+++ b/src/flagright/types/business_directors_item.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from .legal_entity import LegalEntity
+from .person import Person
+
+BusinessDirectorsItem = typing.Union[Person, LegalEntity]
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index 14d2785..2c92f25 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .acquisition_channel import AcquisitionChannel
from .business_optional_associated_parties_item import BusinessOptionalAssociatedPartiesItem
+from .business_optional_directors_item import BusinessOptionalDirectorsItem
from .business_optional_saved_payment_details_item import BusinessOptionalSavedPaymentDetailsItem
from .business_optional_share_holders_item import BusinessOptionalShareHoldersItem
from .corporate_entity_details import CorporateEntityDetails
@@ -17,7 +18,6 @@
from .mcc_details import MccDetails
from .payment_method import PaymentMethod
from .pep_status import PepStatus
-from .person import Person
from .person_attachment import PersonAttachment
from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
@@ -61,7 +61,7 @@ class BusinessOptional(UniversalBaseModel):
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
"""
- directors: typing.Optional[typing.List[Person]] = pydantic.Field(default=None)
+ directors: typing.Optional[typing.List[BusinessOptionalDirectorsItem]] = pydantic.Field(default=None)
"""
Director(s) of the company. Must be at least one
"""
diff --git a/src/flagright/types/business_optional_directors_item.py b/src/flagright/types/business_optional_directors_item.py
new file mode 100644
index 0000000..3ad0156
--- /dev/null
+++ b/src/flagright/types/business_optional_directors_item.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from .legal_entity import LegalEntity
+from .person import Person
+
+BusinessOptionalDirectorsItem = typing.Union[Person, LegalEntity]
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 bdf8c73..bcc3509 100644
--- a/src/flagright/types/business_optional_saved_payment_details_item.py
+++ b/src/flagright/types/business_optional_saved_payment_details_item.py
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -30,6 +31,9 @@
class BusinessOptionalSavedPaymentDetailsItem_Card(UniversalBaseModel):
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -82,6 +86,9 @@ class Config:
class BusinessOptionalSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -119,6 +126,9 @@ class Config:
class BusinessOptionalSavedPaymentDetailsItem_Iban(UniversalBaseModel):
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -150,6 +160,9 @@ class Config:
class BusinessOptionalSavedPaymentDetailsItem_Ach(UniversalBaseModel):
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -179,6 +192,9 @@ class Config:
class BusinessOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -215,6 +231,9 @@ class Config:
class BusinessOptionalSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -235,6 +254,9 @@ class Config:
class BusinessOptionalSavedPaymentDetailsItem_Upi(UniversalBaseModel):
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -257,6 +279,9 @@ class Config:
class BusinessOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -294,6 +319,9 @@ class Config:
class BusinessOptionalSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -329,6 +357,9 @@ class Config:
class BusinessOptionalSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -346,6 +377,9 @@ class Config:
class BusinessOptionalSavedPaymentDetailsItem_Npp(UniversalBaseModel):
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/business_saved_payment_details_item.py b/src/flagright/types/business_saved_payment_details_item.py
index e0c9bbb..2750fae 100644
--- a/src/flagright/types/business_saved_payment_details_item.py
+++ b/src/flagright/types/business_saved_payment_details_item.py
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -30,6 +31,9 @@
class BusinessSavedPaymentDetailsItem_Card(UniversalBaseModel):
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -82,6 +86,9 @@ class Config:
class BusinessSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -119,6 +126,9 @@ class Config:
class BusinessSavedPaymentDetailsItem_Iban(UniversalBaseModel):
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -150,6 +160,9 @@ class Config:
class BusinessSavedPaymentDetailsItem_Ach(UniversalBaseModel):
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -179,6 +192,9 @@ class Config:
class BusinessSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -215,6 +231,9 @@ class Config:
class BusinessSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -235,6 +254,9 @@ class Config:
class BusinessSavedPaymentDetailsItem_Upi(UniversalBaseModel):
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -257,6 +279,9 @@ class Config:
class BusinessSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -294,6 +319,9 @@ class Config:
class BusinessSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -329,6 +357,9 @@ class Config:
class BusinessSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -346,6 +377,9 @@ class Config:
class BusinessSavedPaymentDetailsItem_Npp(UniversalBaseModel):
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 6134e70..2592e74 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .acquisition_channel import AcquisitionChannel
from .business_with_rules_result_associated_parties_item import BusinessWithRulesResultAssociatedPartiesItem
+from .business_with_rules_result_directors_item import BusinessWithRulesResultDirectorsItem
from .business_with_rules_result_saved_payment_details_item import BusinessWithRulesResultSavedPaymentDetailsItem
from .business_with_rules_result_share_holders_item import BusinessWithRulesResultShareHoldersItem
from .corporate_entity_details import CorporateEntityDetails
@@ -19,7 +20,6 @@
from .mcc_details import MccDetails
from .payment_method import PaymentMethod
from .pep_status import PepStatus
-from .person import Person
from .person_attachment import PersonAttachment
from .products_enabled import ProductsEnabled
from .risk_level import RiskLevel
@@ -70,7 +70,7 @@ class BusinessWithRulesResult(UniversalBaseModel):
Shareholders (beneficiaries) of the company that hold at least 25% ownership. Can be another company or an individual
"""
- directors: typing.Optional[typing.List[Person]] = pydantic.Field(default=None)
+ directors: typing.Optional[typing.List[BusinessWithRulesResultDirectorsItem]] = pydantic.Field(default=None)
"""
Director(s) of the company. Must be at least one
"""
diff --git a/src/flagright/types/business_with_rules_result_directors_item.py b/src/flagright/types/business_with_rules_result_directors_item.py
new file mode 100644
index 0000000..6fc9bd3
--- /dev/null
+++ b/src/flagright/types/business_with_rules_result_directors_item.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from .legal_entity import LegalEntity
+from .person import Person
+
+BusinessWithRulesResultDirectorsItem = typing.Union[Person, LegalEntity]
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 75e850c..4fb1024 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
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -30,6 +31,9 @@
class BusinessWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -82,6 +86,9 @@ class Config:
class BusinessWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -119,6 +126,9 @@ class Config:
class BusinessWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBaseModel):
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -150,6 +160,9 @@ class Config:
class BusinessWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseModel):
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -179,6 +192,9 @@ class Config:
class BusinessWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -215,6 +231,9 @@ class Config:
class BusinessWithRulesResultSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -235,6 +254,9 @@ class Config:
class BusinessWithRulesResultSavedPaymentDetailsItem_Upi(UniversalBaseModel):
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -257,6 +279,9 @@ class Config:
class BusinessWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -294,6 +319,9 @@ class Config:
class BusinessWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -329,6 +357,9 @@ class Config:
class BusinessWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -346,6 +377,9 @@ class Config:
class BusinessWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseModel):
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/card_details.py b/src/flagright/types/card_details.py
index 97171e3..3cfdf03 100644
--- a/src/flagright/types/card_details.py
+++ b/src/flagright/types/card_details.py
@@ -15,6 +15,7 @@
from .card_status import CardStatus
from .card_type import CardType
from .consumer_name import ConsumerName
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .pos_details import PosDetails
@@ -26,6 +27,9 @@ class CardDetails(UniversalBaseModel):
Model for credit or debit card details
"""
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = (
pydantic.Field(default=None)
)
diff --git a/src/flagright/types/cash_details.py b/src/flagright/types/cash_details.py
index 6001863..3d4686c 100644
--- a/src/flagright/types/cash_details.py
+++ b/src/flagright/types/cash_details.py
@@ -7,10 +7,14 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .address import Address
+from .counterparty_type import CounterpartyType
from .email_id import EmailId
class CashDetails(UniversalBaseModel):
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = pydantic.Field(default=None)
"""
Identifier for the cash transaction
diff --git a/src/flagright/types/check_details.py b/src/flagright/types/check_details.py
index bb7ce12..28a3e23 100644
--- a/src/flagright/types/check_details.py
+++ b/src/flagright/types/check_details.py
@@ -8,11 +8,15 @@
from ..core.serialization import FieldMetadata
from .address import Address
from .check_delivery_status import CheckDeliveryStatus
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .tag import Tag
class CheckDetails(UniversalBaseModel):
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = (
diff --git a/src/flagright/types/counterparty_type.py b/src/flagright/types/counterparty_type.py
new file mode 100644
index 0000000..7e1f664
--- /dev/null
+++ b/src/flagright/types/counterparty_type.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+CounterpartyType = typing.Union[typing.Literal["INDIVIDUAL", "LEGAL_ENTITY"], typing.Any]
diff --git a/src/flagright/types/executed_rules_result.py b/src/flagright/types/executed_rules_result.py
index 9fda566..e070bfa 100644
--- a/src/flagright/types/executed_rules_result.py
+++ b/src/flagright/types/executed_rules_result.py
@@ -39,6 +39,7 @@ class ExecutedRulesResult(UniversalBaseModel):
rule_action: typing_extensions.Annotated[RuleAction, FieldMetadata(alias="ruleAction")]
rule_hit: typing_extensions.Annotated[bool, FieldMetadata(alias="ruleHit")]
+ version_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="versionId")] = None
executed_at: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="executedAt")] = (
pydantic.Field(default=None)
)
diff --git a/src/flagright/types/generic_bank_account_details.py b/src/flagright/types/generic_bank_account_details.py
index c89ba80..8bbdddb 100644
--- a/src/flagright/types/generic_bank_account_details.py
+++ b/src/flagright/types/generic_bank_account_details.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .address import Address
from .amount import Amount
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .tag import Tag
@@ -18,6 +19,9 @@ class GenericBankAccountDetails(UniversalBaseModel):
Model for any generic bank account
"""
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = (
pydantic.Field(default=None)
)
diff --git a/src/flagright/types/hit_rules_details.py b/src/flagright/types/hit_rules_details.py
index 93473bd..f184fe0 100644
--- a/src/flagright/types/hit_rules_details.py
+++ b/src/flagright/types/hit_rules_details.py
@@ -35,6 +35,7 @@ class HitRulesDetails(UniversalBaseModel):
Description of the rule
"""
+ version_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="versionId")] = None
executed_at: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="executedAt")] = (
pydantic.Field(default=None)
)
diff --git a/src/flagright/types/iban_details.py b/src/flagright/types/iban_details.py
index 2b13a60..779d697 100644
--- a/src/flagright/types/iban_details.py
+++ b/src/flagright/types/iban_details.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .address import Address
from .amount import Amount
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .tag import Tag
@@ -18,6 +19,9 @@ class IbanDetails(UniversalBaseModel):
Standardized model for Bank Details
"""
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = pydantic.Field(default=None)
"""
Identifier for the bank. Can be routing number, BIK number, SWIFT code, BIC number etc.
diff --git a/src/flagright/types/mpesa_details.py b/src/flagright/types/mpesa_details.py
index 3313fce..4a56bb4 100644
--- a/src/flagright/types/mpesa_details.py
+++ b/src/flagright/types/mpesa_details.py
@@ -7,6 +7,7 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .address import Address
+from .counterparty_type import CounterpartyType
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
from .tag import Tag
@@ -17,6 +18,9 @@ class MpesaDetails(UniversalBaseModel):
Model for Mpesa payment method
"""
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")] = pydantic.Field()
"""
Business code
diff --git a/src/flagright/types/npp_details.py b/src/flagright/types/npp_details.py
index 4ee3c79..20042d4 100644
--- a/src/flagright/types/npp_details.py
+++ b/src/flagright/types/npp_details.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .address import Address
from .consumer_name import ConsumerName
+from .counterparty_type import CounterpartyType
from .email_id import EmailId
from .tag import Tag
@@ -17,6 +18,9 @@ class NppDetails(UniversalBaseModel):
New Payment Platform Details for Australia
"""
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = (
pydantic.Field(default=None)
)
diff --git a/src/flagright/types/sanctions_details_entity_type.py b/src/flagright/types/sanctions_details_entity_type.py
index 780d619..7c91704 100644
--- a/src/flagright/types/sanctions_details_entity_type.py
+++ b/src/flagright/types/sanctions_details_entity_type.py
@@ -15,6 +15,7 @@
"BANK_ACCOUNT_HOLDER_NAME",
"BUSINESS_PARTNER",
"ASSOCIATED_PARTY",
+ "TRANSACTION_REFERENCE",
],
typing.Any,
]
diff --git a/src/flagright/types/swift_details.py b/src/flagright/types/swift_details.py
index 45e2c87..e083773 100644
--- a/src/flagright/types/swift_details.py
+++ b/src/flagright/types/swift_details.py
@@ -9,6 +9,7 @@
from .address import Address
from .amount import Amount
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .tag import Tag
@@ -19,6 +20,9 @@ class SwiftDetails(UniversalBaseModel):
Model for SWIFT payment method
"""
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = pydantic.Field(
default=None
)
diff --git a/src/flagright/types/transaction_destination_payment_details.py b/src/flagright/types/transaction_destination_payment_details.py
index e43200c..871d027 100644
--- a/src/flagright/types/transaction_destination_payment_details.py
+++ b/src/flagright/types/transaction_destination_payment_details.py
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -30,6 +31,9 @@
class TransactionDestinationPaymentDetails_Card(UniversalBaseModel):
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -82,6 +86,9 @@ class Config:
class TransactionDestinationPaymentDetails_GenericBankAccount(UniversalBaseModel):
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -119,6 +126,9 @@ class Config:
class TransactionDestinationPaymentDetails_Iban(UniversalBaseModel):
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -150,6 +160,9 @@ class Config:
class TransactionDestinationPaymentDetails_Ach(UniversalBaseModel):
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -179,6 +192,9 @@ class Config:
class TransactionDestinationPaymentDetails_Upi(UniversalBaseModel):
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -201,6 +217,9 @@ class Config:
class TransactionDestinationPaymentDetails_Wallet(UniversalBaseModel):
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -238,6 +257,9 @@ class Config:
class TransactionDestinationPaymentDetails_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -274,6 +296,9 @@ class Config:
class TransactionDestinationPaymentDetails_Mpesa(UniversalBaseModel):
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -294,6 +319,9 @@ class Config:
class TransactionDestinationPaymentDetails_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -329,6 +357,9 @@ class Config:
class TransactionDestinationPaymentDetails_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -346,6 +377,9 @@ class Config:
class TransactionDestinationPaymentDetails_Npp(UniversalBaseModel):
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/transaction_origin_payment_details.py b/src/flagright/types/transaction_origin_payment_details.py
index e1a9aec..50be932 100644
--- a/src/flagright/types/transaction_origin_payment_details.py
+++ b/src/flagright/types/transaction_origin_payment_details.py
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -34,6 +35,9 @@ class TransactionOriginPaymentDetails_Card(UniversalBaseModel):
"""
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -90,6 +94,9 @@ class TransactionOriginPaymentDetails_GenericBankAccount(UniversalBaseModel):
"""
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -131,6 +138,9 @@ class TransactionOriginPaymentDetails_Iban(UniversalBaseModel):
"""
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -166,6 +176,9 @@ class TransactionOriginPaymentDetails_Ach(UniversalBaseModel):
"""
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -199,6 +212,9 @@ class TransactionOriginPaymentDetails_Swift(UniversalBaseModel):
"""
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -239,6 +255,9 @@ class TransactionOriginPaymentDetails_Mpesa(UniversalBaseModel):
"""
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -263,6 +282,9 @@ class TransactionOriginPaymentDetails_Upi(UniversalBaseModel):
"""
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -289,6 +311,9 @@ class TransactionOriginPaymentDetails_Wallet(UniversalBaseModel):
"""
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -330,6 +355,9 @@ class TransactionOriginPaymentDetails_Check(UniversalBaseModel):
"""
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -369,6 +397,9 @@ class TransactionOriginPaymentDetails_Cash(UniversalBaseModel):
"""
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -390,6 +421,9 @@ class TransactionOriginPaymentDetails_Npp(UniversalBaseModel):
"""
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/transaction_updatable_destination_payment_details.py b/src/flagright/types/transaction_updatable_destination_payment_details.py
index faa8a0e..5204a8b 100644
--- a/src/flagright/types/transaction_updatable_destination_payment_details.py
+++ b/src/flagright/types/transaction_updatable_destination_payment_details.py
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -30,6 +31,9 @@
class TransactionUpdatableDestinationPaymentDetails_Card(UniversalBaseModel):
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -82,6 +86,9 @@ class Config:
class TransactionUpdatableDestinationPaymentDetails_GenericBankAccount(UniversalBaseModel):
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -119,6 +126,9 @@ class Config:
class TransactionUpdatableDestinationPaymentDetails_Iban(UniversalBaseModel):
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -150,6 +160,9 @@ class Config:
class TransactionUpdatableDestinationPaymentDetails_Ach(UniversalBaseModel):
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -179,6 +192,9 @@ class Config:
class TransactionUpdatableDestinationPaymentDetails_Upi(UniversalBaseModel):
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -201,6 +217,9 @@ class Config:
class TransactionUpdatableDestinationPaymentDetails_Wallet(UniversalBaseModel):
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -238,6 +257,9 @@ class Config:
class TransactionUpdatableDestinationPaymentDetails_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -274,6 +296,9 @@ class Config:
class TransactionUpdatableDestinationPaymentDetails_Mpesa(UniversalBaseModel):
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -294,6 +319,9 @@ class Config:
class TransactionUpdatableDestinationPaymentDetails_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -329,6 +357,9 @@ class Config:
class TransactionUpdatableDestinationPaymentDetails_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -346,6 +377,9 @@ class Config:
class TransactionUpdatableDestinationPaymentDetails_Npp(UniversalBaseModel):
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/transaction_updatable_origin_payment_details.py b/src/flagright/types/transaction_updatable_origin_payment_details.py
index 96995cd..689a676 100644
--- a/src/flagright/types/transaction_updatable_origin_payment_details.py
+++ b/src/flagright/types/transaction_updatable_origin_payment_details.py
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -34,6 +35,9 @@ class TransactionUpdatableOriginPaymentDetails_Card(UniversalBaseModel):
"""
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -90,6 +94,9 @@ class TransactionUpdatableOriginPaymentDetails_GenericBankAccount(UniversalBaseM
"""
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -131,6 +138,9 @@ class TransactionUpdatableOriginPaymentDetails_Iban(UniversalBaseModel):
"""
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -166,6 +176,9 @@ class TransactionUpdatableOriginPaymentDetails_Ach(UniversalBaseModel):
"""
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -199,6 +212,9 @@ class TransactionUpdatableOriginPaymentDetails_Swift(UniversalBaseModel):
"""
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -239,6 +255,9 @@ class TransactionUpdatableOriginPaymentDetails_Mpesa(UniversalBaseModel):
"""
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -263,6 +282,9 @@ class TransactionUpdatableOriginPaymentDetails_Upi(UniversalBaseModel):
"""
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -289,6 +311,9 @@ class TransactionUpdatableOriginPaymentDetails_Wallet(UniversalBaseModel):
"""
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -330,6 +355,9 @@ class TransactionUpdatableOriginPaymentDetails_Check(UniversalBaseModel):
"""
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -369,6 +397,9 @@ class TransactionUpdatableOriginPaymentDetails_Cash(UniversalBaseModel):
"""
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -390,6 +421,9 @@ class TransactionUpdatableOriginPaymentDetails_Npp(UniversalBaseModel):
"""
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
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 b5a4895..54520f2 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
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -30,6 +31,9 @@
class TransactionWithRulesResultDestinationPaymentDetails_Card(UniversalBaseModel):
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -82,6 +86,9 @@ class Config:
class TransactionWithRulesResultDestinationPaymentDetails_GenericBankAccount(UniversalBaseModel):
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -119,6 +126,9 @@ class Config:
class TransactionWithRulesResultDestinationPaymentDetails_Iban(UniversalBaseModel):
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -150,6 +160,9 @@ class Config:
class TransactionWithRulesResultDestinationPaymentDetails_Ach(UniversalBaseModel):
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -179,6 +192,9 @@ class Config:
class TransactionWithRulesResultDestinationPaymentDetails_Upi(UniversalBaseModel):
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -201,6 +217,9 @@ class Config:
class TransactionWithRulesResultDestinationPaymentDetails_Wallet(UniversalBaseModel):
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -238,6 +257,9 @@ class Config:
class TransactionWithRulesResultDestinationPaymentDetails_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -274,6 +296,9 @@ class Config:
class TransactionWithRulesResultDestinationPaymentDetails_Mpesa(UniversalBaseModel):
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -294,6 +319,9 @@ class Config:
class TransactionWithRulesResultDestinationPaymentDetails_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -329,6 +357,9 @@ class Config:
class TransactionWithRulesResultDestinationPaymentDetails_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -346,6 +377,9 @@ class Config:
class TransactionWithRulesResultDestinationPaymentDetails_Npp(UniversalBaseModel):
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
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 6ff86e6..0dde238 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
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -34,6 +35,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Card(UniversalBaseModel):
"""
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -90,6 +94,9 @@ class TransactionWithRulesResultOriginPaymentDetails_GenericBankAccount(Universa
"""
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -131,6 +138,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Iban(UniversalBaseModel):
"""
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -166,6 +176,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Ach(UniversalBaseModel):
"""
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -199,6 +212,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Swift(UniversalBaseModel):
"""
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -239,6 +255,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Mpesa(UniversalBaseModel):
"""
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -263,6 +282,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Upi(UniversalBaseModel):
"""
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -289,6 +311,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Wallet(UniversalBaseModel):
"""
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -330,6 +355,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Check(UniversalBaseModel):
"""
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -369,6 +397,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Cash(UniversalBaseModel):
"""
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -390,6 +421,9 @@ class TransactionWithRulesResultOriginPaymentDetails_Npp(UniversalBaseModel):
"""
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/upi_details.py b/src/flagright/types/upi_details.py
index b76f43b..9615423 100644
--- a/src/flagright/types/upi_details.py
+++ b/src/flagright/types/upi_details.py
@@ -7,6 +7,7 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .address import Address
+from .counterparty_type import CounterpartyType
from .email_id import EmailId
from .tag import Tag
@@ -16,6 +17,9 @@ class UpiDetails(UniversalBaseModel):
Model for UPI payment method
"""
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")] = pydantic.Field()
"""
UPI Id number
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 cc96152..60c308b 100644
--- a/src/flagright/types/user_optional_saved_payment_details_item.py
+++ b/src/flagright/types/user_optional_saved_payment_details_item.py
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -30,6 +31,9 @@
class UserOptionalSavedPaymentDetailsItem_Card(UniversalBaseModel):
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -82,6 +86,9 @@ class Config:
class UserOptionalSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -119,6 +126,9 @@ class Config:
class UserOptionalSavedPaymentDetailsItem_Iban(UniversalBaseModel):
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -150,6 +160,9 @@ class Config:
class UserOptionalSavedPaymentDetailsItem_Ach(UniversalBaseModel):
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -179,6 +192,9 @@ class Config:
class UserOptionalSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -215,6 +231,9 @@ class Config:
class UserOptionalSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -235,6 +254,9 @@ class Config:
class UserOptionalSavedPaymentDetailsItem_Upi(UniversalBaseModel):
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -257,6 +279,9 @@ class Config:
class UserOptionalSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -294,6 +319,9 @@ class Config:
class UserOptionalSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -329,6 +357,9 @@ class Config:
class UserOptionalSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -346,6 +377,9 @@ class Config:
class UserOptionalSavedPaymentDetailsItem_Npp(UniversalBaseModel):
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/user_saved_payment_details_item.py b/src/flagright/types/user_saved_payment_details_item.py
index eec9bdb..bd1e076 100644
--- a/src/flagright/types/user_saved_payment_details_item.py
+++ b/src/flagright/types/user_saved_payment_details_item.py
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -30,6 +31,9 @@
class UserSavedPaymentDetailsItem_Card(UniversalBaseModel):
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -82,6 +86,9 @@ class Config:
class UserSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -119,6 +126,9 @@ class Config:
class UserSavedPaymentDetailsItem_Iban(UniversalBaseModel):
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -150,6 +160,9 @@ class Config:
class UserSavedPaymentDetailsItem_Ach(UniversalBaseModel):
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -179,6 +192,9 @@ class Config:
class UserSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -215,6 +231,9 @@ class Config:
class UserSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -235,6 +254,9 @@ class Config:
class UserSavedPaymentDetailsItem_Upi(UniversalBaseModel):
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -257,6 +279,9 @@ class Config:
class UserSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -294,6 +319,9 @@ class Config:
class UserSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -329,6 +357,9 @@ class Config:
class UserSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -346,6 +377,9 @@ class Config:
class UserSavedPaymentDetailsItem_Npp(UniversalBaseModel):
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
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 b1e5ad2..2d7c507 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
@@ -19,6 +19,7 @@
from .check_delivery_status import CheckDeliveryStatus
from .consumer_name import ConsumerName
from .correspondent_bank_details import CorrespondentBankDetails
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .mpesa_transaction_type import MpesaTransactionType
@@ -30,6 +31,9 @@
class UserWithRulesResultSavedPaymentDetailsItem_Card(UniversalBaseModel):
method: typing.Literal["CARD"] = "CARD"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
card_fingerprint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cardFingerprint")] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
card_status: typing_extensions.Annotated[typing.Optional[CardStatus], FieldMetadata(alias="cardStatus")] = None
@@ -82,6 +86,9 @@ class Config:
class UserWithRulesResultSavedPaymentDetailsItem_GenericBankAccount(UniversalBaseModel):
method: typing.Literal["GENERIC_BANK_ACCOUNT"] = "GENERIC_BANK_ACCOUNT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountType")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -119,6 +126,9 @@ class Config:
class UserWithRulesResultSavedPaymentDetailsItem_Iban(UniversalBaseModel):
method: typing.Literal["IBAN"] = "IBAN"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
bic: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIC")] = None
bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
bank_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="bankAddress")] = None
@@ -150,6 +160,9 @@ class Config:
class UserWithRulesResultSavedPaymentDetailsItem_Ach(UniversalBaseModel):
method: typing.Literal["ACH"] = "ACH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
account_balance: typing_extensions.Annotated[typing.Optional[Amount], FieldMetadata(alias="accountBalance")] = None
@@ -179,6 +192,9 @@ class Config:
class UserWithRulesResultSavedPaymentDetailsItem_Swift(UniversalBaseModel):
method: typing.Literal["SWIFT"] = "SWIFT"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
swift_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="swiftCode")] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -215,6 +231,9 @@ class Config:
class UserWithRulesResultSavedPaymentDetailsItem_Mpesa(UniversalBaseModel):
method: typing.Literal["MPESA"] = "MPESA"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
business_short_code: typing_extensions.Annotated[str, FieldMetadata(alias="businessShortCode")]
transaction_type: typing_extensions.Annotated[MpesaTransactionType, FieldMetadata(alias="transactionType")]
phone_number: typing_extensions.Annotated[str, FieldMetadata(alias="phoneNumber")]
@@ -235,6 +254,9 @@ class Config:
class UserWithRulesResultSavedPaymentDetailsItem_Upi(UniversalBaseModel):
method: typing.Literal["UPI"] = "UPI"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
upi_id: typing_extensions.Annotated[str, FieldMetadata(alias="upiID")]
bank_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankProvider")] = None
interface_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="interfaceProvider")] = (
@@ -257,6 +279,9 @@ class Config:
class UserWithRulesResultSavedPaymentDetailsItem_Wallet(UniversalBaseModel):
method: typing.Literal["WALLET"] = "WALLET"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = None
wallet_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletId")] = None
payment_channel: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paymentChannel")] = None
@@ -294,6 +319,9 @@ class Config:
class UserWithRulesResultSavedPaymentDetailsItem_Check(UniversalBaseModel):
method: typing.Literal["CHECK"] = "CHECK"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
check_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkIdentifier")] = None
routing_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="routingNumber")] = None
@@ -329,6 +357,9 @@ class Config:
class UserWithRulesResultSavedPaymentDetailsItem_Cash(UniversalBaseModel):
method: typing.Literal["CASH"] = "CASH"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
identifier: typing.Optional[str] = None
address: typing.Optional[Address] = None
name: typing.Optional[str] = None
@@ -346,6 +377,9 @@ class Config:
class UserWithRulesResultSavedPaymentDetailsItem_Npp(UniversalBaseModel):
method: typing.Literal["NPP"] = "NPP"
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
account_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountNumber")] = None
name: typing.Optional[ConsumerName] = None
email_id: typing_extensions.Annotated[typing.Optional[EmailId], FieldMetadata(alias="emailId")] = None
diff --git a/src/flagright/types/wallet_details.py b/src/flagright/types/wallet_details.py
index 52379eb..a33fbb3 100644
--- a/src/flagright/types/wallet_details.py
+++ b/src/flagright/types/wallet_details.py
@@ -8,6 +8,7 @@
from ..core.serialization import FieldMetadata
from .address import Address
from .amount import Amount
+from .counterparty_type import CounterpartyType
from .country_code import CountryCode
from .email_id import EmailId
from .tag import Tag
@@ -20,6 +21,9 @@ class WalletDetails(UniversalBaseModel):
Standardized model for a Generic wallet transaction
"""
+ counterparty_type: typing_extensions.Annotated[
+ typing.Optional[CounterpartyType], FieldMetadata(alias="counterpartyType")
+ ] = None
wallet_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="walletType")] = pydantic.Field(
default=None
)
diff --git a/src/flagright/types/wallet_network.py b/src/flagright/types/wallet_network.py
index b40b119..823d9d6 100644
--- a/src/flagright/types/wallet_network.py
+++ b/src/flagright/types/wallet_network.py
@@ -30,6 +30,7 @@
"HEDERA",
"ALGORAND",
"CELESTIA",
+ "BASE",
],
typing.Any,
]
From 301cca4f449cf5318b24ce3705463abf325bd82d Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 9 Feb 2026 15:40:13 +0000
Subject: [PATCH 78/81] Release 1.8.39
---
poetry.lock | 6 +-
pyproject.toml | 2 +-
reference.md | 192 ++++---
src/flagright/__init__.py | 6 +
src/flagright/batch/client.py | 416 +++++++-------
src/flagright/batch/raw_client.py | 508 +++++++++---------
src/flagright/business_user_events/client.py | 4 +
src/flagright/business_users/client.py | 13 +
src/flagright/business_users/raw_client.py | 13 +
src/flagright/client.py | 8 +
src/flagright/consumer_user_events/client.py | 4 +
src/flagright/consumer_users/client.py | 13 +
src/flagright/consumer_users/raw_client.py | 13 +
src/flagright/core/client_wrapper.py | 17 +-
src/flagright/transaction_events/client.py | 4 +
src/flagright/transactions/client.py | 4 +
src/flagright/types/__init__.py | 6 +
.../batch_business_user_with_rules_result.py | 4 +
.../batch_consumer_user_with_rules_result.py | 4 +
src/flagright/types/business.py | 4 +
src/flagright/types/business_optional.py | 4 +
.../types/business_with_rules_result.py | 4 +
.../types/expected_transaction_countries.py | 32 ++
.../types/expected_transaction_country.py | 26 +
src/flagright/types/sanctions_details.py | 1 +
.../types/sanctions_details_entity_type.py | 2 +
src/flagright/types/user.py | 4 +
src/flagright/types/user_optional.py | 4 +
src/flagright/types/user_with_rules_result.py | 4 +
src/flagright/types/wallet_network.py | 1 +
30 files changed, 789 insertions(+), 534 deletions(-)
create mode 100644 src/flagright/types/expected_transaction_countries.py
create mode 100644 src/flagright/types/expected_transaction_country.py
diff --git a/poetry.lock b/poetry.lock
index 69701ad..3cc8b76 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -222,13 +222,13 @@ files = [
[[package]]
name = "packaging"
-version = "25.0"
+version = "26.0"
description = "Core utilities for Python packages"
optional = false
python-versions = ">=3.8"
files = [
- {file = "packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484"},
- {file = "packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"},
+ {file = "packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529"},
+ {file = "packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 50a6a23..cbb2d0a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.38"
+version = "1.8.39"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index bb2b138..6d7e8ff 100644
--- a/reference.md
+++ b/reference.md
@@ -57,6 +57,7 @@ from flagright import (
)
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transactions.verify(
@@ -385,6 +386,7 @@ Calling `GET /transactions/{transactionId}` will return the entire transaction p
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transactions.get(
@@ -442,6 +444,7 @@ client.transactions.get(
from flagright import Flagright, Transaction
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.verify_transaction(
@@ -530,6 +533,7 @@ client.batch.verify_transaction(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_transactions(
@@ -604,6 +608,7 @@ client.batch.get_transactions(
from flagright import Flagright, TransactionEvent
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_transaction_events(
@@ -674,6 +679,7 @@ client.batch.create_transaction_events(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_transaction_events(
@@ -748,6 +754,7 @@ client.batch.get_transaction_events(
from flagright import Flagright, User
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_consumer_users(
@@ -835,6 +842,7 @@ client.batch.create_consumer_users(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_consumer_users(
@@ -893,7 +901,7 @@ client.batch.get_consumer_users(
-client.batch.get_business_users(...)
+client.batch.create_business_users(...)
-
@@ -906,15 +914,28 @@ client.batch.get_consumer_users(
-
```python
-from flagright import Flagright
+from flagright import Business, CompanyGeneralDetails, Flagright, LegalEntity
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
-client.batch.get_business_users(
- batch_id="batchId",
- page_size=1.1,
- page=1.1,
+client.batch.create_business_users(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
+ data=[
+ Business(
+ user_id="userId",
+ created_timestamp=1.1,
+ legal_entity=LegalEntity(
+ company_general_details=CompanyGeneralDetails(
+ legal_name="Ozkan Hazelnut Export JSC",
+ business_industry=["Farming"],
+ main_products_services_sold=["Hazelnut"],
+ ),
+ ),
+ )
+ ],
)
```
@@ -931,7 +952,7 @@ client.batch.get_business_users(
-
-**batch_id:** `str` — Unique Batch Identifier
+**data:** `typing.Sequence[Business]`
@@ -939,7 +960,7 @@ client.batch.get_business_users(
-
-**page_size:** `typing.Optional[PageSize]` — Page size (default 20)
+**lock_cra_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the CRA risk level for the user.
@@ -947,7 +968,15 @@ client.batch.get_business_users(
-
-**page:** `typing.Optional[Page]` — Page
+**lock_kyc_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the KYC risk level for the user.
+
+
+
+
+
+-
+
+**batch_id:** `typing.Optional[str]`
@@ -967,7 +996,7 @@ client.batch.get_business_users(
-client.batch.create_business_users(...)
+client.batch.get_business_users(...)
-
@@ -980,27 +1009,16 @@ client.batch.get_business_users(
-
```python
-from flagright import Business, CompanyGeneralDetails, Flagright, LegalEntity
+from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
-client.batch.create_business_users(
- lock_cra_risk_level="true",
- lock_kyc_risk_level="true",
- data=[
- Business(
- user_id="userId",
- created_timestamp=1.1,
- legal_entity=LegalEntity(
- company_general_details=CompanyGeneralDetails(
- legal_name="Ozkan Hazelnut Export JSC",
- business_industry=["Farming"],
- main_products_services_sold=["Hazelnut"],
- ),
- ),
- )
- ],
+client.batch.get_business_users(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
)
```
@@ -1017,15 +1035,7 @@ client.batch.create_business_users(
-
-**data:** `typing.Sequence[Business]`
-
-
-
-
-
--
-
-**lock_cra_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the CRA risk level for the user.
+**batch_id:** `str` — Unique Batch Identifier
@@ -1033,7 +1043,7 @@ client.batch.create_business_users(
-
-**lock_kyc_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the KYC risk level for the user.
+**page_size:** `typing.Optional[PageSize]` — Page size (default 20)
@@ -1041,7 +1051,7 @@ client.batch.create_business_users(
-
-**batch_id:** `typing.Optional[str]`
+**page:** `typing.Optional[Page]` — Page
@@ -1061,7 +1071,7 @@ client.batch.create_business_users(
-client.batch.get_consumer_user_events(...)
+client.batch.create_consumer_user_events(...)
-
@@ -1074,15 +1084,21 @@ client.batch.create_business_users(
-
```python
-from flagright import Flagright
+from flagright import ConsumerUserEvent, Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
-client.batch.get_consumer_user_events(
- batch_id="batchId",
- page_size=1.1,
- page=1.1,
+client.batch.create_consumer_user_events(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
+ data=[
+ ConsumerUserEvent(
+ timestamp=1.1,
+ user_id="userId",
+ )
+ ],
)
```
@@ -1099,7 +1115,7 @@ client.batch.get_consumer_user_events(
-
-**batch_id:** `str` — Unique Batch Identifier
+**data:** `typing.Sequence[ConsumerUserEvent]`
@@ -1107,7 +1123,7 @@ client.batch.get_consumer_user_events(
-
-**page_size:** `typing.Optional[PageSize]` — Page size (default 20)
+**lock_cra_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the CRA risk level for the user.
@@ -1115,7 +1131,15 @@ client.batch.get_consumer_user_events(
-
-**page:** `typing.Optional[Page]` — Page
+**lock_kyc_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the KYC risk level for the user.
+
+
+
+
+
+-
+
+**batch_id:** `typing.Optional[str]`
@@ -1135,7 +1159,7 @@ client.batch.get_consumer_user_events(
-client.batch.get_business_user_events(...)
+client.batch.get_consumer_user_events(...)
-
@@ -1151,9 +1175,10 @@ client.batch.get_consumer_user_events(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
-client.batch.get_business_user_events(
+client.batch.get_consumer_user_events(
batch_id="batchId",
page_size=1.1,
page=1.1,
@@ -1209,7 +1234,7 @@ client.batch.get_business_user_events(
-client.batch.create_consumer_user_events(...)
+client.batch.create_business_user_events(...)
-
@@ -1222,16 +1247,17 @@ client.batch.get_business_user_events(
-
```python
-from flagright import ConsumerUserEvent, Flagright
+from flagright import BusinessUserEvent, Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
-client.batch.create_consumer_user_events(
+client.batch.create_business_user_events(
lock_cra_risk_level="true",
lock_kyc_risk_level="true",
data=[
- ConsumerUserEvent(
+ BusinessUserEvent(
timestamp=1.1,
user_id="userId",
)
@@ -1252,7 +1278,7 @@ client.batch.create_consumer_user_events(
-
-**data:** `typing.Sequence[ConsumerUserEvent]`
+**data:** `typing.Sequence[BusinessUserEvent]`
@@ -1296,7 +1322,7 @@ client.batch.create_consumer_user_events(
-client.batch.create_business_user_events(...)
+client.batch.get_business_user_events(...)
-
@@ -1309,20 +1335,16 @@ client.batch.create_consumer_user_events(
-
```python
-from flagright import BusinessUserEvent, Flagright
+from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
-client.batch.create_business_user_events(
- lock_cra_risk_level="true",
- lock_kyc_risk_level="true",
- data=[
- BusinessUserEvent(
- timestamp=1.1,
- user_id="userId",
- )
- ],
+client.batch.get_business_user_events(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
)
```
@@ -1339,15 +1361,7 @@ client.batch.create_business_user_events(
-
-**data:** `typing.Sequence[BusinessUserEvent]`
-
-
-
-
-
--
-
-**lock_cra_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the CRA risk level for the user.
+**batch_id:** `str` — Unique Batch Identifier
@@ -1355,7 +1369,7 @@ client.batch.create_business_user_events(
-
-**lock_kyc_risk_level:** `typing.Optional[BooleanString]` — Boolean string whether Flagright should lock the KYC risk level for the user.
+**page_size:** `typing.Optional[PageSize]` — Page size (default 20)
@@ -1363,7 +1377,7 @@ client.batch.create_business_user_events(
-
-**batch_id:** `typing.Optional[str]`
+**page:** `typing.Optional[Page]` — Page
@@ -1433,6 +1447,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu
from flagright import DeviceData, Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transaction_events.create(
@@ -1582,6 +1597,7 @@ You can retrieve any transaction event you created using the [POST Transaction E
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transaction_events.get(
@@ -1673,6 +1689,7 @@ from flagright import (
)
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_users.create(
@@ -1884,6 +1901,14 @@ client.consumer_users.create(
-
+**expected_transaction_countries:** `typing.Optional[ExpectedTransactionCountries]`
+
+
+
+
+
+-
+
**risk_level:** `typing.Optional[RiskLevel]`
@@ -2082,6 +2107,7 @@ Calling `GET /consumer/user/{userId}` will return the entire user payload and ru
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_users.get(
@@ -2166,6 +2192,7 @@ Each business user needs three mandatory fields:
from flagright import CompanyGeneralDetails, Flagright, LegalEntity
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_users.create(
@@ -2325,6 +2352,14 @@ client.business_users.create(
-
+**expected_transaction_countries:** `typing.Optional[ExpectedTransactionCountries]`
+
+
+
+
+
+-
+
**risk_level:** `typing.Optional[RiskLevel]`
@@ -2507,6 +2542,7 @@ Calling `GET /business/user/{userId}` will return the entire User payload and ru
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_users.get(
@@ -2596,6 +2632,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_user_events.create(
@@ -2743,6 +2780,7 @@ You can retrieve any consumer user event you created using the [POST Consumer Us
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_user_events.get(
@@ -2832,6 +2870,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_user_events.create(
@@ -2979,6 +3018,7 @@ You can retrieve any business user event you created using the [POST Business Us
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_user_events.get(
diff --git a/src/flagright/__init__.py b/src/flagright/__init__.py
index 85284e1..85187d1 100644
--- a/src/flagright/__init__.py
+++ b/src/flagright/__init__.py
@@ -167,6 +167,8 @@
ExecutedLogicVars,
ExecutedRulesResult,
ExpectedIncome,
+ ExpectedTransactionCountries,
+ ExpectedTransactionCountry,
FailedRulesResult,
FalsePositiveDetails,
FileInfo,
@@ -568,6 +570,8 @@
"ExecutedLogicVars": ".types",
"ExecutedRulesResult": ".types",
"ExpectedIncome": ".types",
+ "ExpectedTransactionCountries": ".types",
+ "ExpectedTransactionCountry": ".types",
"FailedRulesResult": ".types",
"FalsePositiveDetails": ".types",
"FileInfo": ".types",
@@ -990,6 +994,8 @@ def __dir__():
"ExecutedLogicVars",
"ExecutedRulesResult",
"ExpectedIncome",
+ "ExpectedTransactionCountries",
+ "ExpectedTransactionCountry",
"FailedRulesResult",
"FalsePositiveDetails",
"FileInfo",
diff --git a/src/flagright/batch/client.py b/src/flagright/batch/client.py
index bb55fdb..477eee4 100644
--- a/src/flagright/batch/client.py
+++ b/src/flagright/batch/client.py
@@ -76,6 +76,7 @@ def verify_transaction(
from flagright import Flagright, Transaction
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.verify_transaction(
@@ -132,6 +133,7 @@ def get_transactions(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_transactions(
@@ -172,6 +174,7 @@ def create_transaction_events(
from flagright import Flagright, TransactionEvent
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_transaction_events(
@@ -222,6 +225,7 @@ def get_transaction_events(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_transaction_events(
@@ -270,6 +274,7 @@ def create_consumer_users(
from flagright import Flagright, User
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_consumer_users(
@@ -325,6 +330,7 @@ def get_consumer_users(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_consumer_users(
@@ -338,52 +344,6 @@ def get_consumer_users(
)
return _response.data
- def get_business_users(
- self,
- batch_id: str,
- *,
- page_size: typing.Optional[PageSize] = None,
- page: typing.Optional[Page] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> BatchBusinessUsersWithRulesResults:
- """
- Parameters
- ----------
- batch_id : str
- Unique Batch Identifier
-
- page_size : typing.Optional[PageSize]
- Page size (default 20)
-
- page : typing.Optional[Page]
- Page
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- BatchBusinessUsersWithRulesResults
- OK
-
- Examples
- --------
- from flagright import Flagright
-
- client = Flagright(
- api_key="YOUR_API_KEY",
- )
- client.batch.get_business_users(
- batch_id="batchId",
- page_size=1.1,
- page=1.1,
- )
- """
- _response = self._raw_client.get_business_users(
- batch_id, page_size=page_size, page=page, request_options=request_options
- )
- return _response.data
-
def create_business_users(
self,
*,
@@ -419,6 +379,7 @@ def create_business_users(
from flagright import Business, CompanyGeneralDetails, Flagright, LegalEntity
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_business_users(
@@ -448,14 +409,14 @@ def create_business_users(
)
return _response.data
- def get_consumer_user_events(
+ def get_business_users(
self,
batch_id: str,
*,
page_size: typing.Optional[PageSize] = None,
page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BatchConsumerUserEventsRulesResult:
+ ) -> BatchBusinessUsersWithRulesResults:
"""
Parameters
----------
@@ -473,7 +434,7 @@ def get_consumer_user_events(
Returns
-------
- BatchConsumerUserEventsRulesResult
+ BatchBusinessUsersWithRulesResults
OK
Examples
@@ -481,27 +442,86 @@ def get_consumer_user_events(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
- client.batch.get_consumer_user_events(
+ client.batch.get_business_users(
batch_id="batchId",
page_size=1.1,
page=1.1,
)
"""
- _response = self._raw_client.get_consumer_user_events(
+ _response = self._raw_client.get_business_users(
batch_id, page_size=page_size, page=page, request_options=request_options
)
return _response.data
- def get_business_user_events(
+ def create_consumer_user_events(
+ self,
+ *,
+ data: typing.Sequence[ConsumerUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[ConsumerUserEvent]
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ from flagright import ConsumerUserEvent, Flagright
+
+ client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
+ api_key="YOUR_API_KEY",
+ )
+ client.batch.create_consumer_user_events(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
+ data=[
+ ConsumerUserEvent(
+ timestamp=1.1,
+ user_id="userId",
+ )
+ ],
+ )
+ """
+ _response = self._raw_client.create_consumer_user_events(
+ data=data,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ batch_id=batch_id,
+ request_options=request_options,
+ )
+ return _response.data
+
+ def get_consumer_user_events(
self,
batch_id: str,
*,
page_size: typing.Optional[PageSize] = None,
page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BatchBusinessUserEventsWithRulesResult:
+ ) -> BatchConsumerUserEventsRulesResult:
"""
Parameters
----------
@@ -519,7 +539,7 @@ def get_business_user_events(
Returns
-------
- BatchBusinessUserEventsWithRulesResult
+ BatchConsumerUserEventsRulesResult
OK
Examples
@@ -527,23 +547,24 @@ def get_business_user_events(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
- client.batch.get_business_user_events(
+ client.batch.get_consumer_user_events(
batch_id="batchId",
page_size=1.1,
page=1.1,
)
"""
- _response = self._raw_client.get_business_user_events(
+ _response = self._raw_client.get_consumer_user_events(
batch_id, page_size=page_size, page=page, request_options=request_options
)
return _response.data
- def create_consumer_user_events(
+ def create_business_user_events(
self,
*,
- data: typing.Sequence[ConsumerUserEvent],
+ data: typing.Sequence[BusinessUserEvent],
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
@@ -552,7 +573,7 @@ def create_consumer_user_events(
"""
Parameters
----------
- data : typing.Sequence[ConsumerUserEvent]
+ data : typing.Sequence[BusinessUserEvent]
lock_cra_risk_level : typing.Optional[BooleanString]
Boolean string whether Flagright should lock the CRA risk level for the user.
@@ -572,23 +593,24 @@ def create_consumer_user_events(
Examples
--------
- from flagright import ConsumerUserEvent, Flagright
+ from flagright import BusinessUserEvent, Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
- client.batch.create_consumer_user_events(
+ client.batch.create_business_user_events(
lock_cra_risk_level="true",
lock_kyc_risk_level="true",
data=[
- ConsumerUserEvent(
+ BusinessUserEvent(
timestamp=1.1,
user_id="userId",
)
],
)
"""
- _response = self._raw_client.create_consumer_user_events(
+ _response = self._raw_client.create_business_user_events(
data=data,
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
@@ -597,60 +619,50 @@ def create_consumer_user_events(
)
return _response.data
- def create_business_user_events(
+ def get_business_user_events(
self,
+ batch_id: str,
*,
- data: typing.Sequence[BusinessUserEvent],
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- batch_id: typing.Optional[str] = OMIT,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BatchResponse:
+ ) -> BatchBusinessUserEventsWithRulesResult:
"""
Parameters
----------
- data : typing.Sequence[BusinessUserEvent]
-
- lock_cra_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the CRA risk level for the user.
+ batch_id : str
+ Unique Batch Identifier
- lock_kyc_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the KYC risk level for the user.
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
- batch_id : typing.Optional[str]
+ page : typing.Optional[Page]
+ Page
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- BatchResponse
- Created
+ BatchBusinessUserEventsWithRulesResult
+ OK
Examples
--------
- from flagright import BusinessUserEvent, Flagright
+ from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
- client.batch.create_business_user_events(
- lock_cra_risk_level="true",
- lock_kyc_risk_level="true",
- data=[
- BusinessUserEvent(
- timestamp=1.1,
- user_id="userId",
- )
- ],
+ client.batch.get_business_user_events(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
)
"""
- _response = self._raw_client.create_business_user_events(
- data=data,
- lock_cra_risk_level=lock_cra_risk_level,
- lock_kyc_risk_level=lock_kyc_risk_level,
- batch_id=batch_id,
- request_options=request_options,
+ _response = self._raw_client.get_business_user_events(
+ batch_id, page_size=page_size, page=page, request_options=request_options
)
return _response.data
@@ -707,6 +719,7 @@ async def verify_transaction(
from flagright import AsyncFlagright, Transaction
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -771,6 +784,7 @@ async def get_transactions(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -819,6 +833,7 @@ async def create_transaction_events(
from flagright import AsyncFlagright, TransactionEvent
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -877,6 +892,7 @@ async def get_transaction_events(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -933,6 +949,7 @@ async def create_consumer_users(
from flagright import AsyncFlagright, User
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -996,6 +1013,7 @@ async def get_consumer_users(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -1015,60 +1033,6 @@ async def main() -> None:
)
return _response.data
- async def get_business_users(
- self,
- batch_id: str,
- *,
- page_size: typing.Optional[PageSize] = None,
- page: typing.Optional[Page] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> BatchBusinessUsersWithRulesResults:
- """
- Parameters
- ----------
- batch_id : str
- Unique Batch Identifier
-
- page_size : typing.Optional[PageSize]
- Page size (default 20)
-
- page : typing.Optional[Page]
- Page
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- BatchBusinessUsersWithRulesResults
- OK
-
- Examples
- --------
- import asyncio
-
- from flagright import AsyncFlagright
-
- client = AsyncFlagright(
- api_key="YOUR_API_KEY",
- )
-
-
- async def main() -> None:
- await client.batch.get_business_users(
- batch_id="batchId",
- page_size=1.1,
- page=1.1,
- )
-
-
- asyncio.run(main())
- """
- _response = await self._raw_client.get_business_users(
- batch_id, page_size=page_size, page=page, request_options=request_options
- )
- return _response.data
-
async def create_business_users(
self,
*,
@@ -1111,6 +1075,7 @@ async def create_business_users(
)
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -1146,14 +1111,14 @@ async def main() -> None:
)
return _response.data
- async def get_consumer_user_events(
+ async def get_business_users(
self,
batch_id: str,
*,
page_size: typing.Optional[PageSize] = None,
page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BatchConsumerUserEventsRulesResult:
+ ) -> BatchBusinessUsersWithRulesResults:
"""
Parameters
----------
@@ -1171,7 +1136,7 @@ async def get_consumer_user_events(
Returns
-------
- BatchConsumerUserEventsRulesResult
+ BatchBusinessUsersWithRulesResults
OK
Examples
@@ -1181,12 +1146,13 @@ async def get_consumer_user_events(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
async def main() -> None:
- await client.batch.get_consumer_user_events(
+ await client.batch.get_business_users(
batch_id="batchId",
page_size=1.1,
page=1.1,
@@ -1195,19 +1161,85 @@ async def main() -> None:
asyncio.run(main())
"""
- _response = await self._raw_client.get_consumer_user_events(
+ _response = await self._raw_client.get_business_users(
batch_id, page_size=page_size, page=page, request_options=request_options
)
return _response.data
- async def get_business_user_events(
+ async def create_consumer_user_events(
+ self,
+ *,
+ data: typing.Sequence[ConsumerUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> BatchResponse:
+ """
+ Parameters
+ ----------
+ data : typing.Sequence[ConsumerUserEvent]
+
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
+
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ batch_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ BatchResponse
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from flagright import AsyncFlagright, ConsumerUserEvent
+
+ client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.batch.create_consumer_user_events(
+ lock_cra_risk_level="true",
+ lock_kyc_risk_level="true",
+ data=[
+ ConsumerUserEvent(
+ timestamp=1.1,
+ user_id="userId",
+ )
+ ],
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.create_consumer_user_events(
+ data=data,
+ lock_cra_risk_level=lock_cra_risk_level,
+ lock_kyc_risk_level=lock_kyc_risk_level,
+ batch_id=batch_id,
+ request_options=request_options,
+ )
+ return _response.data
+
+ async def get_consumer_user_events(
self,
batch_id: str,
*,
page_size: typing.Optional[PageSize] = None,
page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BatchBusinessUserEventsWithRulesResult:
+ ) -> BatchConsumerUserEventsRulesResult:
"""
Parameters
----------
@@ -1225,7 +1257,7 @@ async def get_business_user_events(
Returns
-------
- BatchBusinessUserEventsWithRulesResult
+ BatchConsumerUserEventsRulesResult
OK
Examples
@@ -1235,12 +1267,13 @@ async def get_business_user_events(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
async def main() -> None:
- await client.batch.get_business_user_events(
+ await client.batch.get_consumer_user_events(
batch_id="batchId",
page_size=1.1,
page=1.1,
@@ -1249,15 +1282,15 @@ async def main() -> None:
asyncio.run(main())
"""
- _response = await self._raw_client.get_business_user_events(
+ _response = await self._raw_client.get_consumer_user_events(
batch_id, page_size=page_size, page=page, request_options=request_options
)
return _response.data
- async def create_consumer_user_events(
+ async def create_business_user_events(
self,
*,
- data: typing.Sequence[ConsumerUserEvent],
+ data: typing.Sequence[BusinessUserEvent],
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
@@ -1266,7 +1299,7 @@ async def create_consumer_user_events(
"""
Parameters
----------
- data : typing.Sequence[ConsumerUserEvent]
+ data : typing.Sequence[BusinessUserEvent]
lock_cra_risk_level : typing.Optional[BooleanString]
Boolean string whether Flagright should lock the CRA risk level for the user.
@@ -1288,19 +1321,20 @@ async def create_consumer_user_events(
--------
import asyncio
- from flagright import AsyncFlagright, ConsumerUserEvent
+ from flagright import AsyncFlagright, BusinessUserEvent
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
async def main() -> None:
- await client.batch.create_consumer_user_events(
+ await client.batch.create_business_user_events(
lock_cra_risk_level="true",
lock_kyc_risk_level="true",
data=[
- ConsumerUserEvent(
+ BusinessUserEvent(
timestamp=1.1,
user_id="userId",
)
@@ -1310,7 +1344,7 @@ async def main() -> None:
asyncio.run(main())
"""
- _response = await self._raw_client.create_consumer_user_events(
+ _response = await self._raw_client.create_business_user_events(
data=data,
lock_cra_risk_level=lock_cra_risk_level,
lock_kyc_risk_level=lock_kyc_risk_level,
@@ -1319,67 +1353,57 @@ async def main() -> None:
)
return _response.data
- async def create_business_user_events(
+ async def get_business_user_events(
self,
+ batch_id: str,
*,
- data: typing.Sequence[BusinessUserEvent],
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- batch_id: typing.Optional[str] = OMIT,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> BatchResponse:
+ ) -> BatchBusinessUserEventsWithRulesResult:
"""
Parameters
----------
- data : typing.Sequence[BusinessUserEvent]
-
- lock_cra_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the CRA risk level for the user.
+ batch_id : str
+ Unique Batch Identifier
- lock_kyc_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the KYC risk level for the user.
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
- batch_id : typing.Optional[str]
+ page : typing.Optional[Page]
+ Page
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- BatchResponse
- Created
+ BatchBusinessUserEventsWithRulesResult
+ OK
Examples
--------
import asyncio
- from flagright import AsyncFlagright, BusinessUserEvent
+ from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
async def main() -> None:
- await client.batch.create_business_user_events(
- lock_cra_risk_level="true",
- lock_kyc_risk_level="true",
- data=[
- BusinessUserEvent(
- timestamp=1.1,
- user_id="userId",
- )
- ],
+ await client.batch.get_business_user_events(
+ batch_id="batchId",
+ page_size=1.1,
+ page=1.1,
)
asyncio.run(main())
"""
- _response = await self._raw_client.create_business_user_events(
- data=data,
- lock_cra_risk_level=lock_cra_risk_level,
- lock_kyc_risk_level=lock_kyc_risk_level,
- batch_id=batch_id,
- request_options=request_options,
+ _response = await self._raw_client.get_business_user_events(
+ batch_id, page_size=page_size, page=page, request_options=request_options
)
return _response.data
diff --git a/src/flagright/batch/raw_client.py b/src/flagright/batch/raw_client.py
index 77e9e7c..8f4aabe 100644
--- a/src/flagright/batch/raw_client.py
+++ b/src/flagright/batch/raw_client.py
@@ -586,55 +586,67 @@ def get_consumer_users(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def get_business_users(
+ def create_business_users(
self,
- batch_id: str,
*,
- page_size: typing.Optional[PageSize] = None,
- page: typing.Optional[Page] = None,
+ data: typing.Sequence[Business],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[BatchBusinessUsersWithRulesResults]:
+ ) -> HttpResponse[BatchResponse]:
"""
Parameters
----------
- batch_id : str
- Unique Batch Identifier
+ data : typing.Sequence[Business]
- page_size : typing.Optional[PageSize]
- Page size (default 20)
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
- page : typing.Optional[Page]
- Page
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- HttpResponse[BatchBusinessUsersWithRulesResults]
- OK
+ HttpResponse[BatchResponse]
+ Created
"""
_response = self._client_wrapper.httpx_client.request(
- f"batch/business/users/{jsonable_encoder(batch_id)}",
- method="GET",
+ "batch/business/users",
+ method="POST",
params={
- "pageSize": page_size,
- "page": page,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[Business], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchBusinessUsersWithRulesResults,
+ BatchResponse,
parse_obj_as(
- type_=BatchBusinessUsersWithRulesResults, # type: ignore
+ type_=BatchResponse, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
- if _response.status_code == 401:
- raise UnauthorizedError(
+ if _response.status_code == 400:
+ raise BadRequestError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -644,8 +656,8 @@ def get_business_users(
),
),
)
- if _response.status_code == 404:
- raise NotFoundError(
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -671,67 +683,55 @@ def get_business_users(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def create_business_users(
+ def get_business_users(
self,
+ batch_id: str,
*,
- data: typing.Sequence[Business],
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- batch_id: typing.Optional[str] = OMIT,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[BatchResponse]:
+ ) -> HttpResponse[BatchBusinessUsersWithRulesResults]:
"""
Parameters
----------
- data : typing.Sequence[Business]
-
- lock_cra_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the CRA risk level for the user.
+ batch_id : str
+ Unique Batch Identifier
- lock_kyc_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the KYC risk level for the user.
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
- batch_id : typing.Optional[str]
+ page : typing.Optional[Page]
+ Page
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- HttpResponse[BatchResponse]
- Created
+ HttpResponse[BatchBusinessUsersWithRulesResults]
+ OK
"""
_response = self._client_wrapper.httpx_client.request(
- "batch/business/users",
- method="POST",
+ f"batch/business/users/{jsonable_encoder(batch_id)}",
+ method="GET",
params={
- "lockCraRiskLevel": lock_cra_risk_level,
- "lockKycRiskLevel": lock_kyc_risk_level,
- },
- json={
- "batchId": batch_id,
- "data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[Business], direction="write"
- ),
- },
- headers={
- "content-type": "application/json",
+ "pageSize": page_size,
+ "page": page,
},
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchResponse,
+ BatchBusinessUsersWithRulesResults,
parse_obj_as(
- type_=BatchResponse, # type: ignore
+ type_=BatchBusinessUsersWithRulesResults, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
- if _response.status_code == 400:
- raise BadRequestError(
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -741,8 +741,8 @@ def create_business_users(
),
),
)
- if _response.status_code == 401:
- raise UnauthorizedError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -768,55 +768,67 @@ def create_business_users(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def get_consumer_user_events(
+ def create_consumer_user_events(
self,
- batch_id: str,
*,
- page_size: typing.Optional[PageSize] = None,
- page: typing.Optional[Page] = None,
+ data: typing.Sequence[ConsumerUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[BatchConsumerUserEventsRulesResult]:
+ ) -> HttpResponse[BatchResponse]:
"""
Parameters
----------
- batch_id : str
- Unique Batch Identifier
+ data : typing.Sequence[ConsumerUserEvent]
- page_size : typing.Optional[PageSize]
- Page size (default 20)
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
- page : typing.Optional[Page]
- Page
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- HttpResponse[BatchConsumerUserEventsRulesResult]
- OK
+ HttpResponse[BatchResponse]
+ Created
"""
_response = self._client_wrapper.httpx_client.request(
- f"batch/events/consumer/user/{jsonable_encoder(batch_id)}",
- method="GET",
+ "batch/events/consumer/user",
+ method="POST",
params={
- "pageSize": page_size,
- "page": page,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[ConsumerUserEvent], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchConsumerUserEventsRulesResult,
+ BatchResponse,
parse_obj_as(
- type_=BatchConsumerUserEventsRulesResult, # type: ignore
+ type_=BatchResponse, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
- if _response.status_code == 401:
- raise UnauthorizedError(
+ if _response.status_code == 400:
+ raise BadRequestError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -826,8 +838,8 @@ def get_consumer_user_events(
),
),
)
- if _response.status_code == 404:
- raise NotFoundError(
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -853,14 +865,14 @@ def get_consumer_user_events(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def get_business_user_events(
+ def get_consumer_user_events(
self,
batch_id: str,
*,
page_size: typing.Optional[PageSize] = None,
page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[BatchBusinessUserEventsWithRulesResult]:
+ ) -> HttpResponse[BatchConsumerUserEventsRulesResult]:
"""
Parameters
----------
@@ -878,11 +890,11 @@ def get_business_user_events(
Returns
-------
- HttpResponse[BatchBusinessUserEventsWithRulesResult]
+ HttpResponse[BatchConsumerUserEventsRulesResult]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"batch/events/business/user/{jsonable_encoder(batch_id)}",
+ f"batch/events/consumer/user/{jsonable_encoder(batch_id)}",
method="GET",
params={
"pageSize": page_size,
@@ -893,9 +905,9 @@ def get_business_user_events(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchBusinessUserEventsWithRulesResult,
+ BatchConsumerUserEventsRulesResult,
parse_obj_as(
- type_=BatchBusinessUserEventsWithRulesResult, # type: ignore
+ type_=BatchConsumerUserEventsRulesResult, # type: ignore
object_=_response.json(),
),
)
@@ -938,10 +950,10 @@ def get_business_user_events(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def create_consumer_user_events(
+ def create_business_user_events(
self,
*,
- data: typing.Sequence[ConsumerUserEvent],
+ data: typing.Sequence[BusinessUserEvent],
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
@@ -950,7 +962,7 @@ def create_consumer_user_events(
"""
Parameters
----------
- data : typing.Sequence[ConsumerUserEvent]
+ data : typing.Sequence[BusinessUserEvent]
lock_cra_risk_level : typing.Optional[BooleanString]
Boolean string whether Flagright should lock the CRA risk level for the user.
@@ -969,7 +981,7 @@ def create_consumer_user_events(
Created
"""
_response = self._client_wrapper.httpx_client.request(
- "batch/events/consumer/user",
+ "batch/events/business/user",
method="POST",
params={
"lockCraRiskLevel": lock_cra_risk_level,
@@ -978,7 +990,7 @@ def create_consumer_user_events(
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[ConsumerUserEvent], direction="write"
+ object_=data, annotation=typing.Sequence[BusinessUserEvent], direction="write"
),
},
headers={
@@ -1035,67 +1047,55 @@ def create_consumer_user_events(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def create_business_user_events(
+ def get_business_user_events(
self,
+ batch_id: str,
*,
- data: typing.Sequence[BusinessUserEvent],
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- batch_id: typing.Optional[str] = OMIT,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[BatchResponse]:
+ ) -> HttpResponse[BatchBusinessUserEventsWithRulesResult]:
"""
Parameters
----------
- data : typing.Sequence[BusinessUserEvent]
-
- lock_cra_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the CRA risk level for the user.
+ batch_id : str
+ Unique Batch Identifier
- lock_kyc_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the KYC risk level for the user.
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
- batch_id : typing.Optional[str]
+ page : typing.Optional[Page]
+ Page
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- HttpResponse[BatchResponse]
- Created
+ HttpResponse[BatchBusinessUserEventsWithRulesResult]
+ OK
"""
_response = self._client_wrapper.httpx_client.request(
- "batch/events/business/user",
- method="POST",
+ f"batch/events/business/user/{jsonable_encoder(batch_id)}",
+ method="GET",
params={
- "lockCraRiskLevel": lock_cra_risk_level,
- "lockKycRiskLevel": lock_kyc_risk_level,
- },
- json={
- "batchId": batch_id,
- "data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[BusinessUserEvent], direction="write"
- ),
- },
- headers={
- "content-type": "application/json",
+ "pageSize": page_size,
+ "page": page,
},
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchResponse,
+ BatchBusinessUserEventsWithRulesResult,
parse_obj_as(
- type_=BatchResponse, # type: ignore
+ type_=BatchBusinessUserEventsWithRulesResult, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
- if _response.status_code == 400:
- raise BadRequestError(
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -1105,8 +1105,8 @@ def create_business_user_events(
),
),
)
- if _response.status_code == 401:
- raise UnauthorizedError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -1682,55 +1682,67 @@ async def get_consumer_users(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_business_users(
+ async def create_business_users(
self,
- batch_id: str,
*,
- page_size: typing.Optional[PageSize] = None,
- page: typing.Optional[Page] = None,
+ data: typing.Sequence[Business],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[BatchBusinessUsersWithRulesResults]:
+ ) -> AsyncHttpResponse[BatchResponse]:
"""
Parameters
----------
- batch_id : str
- Unique Batch Identifier
+ data : typing.Sequence[Business]
- page_size : typing.Optional[PageSize]
- Page size (default 20)
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
- page : typing.Optional[Page]
- Page
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[BatchBusinessUsersWithRulesResults]
- OK
+ AsyncHttpResponse[BatchResponse]
+ Created
"""
_response = await self._client_wrapper.httpx_client.request(
- f"batch/business/users/{jsonable_encoder(batch_id)}",
- method="GET",
+ "batch/business/users",
+ method="POST",
params={
- "pageSize": page_size,
- "page": page,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[Business], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchBusinessUsersWithRulesResults,
+ BatchResponse,
parse_obj_as(
- type_=BatchBusinessUsersWithRulesResults, # type: ignore
+ type_=BatchResponse, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 401:
- raise UnauthorizedError(
+ if _response.status_code == 400:
+ raise BadRequestError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -1740,8 +1752,8 @@ async def get_business_users(
),
),
)
- if _response.status_code == 404:
- raise NotFoundError(
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -1767,67 +1779,55 @@ async def get_business_users(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def create_business_users(
+ async def get_business_users(
self,
+ batch_id: str,
*,
- data: typing.Sequence[Business],
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- batch_id: typing.Optional[str] = OMIT,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[BatchResponse]:
+ ) -> AsyncHttpResponse[BatchBusinessUsersWithRulesResults]:
"""
Parameters
----------
- data : typing.Sequence[Business]
-
- lock_cra_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the CRA risk level for the user.
+ batch_id : str
+ Unique Batch Identifier
- lock_kyc_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the KYC risk level for the user.
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
- batch_id : typing.Optional[str]
+ page : typing.Optional[Page]
+ Page
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[BatchResponse]
- Created
+ AsyncHttpResponse[BatchBusinessUsersWithRulesResults]
+ OK
"""
_response = await self._client_wrapper.httpx_client.request(
- "batch/business/users",
- method="POST",
+ f"batch/business/users/{jsonable_encoder(batch_id)}",
+ method="GET",
params={
- "lockCraRiskLevel": lock_cra_risk_level,
- "lockKycRiskLevel": lock_kyc_risk_level,
- },
- json={
- "batchId": batch_id,
- "data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[Business], direction="write"
- ),
- },
- headers={
- "content-type": "application/json",
+ "pageSize": page_size,
+ "page": page,
},
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchResponse,
+ BatchBusinessUsersWithRulesResults,
parse_obj_as(
- type_=BatchResponse, # type: ignore
+ type_=BatchBusinessUsersWithRulesResults, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 400:
- raise BadRequestError(
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -1837,8 +1837,8 @@ async def create_business_users(
),
),
)
- if _response.status_code == 401:
- raise UnauthorizedError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -1864,55 +1864,67 @@ async def create_business_users(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_consumer_user_events(
+ async def create_consumer_user_events(
self,
- batch_id: str,
*,
- page_size: typing.Optional[PageSize] = None,
- page: typing.Optional[Page] = None,
+ data: typing.Sequence[ConsumerUserEvent],
+ lock_cra_risk_level: typing.Optional[BooleanString] = None,
+ lock_kyc_risk_level: typing.Optional[BooleanString] = None,
+ batch_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[BatchConsumerUserEventsRulesResult]:
+ ) -> AsyncHttpResponse[BatchResponse]:
"""
Parameters
----------
- batch_id : str
- Unique Batch Identifier
+ data : typing.Sequence[ConsumerUserEvent]
- page_size : typing.Optional[PageSize]
- Page size (default 20)
+ lock_cra_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the CRA risk level for the user.
- page : typing.Optional[Page]
- Page
+ lock_kyc_risk_level : typing.Optional[BooleanString]
+ Boolean string whether Flagright should lock the KYC risk level for the user.
+
+ batch_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[BatchConsumerUserEventsRulesResult]
- OK
+ AsyncHttpResponse[BatchResponse]
+ Created
"""
_response = await self._client_wrapper.httpx_client.request(
- f"batch/events/consumer/user/{jsonable_encoder(batch_id)}",
- method="GET",
+ "batch/events/consumer/user",
+ method="POST",
params={
- "pageSize": page_size,
- "page": page,
+ "lockCraRiskLevel": lock_cra_risk_level,
+ "lockKycRiskLevel": lock_kyc_risk_level,
+ },
+ json={
+ "batchId": batch_id,
+ "data": convert_and_respect_annotation_metadata(
+ object_=data, annotation=typing.Sequence[ConsumerUserEvent], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchConsumerUserEventsRulesResult,
+ BatchResponse,
parse_obj_as(
- type_=BatchConsumerUserEventsRulesResult, # type: ignore
+ type_=BatchResponse, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 401:
- raise UnauthorizedError(
+ if _response.status_code == 400:
+ raise BadRequestError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -1922,8 +1934,8 @@ async def get_consumer_user_events(
),
),
)
- if _response.status_code == 404:
- raise NotFoundError(
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -1949,14 +1961,14 @@ async def get_consumer_user_events(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_business_user_events(
+ async def get_consumer_user_events(
self,
batch_id: str,
*,
page_size: typing.Optional[PageSize] = None,
page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[BatchBusinessUserEventsWithRulesResult]:
+ ) -> AsyncHttpResponse[BatchConsumerUserEventsRulesResult]:
"""
Parameters
----------
@@ -1974,11 +1986,11 @@ async def get_business_user_events(
Returns
-------
- AsyncHttpResponse[BatchBusinessUserEventsWithRulesResult]
+ AsyncHttpResponse[BatchConsumerUserEventsRulesResult]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- f"batch/events/business/user/{jsonable_encoder(batch_id)}",
+ f"batch/events/consumer/user/{jsonable_encoder(batch_id)}",
method="GET",
params={
"pageSize": page_size,
@@ -1989,9 +2001,9 @@ async def get_business_user_events(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchBusinessUserEventsWithRulesResult,
+ BatchConsumerUserEventsRulesResult,
parse_obj_as(
- type_=BatchBusinessUserEventsWithRulesResult, # type: ignore
+ type_=BatchConsumerUserEventsRulesResult, # type: ignore
object_=_response.json(),
),
)
@@ -2034,10 +2046,10 @@ async def get_business_user_events(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def create_consumer_user_events(
+ async def create_business_user_events(
self,
*,
- data: typing.Sequence[ConsumerUserEvent],
+ data: typing.Sequence[BusinessUserEvent],
lock_cra_risk_level: typing.Optional[BooleanString] = None,
lock_kyc_risk_level: typing.Optional[BooleanString] = None,
batch_id: typing.Optional[str] = OMIT,
@@ -2046,7 +2058,7 @@ async def create_consumer_user_events(
"""
Parameters
----------
- data : typing.Sequence[ConsumerUserEvent]
+ data : typing.Sequence[BusinessUserEvent]
lock_cra_risk_level : typing.Optional[BooleanString]
Boolean string whether Flagright should lock the CRA risk level for the user.
@@ -2065,7 +2077,7 @@ async def create_consumer_user_events(
Created
"""
_response = await self._client_wrapper.httpx_client.request(
- "batch/events/consumer/user",
+ "batch/events/business/user",
method="POST",
params={
"lockCraRiskLevel": lock_cra_risk_level,
@@ -2074,7 +2086,7 @@ async def create_consumer_user_events(
json={
"batchId": batch_id,
"data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[ConsumerUserEvent], direction="write"
+ object_=data, annotation=typing.Sequence[BusinessUserEvent], direction="write"
),
},
headers={
@@ -2131,67 +2143,55 @@ async def create_consumer_user_events(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def create_business_user_events(
+ async def get_business_user_events(
self,
+ batch_id: str,
*,
- data: typing.Sequence[BusinessUserEvent],
- lock_cra_risk_level: typing.Optional[BooleanString] = None,
- lock_kyc_risk_level: typing.Optional[BooleanString] = None,
- batch_id: typing.Optional[str] = OMIT,
+ page_size: typing.Optional[PageSize] = None,
+ page: typing.Optional[Page] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[BatchResponse]:
+ ) -> AsyncHttpResponse[BatchBusinessUserEventsWithRulesResult]:
"""
Parameters
----------
- data : typing.Sequence[BusinessUserEvent]
-
- lock_cra_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the CRA risk level for the user.
+ batch_id : str
+ Unique Batch Identifier
- lock_kyc_risk_level : typing.Optional[BooleanString]
- Boolean string whether Flagright should lock the KYC risk level for the user.
+ page_size : typing.Optional[PageSize]
+ Page size (default 20)
- batch_id : typing.Optional[str]
+ page : typing.Optional[Page]
+ Page
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[BatchResponse]
- Created
+ AsyncHttpResponse[BatchBusinessUserEventsWithRulesResult]
+ OK
"""
_response = await self._client_wrapper.httpx_client.request(
- "batch/events/business/user",
- method="POST",
+ f"batch/events/business/user/{jsonable_encoder(batch_id)}",
+ method="GET",
params={
- "lockCraRiskLevel": lock_cra_risk_level,
- "lockKycRiskLevel": lock_kyc_risk_level,
- },
- json={
- "batchId": batch_id,
- "data": convert_and_respect_annotation_metadata(
- object_=data, annotation=typing.Sequence[BusinessUserEvent], direction="write"
- ),
- },
- headers={
- "content-type": "application/json",
+ "pageSize": page_size,
+ "page": page,
},
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BatchResponse,
+ BatchBusinessUserEventsWithRulesResult,
parse_obj_as(
- type_=BatchResponse, # type: ignore
+ type_=BatchBusinessUserEventsWithRulesResult, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 400:
- raise BadRequestError(
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
@@ -2201,8 +2201,8 @@ async def create_business_user_events(
),
),
)
- if _response.status_code == 401:
- raise UnauthorizedError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
ApiErrorResponse,
diff --git a/src/flagright/business_user_events/client.py b/src/flagright/business_user_events/client.py
index 1b94587..da36d22 100644
--- a/src/flagright/business_user_events/client.py
+++ b/src/flagright/business_user_events/client.py
@@ -108,6 +108,7 @@ def create(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_user_events.create(
@@ -158,6 +159,7 @@ def get(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_user_events.get(
@@ -264,6 +266,7 @@ async def create(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -322,6 +325,7 @@ async def get(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index e1af272..e476679 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -13,6 +13,7 @@
from ..types.business_with_rules_result import BusinessWithRulesResult
from ..types.corporate_entity_details import CorporateEntityDetails
from ..types.device_data import DeviceData
+from ..types.expected_transaction_countries import ExpectedTransactionCountries
from ..types.kyc_status_details import KycStatusDetails
from ..types.legal_entity import LegalEntity
from ..types.mcc_details import MccDetails
@@ -66,6 +67,7 @@ def create(
associated_parties: typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]] = OMIT,
business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
+ expected_transaction_countries: typing.Optional[ExpectedTransactionCountries] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
allowed_payment_methods: typing.Optional[typing.Sequence[PaymentMethod]] = OMIT,
@@ -146,6 +148,8 @@ def create(
transaction_limits : typing.Optional[TransactionLimits]
+ expected_transaction_countries : typing.Optional[ExpectedTransactionCountries]
+
risk_level : typing.Optional[RiskLevel]
kyc_risk_level : typing.Optional[RiskLevel]
@@ -199,6 +203,7 @@ def create(
from flagright import CompanyGeneralDetails, Flagright, LegalEntity
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_users.create(
@@ -233,6 +238,7 @@ def create(
associated_parties=associated_parties,
business_partners=business_partners,
transaction_limits=transaction_limits,
+ expected_transaction_countries=expected_transaction_countries,
risk_level=risk_level,
kyc_risk_level=kyc_risk_level,
allowed_payment_methods=allowed_payment_methods,
@@ -280,6 +286,7 @@ def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions]
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_users.get(
@@ -324,6 +331,7 @@ async def create(
associated_parties: typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]] = OMIT,
business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
+ expected_transaction_countries: typing.Optional[ExpectedTransactionCountries] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
allowed_payment_methods: typing.Optional[typing.Sequence[PaymentMethod]] = OMIT,
@@ -404,6 +412,8 @@ async def create(
transaction_limits : typing.Optional[TransactionLimits]
+ expected_transaction_countries : typing.Optional[ExpectedTransactionCountries]
+
risk_level : typing.Optional[RiskLevel]
kyc_risk_level : typing.Optional[RiskLevel]
@@ -459,6 +469,7 @@ async def create(
from flagright import AsyncFlagright, CompanyGeneralDetails, LegalEntity
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -499,6 +510,7 @@ async def main() -> None:
associated_parties=associated_parties,
business_partners=business_partners,
transaction_limits=transaction_limits,
+ expected_transaction_countries=expected_transaction_countries,
risk_level=risk_level,
kyc_risk_level=kyc_risk_level,
allowed_payment_methods=allowed_payment_methods,
@@ -550,6 +562,7 @@ async def get(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index f867b65..ff9cbc2 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -23,6 +23,7 @@
from ..types.business_with_rules_result import BusinessWithRulesResult
from ..types.corporate_entity_details import CorporateEntityDetails
from ..types.device_data import DeviceData
+from ..types.expected_transaction_countries import ExpectedTransactionCountries
from ..types.kyc_status_details import KycStatusDetails
from ..types.legal_entity import LegalEntity
from ..types.mcc_details import MccDetails
@@ -64,6 +65,7 @@ def create(
associated_parties: typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]] = OMIT,
business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
+ expected_transaction_countries: typing.Optional[ExpectedTransactionCountries] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
allowed_payment_methods: typing.Optional[typing.Sequence[PaymentMethod]] = OMIT,
@@ -144,6 +146,8 @@ def create(
transaction_limits : typing.Optional[TransactionLimits]
+ expected_transaction_countries : typing.Optional[ExpectedTransactionCountries]
+
risk_level : typing.Optional[RiskLevel]
kyc_risk_level : typing.Optional[RiskLevel]
@@ -234,6 +238,9 @@ def create(
"transactionLimits": convert_and_respect_annotation_metadata(
object_=transaction_limits, annotation=TransactionLimits, direction="write"
),
+ "expectedTransactionCountries": convert_and_respect_annotation_metadata(
+ object_=expected_transaction_countries, annotation=ExpectedTransactionCountries, direction="write"
+ ),
"riskLevel": risk_level,
"kycRiskLevel": kyc_risk_level,
"allowedPaymentMethods": allowed_payment_methods,
@@ -424,6 +431,7 @@ async def create(
associated_parties: typing.Optional[typing.Sequence[BusinessAssociatedPartiesItem]] = OMIT,
business_partners: typing.Optional[typing.Sequence[LegalEntity]] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
+ expected_transaction_countries: typing.Optional[ExpectedTransactionCountries] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
allowed_payment_methods: typing.Optional[typing.Sequence[PaymentMethod]] = OMIT,
@@ -504,6 +512,8 @@ async def create(
transaction_limits : typing.Optional[TransactionLimits]
+ expected_transaction_countries : typing.Optional[ExpectedTransactionCountries]
+
risk_level : typing.Optional[RiskLevel]
kyc_risk_level : typing.Optional[RiskLevel]
@@ -594,6 +604,9 @@ async def create(
"transactionLimits": convert_and_respect_annotation_metadata(
object_=transaction_limits, annotation=TransactionLimits, direction="write"
),
+ "expectedTransactionCountries": convert_and_respect_annotation_metadata(
+ object_=expected_transaction_countries, annotation=ExpectedTransactionCountries, direction="write"
+ ),
"riskLevel": risk_level,
"kycRiskLevel": kyc_risk_level,
"allowedPaymentMethods": allowed_payment_methods,
diff --git a/src/flagright/client.py b/src/flagright/client.py
index 36c79e1..dad7262 100644
--- a/src/flagright/client.py
+++ b/src/flagright/client.py
@@ -36,6 +36,7 @@ class Flagright:
+ authorization : str
api_key : str
headers : typing.Optional[typing.Dict[str, str]]
Additional headers to send with every request.
@@ -54,6 +55,7 @@ class Flagright:
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
"""
@@ -63,6 +65,7 @@ def __init__(
*,
base_url: typing.Optional[str] = None,
environment: FlagrightEnvironment = FlagrightEnvironment.SANDBOX_API_SERVER_EU_1,
+ authorization: str,
api_key: str,
headers: typing.Optional[typing.Dict[str, str]] = None,
timeout: typing.Optional[float] = None,
@@ -74,6 +77,7 @@ def __init__(
)
self._client_wrapper = SyncClientWrapper(
base_url=_get_base_url(base_url=base_url, environment=environment),
+ authorization=authorization,
api_key=api_key,
headers=headers,
httpx_client=httpx_client
@@ -166,6 +170,7 @@ class AsyncFlagright:
+ authorization : str
api_key : str
headers : typing.Optional[typing.Dict[str, str]]
Additional headers to send with every request.
@@ -184,6 +189,7 @@ class AsyncFlagright:
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
"""
@@ -193,6 +199,7 @@ def __init__(
*,
base_url: typing.Optional[str] = None,
environment: FlagrightEnvironment = FlagrightEnvironment.SANDBOX_API_SERVER_EU_1,
+ authorization: str,
api_key: str,
headers: typing.Optional[typing.Dict[str, str]] = None,
timeout: typing.Optional[float] = None,
@@ -204,6 +211,7 @@ def __init__(
)
self._client_wrapper = AsyncClientWrapper(
base_url=_get_base_url(base_url=base_url, environment=environment),
+ authorization=authorization,
api_key=api_key,
headers=headers,
httpx_client=httpx_client
diff --git a/src/flagright/consumer_user_events/client.py b/src/flagright/consumer_user_events/client.py
index 8148a4b..476273d 100644
--- a/src/flagright/consumer_user_events/client.py
+++ b/src/flagright/consumer_user_events/client.py
@@ -108,6 +108,7 @@ def create(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_user_events.create(
@@ -158,6 +159,7 @@ def get(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_user_events.get(
@@ -264,6 +266,7 @@ async def create(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -322,6 +325,7 @@ async def get(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
index 44c02ef..1aa6b36 100644
--- a/src/flagright/consumer_users/client.py
+++ b/src/flagright/consumer_users/client.py
@@ -14,6 +14,7 @@
from ..types.employment_details import EmploymentDetails
from ..types.employment_status import EmploymentStatus
from ..types.expected_income import ExpectedIncome
+from ..types.expected_transaction_countries import ExpectedTransactionCountries
from ..types.kyc_status_details import KycStatusDetails
from ..types.legal_document import LegalDocument
from ..types.pep_status import PepStatus
@@ -71,6 +72,7 @@ def create(
employment_details: typing.Optional[EmploymentDetails] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
expected_income: typing.Optional[ExpectedIncome] = OMIT,
+ expected_transaction_countries: typing.Optional[ExpectedTransactionCountries] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
@@ -149,6 +151,8 @@ def create(
expected_income : typing.Optional[ExpectedIncome]
+ expected_transaction_countries : typing.Optional[ExpectedTransactionCountries]
+
risk_level : typing.Optional[RiskLevel]
kyc_risk_level : typing.Optional[RiskLevel]
@@ -214,6 +218,7 @@ def create(
)
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_users.create(
@@ -293,6 +298,7 @@ def create(
employment_details=employment_details,
transaction_limits=transaction_limits,
expected_income=expected_income,
+ expected_transaction_countries=expected_transaction_countries,
risk_level=risk_level,
kyc_risk_level=kyc_risk_level,
acquisition_channel=acquisition_channel,
@@ -342,6 +348,7 @@ def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions]
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_users.get(
@@ -387,6 +394,7 @@ async def create(
employment_details: typing.Optional[EmploymentDetails] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
expected_income: typing.Optional[ExpectedIncome] = OMIT,
+ expected_transaction_countries: typing.Optional[ExpectedTransactionCountries] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
@@ -465,6 +473,8 @@ async def create(
expected_income : typing.Optional[ExpectedIncome]
+ expected_transaction_countries : typing.Optional[ExpectedTransactionCountries]
+
risk_level : typing.Optional[RiskLevel]
kyc_risk_level : typing.Optional[RiskLevel]
@@ -532,6 +542,7 @@ async def create(
)
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -617,6 +628,7 @@ async def main() -> None:
employment_details=employment_details,
transaction_limits=transaction_limits,
expected_income=expected_income,
+ expected_transaction_countries=expected_transaction_countries,
risk_level=risk_level,
kyc_risk_level=kyc_risk_level,
acquisition_channel=acquisition_channel,
@@ -670,6 +682,7 @@ async def get(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
diff --git a/src/flagright/consumer_users/raw_client.py b/src/flagright/consumer_users/raw_client.py
index 6978af6..6f3dde4 100644
--- a/src/flagright/consumer_users/raw_client.py
+++ b/src/flagright/consumer_users/raw_client.py
@@ -24,6 +24,7 @@
from ..types.employment_details import EmploymentDetails
from ..types.employment_status import EmploymentStatus
from ..types.expected_income import ExpectedIncome
+from ..types.expected_transaction_countries import ExpectedTransactionCountries
from ..types.kyc_status_details import KycStatusDetails
from ..types.legal_document import LegalDocument
from ..types.pep_status import PepStatus
@@ -69,6 +70,7 @@ def create(
employment_details: typing.Optional[EmploymentDetails] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
expected_income: typing.Optional[ExpectedIncome] = OMIT,
+ expected_transaction_countries: typing.Optional[ExpectedTransactionCountries] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
@@ -147,6 +149,8 @@ def create(
expected_income : typing.Optional[ExpectedIncome]
+ expected_transaction_countries : typing.Optional[ExpectedTransactionCountries]
+
risk_level : typing.Optional[RiskLevel]
kyc_risk_level : typing.Optional[RiskLevel]
@@ -237,6 +241,9 @@ def create(
"expectedIncome": convert_and_respect_annotation_metadata(
object_=expected_income, annotation=ExpectedIncome, direction="write"
),
+ "expectedTransactionCountries": convert_and_respect_annotation_metadata(
+ object_=expected_transaction_countries, annotation=ExpectedTransactionCountries, direction="write"
+ ),
"riskLevel": risk_level,
"kycRiskLevel": kyc_risk_level,
"acquisitionChannel": acquisition_channel,
@@ -430,6 +437,7 @@ async def create(
employment_details: typing.Optional[EmploymentDetails] = OMIT,
transaction_limits: typing.Optional[TransactionLimits] = OMIT,
expected_income: typing.Optional[ExpectedIncome] = OMIT,
+ expected_transaction_countries: typing.Optional[ExpectedTransactionCountries] = OMIT,
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
@@ -508,6 +516,8 @@ async def create(
expected_income : typing.Optional[ExpectedIncome]
+ expected_transaction_countries : typing.Optional[ExpectedTransactionCountries]
+
risk_level : typing.Optional[RiskLevel]
kyc_risk_level : typing.Optional[RiskLevel]
@@ -598,6 +608,9 @@ async def create(
"expectedIncome": convert_and_respect_annotation_metadata(
object_=expected_income, annotation=ExpectedIncome, direction="write"
),
+ "expectedTransactionCountries": convert_and_respect_annotation_metadata(
+ object_=expected_transaction_countries, annotation=ExpectedTransactionCountries, direction="write"
+ ),
"riskLevel": risk_level,
"kycRiskLevel": kyc_risk_level,
"acquisitionChannel": acquisition_channel,
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index b39fc6a..eff4410 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -10,11 +10,13 @@ class BaseClientWrapper:
def __init__(
self,
*,
+ authorization: str,
api_key: str,
headers: typing.Optional[typing.Dict[str, str]] = None,
base_url: str,
timeout: typing.Optional[float] = None,
):
+ self._authorization = authorization
self.api_key = api_key
self._headers = headers
self._base_url = base_url
@@ -22,12 +24,13 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.38",
+ "User-Agent": "flagright/1.8.39",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.38",
+ "X-Fern-SDK-Version": "1.8.39",
**(self.get_custom_headers() or {}),
}
+ headers["Authorization"] = self._authorization
headers["x-api-key"] = self.api_key
return headers
@@ -45,13 +48,16 @@ class SyncClientWrapper(BaseClientWrapper):
def __init__(
self,
*,
+ authorization: str,
api_key: str,
headers: typing.Optional[typing.Dict[str, str]] = None,
base_url: str,
timeout: typing.Optional[float] = None,
httpx_client: httpx.Client,
):
- super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout)
+ super().__init__(
+ authorization=authorization, api_key=api_key, headers=headers, base_url=base_url, timeout=timeout
+ )
self.httpx_client = HttpClient(
httpx_client=httpx_client,
base_headers=self.get_headers,
@@ -64,13 +70,16 @@ class AsyncClientWrapper(BaseClientWrapper):
def __init__(
self,
*,
+ authorization: str,
api_key: str,
headers: typing.Optional[typing.Dict[str, str]] = None,
base_url: str,
timeout: typing.Optional[float] = None,
httpx_client: httpx.AsyncClient,
):
- super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout)
+ super().__init__(
+ authorization=authorization, api_key=api_key, headers=headers, base_url=base_url, timeout=timeout
+ )
self.httpx_client = AsyncHttpClient(
httpx_client=httpx_client,
base_headers=self.get_headers,
diff --git a/src/flagright/transaction_events/client.py b/src/flagright/transaction_events/client.py
index 9e2e11c..7449354 100644
--- a/src/flagright/transaction_events/client.py
+++ b/src/flagright/transaction_events/client.py
@@ -104,6 +104,7 @@ def create(
from flagright import DeviceData, Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transaction_events.create(
@@ -163,6 +164,7 @@ def get(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transaction_events.get(
@@ -264,6 +266,7 @@ async def create(
from flagright import AsyncFlagright, DeviceData
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -331,6 +334,7 @@ async def get(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index cac33d3..46f68c5 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -176,6 +176,7 @@ def verify(
)
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transactions.verify(
@@ -302,6 +303,7 @@ def get(
from flagright import Flagright
client = Flagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transactions.get(
@@ -468,6 +470,7 @@ async def verify(
)
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -602,6 +605,7 @@ async def get(
from flagright import AsyncFlagright
client = AsyncFlagright(
+ authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
diff --git a/src/flagright/types/__init__.py b/src/flagright/types/__init__.py
index 33d1b43..77c706f 100644
--- a/src/flagright/types/__init__.py
+++ b/src/flagright/types/__init__.py
@@ -180,6 +180,8 @@
from .executed_logic_vars import ExecutedLogicVars
from .executed_rules_result import ExecutedRulesResult
from .expected_income import ExpectedIncome
+ from .expected_transaction_countries import ExpectedTransactionCountries
+ from .expected_transaction_country import ExpectedTransactionCountry
from .failed_rules_result import FailedRulesResult
from .false_positive_details import FalsePositiveDetails
from .file_info import FileInfo
@@ -577,6 +579,8 @@
"ExecutedLogicVars": ".executed_logic_vars",
"ExecutedRulesResult": ".executed_rules_result",
"ExpectedIncome": ".expected_income",
+ "ExpectedTransactionCountries": ".expected_transaction_countries",
+ "ExpectedTransactionCountry": ".expected_transaction_country",
"FailedRulesResult": ".failed_rules_result",
"FalsePositiveDetails": ".false_positive_details",
"FileInfo": ".file_info",
@@ -980,6 +984,8 @@ def __dir__():
"ExecutedLogicVars",
"ExecutedRulesResult",
"ExpectedIncome",
+ "ExpectedTransactionCountries",
+ "ExpectedTransactionCountry",
"FailedRulesResult",
"FalsePositiveDetails",
"FileInfo",
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index 1f6f0df..e2fa613 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -18,6 +18,7 @@
from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
+from .expected_transaction_countries import ExpectedTransactionCountries
from .kyc_status_details import KycStatusDetails
from .legal_entity import LegalEntity
from .mcc_details import MccDetails
@@ -99,6 +100,9 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
transaction_limits: typing_extensions.Annotated[
typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
] = None
+ expected_transaction_countries: typing_extensions.Annotated[
+ typing.Optional[ExpectedTransactionCountries], FieldMetadata(alias="expectedTransactionCountries")
+ ] = None
risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
allowed_payment_methods: typing_extensions.Annotated[
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result.py b/src/flagright/types/batch_consumer_user_with_rules_result.py
index 339a3e3..032d3cd 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result.py
@@ -19,6 +19,7 @@
from .employment_status import EmploymentStatus
from .executed_rules_result import ExecutedRulesResult
from .expected_income import ExpectedIncome
+from .expected_transaction_countries import ExpectedTransactionCountries
from .kyc_status_details import KycStatusDetails
from .legal_document import LegalDocument
from .pep_status import PepStatus
@@ -84,6 +85,9 @@ class BatchConsumerUserWithRulesResult(UniversalBaseModel):
expected_income: typing_extensions.Annotated[
typing.Optional[ExpectedIncome], FieldMetadata(alias="expectedIncome")
] = None
+ expected_transaction_countries: typing_extensions.Annotated[
+ typing.Optional[ExpectedTransactionCountries], FieldMetadata(alias="expectedTransactionCountries")
+ ] = None
risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
acquisition_channel: typing_extensions.Annotated[
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index 2b180fb..c2c5d7d 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -13,6 +13,7 @@
from .business_share_holders_item import BusinessShareHoldersItem
from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
+from .expected_transaction_countries import ExpectedTransactionCountries
from .kyc_status_details import KycStatusDetails
from .legal_entity import LegalEntity
from .mcc_details import MccDetails
@@ -89,6 +90,9 @@ class Business(UniversalBaseModel):
transaction_limits: typing_extensions.Annotated[
typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
] = None
+ expected_transaction_countries: typing_extensions.Annotated[
+ typing.Optional[ExpectedTransactionCountries], FieldMetadata(alias="expectedTransactionCountries")
+ ] = None
risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
allowed_payment_methods: typing_extensions.Annotated[
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index 2c92f25..49f4652 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -13,6 +13,7 @@
from .business_optional_share_holders_item import BusinessOptionalShareHoldersItem
from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
+from .expected_transaction_countries import ExpectedTransactionCountries
from .kyc_status_details import KycStatusDetails
from .legal_entity import LegalEntity
from .mcc_details import MccDetails
@@ -83,6 +84,9 @@ class BusinessOptional(UniversalBaseModel):
transaction_limits: typing_extensions.Annotated[
typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
] = None
+ expected_transaction_countries: typing_extensions.Annotated[
+ typing.Optional[ExpectedTransactionCountries], FieldMetadata(alias="expectedTransactionCountries")
+ ] = None
risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
allowed_payment_methods: typing_extensions.Annotated[
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 2592e74..42e7e42 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -14,6 +14,7 @@
from .corporate_entity_details import CorporateEntityDetails
from .device_data import DeviceData
from .executed_rules_result import ExecutedRulesResult
+from .expected_transaction_countries import ExpectedTransactionCountries
from .hit_rules_details import HitRulesDetails
from .kyc_status_details import KycStatusDetails
from .legal_entity import LegalEntity
@@ -93,6 +94,9 @@ class BusinessWithRulesResult(UniversalBaseModel):
transaction_limits: typing_extensions.Annotated[
typing.Optional[TransactionLimits], FieldMetadata(alias="transactionLimits")
] = None
+ expected_transaction_countries: typing_extensions.Annotated[
+ typing.Optional[ExpectedTransactionCountries], FieldMetadata(alias="expectedTransactionCountries")
+ ] = None
risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
allowed_payment_methods: typing_extensions.Annotated[
diff --git a/src/flagright/types/expected_transaction_countries.py b/src/flagright/types/expected_transaction_countries.py
new file mode 100644
index 0000000..e29601f
--- /dev/null
+++ b/src/flagright/types/expected_transaction_countries.py
@@ -0,0 +1,32 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .expected_transaction_country import ExpectedTransactionCountry
+
+
+class ExpectedTransactionCountries(UniversalBaseModel):
+ """
+ Model for expected transaction countries
+ """
+
+ incoming: typing.Optional[typing.List[ExpectedTransactionCountry]] = pydantic.Field(default=None)
+ """
+ Countries the user expects to receive transactions from
+ """
+
+ outgoing: typing.Optional[typing.List[ExpectedTransactionCountry]] = pydantic.Field(default=None)
+ """
+ Countries the user expects to send transactions to
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/expected_transaction_country.py b/src/flagright/types/expected_transaction_country.py
new file mode 100644
index 0000000..09ffdb2
--- /dev/null
+++ b/src/flagright/types/expected_transaction_country.py
@@ -0,0 +1,26 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+import typing_extensions
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ..core.serialization import FieldMetadata
+from .country_code import CountryCode
+
+
+class ExpectedTransactionCountry(UniversalBaseModel):
+ """
+ Model for a single expected transaction country
+ """
+
+ country_code: typing_extensions.Annotated[CountryCode, FieldMetadata(alias="countryCode")]
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/flagright/types/sanctions_details.py b/src/flagright/types/sanctions_details.py
index 5fb750b..4692cb8 100644
--- a/src/flagright/types/sanctions_details.py
+++ b/src/flagright/types/sanctions_details.py
@@ -27,6 +27,7 @@ class SanctionsDetails(UniversalBaseModel):
hit_direction: typing_extensions.Annotated[
typing.Optional[RuleHitDirection], FieldMetadata(alias="hitDirection")
] = None
+ is_rule_hit: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isRuleHit")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/sanctions_details_entity_type.py b/src/flagright/types/sanctions_details_entity_type.py
index 7c91704..10aa77e 100644
--- a/src/flagright/types/sanctions_details_entity_type.py
+++ b/src/flagright/types/sanctions_details_entity_type.py
@@ -15,7 +15,9 @@
"BANK_ACCOUNT_HOLDER_NAME",
"BUSINESS_PARTNER",
"ASSOCIATED_PARTY",
+ "CONSUMER_ALIAS",
"TRANSACTION_REFERENCE",
+ "TRANSACTION_TAG",
],
typing.Any,
]
diff --git a/src/flagright/types/user.py b/src/flagright/types/user.py
index 9f3b3dc..c3fa82e 100644
--- a/src/flagright/types/user.py
+++ b/src/flagright/types/user.py
@@ -15,6 +15,7 @@
from .employment_details import EmploymentDetails
from .employment_status import EmploymentStatus
from .expected_income import ExpectedIncome
+from .expected_transaction_countries import ExpectedTransactionCountries
from .kyc_status_details import KycStatusDetails
from .legal_document import LegalDocument
from .pep_status import PepStatus
@@ -80,6 +81,9 @@ class User(UniversalBaseModel):
expected_income: typing_extensions.Annotated[
typing.Optional[ExpectedIncome], FieldMetadata(alias="expectedIncome")
] = None
+ expected_transaction_countries: typing_extensions.Annotated[
+ typing.Optional[ExpectedTransactionCountries], FieldMetadata(alias="expectedTransactionCountries")
+ ] = None
risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
acquisition_channel: typing_extensions.Annotated[
diff --git a/src/flagright/types/user_optional.py b/src/flagright/types/user_optional.py
index d62f7c3..465b404 100644
--- a/src/flagright/types/user_optional.py
+++ b/src/flagright/types/user_optional.py
@@ -15,6 +15,7 @@
from .employment_details import EmploymentDetails
from .employment_status import EmploymentStatus
from .expected_income import ExpectedIncome
+from .expected_transaction_countries import ExpectedTransactionCountries
from .kyc_status_details import KycStatusDetails
from .legal_document import LegalDocument
from .pep_status import PepStatus
@@ -74,6 +75,9 @@ class UserOptional(UniversalBaseModel):
expected_income: typing_extensions.Annotated[
typing.Optional[ExpectedIncome], FieldMetadata(alias="expectedIncome")
] = None
+ expected_transaction_countries: typing_extensions.Annotated[
+ typing.Optional[ExpectedTransactionCountries], FieldMetadata(alias="expectedTransactionCountries")
+ ] = None
risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
acquisition_channel: typing_extensions.Annotated[
diff --git a/src/flagright/types/user_with_rules_result.py b/src/flagright/types/user_with_rules_result.py
index c41bfb9..2953d84 100644
--- a/src/flagright/types/user_with_rules_result.py
+++ b/src/flagright/types/user_with_rules_result.py
@@ -16,6 +16,7 @@
from .employment_status import EmploymentStatus
from .executed_rules_result import ExecutedRulesResult
from .expected_income import ExpectedIncome
+from .expected_transaction_countries import ExpectedTransactionCountries
from .hit_rules_details import HitRulesDetails
from .kyc_status_details import KycStatusDetails
from .legal_document import LegalDocument
@@ -83,6 +84,9 @@ class UserWithRulesResult(UniversalBaseModel):
expected_income: typing_extensions.Annotated[
typing.Optional[ExpectedIncome], FieldMetadata(alias="expectedIncome")
] = None
+ expected_transaction_countries: typing_extensions.Annotated[
+ typing.Optional[ExpectedTransactionCountries], FieldMetadata(alias="expectedTransactionCountries")
+ ] = None
risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="riskLevel")] = None
kyc_risk_level: typing_extensions.Annotated[typing.Optional[RiskLevel], FieldMetadata(alias="kycRiskLevel")] = None
acquisition_channel: typing_extensions.Annotated[
diff --git a/src/flagright/types/wallet_network.py b/src/flagright/types/wallet_network.py
index 823d9d6..b2f8e0b 100644
--- a/src/flagright/types/wallet_network.py
+++ b/src/flagright/types/wallet_network.py
@@ -31,6 +31,7 @@
"ALGORAND",
"CELESTIA",
"BASE",
+ "SUI",
],
typing.Any,
]
From b0c9c082572b2852b9f559ce3c88c3666b8dfbc8 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 12 Feb 2026 15:49:22 +0000
Subject: [PATCH 79/81] Release 1.8.40
---
pyproject.toml | 2 +-
reference.md | 72 -------------------
src/flagright/business_user_events/client.py | 8 ---
.../business_user_events/raw_client.py | 8 ---
src/flagright/business_users/client.py | 18 -----
src/flagright/business_users/raw_client.py | 18 -----
src/flagright/consumer_user_events/client.py | 8 ---
.../consumer_user_events/raw_client.py | 8 ---
src/flagright/consumer_users/client.py | 18 -----
src/flagright/consumer_users/raw_client.py | 18 -----
src/flagright/core/client_wrapper.py | 4 +-
src/flagright/transaction_events/client.py | 8 ---
.../transaction_events/raw_client.py | 8 ---
src/flagright/transactions/client.py | 16 -----
src/flagright/transactions/raw_client.py | 16 -----
...h_business_user_event_with_rules_result.py | 1 -
.../batch_business_user_with_rules_result.py | 8 ---
...h_consumer_user_event_with_rules_result.py | 1 -
.../batch_consumer_user_with_rules_result.py | 8 ---
...tch_transaction_event_monitoring_result.py | 1 -
src/flagright/types/business.py | 8 ---
src/flagright/types/business_optional.py | 8 ---
src/flagright/types/business_user_event.py | 1 -
.../business_user_event_with_rules_result.py | 1 -
.../types/business_with_rules_result.py | 8 ---
src/flagright/types/consumer_user_event.py | 1 -
.../consumer_user_event_with_rules_result.py | 1 -
src/flagright/types/currency_code.py | 1 +
src/flagright/types/executed_rules_result.py | 4 --
src/flagright/types/transaction.py | 5 --
src/flagright/types/transaction_event.py | 1 -
.../transaction_event_with_rules_result.py | 1 -
src/flagright/types/transaction_updatable.py | 5 --
.../types/transaction_with_rules_result.py | 4 --
src/flagright/types/user.py | 8 ---
src/flagright/types/user_optional.py | 8 ---
src/flagright/types/user_with_rules_result.py | 8 ---
src/flagright/types/wallet_network.py | 1 +
38 files changed, 5 insertions(+), 318 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index cbb2d0a..d6fb9a9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.39"
+version = "1.8.40"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 6d7e8ff..3378ba0 100644
--- a/reference.md
+++ b/reference.md
@@ -324,22 +324,6 @@ client.transactions.verify(
-
-**update_count:** `typing.Optional[float]`
-
-
-
-
-
--
-
-**payment_approval_timestamp:** `typing.Optional[float]`
-
-
-
-
-
--
-
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1543,14 +1527,6 @@ client.transaction_events.create(
-
-**update_count:** `typing.Optional[float]`
-
-
-
-
-
--
-
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1981,14 +1957,6 @@ client.consumer_users.create(
-
-**last_transaction_timestamp:** `typing.Optional[float]` — Timestamp of the last successful transaction of the user
-
-
-
-
-
--
-
**corporate_entities:** `typing.Optional[typing.Sequence[CorporateEntityDetails]]` — Corporate entities of the user
@@ -2045,14 +2013,6 @@ client.consumer_users.create(
-
-**update_count:** `typing.Optional[float]`
-
-
-
-
-
--
-
**products_enabled:** `typing.Optional[typing.Sequence[ProductsEnabled]]`
@@ -2384,14 +2344,6 @@ client.business_users.create(
-
-**last_transaction_timestamp:** `typing.Optional[float]` — Timestamp of the last successful transaction of the user
-
-
-
-
-
--
-
**linked_entities:** `typing.Optional[UserEntityLink]`
@@ -2456,14 +2408,6 @@ client.business_users.create(
-
-**update_count:** `typing.Optional[float]`
-
-
-
-
-
--
-
**products_enabled:** `typing.Optional[typing.Sequence[ProductsEnabled]]`
@@ -2729,14 +2673,6 @@ client.consumer_user_events.create(
-
-**update_count:** `typing.Optional[float]`
-
-
-
-
-
--
-
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -2967,14 +2903,6 @@ client.business_user_events.create(
-
-**update_count:** `typing.Optional[float]`
-
-
-
-
-
--
-
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
diff --git a/src/flagright/business_user_events/client.py b/src/flagright/business_user_events/client.py
index da36d22..be8bd55 100644
--- a/src/flagright/business_user_events/client.py
+++ b/src/flagright/business_user_events/client.py
@@ -41,7 +41,6 @@ def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_business_user_attributes: typing.Optional[BusinessOptional] = OMIT,
- update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessWithRulesResult:
"""
@@ -93,8 +92,6 @@ def create(
updated_business_user_attributes : typing.Optional[BusinessOptional]
- update_count : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -129,7 +126,6 @@ def create(
reason=reason,
event_description=event_description,
updated_business_user_attributes=updated_business_user_attributes,
- update_count=update_count,
request_options=request_options,
)
return _response.data
@@ -197,7 +193,6 @@ async def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_business_user_attributes: typing.Optional[BusinessOptional] = OMIT,
- update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BusinessWithRulesResult:
"""
@@ -249,8 +244,6 @@ async def create(
updated_business_user_attributes : typing.Optional[BusinessOptional]
- update_count : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -293,7 +286,6 @@ async def main() -> None:
reason=reason,
event_description=event_description,
updated_business_user_attributes=updated_business_user_attributes,
- update_count=update_count,
request_options=request_options,
)
return _response.data
diff --git a/src/flagright/business_user_events/raw_client.py b/src/flagright/business_user_events/raw_client.py
index eb72cdf..22cbbd2 100644
--- a/src/flagright/business_user_events/raw_client.py
+++ b/src/flagright/business_user_events/raw_client.py
@@ -40,7 +40,6 @@ def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_business_user_attributes: typing.Optional[BusinessOptional] = OMIT,
- update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BusinessWithRulesResult]:
"""
@@ -92,8 +91,6 @@ def create(
updated_business_user_attributes : typing.Optional[BusinessOptional]
- update_count : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -119,7 +116,6 @@ def create(
"updatedBusinessUserAttributes": convert_and_respect_annotation_metadata(
object_=updated_business_user_attributes, annotation=BusinessOptional, direction="write"
),
- "updateCount": update_count,
},
headers={
"content-type": "application/json",
@@ -276,7 +272,6 @@ async def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_business_user_attributes: typing.Optional[BusinessOptional] = OMIT,
- update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BusinessWithRulesResult]:
"""
@@ -328,8 +323,6 @@ async def create(
updated_business_user_attributes : typing.Optional[BusinessOptional]
- update_count : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -355,7 +348,6 @@ async def create(
"updatedBusinessUserAttributes": convert_and_respect_annotation_metadata(
object_=updated_business_user_attributes, annotation=BusinessOptional, direction="write"
),
- "updateCount": update_count,
},
headers={
"content-type": "application/json",
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index e476679..a6feba3 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -71,7 +71,6 @@ def create(
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
allowed_payment_methods: typing.Optional[typing.Sequence[PaymentMethod]] = OMIT,
- last_transaction_timestamp: typing.Optional[float] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]] = OMIT,
@@ -80,7 +79,6 @@ def create(
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
- update_count: typing.Optional[float] = OMIT,
products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
sanctions_status: typing.Optional[bool] = OMIT,
@@ -156,9 +154,6 @@ def create(
allowed_payment_methods : typing.Optional[typing.Sequence[PaymentMethod]]
- last_transaction_timestamp : typing.Optional[float]
- Timestamp of the last successful transaction of the user
-
linked_entities : typing.Optional[UserEntityLink]
acquisition_channel : typing.Optional[AcquisitionChannel]
@@ -178,8 +173,6 @@ def create(
jurisdiction : typing.Optional[str]
Legal authority or region governing the transaction
- update_count : typing.Optional[float]
-
products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
pep_status : typing.Optional[typing.Sequence[PepStatus]]
@@ -242,7 +235,6 @@ def create(
risk_level=risk_level,
kyc_risk_level=kyc_risk_level,
allowed_payment_methods=allowed_payment_methods,
- last_transaction_timestamp=last_transaction_timestamp,
linked_entities=linked_entities,
acquisition_channel=acquisition_channel,
saved_payment_details=saved_payment_details,
@@ -251,7 +243,6 @@ def create(
attachments=attachments,
meta_data=meta_data,
jurisdiction=jurisdiction,
- update_count=update_count,
products_enabled=products_enabled,
pep_status=pep_status,
sanctions_status=sanctions_status,
@@ -335,7 +326,6 @@ async def create(
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
allowed_payment_methods: typing.Optional[typing.Sequence[PaymentMethod]] = OMIT,
- last_transaction_timestamp: typing.Optional[float] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]] = OMIT,
@@ -344,7 +334,6 @@ async def create(
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
- update_count: typing.Optional[float] = OMIT,
products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
sanctions_status: typing.Optional[bool] = OMIT,
@@ -420,9 +409,6 @@ async def create(
allowed_payment_methods : typing.Optional[typing.Sequence[PaymentMethod]]
- last_transaction_timestamp : typing.Optional[float]
- Timestamp of the last successful transaction of the user
-
linked_entities : typing.Optional[UserEntityLink]
acquisition_channel : typing.Optional[AcquisitionChannel]
@@ -442,8 +428,6 @@ async def create(
jurisdiction : typing.Optional[str]
Legal authority or region governing the transaction
- update_count : typing.Optional[float]
-
products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
pep_status : typing.Optional[typing.Sequence[PepStatus]]
@@ -514,7 +498,6 @@ async def main() -> None:
risk_level=risk_level,
kyc_risk_level=kyc_risk_level,
allowed_payment_methods=allowed_payment_methods,
- last_transaction_timestamp=last_transaction_timestamp,
linked_entities=linked_entities,
acquisition_channel=acquisition_channel,
saved_payment_details=saved_payment_details,
@@ -523,7 +506,6 @@ async def main() -> None:
attachments=attachments,
meta_data=meta_data,
jurisdiction=jurisdiction,
- update_count=update_count,
products_enabled=products_enabled,
pep_status=pep_status,
sanctions_status=sanctions_status,
diff --git a/src/flagright/business_users/raw_client.py b/src/flagright/business_users/raw_client.py
index ff9cbc2..3b94a86 100644
--- a/src/flagright/business_users/raw_client.py
+++ b/src/flagright/business_users/raw_client.py
@@ -69,7 +69,6 @@ def create(
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
allowed_payment_methods: typing.Optional[typing.Sequence[PaymentMethod]] = OMIT,
- last_transaction_timestamp: typing.Optional[float] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]] = OMIT,
@@ -78,7 +77,6 @@ def create(
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
- update_count: typing.Optional[float] = OMIT,
products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
sanctions_status: typing.Optional[bool] = OMIT,
@@ -154,9 +152,6 @@ def create(
allowed_payment_methods : typing.Optional[typing.Sequence[PaymentMethod]]
- last_transaction_timestamp : typing.Optional[float]
- Timestamp of the last successful transaction of the user
-
linked_entities : typing.Optional[UserEntityLink]
acquisition_channel : typing.Optional[AcquisitionChannel]
@@ -176,8 +171,6 @@ def create(
jurisdiction : typing.Optional[str]
Legal authority or region governing the transaction
- update_count : typing.Optional[float]
-
products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
pep_status : typing.Optional[typing.Sequence[PepStatus]]
@@ -244,7 +237,6 @@ def create(
"riskLevel": risk_level,
"kycRiskLevel": kyc_risk_level,
"allowedPaymentMethods": allowed_payment_methods,
- "lastTransactionTimestamp": last_transaction_timestamp,
"linkedEntities": convert_and_respect_annotation_metadata(
object_=linked_entities, annotation=UserEntityLink, direction="write"
),
@@ -267,7 +259,6 @@ def create(
object_=meta_data, annotation=DeviceData, direction="write"
),
"jurisdiction": jurisdiction,
- "updateCount": update_count,
"productsEnabled": convert_and_respect_annotation_metadata(
object_=products_enabled, annotation=typing.Sequence[ProductsEnabled], direction="write"
),
@@ -435,7 +426,6 @@ async def create(
risk_level: typing.Optional[RiskLevel] = OMIT,
kyc_risk_level: typing.Optional[RiskLevel] = OMIT,
allowed_payment_methods: typing.Optional[typing.Sequence[PaymentMethod]] = OMIT,
- last_transaction_timestamp: typing.Optional[float] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
acquisition_channel: typing.Optional[AcquisitionChannel] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[BusinessSavedPaymentDetailsItem]] = OMIT,
@@ -444,7 +434,6 @@ async def create(
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
- update_count: typing.Optional[float] = OMIT,
products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
sanctions_status: typing.Optional[bool] = OMIT,
@@ -520,9 +509,6 @@ async def create(
allowed_payment_methods : typing.Optional[typing.Sequence[PaymentMethod]]
- last_transaction_timestamp : typing.Optional[float]
- Timestamp of the last successful transaction of the user
-
linked_entities : typing.Optional[UserEntityLink]
acquisition_channel : typing.Optional[AcquisitionChannel]
@@ -542,8 +528,6 @@ async def create(
jurisdiction : typing.Optional[str]
Legal authority or region governing the transaction
- update_count : typing.Optional[float]
-
products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
pep_status : typing.Optional[typing.Sequence[PepStatus]]
@@ -610,7 +594,6 @@ async def create(
"riskLevel": risk_level,
"kycRiskLevel": kyc_risk_level,
"allowedPaymentMethods": allowed_payment_methods,
- "lastTransactionTimestamp": last_transaction_timestamp,
"linkedEntities": convert_and_respect_annotation_metadata(
object_=linked_entities, annotation=UserEntityLink, direction="write"
),
@@ -633,7 +616,6 @@ async def create(
object_=meta_data, annotation=DeviceData, direction="write"
),
"jurisdiction": jurisdiction,
- "updateCount": update_count,
"productsEnabled": convert_and_respect_annotation_metadata(
object_=products_enabled, annotation=typing.Sequence[ProductsEnabled], direction="write"
),
diff --git a/src/flagright/consumer_user_events/client.py b/src/flagright/consumer_user_events/client.py
index 476273d..9da0531 100644
--- a/src/flagright/consumer_user_events/client.py
+++ b/src/flagright/consumer_user_events/client.py
@@ -41,7 +41,6 @@ def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_consumer_user_attributes: typing.Optional[UserOptional] = OMIT,
- update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UserWithRulesResult:
"""
@@ -93,8 +92,6 @@ def create(
updated_consumer_user_attributes : typing.Optional[UserOptional]
- update_count : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -129,7 +126,6 @@ def create(
reason=reason,
event_description=event_description,
updated_consumer_user_attributes=updated_consumer_user_attributes,
- update_count=update_count,
request_options=request_options,
)
return _response.data
@@ -197,7 +193,6 @@ async def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_consumer_user_attributes: typing.Optional[UserOptional] = OMIT,
- update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UserWithRulesResult:
"""
@@ -249,8 +244,6 @@ async def create(
updated_consumer_user_attributes : typing.Optional[UserOptional]
- update_count : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -293,7 +286,6 @@ async def main() -> None:
reason=reason,
event_description=event_description,
updated_consumer_user_attributes=updated_consumer_user_attributes,
- update_count=update_count,
request_options=request_options,
)
return _response.data
diff --git a/src/flagright/consumer_user_events/raw_client.py b/src/flagright/consumer_user_events/raw_client.py
index 1fdc4a6..3cb13dc 100644
--- a/src/flagright/consumer_user_events/raw_client.py
+++ b/src/flagright/consumer_user_events/raw_client.py
@@ -40,7 +40,6 @@ def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_consumer_user_attributes: typing.Optional[UserOptional] = OMIT,
- update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[UserWithRulesResult]:
"""
@@ -92,8 +91,6 @@ def create(
updated_consumer_user_attributes : typing.Optional[UserOptional]
- update_count : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -119,7 +116,6 @@ def create(
"updatedConsumerUserAttributes": convert_and_respect_annotation_metadata(
object_=updated_consumer_user_attributes, annotation=UserOptional, direction="write"
),
- "updateCount": update_count,
},
headers={
"content-type": "application/json",
@@ -276,7 +272,6 @@ async def create(
reason: typing.Optional[str] = OMIT,
event_description: typing.Optional[str] = OMIT,
updated_consumer_user_attributes: typing.Optional[UserOptional] = OMIT,
- update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[UserWithRulesResult]:
"""
@@ -328,8 +323,6 @@ async def create(
updated_consumer_user_attributes : typing.Optional[UserOptional]
- update_count : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -355,7 +348,6 @@ async def create(
"updatedConsumerUserAttributes": convert_and_respect_annotation_metadata(
object_=updated_consumer_user_attributes, annotation=UserOptional, direction="write"
),
- "updateCount": update_count,
},
headers={
"content-type": "application/json",
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
index 1aa6b36..c3e4547 100644
--- a/src/flagright/consumer_users/client.py
+++ b/src/flagright/consumer_users/client.py
@@ -82,7 +82,6 @@ def create(
pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
sanctions_status: typing.Optional[SanctionsStatus] = OMIT,
adverse_media_status: typing.Optional[AdverseMediaStatus] = OMIT,
- last_transaction_timestamp: typing.Optional[float] = OMIT,
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
@@ -90,7 +89,6 @@ def create(
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
- update_count: typing.Optional[float] = OMIT,
products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ConsumerUsersCreateResponse:
@@ -171,9 +169,6 @@ def create(
adverse_media_status : typing.Optional[AdverseMediaStatus]
- last_transaction_timestamp : typing.Optional[float]
- Timestamp of the last successful transaction of the user
-
corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
Corporate entities of the user
@@ -192,8 +187,6 @@ def create(
jurisdiction : typing.Optional[str]
Legal authority or region governing the transaction
- update_count : typing.Optional[float]
-
products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
request_options : typing.Optional[RequestOptions]
@@ -308,7 +301,6 @@ def create(
pep_status=pep_status,
sanctions_status=sanctions_status,
adverse_media_status=adverse_media_status,
- last_transaction_timestamp=last_transaction_timestamp,
corporate_entities=corporate_entities,
linked_entities=linked_entities,
saved_payment_details=saved_payment_details,
@@ -316,7 +308,6 @@ def create(
attachments=attachments,
meta_data=meta_data,
jurisdiction=jurisdiction,
- update_count=update_count,
products_enabled=products_enabled,
request_options=request_options,
)
@@ -404,7 +395,6 @@ async def create(
pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
sanctions_status: typing.Optional[SanctionsStatus] = OMIT,
adverse_media_status: typing.Optional[AdverseMediaStatus] = OMIT,
- last_transaction_timestamp: typing.Optional[float] = OMIT,
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
@@ -412,7 +402,6 @@ async def create(
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
- update_count: typing.Optional[float] = OMIT,
products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ConsumerUsersCreateResponse:
@@ -493,9 +482,6 @@ async def create(
adverse_media_status : typing.Optional[AdverseMediaStatus]
- last_transaction_timestamp : typing.Optional[float]
- Timestamp of the last successful transaction of the user
-
corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
Corporate entities of the user
@@ -514,8 +500,6 @@ async def create(
jurisdiction : typing.Optional[str]
Legal authority or region governing the transaction
- update_count : typing.Optional[float]
-
products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
request_options : typing.Optional[RequestOptions]
@@ -638,7 +622,6 @@ async def main() -> None:
pep_status=pep_status,
sanctions_status=sanctions_status,
adverse_media_status=adverse_media_status,
- last_transaction_timestamp=last_transaction_timestamp,
corporate_entities=corporate_entities,
linked_entities=linked_entities,
saved_payment_details=saved_payment_details,
@@ -646,7 +629,6 @@ async def main() -> None:
attachments=attachments,
meta_data=meta_data,
jurisdiction=jurisdiction,
- update_count=update_count,
products_enabled=products_enabled,
request_options=request_options,
)
diff --git a/src/flagright/consumer_users/raw_client.py b/src/flagright/consumer_users/raw_client.py
index 6f3dde4..f812a08 100644
--- a/src/flagright/consumer_users/raw_client.py
+++ b/src/flagright/consumer_users/raw_client.py
@@ -80,7 +80,6 @@ def create(
pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
sanctions_status: typing.Optional[SanctionsStatus] = OMIT,
adverse_media_status: typing.Optional[AdverseMediaStatus] = OMIT,
- last_transaction_timestamp: typing.Optional[float] = OMIT,
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
@@ -88,7 +87,6 @@ def create(
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
- update_count: typing.Optional[float] = OMIT,
products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[ConsumerUsersCreateResponse]:
@@ -169,9 +167,6 @@ def create(
adverse_media_status : typing.Optional[AdverseMediaStatus]
- last_transaction_timestamp : typing.Optional[float]
- Timestamp of the last successful transaction of the user
-
corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
Corporate entities of the user
@@ -190,8 +185,6 @@ def create(
jurisdiction : typing.Optional[str]
Legal authority or region governing the transaction
- update_count : typing.Optional[float]
-
products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
request_options : typing.Optional[RequestOptions]
@@ -255,7 +248,6 @@ def create(
),
"sanctionsStatus": sanctions_status,
"adverseMediaStatus": adverse_media_status,
- "lastTransactionTimestamp": last_transaction_timestamp,
"corporateEntities": convert_and_respect_annotation_metadata(
object_=corporate_entities, annotation=typing.Sequence[CorporateEntityDetails], direction="write"
),
@@ -277,7 +269,6 @@ def create(
object_=meta_data, annotation=DeviceData, direction="write"
),
"jurisdiction": jurisdiction,
- "updateCount": update_count,
"productsEnabled": convert_and_respect_annotation_metadata(
object_=products_enabled, annotation=typing.Sequence[ProductsEnabled], direction="write"
),
@@ -447,7 +438,6 @@ async def create(
pep_status: typing.Optional[typing.Sequence[PepStatus]] = OMIT,
sanctions_status: typing.Optional[SanctionsStatus] = OMIT,
adverse_media_status: typing.Optional[AdverseMediaStatus] = OMIT,
- last_transaction_timestamp: typing.Optional[float] = OMIT,
corporate_entities: typing.Optional[typing.Sequence[CorporateEntityDetails]] = OMIT,
linked_entities: typing.Optional[UserEntityLink] = OMIT,
saved_payment_details: typing.Optional[typing.Sequence[UserSavedPaymentDetailsItem]] = OMIT,
@@ -455,7 +445,6 @@ async def create(
attachments: typing.Optional[typing.Sequence[PersonAttachment]] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
- update_count: typing.Optional[float] = OMIT,
products_enabled: typing.Optional[typing.Sequence[ProductsEnabled]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[ConsumerUsersCreateResponse]:
@@ -536,9 +525,6 @@ async def create(
adverse_media_status : typing.Optional[AdverseMediaStatus]
- last_transaction_timestamp : typing.Optional[float]
- Timestamp of the last successful transaction of the user
-
corporate_entities : typing.Optional[typing.Sequence[CorporateEntityDetails]]
Corporate entities of the user
@@ -557,8 +543,6 @@ async def create(
jurisdiction : typing.Optional[str]
Legal authority or region governing the transaction
- update_count : typing.Optional[float]
-
products_enabled : typing.Optional[typing.Sequence[ProductsEnabled]]
request_options : typing.Optional[RequestOptions]
@@ -622,7 +606,6 @@ async def create(
),
"sanctionsStatus": sanctions_status,
"adverseMediaStatus": adverse_media_status,
- "lastTransactionTimestamp": last_transaction_timestamp,
"corporateEntities": convert_and_respect_annotation_metadata(
object_=corporate_entities, annotation=typing.Sequence[CorporateEntityDetails], direction="write"
),
@@ -644,7 +627,6 @@ async def create(
object_=meta_data, annotation=DeviceData, direction="write"
),
"jurisdiction": jurisdiction,
- "updateCount": update_count,
"productsEnabled": convert_and_respect_annotation_metadata(
object_=products_enabled, annotation=typing.Sequence[ProductsEnabled], direction="write"
),
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index eff4410..7516da4 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -24,10 +24,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.39",
+ "User-Agent": "flagright/1.8.40",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.39",
+ "X-Fern-SDK-Version": "1.8.40",
**(self.get_custom_headers() or {}),
}
headers["Authorization"] = self._authorization
diff --git a/src/flagright/transaction_events/client.py b/src/flagright/transaction_events/client.py
index 7449354..b4dc448 100644
--- a/src/flagright/transaction_events/client.py
+++ b/src/flagright/transaction_events/client.py
@@ -41,7 +41,6 @@ def create(
event_description: typing.Optional[str] = OMIT,
updated_transaction_attributes: typing.Optional[TransactionUpdatable] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
- update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TransactionEventMonitoringResult:
"""
@@ -89,8 +88,6 @@ def create(
meta_data : typing.Optional[DeviceData]
- update_count : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -131,7 +128,6 @@ def create(
event_description=event_description,
updated_transaction_attributes=updated_transaction_attributes,
meta_data=meta_data,
- update_count=update_count,
request_options=request_options,
)
return _response.data
@@ -201,7 +197,6 @@ async def create(
event_description: typing.Optional[str] = OMIT,
updated_transaction_attributes: typing.Optional[TransactionUpdatable] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
- update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TransactionEventMonitoringResult:
"""
@@ -249,8 +244,6 @@ async def create(
meta_data : typing.Optional[DeviceData]
- update_count : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -299,7 +292,6 @@ async def main() -> None:
event_description=event_description,
updated_transaction_attributes=updated_transaction_attributes,
meta_data=meta_data,
- update_count=update_count,
request_options=request_options,
)
return _response.data
diff --git a/src/flagright/transaction_events/raw_client.py b/src/flagright/transaction_events/raw_client.py
index 271ab67..c403636 100644
--- a/src/flagright/transaction_events/raw_client.py
+++ b/src/flagright/transaction_events/raw_client.py
@@ -40,7 +40,6 @@ def create(
event_description: typing.Optional[str] = OMIT,
updated_transaction_attributes: typing.Optional[TransactionUpdatable] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
- update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[TransactionEventMonitoringResult]:
"""
@@ -88,8 +87,6 @@ def create(
meta_data : typing.Optional[DeviceData]
- update_count : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -114,7 +111,6 @@ def create(
"metaData": convert_and_respect_annotation_metadata(
object_=meta_data, annotation=DeviceData, direction="write"
),
- "updateCount": update_count,
},
headers={
"content-type": "application/json",
@@ -273,7 +269,6 @@ async def create(
event_description: typing.Optional[str] = OMIT,
updated_transaction_attributes: typing.Optional[TransactionUpdatable] = OMIT,
meta_data: typing.Optional[DeviceData] = OMIT,
- update_count: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[TransactionEventMonitoringResult]:
"""
@@ -321,8 +316,6 @@ async def create(
meta_data : typing.Optional[DeviceData]
- update_count : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -347,7 +340,6 @@ async def create(
"metaData": convert_and_respect_annotation_metadata(
object_=meta_data, annotation=DeviceData, direction="write"
),
- "updateCount": update_count,
},
headers={
"content-type": "application/json",
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index 46f68c5..670c9b6 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -63,8 +63,6 @@ def verify(
metadata: typing.Optional[TransactionMetadata] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
- update_count: typing.Optional[float] = OMIT,
- payment_approval_timestamp: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TransactionsVerifyResponse:
"""
@@ -152,10 +150,6 @@ def verify(
jurisdiction : typing.Optional[str]
Legal authority or region governing the transaction
- update_count : typing.Optional[float]
-
- payment_approval_timestamp : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -269,8 +263,6 @@ def verify(
metadata=metadata,
tags=tags,
jurisdiction=jurisdiction,
- update_count=update_count,
- payment_approval_timestamp=payment_approval_timestamp,
request_options=request_options,
)
return _response.data
@@ -355,8 +347,6 @@ async def verify(
metadata: typing.Optional[TransactionMetadata] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
- update_count: typing.Optional[float] = OMIT,
- payment_approval_timestamp: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TransactionsVerifyResponse:
"""
@@ -444,10 +434,6 @@ async def verify(
jurisdiction : typing.Optional[str]
Legal authority or region governing the transaction
- update_count : typing.Optional[float]
-
- payment_approval_timestamp : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -569,8 +555,6 @@ async def main() -> None:
metadata=metadata,
tags=tags,
jurisdiction=jurisdiction,
- update_count=update_count,
- payment_approval_timestamp=payment_approval_timestamp,
request_options=request_options,
)
return _response.data
diff --git a/src/flagright/transactions/raw_client.py b/src/flagright/transactions/raw_client.py
index 1d4ac98..658c870 100644
--- a/src/flagright/transactions/raw_client.py
+++ b/src/flagright/transactions/raw_client.py
@@ -61,8 +61,6 @@ def verify(
metadata: typing.Optional[TransactionMetadata] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
- update_count: typing.Optional[float] = OMIT,
- payment_approval_timestamp: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[TransactionsVerifyResponse]:
"""
@@ -150,10 +148,6 @@ def verify(
jurisdiction : typing.Optional[str]
Legal authority or region governing the transaction
- update_count : typing.Optional[float]
-
- payment_approval_timestamp : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -213,8 +207,6 @@ def verify(
object_=tags, annotation=typing.Sequence[Tag], direction="write"
),
"jurisdiction": jurisdiction,
- "updateCount": update_count,
- "paymentApprovalTimestamp": payment_approval_timestamp,
},
headers={
"content-type": "application/json",
@@ -377,8 +369,6 @@ async def verify(
metadata: typing.Optional[TransactionMetadata] = OMIT,
tags: typing.Optional[typing.Sequence[Tag]] = OMIT,
jurisdiction: typing.Optional[str] = OMIT,
- update_count: typing.Optional[float] = OMIT,
- payment_approval_timestamp: typing.Optional[float] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[TransactionsVerifyResponse]:
"""
@@ -466,10 +456,6 @@ async def verify(
jurisdiction : typing.Optional[str]
Legal authority or region governing the transaction
- update_count : typing.Optional[float]
-
- payment_approval_timestamp : typing.Optional[float]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -529,8 +515,6 @@ async def verify(
object_=tags, annotation=typing.Sequence[Tag], direction="write"
),
"jurisdiction": jurisdiction,
- "updateCount": update_count,
- "paymentApprovalTimestamp": payment_approval_timestamp,
},
headers={
"content-type": "application/json",
diff --git a/src/flagright/types/batch_business_user_event_with_rules_result.py b/src/flagright/types/batch_business_user_event_with_rules_result.py
index 9112587..e2b5dd0 100644
--- a/src/flagright/types/batch_business_user_event_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_event_with_rules_result.py
@@ -44,7 +44,6 @@ class BatchBusinessUserEventWithRulesResult(UniversalBaseModel):
updated_business_user_attributes: typing_extensions.Annotated[
typing.Optional[BusinessOptional], FieldMetadata(alias="updatedBusinessUserAttributes")
] = None
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/batch_business_user_with_rules_result.py b/src/flagright/types/batch_business_user_with_rules_result.py
index e2fa613..4baeaab 100644
--- a/src/flagright/types/batch_business_user_with_rules_result.py
+++ b/src/flagright/types/batch_business_user_with_rules_result.py
@@ -108,13 +108,6 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
allowed_payment_methods: typing_extensions.Annotated[
typing.Optional[typing.List[PaymentMethod]], FieldMetadata(alias="allowedPaymentMethods")
] = None
- last_transaction_timestamp: typing_extensions.Annotated[
- typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
- ] = pydantic.Field(default=None)
- """
- Timestamp of the last successful transaction of the user
- """
-
linked_entities: typing_extensions.Annotated[
typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
] = None
@@ -142,7 +135,6 @@ class BatchBusinessUserWithRulesResult(UniversalBaseModel):
Legal authority or region governing the transaction
"""
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
products_enabled: typing_extensions.Annotated[
typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
] = None
diff --git a/src/flagright/types/batch_consumer_user_event_with_rules_result.py b/src/flagright/types/batch_consumer_user_event_with_rules_result.py
index f2b7cc7..d9c49b9 100644
--- a/src/flagright/types/batch_consumer_user_event_with_rules_result.py
+++ b/src/flagright/types/batch_consumer_user_event_with_rules_result.py
@@ -44,7 +44,6 @@ class BatchConsumerUserEventWithRulesResult(UniversalBaseModel):
updated_consumer_user_attributes: typing_extensions.Annotated[
typing.Optional[UserOptional], FieldMetadata(alias="updatedConsumerUserAttributes")
] = None
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/batch_consumer_user_with_rules_result.py b/src/flagright/types/batch_consumer_user_with_rules_result.py
index 032d3cd..cf7e1d4 100644
--- a/src/flagright/types/batch_consumer_user_with_rules_result.py
+++ b/src/flagright/types/batch_consumer_user_with_rules_result.py
@@ -111,13 +111,6 @@ class BatchConsumerUserWithRulesResult(UniversalBaseModel):
adverse_media_status: typing_extensions.Annotated[
typing.Optional[AdverseMediaStatus], FieldMetadata(alias="adverseMediaStatus")
] = None
- last_transaction_timestamp: typing_extensions.Annotated[
- typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
- ] = pydantic.Field(default=None)
- """
- Timestamp of the last successful transaction of the user
- """
-
corporate_entities: typing_extensions.Annotated[
typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
] = pydantic.Field(default=None)
@@ -148,7 +141,6 @@ class BatchConsumerUserWithRulesResult(UniversalBaseModel):
Legal authority or region governing the transaction
"""
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
products_enabled: typing_extensions.Annotated[
typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
] = None
diff --git a/src/flagright/types/batch_transaction_event_monitoring_result.py b/src/flagright/types/batch_transaction_event_monitoring_result.py
index a8a5998..63903d7 100644
--- a/src/flagright/types/batch_transaction_event_monitoring_result.py
+++ b/src/flagright/types/batch_transaction_event_monitoring_result.py
@@ -49,7 +49,6 @@ class BatchTransactionEventMonitoringResult(UniversalBaseModel):
typing.Optional[TransactionUpdatable], FieldMetadata(alias="updatedTransactionAttributes")
] = None
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
hit_rules: typing_extensions.Annotated[
typing.Optional[typing.List[HitRulesDetails]], FieldMetadata(alias="hitRules")
] = None
diff --git a/src/flagright/types/business.py b/src/flagright/types/business.py
index c2c5d7d..7339683 100644
--- a/src/flagright/types/business.py
+++ b/src/flagright/types/business.py
@@ -98,13 +98,6 @@ class Business(UniversalBaseModel):
allowed_payment_methods: typing_extensions.Annotated[
typing.Optional[typing.List[PaymentMethod]], FieldMetadata(alias="allowedPaymentMethods")
] = None
- last_transaction_timestamp: typing_extensions.Annotated[
- typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
- ] = pydantic.Field(default=None)
- """
- Timestamp of the last successful transaction of the user
- """
-
linked_entities: typing_extensions.Annotated[
typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
] = None
@@ -131,7 +124,6 @@ class Business(UniversalBaseModel):
Legal authority or region governing the transaction
"""
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
products_enabled: typing_extensions.Annotated[
typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
] = None
diff --git a/src/flagright/types/business_optional.py b/src/flagright/types/business_optional.py
index 49f4652..8f2e98e 100644
--- a/src/flagright/types/business_optional.py
+++ b/src/flagright/types/business_optional.py
@@ -92,13 +92,6 @@ class BusinessOptional(UniversalBaseModel):
allowed_payment_methods: typing_extensions.Annotated[
typing.Optional[typing.List[PaymentMethod]], FieldMetadata(alias="allowedPaymentMethods")
] = None
- last_transaction_timestamp: typing_extensions.Annotated[
- typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
- ] = pydantic.Field(default=None)
- """
- Timestamp of the last successful transaction of the user
- """
-
linked_entities: typing_extensions.Annotated[
typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
] = None
@@ -126,7 +119,6 @@ class BusinessOptional(UniversalBaseModel):
Legal authority or region governing the transaction
"""
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
products_enabled: typing_extensions.Annotated[
typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
] = None
diff --git a/src/flagright/types/business_user_event.py b/src/flagright/types/business_user_event.py
index 35c644d..732aa0f 100644
--- a/src/flagright/types/business_user_event.py
+++ b/src/flagright/types/business_user_event.py
@@ -46,7 +46,6 @@ class BusinessUserEvent(UniversalBaseModel):
updated_business_user_attributes: typing_extensions.Annotated[
typing.Optional[BusinessOptional], FieldMetadata(alias="updatedBusinessUserAttributes")
] = None
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/business_user_event_with_rules_result.py b/src/flagright/types/business_user_event_with_rules_result.py
index 5e5a12c..409f5ce 100644
--- a/src/flagright/types/business_user_event_with_rules_result.py
+++ b/src/flagright/types/business_user_event_with_rules_result.py
@@ -45,7 +45,6 @@ class BusinessUserEventWithRulesResult(UniversalBaseModel):
updated_business_user_attributes: typing_extensions.Annotated[
typing.Optional[BusinessOptional], FieldMetadata(alias="updatedBusinessUserAttributes")
] = None
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/business_with_rules_result.py b/src/flagright/types/business_with_rules_result.py
index 42e7e42..a81ff0e 100644
--- a/src/flagright/types/business_with_rules_result.py
+++ b/src/flagright/types/business_with_rules_result.py
@@ -102,13 +102,6 @@ class BusinessWithRulesResult(UniversalBaseModel):
allowed_payment_methods: typing_extensions.Annotated[
typing.Optional[typing.List[PaymentMethod]], FieldMetadata(alias="allowedPaymentMethods")
] = None
- last_transaction_timestamp: typing_extensions.Annotated[
- typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
- ] = pydantic.Field(default=None)
- """
- Timestamp of the last successful transaction of the user
- """
-
linked_entities: typing_extensions.Annotated[
typing.Optional[UserEntityLink], FieldMetadata(alias="linkedEntities")
] = None
@@ -136,7 +129,6 @@ class BusinessWithRulesResult(UniversalBaseModel):
Legal authority or region governing the transaction
"""
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
products_enabled: typing_extensions.Annotated[
typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
] = None
diff --git a/src/flagright/types/consumer_user_event.py b/src/flagright/types/consumer_user_event.py
index 8742118..f15035a 100644
--- a/src/flagright/types/consumer_user_event.py
+++ b/src/flagright/types/consumer_user_event.py
@@ -46,7 +46,6 @@ class ConsumerUserEvent(UniversalBaseModel):
updated_consumer_user_attributes: typing_extensions.Annotated[
typing.Optional[UserOptional], FieldMetadata(alias="updatedConsumerUserAttributes")
] = None
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/consumer_user_event_with_rules_result.py b/src/flagright/types/consumer_user_event_with_rules_result.py
index d385190..a3ce243 100644
--- a/src/flagright/types/consumer_user_event_with_rules_result.py
+++ b/src/flagright/types/consumer_user_event_with_rules_result.py
@@ -45,7 +45,6 @@ class ConsumerUserEventWithRulesResult(UniversalBaseModel):
updated_consumer_user_attributes: typing_extensions.Annotated[
typing.Optional[UserOptional], FieldMetadata(alias="updatedConsumerUserAttributes")
] = None
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/currency_code.py b/src/flagright/types/currency_code.py
index 9a6115d..5e28ca1 100644
--- a/src/flagright/types/currency_code.py
+++ b/src/flagright/types/currency_code.py
@@ -194,6 +194,7 @@
"HRK",
"HTG",
"HUF",
+ "HYPE",
"ICP",
"IDEX",
"IDR",
diff --git a/src/flagright/types/executed_rules_result.py b/src/flagright/types/executed_rules_result.py
index e070bfa..5f6af97 100644
--- a/src/flagright/types/executed_rules_result.py
+++ b/src/flagright/types/executed_rules_result.py
@@ -8,7 +8,6 @@
from ..core.serialization import FieldMetadata
from .executed_logic_vars import ExecutedLogicVars
from .rule_action import RuleAction
-from .rule_execution_sanctions_details import RuleExecutionSanctionsDetails
from .rule_hit_meta import RuleHitMeta
from .rule_labels import RuleLabels
from .rule_nature import RuleNature
@@ -52,9 +51,6 @@ class ExecutedRulesResult(UniversalBaseModel):
labels: typing.Optional[typing.List[RuleLabels]] = None
nature: typing.Optional[RuleNature] = None
is_shadow: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isShadow")] = None
- sanctions_details: typing_extensions.Annotated[
- typing.Optional[typing.List[RuleExecutionSanctionsDetails]], FieldMetadata(alias="sanctionsDetails")
- ] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction.py b/src/flagright/types/transaction.py
index ae23114..282fa2c 100644
--- a/src/flagright/types/transaction.py
+++ b/src/flagright/types/transaction.py
@@ -115,11 +115,6 @@ class Transaction(UniversalBaseModel):
Legal authority or region governing the transaction
"""
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
- payment_approval_timestamp: typing_extensions.Annotated[
- typing.Optional[float], FieldMetadata(alias="paymentApprovalTimestamp")
- ] = None
-
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/transaction_event.py b/src/flagright/types/transaction_event.py
index 7a41893..65db65d 100644
--- a/src/flagright/types/transaction_event.py
+++ b/src/flagright/types/transaction_event.py
@@ -50,7 +50,6 @@ class TransactionEvent(UniversalBaseModel):
typing.Optional[TransactionUpdatable], FieldMetadata(alias="updatedTransactionAttributes")
] = None
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/flagright/types/transaction_event_with_rules_result.py b/src/flagright/types/transaction_event_with_rules_result.py
index 8400fdd..6a872eb 100644
--- a/src/flagright/types/transaction_event_with_rules_result.py
+++ b/src/flagright/types/transaction_event_with_rules_result.py
@@ -50,7 +50,6 @@ class TransactionEventWithRulesResult(UniversalBaseModel):
typing.Optional[TransactionUpdatable], FieldMetadata(alias="updatedTransactionAttributes")
] = None
meta_data: typing_extensions.Annotated[typing.Optional[DeviceData], FieldMetadata(alias="metaData")] = None
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
executed_rules: typing_extensions.Annotated[
typing.Optional[typing.List[ExecutedRulesResult]], FieldMetadata(alias="executedRules")
] = None
diff --git a/src/flagright/types/transaction_updatable.py b/src/flagright/types/transaction_updatable.py
index 8efb136..739afd4 100644
--- a/src/flagright/types/transaction_updatable.py
+++ b/src/flagright/types/transaction_updatable.py
@@ -86,11 +86,6 @@ class TransactionUpdatable(UniversalBaseModel):
Legal authority or region governing the transaction
"""
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
- payment_approval_timestamp: typing_extensions.Annotated[
- typing.Optional[float], FieldMetadata(alias="paymentApprovalTimestamp")
- ] = None
-
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/flagright/types/transaction_with_rules_result.py b/src/flagright/types/transaction_with_rules_result.py
index 52d1456..534fe47 100644
--- a/src/flagright/types/transaction_with_rules_result.py
+++ b/src/flagright/types/transaction_with_rules_result.py
@@ -122,10 +122,6 @@ class TransactionWithRulesResult(UniversalBaseModel):
Legal authority or region governing the transaction
"""
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
- payment_approval_timestamp: typing_extensions.Annotated[
- typing.Optional[float], FieldMetadata(alias="paymentApprovalTimestamp")
- ] = None
executed_rules: typing_extensions.Annotated[typing.List[ExecutedRulesResult], FieldMetadata(alias="executedRules")]
hit_rules: typing_extensions.Annotated[typing.List[HitRulesDetails], FieldMetadata(alias="hitRules")]
status: RuleAction
diff --git a/src/flagright/types/user.py b/src/flagright/types/user.py
index c3fa82e..b4e7f6b 100644
--- a/src/flagright/types/user.py
+++ b/src/flagright/types/user.py
@@ -107,13 +107,6 @@ class User(UniversalBaseModel):
adverse_media_status: typing_extensions.Annotated[
typing.Optional[AdverseMediaStatus], FieldMetadata(alias="adverseMediaStatus")
] = None
- last_transaction_timestamp: typing_extensions.Annotated[
- typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
- ] = pydantic.Field(default=None)
- """
- Timestamp of the last successful transaction of the user
- """
-
corporate_entities: typing_extensions.Annotated[
typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
] = pydantic.Field(default=None)
@@ -143,7 +136,6 @@ class User(UniversalBaseModel):
Legal authority or region governing the transaction
"""
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
products_enabled: typing_extensions.Annotated[
typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
] = None
diff --git a/src/flagright/types/user_optional.py b/src/flagright/types/user_optional.py
index 465b404..8174cff 100644
--- a/src/flagright/types/user_optional.py
+++ b/src/flagright/types/user_optional.py
@@ -101,13 +101,6 @@ class UserOptional(UniversalBaseModel):
adverse_media_status: typing_extensions.Annotated[
typing.Optional[AdverseMediaStatus], FieldMetadata(alias="adverseMediaStatus")
] = None
- last_transaction_timestamp: typing_extensions.Annotated[
- typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
- ] = pydantic.Field(default=None)
- """
- Timestamp of the last successful transaction of the user
- """
-
corporate_entities: typing_extensions.Annotated[
typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
] = pydantic.Field(default=None)
@@ -137,7 +130,6 @@ class UserOptional(UniversalBaseModel):
Legal authority or region governing the transaction
"""
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
products_enabled: typing_extensions.Annotated[
typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
] = None
diff --git a/src/flagright/types/user_with_rules_result.py b/src/flagright/types/user_with_rules_result.py
index 2953d84..2b68716 100644
--- a/src/flagright/types/user_with_rules_result.py
+++ b/src/flagright/types/user_with_rules_result.py
@@ -110,13 +110,6 @@ class UserWithRulesResult(UniversalBaseModel):
adverse_media_status: typing_extensions.Annotated[
typing.Optional[AdverseMediaStatus], FieldMetadata(alias="adverseMediaStatus")
] = None
- last_transaction_timestamp: typing_extensions.Annotated[
- typing.Optional[float], FieldMetadata(alias="lastTransactionTimestamp")
- ] = pydantic.Field(default=None)
- """
- Timestamp of the last successful transaction of the user
- """
-
corporate_entities: typing_extensions.Annotated[
typing.Optional[typing.List[CorporateEntityDetails]], FieldMetadata(alias="corporateEntities")
] = pydantic.Field(default=None)
@@ -147,7 +140,6 @@ class UserWithRulesResult(UniversalBaseModel):
Legal authority or region governing the transaction
"""
- update_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="updateCount")] = None
products_enabled: typing_extensions.Annotated[
typing.Optional[typing.List[ProductsEnabled]], FieldMetadata(alias="productsEnabled")
] = None
diff --git a/src/flagright/types/wallet_network.py b/src/flagright/types/wallet_network.py
index b2f8e0b..c170726 100644
--- a/src/flagright/types/wallet_network.py
+++ b/src/flagright/types/wallet_network.py
@@ -17,6 +17,7 @@
"LITECOIN",
"BITCOIN_CASH",
"RIPPLE",
+ "HYPERLIQUID",
"STELLAR",
"EOS_PUBLIC",
"TRON",
From e0f56dc565ea21ec318436784cfe7fe42ef8283d Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Fri, 13 Feb 2026 06:02:06 +0000
Subject: [PATCH 80/81] Release 1.8.41
---
pyproject.toml | 2 +-
src/flagright/core/client_wrapper.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index d6fb9a9..54d0121 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.40"
+version = "1.8.41"
description = ""
readme = "README.md"
authors = []
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 7516da4..0f36ad9 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -24,10 +24,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.40",
+ "User-Agent": "flagright/1.8.41",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.40",
+ "X-Fern-SDK-Version": "1.8.41",
**(self.get_custom_headers() or {}),
}
headers["Authorization"] = self._authorization
From 2afd2af0a3ff3cd56d4a17a3a445052e5cc9c41c Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Fri, 13 Feb 2026 07:56:43 +0000
Subject: [PATCH 81/81] Release 1.8.42
---
pyproject.toml | 2 +-
reference.md | 24 --------------------
src/flagright/batch/client.py | 24 --------------------
src/flagright/business_user_events/client.py | 4 ----
src/flagright/business_users/client.py | 4 ----
src/flagright/client.py | 8 -------
src/flagright/consumer_user_events/client.py | 4 ----
src/flagright/consumer_users/client.py | 4 ----
src/flagright/core/client_wrapper.py | 17 ++++----------
src/flagright/transaction_events/client.py | 4 ----
src/flagright/transactions/client.py | 4 ----
11 files changed, 5 insertions(+), 94 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 54d0121..997544a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "flagright"
[tool.poetry]
name = "flagright"
-version = "1.8.41"
+version = "1.8.42"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 3378ba0..b42eda3 100644
--- a/reference.md
+++ b/reference.md
@@ -57,7 +57,6 @@ from flagright import (
)
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transactions.verify(
@@ -370,7 +369,6 @@ Calling `GET /transactions/{transactionId}` will return the entire transaction p
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transactions.get(
@@ -428,7 +426,6 @@ client.transactions.get(
from flagright import Flagright, Transaction
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.verify_transaction(
@@ -517,7 +514,6 @@ client.batch.verify_transaction(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_transactions(
@@ -592,7 +588,6 @@ client.batch.get_transactions(
from flagright import Flagright, TransactionEvent
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_transaction_events(
@@ -663,7 +658,6 @@ client.batch.create_transaction_events(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_transaction_events(
@@ -738,7 +732,6 @@ client.batch.get_transaction_events(
from flagright import Flagright, User
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_consumer_users(
@@ -826,7 +819,6 @@ client.batch.create_consumer_users(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_consumer_users(
@@ -901,7 +893,6 @@ client.batch.get_consumer_users(
from flagright import Business, CompanyGeneralDetails, Flagright, LegalEntity
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_business_users(
@@ -996,7 +987,6 @@ client.batch.create_business_users(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_business_users(
@@ -1071,7 +1061,6 @@ client.batch.get_business_users(
from flagright import ConsumerUserEvent, Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_consumer_user_events(
@@ -1159,7 +1148,6 @@ client.batch.create_consumer_user_events(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_consumer_user_events(
@@ -1234,7 +1222,6 @@ client.batch.get_consumer_user_events(
from flagright import BusinessUserEvent, Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_business_user_events(
@@ -1322,7 +1309,6 @@ client.batch.create_business_user_events(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_business_user_events(
@@ -1431,7 +1417,6 @@ In order to make individual events retrievable, you also need to pass in a uniqu
from flagright import DeviceData, Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transaction_events.create(
@@ -1573,7 +1558,6 @@ You can retrieve any transaction event you created using the [POST Transaction E
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transaction_events.get(
@@ -1665,7 +1649,6 @@ from flagright import (
)
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_users.create(
@@ -2067,7 +2050,6 @@ Calling `GET /consumer/user/{userId}` will return the entire user payload and ru
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_users.get(
@@ -2152,7 +2134,6 @@ Each business user needs three mandatory fields:
from flagright import CompanyGeneralDetails, Flagright, LegalEntity
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_users.create(
@@ -2486,7 +2467,6 @@ Calling `GET /business/user/{userId}` will return the entire User payload and ru
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_users.get(
@@ -2576,7 +2556,6 @@ In order to make individual events retrievable, you also need to pass in a uniqu
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_user_events.create(
@@ -2716,7 +2695,6 @@ You can retrieve any consumer user event you created using the [POST Consumer Us
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_user_events.get(
@@ -2806,7 +2784,6 @@ In order to make individual events retrievable, you also need to pass in a uniqu
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_user_events.create(
@@ -2946,7 +2923,6 @@ You can retrieve any business user event you created using the [POST Business Us
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_user_events.get(
diff --git a/src/flagright/batch/client.py b/src/flagright/batch/client.py
index 477eee4..a3599d3 100644
--- a/src/flagright/batch/client.py
+++ b/src/flagright/batch/client.py
@@ -76,7 +76,6 @@ def verify_transaction(
from flagright import Flagright, Transaction
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.verify_transaction(
@@ -133,7 +132,6 @@ def get_transactions(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_transactions(
@@ -174,7 +172,6 @@ def create_transaction_events(
from flagright import Flagright, TransactionEvent
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_transaction_events(
@@ -225,7 +222,6 @@ def get_transaction_events(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_transaction_events(
@@ -274,7 +270,6 @@ def create_consumer_users(
from flagright import Flagright, User
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_consumer_users(
@@ -330,7 +325,6 @@ def get_consumer_users(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_consumer_users(
@@ -379,7 +373,6 @@ def create_business_users(
from flagright import Business, CompanyGeneralDetails, Flagright, LegalEntity
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_business_users(
@@ -442,7 +435,6 @@ def get_business_users(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_business_users(
@@ -491,7 +483,6 @@ def create_consumer_user_events(
from flagright import ConsumerUserEvent, Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_consumer_user_events(
@@ -547,7 +538,6 @@ def get_consumer_user_events(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_consumer_user_events(
@@ -596,7 +586,6 @@ def create_business_user_events(
from flagright import BusinessUserEvent, Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.create_business_user_events(
@@ -652,7 +641,6 @@ def get_business_user_events(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.batch.get_business_user_events(
@@ -719,7 +707,6 @@ async def verify_transaction(
from flagright import AsyncFlagright, Transaction
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -784,7 +771,6 @@ async def get_transactions(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -833,7 +819,6 @@ async def create_transaction_events(
from flagright import AsyncFlagright, TransactionEvent
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -892,7 +877,6 @@ async def get_transaction_events(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -949,7 +933,6 @@ async def create_consumer_users(
from flagright import AsyncFlagright, User
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -1013,7 +996,6 @@ async def get_consumer_users(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -1075,7 +1057,6 @@ async def create_business_users(
)
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -1146,7 +1127,6 @@ async def get_business_users(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -1203,7 +1183,6 @@ async def create_consumer_user_events(
from flagright import AsyncFlagright, ConsumerUserEvent
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -1267,7 +1246,6 @@ async def get_consumer_user_events(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -1324,7 +1302,6 @@ async def create_business_user_events(
from flagright import AsyncFlagright, BusinessUserEvent
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -1388,7 +1365,6 @@ async def get_business_user_events(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
diff --git a/src/flagright/business_user_events/client.py b/src/flagright/business_user_events/client.py
index be8bd55..402b12b 100644
--- a/src/flagright/business_user_events/client.py
+++ b/src/flagright/business_user_events/client.py
@@ -105,7 +105,6 @@ def create(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_user_events.create(
@@ -155,7 +154,6 @@ def get(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_user_events.get(
@@ -259,7 +257,6 @@ async def create(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -317,7 +314,6 @@ async def get(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
diff --git a/src/flagright/business_users/client.py b/src/flagright/business_users/client.py
index a6feba3..0db280f 100644
--- a/src/flagright/business_users/client.py
+++ b/src/flagright/business_users/client.py
@@ -196,7 +196,6 @@ def create(
from flagright import CompanyGeneralDetails, Flagright, LegalEntity
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_users.create(
@@ -277,7 +276,6 @@ def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions]
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.business_users.get(
@@ -453,7 +451,6 @@ async def create(
from flagright import AsyncFlagright, CompanyGeneralDetails, LegalEntity
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -544,7 +541,6 @@ async def get(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
diff --git a/src/flagright/client.py b/src/flagright/client.py
index dad7262..36c79e1 100644
--- a/src/flagright/client.py
+++ b/src/flagright/client.py
@@ -36,7 +36,6 @@ class Flagright:
- authorization : str
api_key : str
headers : typing.Optional[typing.Dict[str, str]]
Additional headers to send with every request.
@@ -55,7 +54,6 @@ class Flagright:
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
"""
@@ -65,7 +63,6 @@ def __init__(
*,
base_url: typing.Optional[str] = None,
environment: FlagrightEnvironment = FlagrightEnvironment.SANDBOX_API_SERVER_EU_1,
- authorization: str,
api_key: str,
headers: typing.Optional[typing.Dict[str, str]] = None,
timeout: typing.Optional[float] = None,
@@ -77,7 +74,6 @@ def __init__(
)
self._client_wrapper = SyncClientWrapper(
base_url=_get_base_url(base_url=base_url, environment=environment),
- authorization=authorization,
api_key=api_key,
headers=headers,
httpx_client=httpx_client
@@ -170,7 +166,6 @@ class AsyncFlagright:
- authorization : str
api_key : str
headers : typing.Optional[typing.Dict[str, str]]
Additional headers to send with every request.
@@ -189,7 +184,6 @@ class AsyncFlagright:
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
"""
@@ -199,7 +193,6 @@ def __init__(
*,
base_url: typing.Optional[str] = None,
environment: FlagrightEnvironment = FlagrightEnvironment.SANDBOX_API_SERVER_EU_1,
- authorization: str,
api_key: str,
headers: typing.Optional[typing.Dict[str, str]] = None,
timeout: typing.Optional[float] = None,
@@ -211,7 +204,6 @@ def __init__(
)
self._client_wrapper = AsyncClientWrapper(
base_url=_get_base_url(base_url=base_url, environment=environment),
- authorization=authorization,
api_key=api_key,
headers=headers,
httpx_client=httpx_client
diff --git a/src/flagright/consumer_user_events/client.py b/src/flagright/consumer_user_events/client.py
index 9da0531..9e4a601 100644
--- a/src/flagright/consumer_user_events/client.py
+++ b/src/flagright/consumer_user_events/client.py
@@ -105,7 +105,6 @@ def create(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_user_events.create(
@@ -155,7 +154,6 @@ def get(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_user_events.get(
@@ -259,7 +257,6 @@ async def create(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -317,7 +314,6 @@ async def get(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
diff --git a/src/flagright/consumer_users/client.py b/src/flagright/consumer_users/client.py
index c3e4547..654c674 100644
--- a/src/flagright/consumer_users/client.py
+++ b/src/flagright/consumer_users/client.py
@@ -211,7 +211,6 @@ def create(
)
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_users.create(
@@ -339,7 +338,6 @@ def get(self, user_id: str, *, request_options: typing.Optional[RequestOptions]
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.consumer_users.get(
@@ -526,7 +524,6 @@ async def create(
)
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -664,7 +661,6 @@ async def get(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
diff --git a/src/flagright/core/client_wrapper.py b/src/flagright/core/client_wrapper.py
index 0f36ad9..5b989af 100644
--- a/src/flagright/core/client_wrapper.py
+++ b/src/flagright/core/client_wrapper.py
@@ -10,13 +10,11 @@ class BaseClientWrapper:
def __init__(
self,
*,
- authorization: str,
api_key: str,
headers: typing.Optional[typing.Dict[str, str]] = None,
base_url: str,
timeout: typing.Optional[float] = None,
):
- self._authorization = authorization
self.api_key = api_key
self._headers = headers
self._base_url = base_url
@@ -24,13 +22,12 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "flagright/1.8.41",
+ "User-Agent": "flagright/1.8.42",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
- "X-Fern-SDK-Version": "1.8.41",
+ "X-Fern-SDK-Version": "1.8.42",
**(self.get_custom_headers() or {}),
}
- headers["Authorization"] = self._authorization
headers["x-api-key"] = self.api_key
return headers
@@ -48,16 +45,13 @@ class SyncClientWrapper(BaseClientWrapper):
def __init__(
self,
*,
- authorization: str,
api_key: str,
headers: typing.Optional[typing.Dict[str, str]] = None,
base_url: str,
timeout: typing.Optional[float] = None,
httpx_client: httpx.Client,
):
- super().__init__(
- authorization=authorization, api_key=api_key, headers=headers, base_url=base_url, timeout=timeout
- )
+ super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout)
self.httpx_client = HttpClient(
httpx_client=httpx_client,
base_headers=self.get_headers,
@@ -70,16 +64,13 @@ class AsyncClientWrapper(BaseClientWrapper):
def __init__(
self,
*,
- authorization: str,
api_key: str,
headers: typing.Optional[typing.Dict[str, str]] = None,
base_url: str,
timeout: typing.Optional[float] = None,
httpx_client: httpx.AsyncClient,
):
- super().__init__(
- authorization=authorization, api_key=api_key, headers=headers, base_url=base_url, timeout=timeout
- )
+ super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout)
self.httpx_client = AsyncHttpClient(
httpx_client=httpx_client,
base_headers=self.get_headers,
diff --git a/src/flagright/transaction_events/client.py b/src/flagright/transaction_events/client.py
index b4dc448..f49bae6 100644
--- a/src/flagright/transaction_events/client.py
+++ b/src/flagright/transaction_events/client.py
@@ -101,7 +101,6 @@ def create(
from flagright import DeviceData, Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transaction_events.create(
@@ -160,7 +159,6 @@ def get(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transaction_events.get(
@@ -259,7 +257,6 @@ async def create(
from flagright import AsyncFlagright, DeviceData
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -326,7 +323,6 @@ async def get(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
diff --git a/src/flagright/transactions/client.py b/src/flagright/transactions/client.py
index 670c9b6..f02df54 100644
--- a/src/flagright/transactions/client.py
+++ b/src/flagright/transactions/client.py
@@ -170,7 +170,6 @@ def verify(
)
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transactions.verify(
@@ -295,7 +294,6 @@ def get(
from flagright import Flagright
client = Flagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
client.transactions.get(
@@ -456,7 +454,6 @@ async def verify(
)
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)
@@ -589,7 +586,6 @@ async def get(
from flagright import AsyncFlagright
client = AsyncFlagright(
- authorization="YOUR_AUTHORIZATION",
api_key="YOUR_API_KEY",
)