use serde::{Deserialize, Serialize};
use super::customer_portal_scope::CustomerPortalScope;
#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)]
pub struct CustomerPortalTokenRequest {
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_in_seconds: Option<i32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub scopes: Option<Vec<CustomerPortalScope>>,
#[serde(flatten)]
pub extra: serde_json::Map<String, serde_json::Value>,
}
impl CustomerPortalTokenRequest {
#[must_use]
pub fn new() -> Self {
Self {
expires_in_seconds: None,
scopes: None,
extra: serde_json::Map::new(),
}
}
#[must_use]
pub fn expires_in_seconds(mut self, expires_in_seconds: impl Into<i32>) -> Self {
self.expires_in_seconds = Some(expires_in_seconds.into());
self
}
#[must_use]
pub fn scopes(mut self, scopes: impl Into<Vec<CustomerPortalScope>>) -> Self {
self.scopes = Some(scopes.into());
self
}
}