add request/response models for sms verification
This commit is contained in:
parent
00b0efbed5
commit
e5eaad97da
10 changed files with 253 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
|||
po<?php
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.1
|
||||
*
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api\Request\SmsVerification;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationConfirmRequest
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Response\SmsVerification
|
||||
*/
|
||||
class SmsVerificationConfirmRequest extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\SmsVerificationConfirm
|
||||
*
|
||||
* @Mapping\Type("\Intaro\RetailCrm\Model\Api\SmsVerificationConfirm")
|
||||
* @Mapping\SerializedName("verification")
|
||||
*/
|
||||
public $verification;
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api\Request\SmsVerification;
|
||||
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationCreateRequest
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Response\SmsVerification
|
||||
*/
|
||||
class SmsVerificationCreateRequest extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\SmsVerificationCreate
|
||||
*
|
||||
* @Mapping\Type("\Intaro\RetailCrm\Model\Api\SmsVerificationCreate")
|
||||
* @Mapping\SerializedName("verification")
|
||||
*/
|
||||
public $verification;
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api\Response\SmsVerification;
|
||||
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationStatusRequest
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Response\SmsVerification
|
||||
*/
|
||||
class SmsVerificationStatusRequest extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
* Номер телефона для отправки сообщения
|
||||
*
|
||||
* @var string $phone
|
||||
*
|
||||
* @Mapping\Type("string")
|
||||
* @Mapping\SerializedName("checkId")
|
||||
*/
|
||||
protected $checkId;
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api\Response\SmsVerification;
|
||||
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationConfirmResponse
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Response\SmsVerification
|
||||
*/
|
||||
class SmsVerificationConfirmResponse extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*
|
||||
* @Mapping\Type("bool")
|
||||
* @Mapping\SerializedName("success")
|
||||
*/
|
||||
public $success;
|
||||
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\SmsVerification
|
||||
*
|
||||
* @Mapping\Type("\Intaro\RetailCrm\Model\Api\SmsVerification")
|
||||
* @Mapping\SerializedName("verification")
|
||||
*/
|
||||
public $verification;
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api\Response\SmsVerification;
|
||||
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationCreateResponse
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Response\SmsVerification
|
||||
*/
|
||||
class SmsVerificationCreateResponse extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*
|
||||
* @Mapping\Type("bool")
|
||||
* @Mapping\SerializedName("success")
|
||||
*/
|
||||
public $success;
|
||||
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\SmsVerification
|
||||
*
|
||||
* @Mapping\Type("\Intaro\RetailCrm\Model\Api\SmsVerification")
|
||||
* @Mapping\SerializedName("verification")
|
||||
*/
|
||||
public $verification;
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api\Response\SmsVerification;
|
||||
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationStatusResponse
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Response\SmsVerification
|
||||
*/
|
||||
class SmsVerificationStatusResponse extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*
|
||||
* @Mapping\Type("bool")
|
||||
* @Mapping\SerializedName("success")
|
||||
*/
|
||||
public $success;
|
||||
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\SmsVerification
|
||||
*
|
||||
* @Mapping\Type("\Intaro\RetailCrm\Model\Api\SmsVerification")
|
||||
* @Mapping\SerializedName("verification")
|
||||
*/
|
||||
public $verification;
|
||||
}
|
96
intaro.retailcrm/lib/model/api/smsverification.php
Normal file
96
intaro.retailcrm/lib/model/api/smsverification.php
Normal file
|
@ -0,0 +1,96 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api;
|
||||
|
||||
|
||||
class SmsVerification extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
* Дата создания. (Y-m-d H:i:s)
|
||||
*
|
||||
* @var \DateTime
|
||||
*
|
||||
* @Mapping\Type("DateTime<'Y-m-d H:i:s'>")
|
||||
* @Mapping\SerializedName("createdAt")
|
||||
*/
|
||||
public $createdAt;
|
||||
|
||||
/**
|
||||
* Дата окончания срока жизни. (Y-m-d H:i:s)
|
||||
* @var \DateTime
|
||||
*
|
||||
* @Mapping\Type("DateTime<'Y-m-d H:i:s'>")
|
||||
* @Mapping\SerializedName("expiredAt")
|
||||
*/
|
||||
public $expiredAt;
|
||||
|
||||
/**
|
||||
* Дата успешной верификации. (Y-m-d H:i:s)
|
||||
* @var \DateTime
|
||||
*
|
||||
* @Mapping\Type("DateTime<'Y-m-d H:i:s'>")
|
||||
* @Mapping\SerializedName("verifiedAt")
|
||||
*/
|
||||
public $verifiedAt;
|
||||
|
||||
/**
|
||||
* Идентификатор для проверки кода
|
||||
*
|
||||
* @var string $checkId
|
||||
*
|
||||
* @Mapping\Type("string")
|
||||
* @Mapping\SerializedName("checkId")
|
||||
*/
|
||||
public $checkId;
|
||||
|
||||
/**
|
||||
* Тип действия
|
||||
*
|
||||
* @var string $actionType
|
||||
*
|
||||
* @Mapping\Type("string")
|
||||
* @Mapping\SerializedName("actionType")
|
||||
*/
|
||||
public $actionType;
|
||||
|
||||
/**
|
||||
* @param \DateTime $createdAt
|
||||
*/
|
||||
public function setCreatedAt(\DateTime $createdAt): void
|
||||
{
|
||||
$this->createdAt = $createdAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $actionType
|
||||
*/
|
||||
public function setActionType(string $actionType): void
|
||||
{
|
||||
$this->actionType = $actionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $checkId
|
||||
*/
|
||||
public function setCheckId(string $checkId): void
|
||||
{
|
||||
$this->checkId = $checkId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \DateTime $verifiedAt
|
||||
*/
|
||||
public function setVerifiedAt(\DateTime $verifiedAt): void
|
||||
{
|
||||
$this->verifiedAt = $verifiedAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \DateTime $expiredAt
|
||||
*/
|
||||
public function setExpiredAt(\DateTime $expiredAt): void
|
||||
{
|
||||
$this->expiredAt = $expiredAt;
|
||||
}
|
||||
}
|
|
@ -1,12 +1,9 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationConfirm
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api
|
||||
*/
|
||||
|
||||
class SmsVerificationConfirm extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
|
@ -44,4 +41,4 @@ class SmsVerificationConfirm extends AbstractApiModel
|
|||
{
|
||||
$this->checkId = $checkId;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,12 +1,9 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationCreate
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api
|
||||
*/
|
||||
|
||||
class SmsVerificationCreate extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
|
@ -98,4 +95,4 @@ class SmsVerificationCreate extends AbstractApiModel
|
|||
{
|
||||
$this->orderId = $orderId;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue