5 #include <Quotient/converters.h>
50 QString idAccessToken{};
54 struct JsonObjectConverter<MsisdnValidationData> {
55 static void dumpTo(QJsonObject& jo,
const MsisdnValidationData& pod)
57 addParam<>(jo,
"client_secret"_L1, pod.clientSecret);
58 addParam<>(jo,
"country"_L1, pod.country);
59 addParam<>(jo,
"phone_number"_L1, pod.phoneNumber);
60 addParam<>(jo,
"send_attempt"_L1, pod.sendAttempt);
61 addParam<IfNotEmpty>(jo,
"next_link"_L1, pod.nextLink);
62 addParam<IfNotEmpty>(jo,
"id_server"_L1, pod.idServer);
63 addParam<IfNotEmpty>(jo,
"id_access_token"_L1, pod.idAccessToken);
65 static void fillFrom(
const QJsonObject& jo, MsisdnValidationData& pod)
67 fillFromJson(jo.value(
"client_secret"_L1), pod.clientSecret);
68 fillFromJson(jo.value(
"country"_L1), pod.country);
69 fillFromJson(jo.value(
"phone_number"_L1), pod.phoneNumber);
70 fillFromJson(jo.value(
"send_attempt"_L1), pod.sendAttempt);
71 fillFromJson(jo.value(
"next_link"_L1), pod.nextLink);
72 fillFromJson(jo.value(
"id_server"_L1), pod.idServer);
73 fillFromJson(jo.value(
"id_access_token"_L1), pod.idAccessToken);