ory_client/models/
plan_details.rs

1/*
2 * Ory APIs
3 *
4 * # Introduction Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.  ## SDKs This document describes the APIs available in the Ory Network. The APIs are available as SDKs for the following languages:  | Language       | Download SDK                                                     | Documentation                                                                        | | -------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | Dart           | [pub.dev](https://pub.dev/packages/ory_client)                   | [README](https://github.com/ory/sdk/blob/master/clients/client/dart/README.md)       | | .NET           | [nuget.org](https://www.nuget.org/packages/Ory.Client/)          | [README](https://github.com/ory/sdk/blob/master/clients/client/dotnet/README.md)     | | Elixir         | [hex.pm](https://hex.pm/packages/ory_client)                     | [README](https://github.com/ory/sdk/blob/master/clients/client/elixir/README.md)     | | Go             | [github.com](https://github.com/ory/client-go)                   | [README](https://github.com/ory/sdk/blob/master/clients/client/go/README.md)         | | Java           | [maven.org](https://search.maven.org/artifact/sh.ory/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/java/README.md)       | | JavaScript     | [npmjs.com](https://www.npmjs.com/package/@ory/client)           | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript/README.md) | | JavaScript (With fetch) | [npmjs.com](https://www.npmjs.com/package/@ory/client-fetch)           | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript-fetch/README.md) |  | PHP            | [packagist.org](https://packagist.org/packages/ory/client)       | [README](https://github.com/ory/sdk/blob/master/clients/client/php/README.md)        | | Python         | [pypi.org](https://pypi.org/project/ory-client/)                 | [README](https://github.com/ory/sdk/blob/master/clients/client/python/README.md)     | | Ruby           | [rubygems.org](https://rubygems.org/gems/ory-client)             | [README](https://github.com/ory/sdk/blob/master/clients/client/ruby/README.md)       | | Rust           | [crates.io](https://crates.io/crates/ory-client)                 | [README](https://github.com/ory/sdk/blob/master/clients/client/rust/README.md)       | 
5 *
6 * The version of the OpenAPI document: v1.22.21
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PlanDetails {
16    /// BaseFeeMonthly is the monthly base fee for the plan.
17    #[serde(rename = "base_fee_monthly")]
18    pub base_fee_monthly: i64,
19    /// BaseFeeYearly is the yearly base fee for the plan.
20    #[serde(rename = "base_fee_yearly")]
21    pub base_fee_yearly: i64,
22    /// Custom is true if the plan is custom. This means it will be hidden from the pricing page.
23    #[serde(rename = "custom")]
24    pub custom: bool,
25    /// Description is the description of the plan.
26    #[serde(rename = "description")]
27    pub description: String,
28    #[serde(rename = "development_features")]
29    pub development_features: std::collections::HashMap<String, models::GenericUsage>,
30    #[serde(rename = "features")]
31    pub features: std::collections::HashMap<String, models::GenericUsage>,
32    /// Latest is true if the plan is the latest version of a plan and should be available for self-service usage.
33    #[serde(rename = "latest", skip_serializing_if = "Option::is_none")]
34    pub latest: Option<bool>,
35    /// Name is the name of the plan.
36    #[serde(rename = "name")]
37    pub name: String,
38    #[serde(rename = "production_features")]
39    pub production_features: std::collections::HashMap<String, models::GenericUsage>,
40    #[serde(rename = "staging_features")]
41    pub staging_features: std::collections::HashMap<String, models::GenericUsage>,
42    /// Version is the version of the plan. The combination of `name@version` must be unique.
43    #[serde(rename = "version")]
44    pub version: i64,
45}
46
47impl PlanDetails {
48    pub fn new(base_fee_monthly: i64, base_fee_yearly: i64, custom: bool, description: String, development_features: std::collections::HashMap<String, models::GenericUsage>, features: std::collections::HashMap<String, models::GenericUsage>, name: String, production_features: std::collections::HashMap<String, models::GenericUsage>, staging_features: std::collections::HashMap<String, models::GenericUsage>, version: i64) -> PlanDetails {
49        PlanDetails {
50            base_fee_monthly,
51            base_fee_yearly,
52            custom,
53            description,
54            development_features,
55            features,
56            latest: None,
57            name,
58            production_features,
59            staging_features,
60            version,
61        }
62    }
63}
64