Skip to main content

ory_kratos_client/models/
update_registration_flow_with_password_method.rs

1/*
2 * Ory Identities API
3 *
4 * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. 
5 *
6 * The version of the OpenAPI document: v26.2.0
7 * Contact: office@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// UpdateRegistrationFlowWithPasswordMethod : Update Registration Flow with Password Method
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct UpdateRegistrationFlowWithPasswordMethod {
17    /// The CSRF Token
18    #[serde(rename = "csrf_token", skip_serializing_if = "Option::is_none")]
19    pub csrf_token: Option<String>,
20    /// Method to use  This field must be set to `password` when using the password method.
21    #[serde(rename = "method")]
22    pub method: String,
23    /// Password to sign the user up with
24    #[serde(rename = "password")]
25    pub password: String,
26    /// The identity's traits
27    #[serde(rename = "traits")]
28    pub traits: serde_json::Value,
29    /// Transient data to pass along to any webhooks
30    #[serde(rename = "transient_payload", skip_serializing_if = "Option::is_none")]
31    pub transient_payload: Option<serde_json::Value>,
32}
33
34impl UpdateRegistrationFlowWithPasswordMethod {
35    /// Update Registration Flow with Password Method
36    pub fn new(method: String, password: String, traits: serde_json::Value) -> UpdateRegistrationFlowWithPasswordMethod {
37        UpdateRegistrationFlowWithPasswordMethod {
38            csrf_token: None,
39            method,
40            password,
41            traits,
42            transient_payload: None,
43        }
44    }
45}
46