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 PatchSubscriptionRequest {
    #[serde(rename = "billing", skip_serializing_if = "Option::is_none")]
    pub billing: Option<Box<models::BillingAddress>>,
    /// When set, the subscription will remain active until the end of billing period
    #[serde(rename = "cancel_at_next_billing_date", skip_serializing_if = "Option::is_none")]
    pub cancel_at_next_billing_date: Option<bool>,
    /// Update credit entitlement cart settings
    #[serde(rename = "credit_entitlement_cart", skip_serializing_if = "Option::is_none")]
    pub credit_entitlement_cart: Option<Vec<models::UpdateCreditEntitlementCartItem>>,
    #[serde(rename = "customer_name", skip_serializing_if = "Option::is_none")]
    pub customer_name: Option<String>,
    #[serde(rename = "disable_on_demand", skip_serializing_if = "Option::is_none")]
    pub disable_on_demand: Option<Box<models::DisableOnDemandReq>>,
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<std::collections::HashMap<String, String>>,
    #[serde(rename = "next_billing_date", skip_serializing_if = "Option::is_none")]
    pub next_billing_date: Option<String>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<models::SubscriptionStatus>,
    #[serde(rename = "tax_id", skip_serializing_if = "Option::is_none")]
    pub tax_id: Option<String>,
}

impl PatchSubscriptionRequest {
    pub fn new() -> PatchSubscriptionRequest {
        PatchSubscriptionRequest {
            billing: None,
            cancel_at_next_billing_date: None,
            credit_entitlement_cart: None,
            customer_name: None,
            disable_on_demand: None,
            metadata: None,
            next_billing_date: None,
            status: None,
            tax_id: None,
        }
    }
}