from pydantic import BaseModel, Extra class MyModel(BaseModel): class Config: extra = Extra.forbid class ContactDataBuyerSeller(MyModel): username: str name: str feedback_score: int trade_count: str last_online: str class ContactDataAd(MyModel): payment_method: str trade_type: str advertiser: ContactDataBuyerSeller asset: str id: str | None contact_id: str | None class ContactData(MyModel): buyer: ContactDataBuyerSeller seller: ContactDataBuyerSeller amount: str amount_xmr: str | None fee_xmr: str | None amount_btc: str | None fee_btc: str | None advertisement: ContactDataAd contact_id: str currency: str country: str account_info: str price_equation: str is_buying: bool is_selling: bool created_at: str escrowed_at: str funded_at: str canceled_at: str | None closed_at: str | None msg: str released_at: str | None payment_completed_at: str | None disputed_at: str | None arbitrated: bool transfer_to_seller_non_custodial_wallet_transaction_confirmations: str | None transfer_to_buyer_settlement_wallet_transaction_id: str | None transfer_to_buyer_settlement_wallet_transaction_key: str | None buyer_settlement_address: str | None buyer_settlement_fee_level: str | None seller_non_custodial_wallet_mnemonic: str | None transfer_to_seller_non_custodial_wallet_transaction_id: str | None class ContactActions(MyModel): advertisement_public_view: str | None advertisement_url: str | None message_post_url: str | None messages_url: str | None release_url: str | None cancel_url: str | None dispute_url: str | None class Contact(MyModel): data: ContactData actions: ContactActions class DashboardResponseData(MyModel): contact_count: int contact_list: list[Contact] class DashboardResponse(MyModel): data: DashboardResponseData class Dashboard(MyModel): success: bool status: int | None message: str response: DashboardResponse DashboardSchema = { "success": "success", "message": "message", "contact_count": "response.data.contact_count", "contact_list": "response.data.contact_list", } class Pagination(MyModel): prev: str | None next: str | None total_elements: int total_pages: int current_page: int class Profile(MyModel): username: str name: str feedback_score: int trade_count: str last_online: str localbitcoins_trade_count: int | None paxful_trade_count: int | None class BuyBitcoinsOnlineAd(MyModel): ad_id: str countrycode: str created_at: str currency: str max_amount: float | None max_amount_available: float min_amount: float | None msg: str online_provider: str require_trusted_by_advertiser: bool verified_email_required: bool temp_price: float track_max_amount: bool trade_type: str trusted_required: bool visible: bool asset: str payment_method_detail: str | None profile: Profile require_feedback_score: int | None first_time_limit_btc: float | None limit_to_fiat_amounts: str | None class Actions(MyModel): public_view: str class BuyBitcoinsOnlineResponseDataAdList(MyModel): data: BuyBitcoinsOnlineAd actions: Actions class BuyBitcoinsOnlineResponseData(MyModel): ad_count: int ad_list: list[BuyBitcoinsOnlineResponseDataAdList] class BuyBitcoinsOnlineResponse(MyModel): data: BuyBitcoinsOnlineResponseData pagination: Pagination | None class BuyBitcoinsOnline(MyModel): success: bool message: str response: BuyBitcoinsOnlineResponse status: int | None class BuyMoneroOnlineAd(MyModel): ad_id: str countrycode: str created_at: str currency: str max_amount: float | None max_amount_available: float min_amount: float | None msg: str online_provider: str require_trusted_by_advertiser: bool verified_email_required: bool temp_price: float track_max_amount: bool trade_type: str trusted_required: bool visible: bool asset: str payment_method_detail: str | None profile: Profile require_feedback_score: int | None first_time_limit_xmr: float | None limit_to_fiat_amounts: str | None class BuyMoneroOnlineAdList(MyModel): data: BuyMoneroOnlineAd actions: Actions class BuyMoneroOnlineResponseData(MyModel): ad_count: int ad_list: list[BuyMoneroOnlineAdList] class BuyMoneroOnlineResponse(MyModel): data: BuyMoneroOnlineResponseData pagination: Pagination | None class BuyMoneroOnline(MyModel): success: bool message: str response: BuyMoneroOnlineResponse status: int | None BuyBitcoinsOnlineSchema = { "success": "success", "message": "message", "ad_count": "response.data.ad_count", "ad_list": "response.data.ad_list", "pagination": "response.pagination", } BuyMoneroOnlineSchema = { "success": "success", "message": "message", "ad_count": "response.data.ad_count", "ad_list": "response.data.ad_list", "pagination": "response.pagination", } class AccountInfo(MyModel): ... class AdsResponseDataAd(MyModel): ad_id: str countrycode: str created_at: str currency: str max_amount: float | None max_amount_available: float min_amount: float | None msg: str online_provider: str require_trusted_by_advertiser: bool verified_email_required: bool temp_price: float track_max_amount: bool trade_type: str trusted_required: bool visible: bool asset: str payment_method_detail: str | None require_feedback_score: int | None first_time_limit_xmr: float | None first_time_limit_btc: float | None limit_to_fiat_amounts: str | None account_info: str price_equation: str class AdsActions(MyModel): change_form: str | None html_form: str | None public_view: str | None class AdsResponseDataAdList(MyModel): data: AdsResponseDataAd actions: AdsActions class AdsResponseData(MyModel): ad_count: int ad_list: list[AdsResponseDataAdList] class AdsResponse(MyModel): data: AdsResponseData pagination: Pagination | None class Ads(MyModel): success: bool message: str response: AdsResponse status: int | None AdsSchema = { "success": "success", "message": "message", "ad_count": "response.data.ad_count", "ad_list": "response.data.ad_list", }