POST | /UserAccount/AccountRegisterationInit |
---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
class AccountRegisterationInitResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $LocationCountryId=0,
/** @var string */
public string $ErrorMsg='',
/** @var bool|null */
public ?bool $IsVerified=null,
/** @var string */
public string $RequestId='',
/** @var bool|null */
public ?bool $PinCodeRequestEnabled=null,
/** @var bool|null */
public ?bool $BypassMobileAuthentication=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['LocationCountryId'])) $this->LocationCountryId = $o['LocationCountryId'];
if (isset($o['ErrorMsg'])) $this->ErrorMsg = $o['ErrorMsg'];
if (isset($o['IsVerified'])) $this->IsVerified = $o['IsVerified'];
if (isset($o['RequestId'])) $this->RequestId = $o['RequestId'];
if (isset($o['PinCodeRequestEnabled'])) $this->PinCodeRequestEnabled = $o['PinCodeRequestEnabled'];
if (isset($o['BypassMobileAuthentication'])) $this->BypassMobileAuthentication = $o['BypassMobileAuthentication'];
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->LocationCountryId)) $o['LocationCountryId'] = $this->LocationCountryId;
if (isset($this->ErrorMsg)) $o['ErrorMsg'] = $this->ErrorMsg;
if (isset($this->IsVerified)) $o['IsVerified'] = $this->IsVerified;
if (isset($this->RequestId)) $o['RequestId'] = $this->RequestId;
if (isset($this->PinCodeRequestEnabled)) $o['PinCodeRequestEnabled'] = $this->PinCodeRequestEnabled;
if (isset($this->BypassMobileAuthentication)) $o['BypassMobileAuthentication'] = $this->BypassMobileAuthentication;
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class AccountRegisterationInitRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $MobileNumber='',
/** @var string */
public string $IsoCode='',
/** @var int */
public int $AttemptNumber=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['MobileNumber'])) $this->MobileNumber = $o['MobileNumber'];
if (isset($o['IsoCode'])) $this->IsoCode = $o['IsoCode'];
if (isset($o['AttemptNumber'])) $this->AttemptNumber = $o['AttemptNumber'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->MobileNumber)) $o['MobileNumber'] = $this->MobileNumber;
if (isset($this->IsoCode)) $o['IsoCode'] = $this->IsoCode;
if (isset($this->AttemptNumber)) $o['AttemptNumber'] = $this->AttemptNumber;
return empty($o) ? new class(){} : $o;
}
}
PHP AccountRegisterationInitRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /UserAccount/AccountRegisterationInit HTTP/1.1
Host: api-demo-1.cura.healthcare
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
MobileNumber: String,
IsoCode: String,
AttemptNumber: 0
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { LocationCountryId: 0, ErrorMsg: String, IsVerified: False, RequestId: String, PinCodeRequestEnabled: False, BypassMobileAuthentication: False, ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } } }