52 if (! jo.is_object()) { jo = json::object(); }
69 if (jo.contains(
"client_secret"s)) {
72 if (jo.contains(
"country"s)) {
73 result.
country = jo.at(
"country"s);
75 if (jo.contains(
"phone_number"s)) {
78 if (jo.contains(
"send_attempt"s)) {
81 if (jo.contains(
"next_link"s)) {
82 result.
nextLink = jo.at(
"next_link"s);
Definition: location.hpp:10
Definition: location.hpp:10
void addToJsonIfNeeded(json &j, std::string name, T &&arg)
Definition: types.hpp:80
nlohmann::json json
Definition: jsonwrap.hpp:20
Definition: location.hpp:27
Definition: request_msisdn_validation.hpp:13
std::string country
The two-letter uppercase ISO-3166-1 alpha-2 country code that the number in phone_number should be pa...
Definition: request_msisdn_validation.hpp:23
std::optional< std::string > nextLink
Optional.
Definition: request_msisdn_validation.hpp:40
std::string clientSecret
A unique string generated by the client, and used to identify the validation attempt.
Definition: request_msisdn_validation.hpp:19
std::string phoneNumber
The phone number to validate.
Definition: request_msisdn_validation.hpp:26
int sendAttempt
The server will only send an SMS if the send_attempt is a number greater than the most recent one whi...
Definition: request_msisdn_validation.hpp:35
static void from_json(const json &jo, RequestMsisdnValidation &result)
Definition: request_msisdn_validation.hpp:66
static void to_json(json &jo, const RequestMsisdnValidation &pod)
Definition: request_msisdn_validation.hpp:50