dodopayments_rust 2.2.2

Rust SDK for Dodo Payments API
Documentation
/*
 * public
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.87.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PartialRefundItem {
    /// The amount to refund. if None the whole item is refunded
    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
    pub amount: Option<i32>,
    /// The id of the item (i.e. `product_id` or `addon_id`)
    #[serde(rename = "item_id")]
    pub item_id: String,
    /// Specify if tax is inclusive of the refund. Default true.
    #[serde(rename = "tax_inclusive", skip_serializing_if = "Option::is_none")]
    pub tax_inclusive: Option<bool>,
}

impl PartialRefundItem {
    pub fn new(item_id: String) -> PartialRefundItem {
        PartialRefundItem {
            amount: None,
            item_id,
            tax_inclusive: None,
        }
    }
}