Skip to content

Instantly share code, notes, and snippets.

@Mr-Malomz
Created October 21, 2022 15:39
Show Gist options
  • Save Mr-Malomz/2aa6515579c0c1e1216370944723cc6f to your computer and use it in GitHub Desktop.
Save Mr-Malomz/2aa6515579c0c1e1216370944723cc6f to your computer and use it in GitHub Desktop.
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct OTPData {
pub phone_number: String,
}
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct VerifyOTPData {
pub user: OTPData,
pub code: String,
}
#[derive(Deserialize, Debug, Clone)]
pub struct OTPResponse {
pub sid: String,
}
#[derive(Deserialize, Debug, Clone)]
pub struct OTPVerifyResponse {
pub status: String,
}
#[derive(Serialize, Debug, Clone)]
pub struct APIResponse {
pub status: u16,
pub message: String,
pub data: String,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment