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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClaimStatusRequestContent {
    /// Stedi generates a control number for each claim status check, so you don’t need to include this property in your request.
    #[serde(rename = "controlNumber", skip_serializing_if = "Option::is_none")]
    pub control_number: Option<String>,
    /// Information about the dependent listed in the referenced claim. You must submit the dependent's `firstName`, `lastName`, `dateOfBirth`, and `gender` (if known). If the claim set the dependent's gender to `U` for unknown, you should omit the `gender` property.
    #[serde(rename = "dependent", skip_serializing_if = "Option::is_none")]
    pub dependent: Option<Box<models::Member>>,
    #[serde(rename = "encounter", skip_serializing_if = "Option::is_none")]
    pub encounter: Option<Box<models::ClaimStatusEncounter>>,
    /// Information about the billing provider and (optionally) service providers related to the referenced claim.   - Exactly one billing provider is **required** in this array. Requests that include only a service provider are rejected with a `400` error.   - For each provider, you must set the `providerType` and one of the following identifiers: `npi`, `taxId`, or `etin`.   - When the `providerType` = `BillingProvider`, we recommend setting `etin` as the identifier.
    #[serde(rename = "providers")]
    pub providers: Vec<models::StatusRequestProvider>,
    #[serde(rename = "serviceLineInformation", skip_serializing_if = "Option::is_none")]
    pub service_line_information: Option<Box<models::ServiceLineInformation>>,
    #[serde(rename = "serviceLinesInformation", skip_serializing_if = "Option::is_none")]
    pub service_lines_information: Option<Vec<models::ServiceLineInformation>>,
    #[serde(rename = "subscriber")]
    pub subscriber: Box<models::ClaimStatusSubscriber>,
    /// This is the payer name, such as Cigna or Aetna.
    #[serde(rename = "tradingPartnerName", skip_serializing_if = "Option::is_none")]
    pub trading_partner_name: Option<String>,
    /// The payer ID. Visit the [Payer Network](https://www.stedi.com/healthcare/network) for a complete list.  - You can send requests using the primary payer ID, the Stedi payer ID, or any alias listed in the payer record.  - You must include leading `0` characters - payer IDs are alphanumeric strings and must be treated as complete strings, not integers. For example, use `00540` for SISCO, not `540`.
    #[serde(rename = "tradingPartnerServiceId")]
    pub trading_partner_service_id: String,
}

impl ClaimStatusRequestContent {
    pub fn new(providers: Vec<models::StatusRequestProvider>, subscriber: models::ClaimStatusSubscriber, trading_partner_service_id: String) -> ClaimStatusRequestContent {
        ClaimStatusRequestContent {
            control_number: None,
            dependent: None,
            encounter: None,
            providers,
            service_line_information: None,
            service_lines_information: None,
            subscriber: Box::new(subscriber),
            trading_partner_name: None,
            trading_partner_service_id,
        }
    }
}