/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.605.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateAutoRechargeRequest {
/// Turns auto top-up on or off. A rule switched off by failed charges stays off until the card is updated.
#[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
/// Auto top-up charges the card when the balance drops below this, in cents. At least $5.
#[serde(rename = "belowCents", skip_serializing_if = "Option::is_none")]
pub below_cents: Option<i32>,
/// Top back up to this, in cents. More than $5 above belowCents.
#[serde(rename = "toCents", skip_serializing_if = "Option::is_none")]
pub to_cents: Option<i32>,
/// Most auto top-up may add per calendar month (UTC), before tax. At least toCents while auto top-up is on. Null for no limit.
#[serde(
rename = "monthlyLimitCents",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub monthly_limit_cents: Option<Option<i32>>,
/// Email the billing owner once each time the balance drops below this. Null for no email.
#[serde(
rename = "alertBelowCents",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub alert_below_cents: Option<Option<i32>>,
}
impl UpdateAutoRechargeRequest {
pub fn new() -> UpdateAutoRechargeRequest {
UpdateAutoRechargeRequest {
enabled: None,
below_cents: None,
to_cents: None,
monthly_limit_cents: None,
alert_below_cents: None,
}
}
}