aboutsummaryrefslogtreecommitdiff
path: root/jb/models/wallet.py
blob: 226e71fb74b269ee6bf907093ea51f14edf282a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from generalresearch.currency import USDCent
from generalresearch.models.custom_types import UUIDStr
from pydantic import BaseModel, ConfigDict, Field


class CashoutRequest(BaseModel):
    model_config = ConfigDict(extra="forbid")

    amount: USDCent = Field(gt=0, lt=10_00, description="Amount in USD cents")
    cashout_method_id: UUIDStr = Field(description="Cashout method ID")


class CashoutConfirmation(BaseModel):
    model_config = ConfigDict(extra="forbid")

    token: str = Field(min_length=1)


class CashoutPostback(BaseModel):
    model_config = ConfigDict(extra="forbid")

    cashout_id: UUIDStr


class PendingCashout(BaseModel):
    model_config = ConfigDict(extra="forbid")

    product_user_id: str
    amount: USDCent
    cashout_method_id: UUIDStr