autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Stedi Enrollment
 *
 * The Stedi Enrollment Service manages provider enrollments with healthcare payers. It tracks enrollment status, provider details, and supports batch enrollment processing to ensure providers have the necessary credentials before processing healthcare transactions. 
 *
 * The version of the OpenAPI document: 2024-09-01
 * Contact: healthcare@stedi.com
 * Generated by: https://openapi-generator.tech
 */

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

/// CreateProviderRequestContent : Information about the provider you want to add to your account. The provider **must** have a unique NPI from other providers in your account.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateProviderRequestContent {
    /// The contact information for the provider. These contacts appear as prepopulated options for contact information when creating enrollment requests for this provider in the Stedi portal. They aren't automatically added to enrollment requests.  These contacts should specify where payers should send communications about the enrollment, if needed.   - Either `organizationName` _or_ `firstName` and `lastName` are required.   - The name and address should match exactly what the payer has on file for the provider. Some payers reject enrollment requests with addresses that don't match their records.   - If you're submitting enrollment requests on a provider's behalf, you may want to set the phone number and email to your own contact details. Do this when you want the payer to contact you about the enrollment status instead of the provider directly.   - These contacts are for convenience only. You can specify different contacts on enrollment requests as needed.
    #[serde(rename = "contacts", skip_serializing_if = "Option::is_none")]
    pub contacts: Option<Vec<models::ProviderContact>>,
    /// The provider's business name. This is typically the provider's practice name, such as `Dental Associates, LLC`, but it can also be the provider's first and last name.
    #[serde(rename = "name")]
    pub name: String,
    /// The provider's [National Provider Identifier (NPI)](https://npiregistry.cms.hhs.gov/search). This is a 10-digit number that is unique to the provider.  Each provider record must have a unique `npi` and `taxId` combination. For example, you can create two provider records with the same `npi` as long as they have different values for `taxId`.
    #[serde(rename = "npi")]
    pub npi: String,
    /// The provider's tax ID, as specified by `taxIdType`. This identifier has to be provided without any separators, such as dashes or spaces. For example 111-22-3333 is invalid but `111223333` is valid.  Each provider record must have a unique `npi` and `taxId` combination. For example, you can create two provider records with the same `taxId` as long as they have different values for `npi`.
    #[serde(rename = "taxId")]
    pub tax_id: String,
    /// The type of tax ID. Can be either an `EIN` (Employer Identification Number) or an `SSN` (Social Security Number).   - Organizations (Type 2 NPIs) must use `EIN`.   - Individual providers (Type 1 NPIs) can use either `EIN` or `SSN`.
    #[serde(rename = "taxIdType")]
    pub tax_id_type: models::TaxIdType,
}

impl CreateProviderRequestContent {
    /// Information about the provider you want to add to your account. The provider **must** have a unique NPI from other providers in your account.
    pub fn new(name: String, npi: String, tax_id: String, tax_id_type: models::TaxIdType) -> CreateProviderRequestContent {
        CreateProviderRequestContent {
            contacts: None,
            name,
            npi,
            tax_id,
            tax_id_type,
        }
    }
}