1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* 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 LicenseKeyResponse {
/// The maximum number of activations allowed for this license key.
#[serde(rename = "activations_limit", skip_serializing_if = "Option::is_none")]
pub activations_limit: Option<i32>,
/// The unique identifier of the business associated with the license key.
#[serde(rename = "business_id")]
pub business_id: String,
/// The timestamp indicating when the license key was created, in UTC.
#[serde(rename = "created_at")]
pub created_at: String,
/// The unique identifier of the customer associated with the license key.
#[serde(rename = "customer_id")]
pub customer_id: String,
/// The timestamp indicating when the license key expires, in UTC.
#[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")]
pub expires_at: Option<String>,
/// The unique identifier of the license key.
#[serde(rename = "id")]
pub id: String,
/// The current number of instances activated for this license key.
#[serde(rename = "instances_count")]
pub instances_count: i32,
/// The license key string.
#[serde(rename = "key")]
pub key: String,
/// The unique identifier of the payment associated with the license key.
#[serde(rename = "payment_id")]
pub payment_id: String,
/// The unique identifier of the product associated with the license key.
#[serde(rename = "product_id")]
pub product_id: String,
/// The current status of the license key (e.g., active, inactive, expired).
#[serde(rename = "status")]
pub status: models::LicenseKeyStatus,
/// The unique identifier of the subscription associated with the license key, if any.
#[serde(rename = "subscription_id", skip_serializing_if = "Option::is_none")]
pub subscription_id: Option<String>,
}
impl LicenseKeyResponse {
pub fn new(business_id: String, created_at: String, customer_id: String, id: String, instances_count: i32, key: String, payment_id: String, product_id: String, status: models::LicenseKeyStatus) -> LicenseKeyResponse {
LicenseKeyResponse {
activations_limit: None,
business_id,
created_at,
customer_id,
expires_at: None,
id,
instances_count,
key,
payment_id,
product_id,
status,
subscription_id: None,
}
}
}