# Generated by ariadne-codegen
# Source: metasrht/graphql/

from typing import Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import Currency, PaymentInterval, PaymentStatus
from .fragments import BillingAddress


class GetSetupIntentDetail(BaseModel):
    me: "GetSetupIntentDetailMe"


class GetSetupIntentDetailMe(BaseModel):
    payment_status: PaymentStatus = Field(alias="paymentStatus")
    subscription: Optional["GetSetupIntentDetailMeSubscription"]
    billing_address: Optional["GetSetupIntentDetailMeBillingAddress"] = Field(
        alias="billingAddress"
    )


class GetSetupIntentDetailMeSubscription(BaseModel):
    id: int
    autorenew: bool
    currency: Currency
    interval: PaymentInterval
    subtotal: int
    product: "GetSetupIntentDetailMeSubscriptionProduct"
    price: "GetSetupIntentDetailMeSubscriptionPrice"


class GetSetupIntentDetailMeSubscriptionProduct(BaseModel):
    name: str


class GetSetupIntentDetailMeSubscriptionPrice(BaseModel):
    currency: Currency
    amount: int


class GetSetupIntentDetailMeBillingAddress(BillingAddress):
    pass


GetSetupIntentDetail.model_rebuild()
GetSetupIntentDetailMe.model_rebuild()
GetSetupIntentDetailMeSubscription.model_rebuild()
