square_api_client/models/pause_subscription_request.rs
1//! Request body struct for the Pause Subscription API
2
3use serde::Serialize;
4
5use super::enums::ChangeTiming;
6
7/// This is the model struct for the PauseSubscriptionRequest type.
8#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)]
9pub struct PauseSubscriptionRequest {
10 /// The `YYYY-MM-DD`-formatted date when the scheduled `PAUSE` action takes place on the
11 /// subscription.
12 ///
13 /// When this date is unspecified or falls within the current billing cycle, the subscription is
14 /// paused on the starting date of the next billing cycle.
15 pub pause_effective_date: Option<String>,
16 /// The number of billing cycles the subscription will be paused before it is reactivated.
17 ///
18 /// When this is set, a `RESUME` action is also scheduled to take place on the subscription at
19 /// the end of the specified pause cycle duration. In this case, neither `resume_effective_date`
20 /// nor `resume_change_timing` may be specified.
21 pub pause_cycle_duration: Option<i64>,
22 /// The date when the subscription is reactivated by a scheduled `RESUME` action. This date must
23 /// be at least one billing cycle ahead of `pause_effective_date`.
24 pub resume_effective_date: Option<String>,
25 /// The timing whether the subscription is reactivated immediately or at the end of the billing
26 /// cycle, relative to `resume_effective_date`.
27 pub resume_change_timing: Option<ChangeTiming>,
28 /// The user-provided reason to pause the subscription.
29 pub pause_reason: Option<String>,
30}