meteroid-rs 0.31.4

Official Rust SDK for Meteroid, the open-source billing platform: subscriptions, invoicing, usage-based billing and webhooks.
Documentation
// this file is @generated

#[derive(
    Clone,
    Debug,
    Default,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Deserialize,
    serde::Serialize,
)]
#[serde(transparent)]
pub struct OAuthAppId(String);

impl OAuthAppId {
    /// The value, as sent on the wire.
    #[must_use]
    pub fn as_str(&self) -> &str {
        &self.0
    }

    /// The value as a `String`.
    #[must_use]
    pub fn into_string(self) -> String {
        self.0
    }
}

impl std::ops::Deref for OAuthAppId {
    type Target = str;

    fn deref(&self) -> &str {
        &self.0
    }
}

impl AsRef<str> for OAuthAppId {
    fn as_ref(&self) -> &str {
        &self.0
    }
}

impl std::borrow::Borrow<str> for OAuthAppId {
    fn borrow(&self) -> &str {
        &self.0
    }
}

impl std::fmt::Display for OAuthAppId {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(&self.0)
    }
}

impl From<String> for OAuthAppId {
    fn from(value: String) -> Self {
        Self(value)
    }
}

impl From<&str> for OAuthAppId {
    fn from(value: &str) -> Self {
        Self(value.to_owned())
    }
}

impl From<&String> for OAuthAppId {
    fn from(value: &String) -> Self {
        Self(value.clone())
    }
}

impl From<&OAuthAppId> for OAuthAppId {
    fn from(value: &OAuthAppId) -> Self {
        value.clone()
    }
}

impl From<OAuthAppId> for String {
    fn from(value: OAuthAppId) -> Self {
        value.0
    }
}

impl PartialEq<str> for OAuthAppId {
    fn eq(&self, other: &str) -> bool {
        self.0 == other
    }
}

impl PartialEq<&str> for OAuthAppId {
    fn eq(&self, other: &&str) -> bool {
        self.0 == *other
    }
}

impl PartialEq<String> for OAuthAppId {
    fn eq(&self, other: &String) -> bool {
        &self.0 == other
    }
}

impl crate::request::QueryParamValue for OAuthAppId {
    fn encode(&self) -> String {
        self.0.clone()
    }
}