klirr-core 0.2.1

Zero-maintenance and smart FOSS generating beautiful invoices for services and expenses.
Documentation
use crate::prelude::*;

/// Localization for vendor information in the invoice,
/// such as bank details and organization information.
#[derive(Debug, Clone, Serialize, Deserialize, Getters, Builder)]
pub struct L18nVendorInfo {
    /// EN: "Address"
    #[getset(get = "pub")]
    address: String,

    /// EN: "Bank"
    #[getset(get = "pub")]
    bank: String,

    /// EN: "IBAN"
    #[getset(get = "pub")]
    iban: String,

    /// EN: "BIC"
    #[getset(get = "pub")]
    bic: String,

    /// EN: "Org. No."
    #[getset(get = "pub")]
    organisation_number: String,

    /// EN: "VAT No."
    #[getset(get = "pub")]
    vat_number: String,
}

impl L18nVendorInfo {
    pub fn english() -> Self {
        Self::builder()
            .address("Address".to_string())
            .bank("Bank".to_string())
            .iban("IBAN".to_string())
            .bic("BIC".to_string())
            .organisation_number("Org. No.".to_string())
            .vat_number("VAT No.".to_string())
            .build()
    }
}