// This file is auto-generated by the revolut-codegen tool.
// Do not edit manually.

#![allow(clippy::all, dead_code)]

/// Error types.
pub mod error {
    /// Error from a `TryFrom` or `FromStr` implementation.
    pub struct ConversionError(::std::borrow::Cow<'static, str>);
    impl ::std::error::Error for ConversionError {}
    impl ::std::fmt::Display for ConversionError {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
            ::std::fmt::Display::fmt(&self.0, f)
        }
    }
    impl ::std::fmt::Debug for ConversionError {
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
            ::std::fmt::Debug::fmt(&self.0, f)
        }
    }
    impl From<&'static str> for ConversionError {
        fn from(value: &'static str) -> Self {
            Self(value.into())
        }
    }
    impl From<String> for ConversionError {
        fn from(value: String) -> Self {
            Self(value.into())
        }
    }
}
///Thrown when request parameter field is invalid
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "Thrown when request parameter field is invalid",
///  "type": "object",
///  "required": [
///    "message"
///  ],
///  "properties": {
///    "message": {
///      "description": "Specifies the invalid parameter that was provided by the user.",
///      "type": "string"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct BadRequestError {
    ///Specifies the invalid parameter that was provided by the user.
    pub message: ::std::string::String,
}
///The cryptocurrency blockchain/network.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The cryptocurrency blockchain/network.",
///  "type": "string",
///  "enum": [
///    "BITCOIN",
///    "RIPPLE",
///    "BITCOINCASH",
///    "LITECOIN",
///    "ETHEREUM",
///    "DOGECOIN",
///    "CARDANO",
///    "STELLAR",
///    "POLKADOT",
///    "SOLANA",
///    "AVALANCHE",
///    "EOS",
///    "TEZOS",
///    "DASH",
///    "ALGORAND",
///    "CELO",
///    "SMARTCHAIN",
///    "POLYGON",
///    "FANTOM",
///    "OPTIMISM",
///    "COSMOS",
///    "KUSAMA",
///    "ETHEREUMCLASSIC",
///    "ETHEREUMPOW",
///    "HEDERAHASHGRAPH",
///    "TRON",
///    "KAVA",
///    "NEAR",
///    "SONGBIRD",
///    "FLARE",
///    "CELESTIA",
///    "BASE"
///  ]
///}
/// ```text
/// </details>
#[derive(
    ::serde::Deserialize,
    ::serde::Serialize,
    Clone,
    Copy,
    Debug,
    Eq,
    Hash,
    Ord,
    PartialEq,
    PartialOrd,
)]
pub enum Blockchain {
    #[serde(rename = "BITCOIN")]
    Bitcoin,
    #[serde(rename = "RIPPLE")]
    Ripple,
    #[serde(rename = "BITCOINCASH")]
    Bitcoincash,
    #[serde(rename = "LITECOIN")]
    Litecoin,
    #[serde(rename = "ETHEREUM")]
    Ethereum,
    #[serde(rename = "DOGECOIN")]
    Dogecoin,
    #[serde(rename = "CARDANO")]
    Cardano,
    #[serde(rename = "STELLAR")]
    Stellar,
    #[serde(rename = "POLKADOT")]
    Polkadot,
    #[serde(rename = "SOLANA")]
    Solana,
    #[serde(rename = "AVALANCHE")]
    Avalanche,
    #[serde(rename = "EOS")]
    Eos,
    #[serde(rename = "TEZOS")]
    Tezos,
    #[serde(rename = "DASH")]
    Dash,
    #[serde(rename = "ALGORAND")]
    Algorand,
    #[serde(rename = "CELO")]
    Celo,
    #[serde(rename = "SMARTCHAIN")]
    Smartchain,
    #[serde(rename = "POLYGON")]
    Polygon,
    #[serde(rename = "FANTOM")]
    Fantom,
    #[serde(rename = "OPTIMISM")]
    Optimism,
    #[serde(rename = "COSMOS")]
    Cosmos,
    #[serde(rename = "KUSAMA")]
    Kusama,
    #[serde(rename = "ETHEREUMCLASSIC")]
    Ethereumclassic,
    #[serde(rename = "ETHEREUMPOW")]
    Ethereumpow,
    #[serde(rename = "HEDERAHASHGRAPH")]
    Hederahashgraph,
    #[serde(rename = "TRON")]
    Tron,
    #[serde(rename = "KAVA")]
    Kava,
    #[serde(rename = "NEAR")]
    Near,
    #[serde(rename = "SONGBIRD")]
    Songbird,
    #[serde(rename = "FLARE")]
    Flare,
    #[serde(rename = "CELESTIA")]
    Celestia,
    #[serde(rename = "BASE")]
    Base,
}
impl ::std::fmt::Display for Blockchain {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        match *self {
            Self::Bitcoin => f.write_str("BITCOIN"),
            Self::Ripple => f.write_str("RIPPLE"),
            Self::Bitcoincash => f.write_str("BITCOINCASH"),
            Self::Litecoin => f.write_str("LITECOIN"),
            Self::Ethereum => f.write_str("ETHEREUM"),
            Self::Dogecoin => f.write_str("DOGECOIN"),
            Self::Cardano => f.write_str("CARDANO"),
            Self::Stellar => f.write_str("STELLAR"),
            Self::Polkadot => f.write_str("POLKADOT"),
            Self::Solana => f.write_str("SOLANA"),
            Self::Avalanche => f.write_str("AVALANCHE"),
            Self::Eos => f.write_str("EOS"),
            Self::Tezos => f.write_str("TEZOS"),
            Self::Dash => f.write_str("DASH"),
            Self::Algorand => f.write_str("ALGORAND"),
            Self::Celo => f.write_str("CELO"),
            Self::Smartchain => f.write_str("SMARTCHAIN"),
            Self::Polygon => f.write_str("POLYGON"),
            Self::Fantom => f.write_str("FANTOM"),
            Self::Optimism => f.write_str("OPTIMISM"),
            Self::Cosmos => f.write_str("COSMOS"),
            Self::Kusama => f.write_str("KUSAMA"),
            Self::Ethereumclassic => f.write_str("ETHEREUMCLASSIC"),
            Self::Ethereumpow => f.write_str("ETHEREUMPOW"),
            Self::Hederahashgraph => f.write_str("HEDERAHASHGRAPH"),
            Self::Tron => f.write_str("TRON"),
            Self::Kava => f.write_str("KAVA"),
            Self::Near => f.write_str("NEAR"),
            Self::Songbird => f.write_str("SONGBIRD"),
            Self::Flare => f.write_str("FLARE"),
            Self::Celestia => f.write_str("CELESTIA"),
            Self::Base => f.write_str("BASE"),
        }
    }
}
impl ::std::str::FromStr for Blockchain {
    type Err = self::error::ConversionError;
    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
        match value {
            "BITCOIN" => Ok(Self::Bitcoin),
            "RIPPLE" => Ok(Self::Ripple),
            "BITCOINCASH" => Ok(Self::Bitcoincash),
            "LITECOIN" => Ok(Self::Litecoin),
            "ETHEREUM" => Ok(Self::Ethereum),
            "DOGECOIN" => Ok(Self::Dogecoin),
            "CARDANO" => Ok(Self::Cardano),
            "STELLAR" => Ok(Self::Stellar),
            "POLKADOT" => Ok(Self::Polkadot),
            "SOLANA" => Ok(Self::Solana),
            "AVALANCHE" => Ok(Self::Avalanche),
            "EOS" => Ok(Self::Eos),
            "TEZOS" => Ok(Self::Tezos),
            "DASH" => Ok(Self::Dash),
            "ALGORAND" => Ok(Self::Algorand),
            "CELO" => Ok(Self::Celo),
            "SMARTCHAIN" => Ok(Self::Smartchain),
            "POLYGON" => Ok(Self::Polygon),
            "FANTOM" => Ok(Self::Fantom),
            "OPTIMISM" => Ok(Self::Optimism),
            "COSMOS" => Ok(Self::Cosmos),
            "KUSAMA" => Ok(Self::Kusama),
            "ETHEREUMCLASSIC" => Ok(Self::Ethereumclassic),
            "ETHEREUMPOW" => Ok(Self::Ethereumpow),
            "HEDERAHASHGRAPH" => Ok(Self::Hederahashgraph),
            "TRON" => Ok(Self::Tron),
            "KAVA" => Ok(Self::Kava),
            "NEAR" => Ok(Self::Near),
            "SONGBIRD" => Ok(Self::Songbird),
            "FLARE" => Ok(Self::Flare),
            "CELESTIA" => Ok(Self::Celestia),
            "BASE" => Ok(Self::Base),
            _ => Err("invalid value".into()),
        }
    }
}
impl ::std::convert::TryFrom<&str> for Blockchain {
    type Error = self::error::ConversionError;
    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
impl ::std::convert::TryFrom<&::std::string::String> for Blockchain {
    type Error = self::error::ConversionError;
    fn try_from(
        value: &::std::string::String,
    ) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
impl ::std::convert::TryFrom<::std::string::String> for Blockchain {
    type Error = self::error::ConversionError;
    fn try_from(
        value: ::std::string::String,
    ) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
///`Config`
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "type": "object",
///  "required": [
///    "countries",
///    "crypto",
///    "fiat",
///    "payment_methods",
///    "version"
///  ],
///  "properties": {
///    "countries": {
///      "description": "The list of client countries supported by Ramp – for your customer to be able to use Revolut Ramp, they must be resident in one of those countries.",
///      "type": "array",
///      "items": {
///        "$ref": "#/components/schemas/CountryCode"
///      }
///    },
///    "crypto": {
///      "description": "The list of cryptocurrencies supported by Revolut Ramp.",
///      "type": "array",
///      "items": {
///        "description": "Supported crypto currency.",
///        "type": "object",
///        "required": [
///          "blockchain",
///          "currency",
///          "id"
///        ],
///        "properties": {
///          "blockchain": {
///            "$ref": "#/components/schemas/Blockchain"
///          },
///          "currency": {
///            "$ref": "#/components/schemas/CurrencyCryptoCode"
///          },
///          "id": {
///            "description": "The unique identifier of the crypto currency-blockchain pair.\nShould be used throughout the API to reference the specific crypto.",
///            "type": "string"
///          },
///          "smartContractAddress": {
///            "description": "The smart contract address. Returned only for tokens.",
///            "type": "string"
///          }
///        }
///      }
///    },
///    "feePercentages": {
///      "description": "The list of fee percentages that can be applied for the order as partner fee.",
///      "type": "array",
///      "items": {
///        "type": "number",
///        "format": "float"
///      }
///    },
///    "fiat": {
///      "description": "The supported fiat currencies and limits.",
///      "type": "array",
///      "items": {
///        "description": "The supported fiat currency and limits.",
///        "type": "object",
///        "required": [
///          "currency",
///          "max_limit",
///          "min_limit"
///        ],
///        "properties": {
///          "currency": {
///            "$ref": "#/components/schemas/CurrencyFiat"
///          },
///          "max_limit": {
///            "description": "The maximum allowed amount.",
///            "type": "number",
///            "format": "float"
///          },
///          "min_limit": {
///            "description": "The minimum allowed amount.",
///            "type": "number",
///            "format": "float"
///          }
///        }
///      }
///    },
///    "payment_methods": {
///      "description": "The list of available payment methods.",
///      "type": "array",
///      "items": {
///        "type": "string",
///        "enum": [
///          "card",
///          "revolut",
///          "apple-pay",
///          "google-pay"
///        ]
///      }
///    },
///    "version": {
///      "description": "The Revolut Ramp configuration version.",
///      "type": "string"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct Config {
    ///The list of client countries supported by Ramp – for your customer to be able to use Revolut Ramp, they must be resident in one of those countries.
    pub countries: ::std::vec::Vec<CountryCode>,
    ///The list of cryptocurrencies supported by Revolut Ramp.
    pub crypto: ::std::vec::Vec<ConfigCryptoItem>,
    ///The list of fee percentages that can be applied for the order as partner fee.
    #[serde(
        rename = "feePercentages",
        default,
        skip_serializing_if = "::std::vec::Vec::is_empty"
    )]
    pub fee_percentages: ::std::vec::Vec<f32>,
    ///The supported fiat currencies and limits.
    pub fiat: ::std::vec::Vec<ConfigFiatItem>,
    ///The list of available payment methods.
    pub payment_methods: ::std::vec::Vec<ConfigPaymentMethodsItem>,
    ///The Revolut Ramp configuration version.
    pub version: ::std::string::String,
}
///Supported crypto currency.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "Supported crypto currency.",
///  "type": "object",
///  "required": [
///    "blockchain",
///    "currency",
///    "id"
///  ],
///  "properties": {
///    "blockchain": {
///      "$ref": "#/components/schemas/Blockchain"
///    },
///    "currency": {
///      "$ref": "#/components/schemas/CurrencyCryptoCode"
///    },
///    "id": {
///      "description": "The unique identifier of the crypto currency-blockchain pair.\nShould be used throughout the API to reference the specific crypto.",
///      "type": "string"
///    },
///    "smartContractAddress": {
///      "description": "The smart contract address. Returned only for tokens.",
///      "type": "string"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct ConfigCryptoItem {
    pub blockchain: Blockchain,
    pub currency: CurrencyCryptoCode,
    /// The unique identifier of the crypto currency-blockchain pair.
    /// Should be used throughout the API to reference the specific crypto.
    pub id: ::std::string::String,
    ///The smart contract address. Returned only for tokens.
    #[serde(
        rename = "smartContractAddress",
        default,
        skip_serializing_if = "::std::option::Option::is_none"
    )]
    pub smart_contract_address: ::std::option::Option<::std::string::String>,
}
///The supported fiat currency and limits.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The supported fiat currency and limits.",
///  "type": "object",
///  "required": [
///    "currency",
///    "max_limit",
///    "min_limit"
///  ],
///  "properties": {
///    "currency": {
///      "$ref": "#/components/schemas/CurrencyFiat"
///    },
///    "max_limit": {
///      "description": "The maximum allowed amount.",
///      "type": "number",
///      "format": "float"
///    },
///    "min_limit": {
///      "description": "The minimum allowed amount.",
///      "type": "number",
///      "format": "float"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct ConfigFiatItem {
    pub currency: CurrencyFiat,
    ///The maximum allowed amount.
    pub max_limit: f32,
    ///The minimum allowed amount.
    pub min_limit: f32,
}
///`ConfigPaymentMethodsItem`
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "type": "string",
///  "enum": [
///    "card",
///    "revolut",
///    "apple-pay",
///    "google-pay"
///  ]
///}
/// ```text
/// </details>
#[derive(
    ::serde::Deserialize,
    ::serde::Serialize,
    Clone,
    Copy,
    Debug,
    Eq,
    Hash,
    Ord,
    PartialEq,
    PartialOrd,
)]
pub enum ConfigPaymentMethodsItem {
    #[serde(rename = "card")]
    Card,
    #[serde(rename = "revolut")]
    Revolut,
    #[serde(rename = "apple-pay")]
    ApplePay,
    #[serde(rename = "google-pay")]
    GooglePay,
}
impl ::std::fmt::Display for ConfigPaymentMethodsItem {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        match *self {
            Self::Card => f.write_str("card"),
            Self::Revolut => f.write_str("revolut"),
            Self::ApplePay => f.write_str("apple-pay"),
            Self::GooglePay => f.write_str("google-pay"),
        }
    }
}
impl ::std::str::FromStr for ConfigPaymentMethodsItem {
    type Err = self::error::ConversionError;
    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
        match value {
            "card" => Ok(Self::Card),
            "revolut" => Ok(Self::Revolut),
            "apple-pay" => Ok(Self::ApplePay),
            "google-pay" => Ok(Self::GooglePay),
            _ => Err("invalid value".into()),
        }
    }
}
impl ::std::convert::TryFrom<&str> for ConfigPaymentMethodsItem {
    type Error = self::error::ConversionError;
    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
impl ::std::convert::TryFrom<&::std::string::String> for ConfigPaymentMethodsItem {
    type Error = self::error::ConversionError;
    fn try_from(
        value: &::std::string::String,
    ) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
impl ::std::convert::TryFrom<::std::string::String> for ConfigPaymentMethodsItem {
    type Error = self::error::ConversionError;
    fn try_from(
        value: ::std::string::String,
    ) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
///The [ISO 3166 Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the country.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The [ISO 3166 Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the country.",
///  "type": "string"
///}
/// ```text
/// </details>
#[derive(
    ::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd,
)]
#[serde(transparent)]
pub struct CountryCode(pub ::std::string::String);
impl ::std::ops::Deref for CountryCode {
    type Target = ::std::string::String;
    fn deref(&self) -> &::std::string::String {
        &self.0
    }
}
impl ::std::convert::From<CountryCode> for ::std::string::String {
    fn from(value: CountryCode) -> Self {
        value.0
    }
}
impl ::std::convert::From<::std::string::String> for CountryCode {
    fn from(value: ::std::string::String) -> Self {
        Self(value)
    }
}
impl ::std::str::FromStr for CountryCode {
    type Err = ::std::convert::Infallible;
    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
        Ok(Self(value.to_string()))
    }
}
impl ::std::fmt::Display for CountryCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        self.0.fmt(f)
    }
}
///The fiat currency [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code or [cryptocurrency code](https://en.wikipedia.org/wiki/List_of_cryptocurrencies).
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The fiat currency [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code or [cryptocurrency code](https://en.wikipedia.org/wiki/List_of_cryptocurrencies).",
///  "type": "string"
///}
/// ```text
/// </details>
#[derive(
    ::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd,
)]
#[serde(transparent)]
pub struct Currency(pub ::std::string::String);
impl ::std::ops::Deref for Currency {
    type Target = ::std::string::String;
    fn deref(&self) -> &::std::string::String {
        &self.0
    }
}
impl ::std::convert::From<Currency> for ::std::string::String {
    fn from(value: Currency) -> Self {
        value.0
    }
}
impl ::std::convert::From<::std::string::String> for Currency {
    fn from(value: ::std::string::String) -> Self {
        Self(value)
    }
}
impl ::std::str::FromStr for Currency {
    type Err = ::std::convert::Infallible;
    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
        Ok(Self(value.to_string()))
    }
}
impl ::std::fmt::Display for Currency {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        self.0.fmt(f)
    }
}
///The [cryptocurrency code](https://en.wikipedia.org/wiki/List_of_cryptocurrencies).
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The [cryptocurrency code](https://en.wikipedia.org/wiki/List_of_cryptocurrencies).",
///  "type": "string"
///}
/// ```text
/// </details>
#[derive(
    ::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd,
)]
#[serde(transparent)]
pub struct CurrencyCryptoCode(pub ::std::string::String);
impl ::std::ops::Deref for CurrencyCryptoCode {
    type Target = ::std::string::String;
    fn deref(&self) -> &::std::string::String {
        &self.0
    }
}
impl ::std::convert::From<CurrencyCryptoCode> for ::std::string::String {
    fn from(value: CurrencyCryptoCode) -> Self {
        value.0
    }
}
impl ::std::convert::From<::std::string::String> for CurrencyCryptoCode {
    fn from(value: ::std::string::String) -> Self {
        Self(value)
    }
}
impl ::std::str::FromStr for CurrencyCryptoCode {
    type Err = ::std::convert::Infallible;
    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
        Ok(Self(value.to_string()))
    }
}
impl ::std::fmt::Display for CurrencyCryptoCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        self.0.fmt(f)
    }
}
///The ID of the currency, obtained from the [`/config`](https://developer.revolut.com/docs/crypto-ramp/retrieve-configuration) endpoint.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The ID of the currency, obtained from the [`/config`](https://developer.revolut.com/docs/crypto-ramp/retrieve-configuration) endpoint.",
///  "type": "string"
///}
/// ```text
/// </details>
#[derive(
    ::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd,
)]
#[serde(transparent)]
pub struct CurrencyCryptoId(pub ::std::string::String);
impl ::std::ops::Deref for CurrencyCryptoId {
    type Target = ::std::string::String;
    fn deref(&self) -> &::std::string::String {
        &self.0
    }
}
impl ::std::convert::From<CurrencyCryptoId> for ::std::string::String {
    fn from(value: CurrencyCryptoId) -> Self {
        value.0
    }
}
impl ::std::convert::From<::std::string::String> for CurrencyCryptoId {
    fn from(value: ::std::string::String) -> Self {
        Self(value)
    }
}
impl ::std::str::FromStr for CurrencyCryptoId {
    type Err = ::std::convert::Infallible;
    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
        Ok(Self(value.to_string()))
    }
}
impl ::std::fmt::Display for CurrencyCryptoId {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        self.0.fmt(f)
    }
}
///The fiat currency [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The fiat currency [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code.",
///  "type": "string",
///  "format": "ISO 4217"
///}
/// ```text
/// </details>
#[derive(
    ::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd,
)]
#[serde(transparent)]
pub struct CurrencyFiat(pub ::std::string::String);
impl ::std::ops::Deref for CurrencyFiat {
    type Target = ::std::string::String;
    fn deref(&self) -> &::std::string::String {
        &self.0
    }
}
impl ::std::convert::From<CurrencyFiat> for ::std::string::String {
    fn from(value: CurrencyFiat) -> Self {
        value.0
    }
}
impl ::std::convert::From<::std::string::String> for CurrencyFiat {
    fn from(value: ::std::string::String) -> Self {
        Self(value)
    }
}
impl ::std::str::FromStr for CurrencyFiat {
    type Err = ::std::convert::Infallible;
    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
        Ok(Self(value.to_string()))
    }
}
impl ::std::fmt::Display for CurrencyFiat {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        self.0.fmt(f)
    }
}
///Thrown when endpoint is disabled by Kill Switch.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "Thrown when endpoint is disabled by Kill Switch.",
///  "type": "object",
///  "required": [
///    "message"
///  ],
///  "properties": {
///    "message": {
///      "description": "The message displayed to the user when endpoint is disabled by Kill Switch.",
///      "type": "string"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct DisabledByKillSwitchError {
    ///The message displayed to the user when endpoint is disabled by Kill Switch.
    pub message: ::std::string::String,
}
///Webhook event type
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "Webhook event type",
///  "type": "string",
///  "enum": [
///    "ORDER_CREATED",
///    "ORDER_PROCESSING",
///    "ORDER_COMPLETED",
///    "ORDER_FAILED"
///  ]
///}
/// ```text
/// </details>
#[derive(
    ::serde::Deserialize,
    ::serde::Serialize,
    Clone,
    Copy,
    Debug,
    Eq,
    Hash,
    Ord,
    PartialEq,
    PartialOrd,
)]
pub enum EventType {
    #[serde(rename = "ORDER_CREATED")]
    OrderCreated,
    #[serde(rename = "ORDER_PROCESSING")]
    OrderProcessing,
    #[serde(rename = "ORDER_COMPLETED")]
    OrderCompleted,
    #[serde(rename = "ORDER_FAILED")]
    OrderFailed,
}
impl ::std::fmt::Display for EventType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        match *self {
            Self::OrderCreated => f.write_str("ORDER_CREATED"),
            Self::OrderProcessing => f.write_str("ORDER_PROCESSING"),
            Self::OrderCompleted => f.write_str("ORDER_COMPLETED"),
            Self::OrderFailed => f.write_str("ORDER_FAILED"),
        }
    }
}
impl ::std::str::FromStr for EventType {
    type Err = self::error::ConversionError;
    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
        match value {
            "ORDER_CREATED" => Ok(Self::OrderCreated),
            "ORDER_PROCESSING" => Ok(Self::OrderProcessing),
            "ORDER_COMPLETED" => Ok(Self::OrderCompleted),
            "ORDER_FAILED" => Ok(Self::OrderFailed),
            _ => Err("invalid value".into()),
        }
    }
}
impl ::std::convert::TryFrom<&str> for EventType {
    type Error = self::error::ConversionError;
    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
impl ::std::convert::TryFrom<&::std::string::String> for EventType {
    type Error = self::error::ConversionError;
    fn try_from(
        value: &::std::string::String,
    ) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
impl ::std::convert::TryFrom<::std::string::String> for EventType {
    type Error = self::error::ConversionError;
    fn try_from(
        value: ::std::string::String,
    ) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
///`MoneyCryptoId`
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "type": "object",
///  "required": [
///    "amount",
///    "currencyId"
///  ],
///  "properties": {
///    "amount": {
///      "description": "The amount.",
///      "type": "number",
///      "format": "float"
///    },
///    "currencyId": {
///      "$ref": "#/components/schemas/CurrencyCryptoId"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct MoneyCryptoId {
    ///The amount.
    pub amount: f32,
    #[serde(rename = "currencyId")]
    pub currency_id: CurrencyCryptoId,
}
///`MoneyFiat`
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "type": "object",
///  "required": [
///    "amount",
///    "currency"
///  ],
///  "properties": {
///    "amount": {
///      "description": "The amount.",
///      "type": "number",
///      "format": "float"
///    },
///    "currency": {
///      "$ref": "#/components/schemas/CurrencyFiat"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct MoneyFiat {
    ///The amount.
    pub amount: f32,
    pub currency: CurrencyFiat,
}
///Thrown when resource can't be found
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "Thrown when resource can't be found",
///  "type": "object",
///  "required": [
///    "message"
///  ],
///  "properties": {
///    "message": {
///      "description": "The message displayed to the user when resource cannot be found.",
///      "type": "string"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct NotFoundError {
    ///The message displayed to the user when resource cannot be found.
    pub message: ::std::string::String,
}
///Fiat to crypto exchange order
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "Fiat to crypto exchange order",
///  "type": "object",
///  "required": [
///    "created_at",
///    "crypto",
///    "exchange_rate",
///    "fees",
///    "fees_partner_currency",
///    "fiat",
///    "id",
///    "payment",
///    "status",
///    "updated_at",
///    "wallet"
///  ],
///  "properties": {
///    "additionalProperties": {
///      "description": "The additional properties passed in the call to the [`/buy`](https://developer.revolut.com/docs/crypto-ramp/retrieve-a-redirect-url) endpoint under the `additionalProperties.*` query parameter(s), if such properties were provided.",
///      "type": "object",
///      "additionalProperties": {
///        "type": "string"
///      }
///    },
///    "created_at": {
///      "description": "The UTC date and time of order creation in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
///      "type": "string",
///      "format": "date-time"
///    },
///    "crypto": {
///      "$ref": "#/components/schemas/MoneyCryptoId"
///    },
///    "exchange_rate": {
///      "description": "The exchange rate for the order.",
///      "type": "number",
///      "format": "float"
///    },
///    "fail_reason": {
///      "description": "The reason why the order failed.",
///      "type": "string",
///      "enum": [
///        "PAYMENT_NOT_RECEIVED",
///        "PAYMENT_DECLINED",
///        "CRYPTO_WITHDRAWAL_FAILED",
///        "OTHER"
///      ]
///    },
///    "fees": {
///      "description": "The fees for the order.",
///      "type": "object",
///      "required": [
///        "network_fee",
///        "partner_fee",
///        "ramp_fee"
///      ],
///      "properties": {
///        "network_fee": {
///          "$ref": "#/components/schemas/MoneyFiat"
///        },
///        "partner_fee": {
///          "$ref": "#/components/schemas/MoneyFiat"
///        },
///        "ramp_fee": {
///          "$ref": "#/components/schemas/MoneyFiat"
///        }
///      }
///    },
///    "fees_partner_currency": {
///      "description": "The fees converted to the partner's currency.",
///      "type": "object",
///      "required": [
///        "network_fee",
///        "partner_fee",
///        "ramp_fee"
///      ],
///      "properties": {
///        "network_fee": {
///          "$ref": "#/components/schemas/MoneyFiat"
///        },
///        "partner_fee": {
///          "$ref": "#/components/schemas/MoneyFiat"
///        },
///        "ramp_fee": {
///          "$ref": "#/components/schemas/MoneyFiat"
///        }
///      }
///    },
///    "fiat": {
///      "$ref": "#/components/schemas/MoneyFiat"
///    },
///    "id": {
///      "description": "The external UUID of the order.",
///      "type": "string",
///      "format": "uuid"
///    },
///    "payment": {
///      "description": "The [payment method](https://developer.revolut.com/docs/guides/crypto-ramp/guides/buy-crypto/introduction-to-revolut-ramp/coverage-and-other-details/payment-options) used for the purchase.",
///      "type": "string",
///      "enum": [
///        "card",
///        "revolut",
///        "apple-pay",
///        "google-pay"
///      ]
///    },
///    "status": {
///      "description": "The state of order processing.",
///      "type": "string",
///      "enum": [
///        "AWAITING_PAYMENT",
///        "PROCESSING",
///        "COMPLETED",
///        "FAILED"
///      ]
///    },
///    "transaction_hash": {
///      "description": "The blockchain transaction hash.\nAbsent if no crypto transaction has been created yet.\nAlways present if order is in the `COMPLETED` state.",
///      "type": "string"
///    },
///    "updated_at": {
///      "description": "The UTC date and time of order update in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
///      "type": "string",
///      "format": "date-time"
///    },
///    "wallet": {
///      "description": "The address of the crypto wallet into which the crypto transfer was ordered.",
///      "type": "string"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct Order {
    ///The additional properties passed in the call to the [`/buy`](https://developer.revolut.com/docs/crypto-ramp/retrieve-a-redirect-url) endpoint under the `additionalProperties.*` query parameter(s), if such properties were provided.
    #[serde(
        rename = "additionalProperties",
        default,
        skip_serializing_if = ":: std :: collections :: HashMap::is_empty"
    )]
    pub additional_properties:
        ::std::collections::HashMap<::std::string::String, ::std::string::String>,
    ///The UTC date and time of order creation in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
    pub crypto: MoneyCryptoId,
    ///The exchange rate for the order.
    pub exchange_rate: f32,
    ///The reason why the order failed.
    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
    pub fail_reason: ::std::option::Option<OrderFailReason>,
    pub fees: OrderFees,
    pub fees_partner_currency: OrderFeesPartnerCurrency,
    pub fiat: MoneyFiat,
    ///The external UUID of the order.
    pub id: ::uuid::Uuid,
    ///The [payment method](https://developer.revolut.com/docs/guides/crypto-ramp/guides/buy-crypto/introduction-to-revolut-ramp/coverage-and-other-details/payment-options) used for the purchase.
    pub payment: OrderPayment,
    ///The state of order processing.
    pub status: OrderStatus,
    /// The blockchain transaction hash.
    /// Absent if no crypto transaction has been created yet.
    /// Always present if order is in the `COMPLETED` state.
    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
    pub transaction_hash: ::std::option::Option<::std::string::String>,
    ///The UTC date and time of order update in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    pub updated_at: ::chrono::DateTime<::chrono::offset::Utc>,
    ///The address of the crypto wallet into which the crypto transfer was ordered.
    pub wallet: ::std::string::String,
}
///The reason why the order failed.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The reason why the order failed.",
///  "type": "string",
///  "enum": [
///    "PAYMENT_NOT_RECEIVED",
///    "PAYMENT_DECLINED",
///    "CRYPTO_WITHDRAWAL_FAILED",
///    "OTHER"
///  ]
///}
/// ```text
/// </details>
#[derive(
    ::serde::Deserialize,
    ::serde::Serialize,
    Clone,
    Copy,
    Debug,
    Eq,
    Hash,
    Ord,
    PartialEq,
    PartialOrd,
)]
pub enum OrderFailReason {
    #[serde(rename = "PAYMENT_NOT_RECEIVED")]
    PaymentNotReceived,
    #[serde(rename = "PAYMENT_DECLINED")]
    PaymentDeclined,
    #[serde(rename = "CRYPTO_WITHDRAWAL_FAILED")]
    CryptoWithdrawalFailed,
    #[serde(rename = "OTHER")]
    Other,
}
impl ::std::fmt::Display for OrderFailReason {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        match *self {
            Self::PaymentNotReceived => f.write_str("PAYMENT_NOT_RECEIVED"),
            Self::PaymentDeclined => f.write_str("PAYMENT_DECLINED"),
            Self::CryptoWithdrawalFailed => f.write_str("CRYPTO_WITHDRAWAL_FAILED"),
            Self::Other => f.write_str("OTHER"),
        }
    }
}
impl ::std::str::FromStr for OrderFailReason {
    type Err = self::error::ConversionError;
    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
        match value {
            "PAYMENT_NOT_RECEIVED" => Ok(Self::PaymentNotReceived),
            "PAYMENT_DECLINED" => Ok(Self::PaymentDeclined),
            "CRYPTO_WITHDRAWAL_FAILED" => Ok(Self::CryptoWithdrawalFailed),
            "OTHER" => Ok(Self::Other),
            _ => Err("invalid value".into()),
        }
    }
}
impl ::std::convert::TryFrom<&str> for OrderFailReason {
    type Error = self::error::ConversionError;
    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
impl ::std::convert::TryFrom<&::std::string::String> for OrderFailReason {
    type Error = self::error::ConversionError;
    fn try_from(
        value: &::std::string::String,
    ) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
impl ::std::convert::TryFrom<::std::string::String> for OrderFailReason {
    type Error = self::error::ConversionError;
    fn try_from(
        value: ::std::string::String,
    ) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
///The fees for the order.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The fees for the order.",
///  "type": "object",
///  "required": [
///    "network_fee",
///    "partner_fee",
///    "ramp_fee"
///  ],
///  "properties": {
///    "network_fee": {
///      "$ref": "#/components/schemas/MoneyFiat"
///    },
///    "partner_fee": {
///      "$ref": "#/components/schemas/MoneyFiat"
///    },
///    "ramp_fee": {
///      "$ref": "#/components/schemas/MoneyFiat"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct OrderFees {
    pub network_fee: MoneyFiat,
    pub partner_fee: MoneyFiat,
    pub ramp_fee: MoneyFiat,
}
///The fees converted to the partner's currency.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The fees converted to the partner's currency.",
///  "type": "object",
///  "required": [
///    "network_fee",
///    "partner_fee",
///    "ramp_fee"
///  ],
///  "properties": {
///    "network_fee": {
///      "$ref": "#/components/schemas/MoneyFiat"
///    },
///    "partner_fee": {
///      "$ref": "#/components/schemas/MoneyFiat"
///    },
///    "ramp_fee": {
///      "$ref": "#/components/schemas/MoneyFiat"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct OrderFeesPartnerCurrency {
    pub network_fee: MoneyFiat,
    pub partner_fee: MoneyFiat,
    pub ramp_fee: MoneyFiat,
}
///The [payment method](https://developer.revolut.com/docs/guides/crypto-ramp/guides/buy-crypto/introduction-to-revolut-ramp/coverage-and-other-details/payment-options) used for the purchase.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The [payment method](https://developer.revolut.com/docs/guides/crypto-ramp/guides/buy-crypto/introduction-to-revolut-ramp/coverage-and-other-details/payment-options) used for the purchase.",
///  "type": "string",
///  "enum": [
///    "card",
///    "revolut",
///    "apple-pay",
///    "google-pay"
///  ]
///}
/// ```text
/// </details>
#[derive(
    ::serde::Deserialize,
    ::serde::Serialize,
    Clone,
    Copy,
    Debug,
    Eq,
    Hash,
    Ord,
    PartialEq,
    PartialOrd,
)]
pub enum OrderPayment {
    #[serde(rename = "card")]
    Card,
    #[serde(rename = "revolut")]
    Revolut,
    #[serde(rename = "apple-pay")]
    ApplePay,
    #[serde(rename = "google-pay")]
    GooglePay,
}
impl ::std::fmt::Display for OrderPayment {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        match *self {
            Self::Card => f.write_str("card"),
            Self::Revolut => f.write_str("revolut"),
            Self::ApplePay => f.write_str("apple-pay"),
            Self::GooglePay => f.write_str("google-pay"),
        }
    }
}
impl ::std::str::FromStr for OrderPayment {
    type Err = self::error::ConversionError;
    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
        match value {
            "card" => Ok(Self::Card),
            "revolut" => Ok(Self::Revolut),
            "apple-pay" => Ok(Self::ApplePay),
            "google-pay" => Ok(Self::GooglePay),
            _ => Err("invalid value".into()),
        }
    }
}
impl ::std::convert::TryFrom<&str> for OrderPayment {
    type Error = self::error::ConversionError;
    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
impl ::std::convert::TryFrom<&::std::string::String> for OrderPayment {
    type Error = self::error::ConversionError;
    fn try_from(
        value: &::std::string::String,
    ) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
impl ::std::convert::TryFrom<::std::string::String> for OrderPayment {
    type Error = self::error::ConversionError;
    fn try_from(
        value: ::std::string::String,
    ) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
///The state of order processing.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The state of order processing.",
///  "type": "string",
///  "enum": [
///    "AWAITING_PAYMENT",
///    "PROCESSING",
///    "COMPLETED",
///    "FAILED"
///  ]
///}
/// ```text
/// </details>
#[derive(
    ::serde::Deserialize,
    ::serde::Serialize,
    Clone,
    Copy,
    Debug,
    Eq,
    Hash,
    Ord,
    PartialEq,
    PartialOrd,
)]
pub enum OrderStatus {
    #[serde(rename = "AWAITING_PAYMENT")]
    AwaitingPayment,
    #[serde(rename = "PROCESSING")]
    Processing,
    #[serde(rename = "COMPLETED")]
    Completed,
    #[serde(rename = "FAILED")]
    Failed,
}
impl ::std::fmt::Display for OrderStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        match *self {
            Self::AwaitingPayment => f.write_str("AWAITING_PAYMENT"),
            Self::Processing => f.write_str("PROCESSING"),
            Self::Completed => f.write_str("COMPLETED"),
            Self::Failed => f.write_str("FAILED"),
        }
    }
}
impl ::std::str::FromStr for OrderStatus {
    type Err = self::error::ConversionError;
    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
        match value {
            "AWAITING_PAYMENT" => Ok(Self::AwaitingPayment),
            "PROCESSING" => Ok(Self::Processing),
            "COMPLETED" => Ok(Self::Completed),
            "FAILED" => Ok(Self::Failed),
            _ => Err("invalid value".into()),
        }
    }
}
impl ::std::convert::TryFrom<&str> for OrderStatus {
    type Error = self::error::ConversionError;
    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
impl ::std::convert::TryFrom<&::std::string::String> for OrderStatus {
    type Error = self::error::ConversionError;
    fn try_from(
        value: &::std::string::String,
    ) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
impl ::std::convert::TryFrom<::std::string::String> for OrderStatus {
    type Error = self::error::ConversionError;
    fn try_from(
        value: ::std::string::String,
    ) -> ::std::result::Result<Self, self::error::ConversionError> {
        value.parse()
    }
}
///`Orders`
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "type": "array",
///  "items": {
///    "$ref": "#/components/schemas/Order"
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct Orders(pub ::std::vec::Vec<Order>);
impl ::std::ops::Deref for Orders {
    type Target = ::std::vec::Vec<Order>;
    fn deref(&self) -> &::std::vec::Vec<Order> {
        &self.0
    }
}
impl ::std::convert::From<Orders> for ::std::vec::Vec<Order> {
    fn from(value: Orders) -> Self {
        value.0
    }
}
impl ::std::convert::From<::std::vec::Vec<Order>> for Orders {
    fn from(value: ::std::vec::Vec<Order>) -> Self {
        Self(value)
    }
}
///The exchange price between fiat and crypto currencies (including fees).
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "The exchange price between fiat and crypto currencies (including fees).",
///  "type": "object",
///  "required": [
///    "crypto",
///    "network_fee",
///    "partner_fee",
///    "service_fee"
///  ],
///  "properties": {
///    "crypto": {
///      "$ref": "#/components/schemas/MoneyCryptoId"
///    },
///    "network_fee": {
///      "$ref": "#/components/schemas/MoneyFiat"
///    },
///    "partner_fee": {
///      "$ref": "#/components/schemas/MoneyFiat"
///    },
///    "service_fee": {
///      "$ref": "#/components/schemas/MoneyFiat"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct Quote {
    pub crypto: MoneyCryptoId,
    pub network_fee: MoneyFiat,
    pub partner_fee: MoneyFiat,
    pub service_fee: MoneyFiat,
}
///Redirect URL to Ramp app widget
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "Redirect URL to Ramp app widget",
///  "type": "object",
///  "required": [
///    "ramp_redirect_url"
///  ],
///  "properties": {
///    "ramp_redirect_url": {
///      "description": "The URL to Revolut Ramp to which to redirect the customer for the purchase.",
///      "type": "string",
///      "format": "uri"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct RampRedirectUrl {
    ///The URL to Revolut Ramp to which to redirect the customer for the purchase.
    pub ramp_redirect_url: ::std::string::String,
}
///Thrown when an unexpected error happens.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "Thrown when an unexpected error happens.",
///  "type": "object",
///  "required": [
///    "errorId",
///    "timestamp"
///  ],
///  "properties": {
///    "errorId": {
///      "description": "The UUID of the unexpected error that has occurred.",
///      "type": "string",
///      "format": "uuid"
///    },
///    "timestamp": {
///      "description": "The timestamp of when the error happened.",
///      "type": "integer",
///      "format": "int64"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct UnexpectedError {
    ///The UUID of the unexpected error that has occurred.
    #[serde(rename = "errorId")]
    pub error_id: ::uuid::Uuid,
    ///The timestamp of when the error happened.
    pub timestamp: i64,
}
///Webhook
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "Webhook",
///  "type": "object",
///  "required": [
///    "events",
///    "id",
///    "signing_secret",
///    "url"
///  ],
///  "properties": {
///    "events": {
///      "description": "The list of event types that the webhook is configured to listen to.",
///      "type": "array",
///      "items": {
///        "$ref": "#/components/schemas/EventType"
///      }
///    },
///    "id": {
///      "description": "The UUID of the webhook.",
///      "type": "string",
///      "format": "uuid"
///    },
///    "signing_secret": {
///      "description": "The [signing secret](https://developer.revolut.com/docs/guides/crypto-ramp/guides/buy-crypto/tutorials/work-with-webhooks/verify-the-payload-signature#webhook-signing-secret) for the webhook.\nUse it to verify the signature for the webhook's request payload.",
///      "type": "string"
///    },
///    "url": {
///      "description": "The webhook's URL to which event notifications will be sent.\nMust be a valid HTTP or HTTPS URL, capable of receiving POST requests.",
///      "type": "string",
///      "format": "uri"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct Webhook {
    ///The list of event types that the webhook is configured to listen to.
    pub events: ::std::vec::Vec<EventType>,
    ///The UUID of the webhook.
    pub id: ::uuid::Uuid,
    /// The [signing secret](https://developer.revolut.com/docs/guides/crypto-ramp/guides/buy-crypto/tutorials/work-with-webhooks/verify-the-payload-signature#webhook-signing-secret) for the webhook.
    /// Use it to verify the signature for the webhook's request payload.
    pub signing_secret: ::std::string::String,
    /// The webhook's URL to which event notifications will be sent.
    /// Must be a valid HTTP or HTTPS URL, capable of receiving POST requests.
    pub url: ::std::string::String,
}
///Webhook create parameters
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "Webhook create parameters",
///  "type": "object",
///  "required": [
///    "events",
///    "url"
///  ],
///  "properties": {
///    "events": {
///      "description": "The list of event types that the webhook is configured to listen to.",
///      "type": "array",
///      "items": {
///        "$ref": "#/components/schemas/EventType"
///      }
///    },
///    "url": {
///      "description": "The webhook's URL to which event notifications will be sent.\nMust be a valid HTTP or HTTPS URL, capable of receiving POST requests.",
///      "type": "string",
///      "format": "uri"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct WebhookCreateRequest {
    ///The list of event types that the webhook is configured to listen to.
    pub events: ::std::vec::Vec<EventType>,
    /// The webhook's URL to which event notifications will be sent.
    /// Must be a valid HTTP or HTTPS URL, capable of receiving POST requests.
    pub url: ::std::string::String,
}
///Webhook update parameters
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "description": "Webhook update parameters",
///  "type": "object",
///  "properties": {
///    "events": {
///      "description": "The list of event types that the webhook is configured to listen to.",
///      "type": "array",
///      "items": {
///        "$ref": "#/components/schemas/EventType"
///      }
///    },
///    "url": {
///      "description": "The webhook's URL to which event notifications will be sent.\nMust be a valid HTTP or HTTPS URL, capable of receiving POST requests.",
///      "type": "string",
///      "format": "uri"
///    }
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
pub struct WebhookUpdateRequest {
    ///The list of event types that the webhook is configured to listen to.
    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
    pub events: ::std::vec::Vec<EventType>,
    /// The webhook's URL to which event notifications will be sent.
    /// Must be a valid HTTP or HTTPS URL, capable of receiving POST requests.
    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
    pub url: ::std::option::Option<::std::string::String>,
}
impl ::std::default::Default for WebhookUpdateRequest {
    fn default() -> Self {
        Self {
            events: Default::default(),
            url: Default::default(),
        }
    }
}
///`Webhooks`
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
///  "type": "array",
///  "items": {
///    "$ref": "#/components/schemas/Webhook"
///  }
///}
/// ```text
/// </details>
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct Webhooks(pub ::std::vec::Vec<Webhook>);
impl ::std::ops::Deref for Webhooks {
    type Target = ::std::vec::Vec<Webhook>;
    fn deref(&self) -> &::std::vec::Vec<Webhook> {
        &self.0
    }
}
impl ::std::convert::From<Webhooks> for ::std::vec::Vec<Webhook> {
    fn from(value: Webhooks) -> Self {
        value.0
    }
}
impl ::std::convert::From<::std::vec::Vec<Webhook>> for Webhooks {
    fn from(value: ::std::vec::Vec<Webhook>) -> Self {
        Self(value)
    }
}
