autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Stedi Healthcare
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2024-04-01
 * Contact: healthcare@stedi.com
 * Generated by: https://openapi-generator.tech
 */

use crate::healthcare::models;
use serde::{Deserialize, Serialize};

/// SubscriberPaymentResponsibilityLevelCode : Code identifying the payer's level of responsibility for paying this claim. Visit [Claims code lists](https://www.stedi.com/docs/healthcare/claims-code-lists#payment-responsibility-sequence-number-codes) for a complete list of possible codes.   - Stedi sets this property to `P` - Primary by default. You only need to include it when you need to submit codes other than `P`. This can happen when the patient has multiple insurance policies. For example, if a patient is covered by both Medicare and an employer-sponsored commercial plan, you could bill the commercial plan first as `P` and then bill the Medicare payer second as `S`.   - Either this property or `otherSubscriberInformation.paymentResponsibilityLevelCode` must be set to `P` to indicate the primary insurance payer. Stedi rejects claims - including secondary and tertiary claims - that don't include information for the primary payer.
/// Code identifying the payer's level of responsibility for paying this claim. Visit [Claims code lists](https://www.stedi.com/docs/healthcare/claims-code-lists#payment-responsibility-sequence-number-codes) for a complete list of possible codes.   - Stedi sets this property to `P` - Primary by default. You only need to include it when you need to submit codes other than `P`. This can happen when the patient has multiple insurance policies. For example, if a patient is covered by both Medicare and an employer-sponsored commercial plan, you could bill the commercial plan first as `P` and then bill the Medicare payer second as `S`.   - Either this property or `otherSubscriberInformation.paymentResponsibilityLevelCode` must be set to `P` to indicate the primary insurance payer. Stedi rejects claims - including secondary and tertiary claims - that don't include information for the primary payer.
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SubscriberPaymentResponsibilityLevelCode {
    #[serde(rename = "A")]
    A,
    #[serde(rename = "B")]
    B,
    #[serde(rename = "C")]
    C,
    #[serde(rename = "D")]
    D,
    #[serde(rename = "E")]
    E,
    #[serde(rename = "F")]
    F,
    #[serde(rename = "G")]
    G,
    #[serde(rename = "H")]
    H,
    #[serde(rename = "P")]
    P,
    #[serde(rename = "S")]
    S,
    #[serde(rename = "T")]
    T,
    #[serde(rename = "U")]
    U,
    /// Any value not defined in the spec (payers may return non-compliant values).
    #[serde(untagged)]
    UnknownValue(String),

}

impl std::fmt::Display for SubscriberPaymentResponsibilityLevelCode {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::A => write!(f, "A"),
            Self::B => write!(f, "B"),
            Self::C => write!(f, "C"),
            Self::D => write!(f, "D"),
            Self::E => write!(f, "E"),
            Self::F => write!(f, "F"),
            Self::G => write!(f, "G"),
            Self::H => write!(f, "H"),
            Self::P => write!(f, "P"),
            Self::S => write!(f, "S"),
            Self::T => write!(f, "T"),
            Self::U => write!(f, "U"),
            Self::UnknownValue(s) => write!(f, "{s}"),
        }
    }
}

impl Default for SubscriberPaymentResponsibilityLevelCode {
    fn default() -> SubscriberPaymentResponsibilityLevelCode {
        Self::A
    }
}