messaging_api_line/models/subscribed_membership_user.rs
1/*
2 * LINE Messaging API
3 *
4 * This document describes LINE Messaging API.
5 *
6 * The version of the OpenAPI document: 0.0.1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// SubscribedMembershipUser : Object containing user membership subscription information.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SubscribedMembershipUser {
17 /// The user's member number in the membership plan.
18 #[serde(rename = "membershipNo")]
19 pub membership_no: i32,
20 /// UNIX timestamp at which the user subscribed to the membership.
21 #[serde(rename = "joinedTime")]
22 pub joined_time: i32,
23 /// Next payment date for membership plan. - Format: yyyy-MM-dd (e.g. 2024-02-08) - Timezone: UTC+9
24 #[serde(rename = "nextBillingDate")]
25 pub next_billing_date: String,
26 /// The period of time in months that the user has been subscribed to a membership plan. If a user previously canceled and then re-subscribed to the same membership plan, only the period after the re-subscription will be counted.
27 #[serde(rename = "totalSubscriptionMonths")]
28 pub total_subscription_months: i32,
29}
30
31impl SubscribedMembershipUser {
32 /// Object containing user membership subscription information.
33 pub fn new(membership_no: i32, joined_time: i32, next_billing_date: String, total_subscription_months: i32) -> SubscribedMembershipUser {
34 SubscribedMembershipUser {
35 membership_no,
36 joined_time,
37 next_billing_date,
38 total_subscription_months,
39 }
40 }
41}
42