Skip to content

Commit

Permalink
Release 1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Apr 17, 2024
1 parent e658d08 commit 1efa6f1
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 5 deletions.
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
version = "1.5.0"
version = "1.5.1"
description = ""
readme = "README.md"
authors = []
Expand Down
2 changes: 2 additions & 0 deletions src/flagright/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
UserStateDetails,
UserWithRulesResult,
WalletDetails,
WalletDetailsNetwork,
WalletPaymentMethod,
WebhookEvent,
WebhookEventBase,
Expand Down Expand Up @@ -321,6 +322,7 @@
"UserStateDetails",
"UserWithRulesResult",
"WalletDetails",
"WalletDetailsNetwork",
"WalletPaymentMethod",
"WebhookEvent",
"WebhookEventBase",
Expand Down
2 changes: 1 addition & 1 deletion src/flagright/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.0",
"X-Fern-SDK-Version": "1.5.1",
}
headers["x-api-key"] = self.api_key
return headers
Expand Down
2 changes: 2 additions & 0 deletions src/flagright/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
from .user_state_details import UserStateDetails
from .user_with_rules_result import UserWithRulesResult
from .wallet_details import WalletDetails
from .wallet_details_network import WalletDetailsNetwork
from .wallet_payment_method import WalletPaymentMethod
from .webhook_event import WebhookEvent
from .webhook_event_base import WebhookEventBase
Expand Down Expand Up @@ -304,6 +305,7 @@
"UserStateDetails",
"UserWithRulesResult",
"WalletDetails",
"WalletDetailsNetwork",
"WalletPaymentMethod",
"WebhookEvent",
"WebhookEventBase",
Expand Down
2 changes: 2 additions & 0 deletions src/flagright/types/wallet_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from .amount import Amount
from .email_id import EmailId
from .tag import Tag
from .wallet_details_network import WalletDetailsNetwork

try:
import pydantic.v1 as pydantic # type: ignore
Expand Down Expand Up @@ -36,6 +37,7 @@ class WalletDetails(pydantic.BaseModel):
alias="walletPhoneNumber", description="Phone number associated with the wallet, if any"
)
wallet_balance: typing.Optional[Amount] = pydantic.Field(alias="walletBalance")
network: typing.Optional[WalletDetailsNetwork] = pydantic.Field(description="Network of the wallet")

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
Expand Down
113 changes: 113 additions & 0 deletions src/flagright/types/wallet_details_network.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# This file was auto-generated by Fern from our API Definition.

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class WalletDetailsNetwork(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"
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],
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 WalletDetailsNetwork.BITCOIN:
return bitcoin()
if self is WalletDetailsNetwork.ETHEREUM:
return ethereum()
if self is WalletDetailsNetwork.POLYGON:
return polygon()
if self is WalletDetailsNetwork.BNB_SMART_CHAIN:
return bnb_smart_chain()
if self is WalletDetailsNetwork.BNB_BEACON_CHAIN:
return bnb_beacon_chain()
if self is WalletDetailsNetwork.ARBITRUM_L_2:
return arbitrum_l_2()
if self is WalletDetailsNetwork.SOLANA:
return solana()
if self is WalletDetailsNetwork.AVALANCHE_C_CHAIN:
return avalanche_c_chain()
if self is WalletDetailsNetwork.LITECOIN:
return litecoin()
if self is WalletDetailsNetwork.BITCOIN_CASH:
return bitcoin_cash()
if self is WalletDetailsNetwork.RIPPLE:
return ripple()
if self is WalletDetailsNetwork.STELLAR:
return stellar()
if self is WalletDetailsNetwork.EOS_PUBLIC:
return eos_public()
if self is WalletDetailsNetwork.TRON:
return tron()
if self is WalletDetailsNetwork.CARDANO:
return cardano()
if self is WalletDetailsNetwork.POLKADOT:
return polkadot()
if self is WalletDetailsNetwork.NEAR_PROTOCOL:
return near_protocol()
if self is WalletDetailsNetwork.COSMOS:
return cosmos()
if self is WalletDetailsNetwork.DOGECOIN:
return dogecoin()
if self is WalletDetailsNetwork.OPTIMISM_MAINNET:
return optimism_mainnet()
if self is WalletDetailsNetwork.FANTOM:
return fantom()
if self is WalletDetailsNetwork.HEDERA:
return hedera()
if self is WalletDetailsNetwork.ALGORAND:
return algorand()
if self is WalletDetailsNetwork.CELESTIA:
return celestia()

0 comments on commit 1efa6f1

Please sign in to comment.