vrchatapi 1.20.7

VRChat API Client for Rust
Documentation
/*
 * VRChat API Documentation
 *
 *
 * Contact: vrchatapi.lpv0t@aries.fyi
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProductListingVariant {
    #[serde(rename = "effectiveFrom", skip_serializing_if = "Option::is_none")]
    pub effective_from: Option<String>,
    #[serde(rename = "listingVariantId")]
    pub listing_variant_id: String,
    #[serde(rename = "nonRefundable")]
    pub non_refundable: bool,
    #[serde(rename = "quantity")]
    pub quantity: i32,
    #[serde(rename = "sellerVariant")]
    pub seller_variant: bool,
    #[serde(rename = "unitPriceTokens")]
    pub unit_price_tokens: i32,
}

impl ProductListingVariant {
    pub fn new(
        listing_variant_id: String,
        non_refundable: bool,
        quantity: i32,
        seller_variant: bool,
        unit_price_tokens: i32,
    ) -> ProductListingVariant {
        ProductListingVariant {
            effective_from: None,
            listing_variant_id,
            non_refundable,
            quantity,
            seller_variant,
            unit_price_tokens,
        }
    }
}