5 #include <Quotient/converters.h>
47 QString idAccessToken{};
51 struct JsonObjectConverter<EmailValidationData> {
52 static void dumpTo(QJsonObject& jo,
const EmailValidationData& pod)
54 addParam<>(jo,
"client_secret"_L1, pod.clientSecret);
55 addParam<>(jo,
"email"_L1, pod.email);
56 addParam<>(jo,
"send_attempt"_L1, pod.sendAttempt);
57 addParam<IfNotEmpty>(jo,
"next_link"_L1, pod.nextLink);
58 addParam<IfNotEmpty>(jo,
"id_server"_L1, pod.idServer);
59 addParam<IfNotEmpty>(jo,
"id_access_token"_L1, pod.idAccessToken);
61 static void fillFrom(
const QJsonObject& jo, EmailValidationData& pod)
63 fillFromJson(jo.value(
"client_secret"_L1), pod.clientSecret);
64 fillFromJson(jo.value(
"email"_L1), pod.email);
65 fillFromJson(jo.value(
"send_attempt"_L1), pod.sendAttempt);
66 fillFromJson(jo.value(
"next_link"_L1), pod.nextLink);
67 fillFromJson(jo.value(
"id_server"_L1), pod.idServer);
68 fillFromJson(jo.value(
"id_access_token"_L1), pod.idAccessToken);