clerk_rs/models/
create_organization_request.rs1#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12pub struct CreateOrganizationRequest {
13 #[serde(rename = "name")]
15 pub name: String,
16 #[serde(rename = "created_by")]
18 pub created_by: String,
19 #[serde(rename = "private_metadata", skip_serializing_if = "Option::is_none")]
21 pub private_metadata: Option<serde_json::Value>,
22 #[serde(rename = "public_metadata", skip_serializing_if = "Option::is_none")]
24 pub public_metadata: Option<serde_json::Value>,
25 #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
27 pub slug: Option<String>,
28 #[serde(rename = "max_allowed_memberships", skip_serializing_if = "Option::is_none")]
30 pub max_allowed_memberships: Option<i64>,
31}
32
33impl CreateOrganizationRequest {
34 pub fn new(name: String, created_by: String) -> CreateOrganizationRequest {
35 CreateOrganizationRequest {
36 name,
37 created_by,
38 private_metadata: None,
39 public_metadata: None,
40 slug: None,
41 max_allowed_memberships: None,
42 }
43 }
44}