diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-09-29 22:22:49 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-09-29 22:22:49 +0900 |
commit | b55334ac0fe89f780776bc4eab90ffe1ca3c57bb (patch) | |
tree | 1a45c0ccfec8f5f7ba37eb4385cdc7f61afa0c97 /lib/identity/definitions/request_msisdn_validation.cpp | |
parent | f5c2e47fa1ab84fdaffe03c30ba973d7dea5ac05 (diff) | |
parent | 1e6510790dab6b9141ae52993987b406399668cd (diff) | |
download | libquotient-b55334ac0fe89f780776bc4eab90ffe1ca3c57bb.tar.gz libquotient-b55334ac0fe89f780776bc4eab90ffe1ca3c57bb.zip |
Merge branch 'cs-api-0.4.0'
Diffstat (limited to 'lib/identity/definitions/request_msisdn_validation.cpp')
-rw-r--r-- | lib/identity/definitions/request_msisdn_validation.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/identity/definitions/request_msisdn_validation.cpp b/lib/identity/definitions/request_msisdn_validation.cpp new file mode 100644 index 00000000..125baa9c --- /dev/null +++ b/lib/identity/definitions/request_msisdn_validation.cpp @@ -0,0 +1,36 @@ +/****************************************************************************** + * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN + */ + +#include "request_msisdn_validation.h" + +using namespace QMatrixClient; + +QJsonObject QMatrixClient::toJson(const RequestMsisdnValidation& pod) +{ + QJsonObject jo; + addParam<>(jo, QStringLiteral("client_secret"), pod.clientSecret); + addParam<>(jo, QStringLiteral("country"), pod.country); + addParam<>(jo, QStringLiteral("phone_number"), pod.phoneNumber); + addParam<>(jo, QStringLiteral("send_attempt"), pod.sendAttempt); + addParam<IfNotEmpty>(jo, QStringLiteral("next_link"), pod.nextLink); + return jo; +} + +RequestMsisdnValidation FromJsonObject<RequestMsisdnValidation>::operator()(const QJsonObject& jo) const +{ + RequestMsisdnValidation result; + result.clientSecret = + fromJson<QString>(jo.value("client_secret"_ls)); + result.country = + fromJson<QString>(jo.value("country"_ls)); + result.phoneNumber = + fromJson<QString>(jo.value("phone_number"_ls)); + result.sendAttempt = + fromJson<int>(jo.value("send_attempt"_ls)); + result.nextLink = + fromJson<QString>(jo.value("next_link"_ls)); + + return result; +} + |