Go to the documentation of this file.
12 struct RequestEmailValidation
49 if (! jo.is_object()) { jo = json::object(); }
52 jo[
"client_secret"s] = pod.clientSecret;
54 jo[
"email"s] = pod.email;
56 jo[
"send_attempt"s] = pod.sendAttempt;
64 if (jo.contains(
"client_secret"s)) {
65 result.clientSecret = jo.at(
"client_secret"s);
67 if (jo.contains(
"email"s)) {
68 result.email = jo.at(
"email"s);
70 if (jo.contains(
"send_attempt"s)) {
71 result.sendAttempt = jo.at(
"send_attempt"s);
73 if (jo.contains(
"next_link"s)) {
74 result.nextLink = jo.at(
"next_link"s);
int sendAttempt
The server will only send an email if the send_attempt is a number greater than the most recent one w...
Definition: request_email_validation.hpp:36
std::string clientSecret
A unique string generated by the client, and used to identify the validation attempt.
Definition: request_email_validation.hpp:23
Definition: location.hpp:26
Definition: request_email_validation.hpp:14
Definition: location.hpp:10
nlohmann::json json
Definition: jsonwrap.hpp:20
Definition: location.hpp:10
void addToJsonIfNeeded(json &j, std::string name, T &&arg)
Definition: types.hpp:80
static void to_json(json &jo, const RequestEmailValidation &pod)
Definition: request_email_validation.hpp:47
std::optional< std::string > nextLink
Optional.
Definition: request_email_validation.hpp:41
std::string email
The email address to validate.
Definition: request_email_validation.hpp:26
static void from_json(const json &jo, RequestEmailValidation &result)
Definition: request_email_validation.hpp:61