autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Stedi Manager
 *
 * 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::manager::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BatchEligibilityChecksRequestContent {
    /// Each entry in this array represents a single eligibility check. You can submit up to 10,000 eligibility checks in a single request. **Warning:** If _any_ of the individual checks contain invalid JSON data, such as missing required properties or invalid values, Stedi rejects the entire batch with a `400` status code and returns errors to help you correct the issues.
    #[serde(rename = "items")]
    pub items: Vec<models::BatchEligibilityChecksItem>,
    /// The maximum number of hours that Stedi will retry eligibility checks in this batch that fail due to [payer connectivity issues](https://www.stedi.com/docs/healthcare/eligibility-troubleshooting#payer-connectivity-issues). Must be an integer between 8 and 24 hours. If not specified, the default is 8 hours.
    #[serde(rename = "maxRetryHours", skip_serializing_if = "Option::is_none")]
    pub max_retry_hours: Option<i32>,
    /// The name that Stedi will use when displaying this batch on the [Eligibility check batches page](https://portal.stedi.com/app/healthcare/checks/batch). It must be unique within your Stedi account. If you don't specify a name, Stedi sets this property to the autogenerated `batchId` returned in the response.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}

impl BatchEligibilityChecksRequestContent {
    pub fn new(items: Vec<models::BatchEligibilityChecksItem>) -> BatchEligibilityChecksRequestContent {
        BatchEligibilityChecksRequestContent {
            items,
            max_retry_hours: None,
            name: None,
        }
    }
}