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};

/// OtherPayerName : Details about the other payer.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OtherPayerName {
    /// The payer's address.
    #[serde(rename = "otherPayerAddress", skip_serializing_if = "Option::is_none")]
    pub other_payer_address: Option<Box<models::ClaimsAddress>>,
    /// The date the other payer adjudicated the claim. Required when this payer has previously adjudicated the claim and you aren’t including a value for `LineAdjudicationInformation.adjudicationOrPaymentDate`.
    #[serde(rename = "otherPayerAdjudicationOrPaymentDate", skip_serializing_if = "Option::is_none")]
    pub other_payer_adjudication_or_payment_date: Option<String>,
    /// The only valid value is `true`. Required when Required when the claim is being sent in the payer-to-payer COB model AND the destination payer is secondary to this payer AND this payer has re-adjudicated the claim.
    #[serde(rename = "otherPayerClaimAdjustmentIndicator", skip_serializing_if = "Option::is_none")]
    pub other_payer_claim_adjustment_indicator: Option<bool>,
    /// The claim control number assigned by this payer.
    #[serde(rename = "otherPayerClaimControlNumber", skip_serializing_if = "Option::is_none")]
    pub other_payer_claim_control_number: Option<String>,
    /// The identifier specified in `otherPayerIdentifierCode`. When sending Line Adjudication Information for this payer, the identifier sent in `lineAdjudicationInformation.otherPayerPrimaryIdentifier` must match this value.
    #[serde(rename = "otherPayerIdentifier")]
    pub other_payer_identifier: String,
    #[serde(rename = "otherPayerIdentifierTypeCode")]
    pub other_payer_identifier_type_code: models::OtherPayerIdentifierTypeCode,
    /// The payer's organization name.
    #[serde(rename = "otherPayerOrganizationName")]
    pub other_payer_organization_name: String,
    /// The authorization number assigned by this payer.
    #[serde(rename = "otherPayerPriorAuthorizationNumber", skip_serializing_if = "Option::is_none")]
    pub other_payer_prior_authorization_number: Option<String>,
    /// The referral number assigned by this payer.
    #[serde(rename = "otherPayerPriorAuthorizationOrReferralNumber", skip_serializing_if = "Option::is_none")]
    pub other_payer_prior_authorization_or_referral_number: Option<String>,
    /// An additional identification number to identify the other payer.
    #[serde(rename = "otherPayerSecondaryIdentifier", skip_serializing_if = "Option::is_none")]
    pub other_payer_secondary_identifier: Option<Vec<models::OtherPayerSecondaryIdentifierItem>>,
}

impl OtherPayerName {
    /// Details about the other payer.
    pub fn new(other_payer_identifier: String, other_payer_identifier_type_code: models::OtherPayerIdentifierTypeCode, other_payer_organization_name: String) -> OtherPayerName {
        OtherPayerName {
            other_payer_address: None,
            other_payer_adjudication_or_payment_date: None,
            other_payer_claim_adjustment_indicator: None,
            other_payer_claim_control_number: None,
            other_payer_identifier,
            other_payer_identifier_type_code,
            other_payer_organization_name,
            other_payer_prior_authorization_number: None,
            other_payer_prior_authorization_or_referral_number: None,
            other_payer_secondary_identifier: None,
        }
    }
}