rebase LP models
This commit is contained in:
parent
e270624c46
commit
00b0efbed5
6 changed files with 172 additions and 98 deletions
|
@ -16,6 +16,8 @@ namespace RetailCrm;
|
|||
|
||||
use RetailCrm\Http\Client;
|
||||
use RetailCrm\Response\ApiResponse;
|
||||
use smsverificationconfirm;
|
||||
use smsverificationcreate;
|
||||
|
||||
/**
|
||||
* PHP version 5.3
|
||||
|
@ -2932,19 +2934,34 @@ class ApiClient
|
|||
return $params;
|
||||
}
|
||||
|
||||
protected function confirmLpVerificationBySMS()
|
||||
protected function confirmLpVerificationBySMS(smsverificationconfirm $smsVerificationConfirm)
|
||||
{
|
||||
|
||||
/* $parameters['phone'] = $phone;
|
||||
$parameters['details'] = isset($details) ? $details : 0;
|
||||
*/
|
||||
return $this->client->makeRequest(
|
||||
'/verification/sms/confirm',
|
||||
Client::METHOD_POST,
|
||||
$smsVerificationConfirm
|
||||
);
|
||||
}
|
||||
|
||||
protected function sendSmsForLpVerification()
|
||||
protected function sendSmsForLpVerification(smsverificationcreate $smsVerificationCreate)
|
||||
{
|
||||
|
||||
return $this->client->makeRequest(
|
||||
'/verification/sms/send',
|
||||
Client::METHOD_POST,
|
||||
$smsVerificationCreate
|
||||
);
|
||||
}
|
||||
|
||||
protected function checkStatusPlVerification()
|
||||
protected function checkStatusPlVerification($checkId)
|
||||
{
|
||||
|
||||
return $this->client->makeRequest(
|
||||
"/verification/sms/$checkId/status",
|
||||
Client::METHOD_GET,
|
||||
['checkId' => $checkId]
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Class SmsVerificationConfirm
|
||||
*/
|
||||
class SmsVerificationConfirm extends BaseModel
|
||||
{
|
||||
/**@var string $code */
|
||||
protected $code;
|
||||
|
||||
/**@var string $checkId */
|
||||
protected $checkId;
|
||||
|
||||
/**
|
||||
* @param string $code
|
||||
*/
|
||||
public function setCode(string $code): void
|
||||
{
|
||||
$this->code = $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $checkId
|
||||
*/
|
||||
public function setCheckId(string $checkId): void
|
||||
{
|
||||
$this->checkId = $checkId;
|
||||
}
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Class SmsVerificationCreate
|
||||
*/
|
||||
class SmsVerificationCreate extends BaseModel
|
||||
{
|
||||
/**@var integer $length */
|
||||
protected $length;
|
||||
|
||||
/**@var string $phone */
|
||||
protected $phone;
|
||||
|
||||
/**@var string $actionType */
|
||||
protected $actionType;
|
||||
|
||||
/**@var integer $customerId */
|
||||
protected $customerId;
|
||||
|
||||
/**@var integer $orderId */
|
||||
protected $orderId;
|
||||
|
||||
/**
|
||||
* @param int $length
|
||||
*/
|
||||
public function setLength(int $length): void
|
||||
{
|
||||
$this->length = $length;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $phone
|
||||
*/
|
||||
public function setPhone(string $phone): void
|
||||
{
|
||||
$this->phone = $phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $actionType
|
||||
*/
|
||||
public function setActionType(string $actionType): void
|
||||
{
|
||||
$this->actionType = $actionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $customerId
|
||||
*/
|
||||
public function setCustomerId(int $customerId): void
|
||||
{
|
||||
$this->customerId = $customerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $orderId
|
||||
*/
|
||||
public function setOrderId(int $orderId): void
|
||||
{
|
||||
$this->orderId = $orderId;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
po<?php
|
||||
/**
|
||||
* PHP version 7.1
|
||||
*
|
||||
|
|
47
intaro.retailcrm/lib/model/api/smsverificationconfirm.php
Normal file
47
intaro.retailcrm/lib/model/api/smsverificationconfirm.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationConfirm
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api
|
||||
*/
|
||||
class SmsVerificationConfirm extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
* Проверочный код
|
||||
*
|
||||
* @var string $code
|
||||
*
|
||||
* @Mapping\Type("string")
|
||||
* @Mapping\SerializedName("code")
|
||||
*/
|
||||
protected $code;
|
||||
|
||||
/**
|
||||
* Идентификатор проверки кода
|
||||
*
|
||||
* @var string $checkId
|
||||
*
|
||||
* @Mapping\Type("string")
|
||||
* @Mapping\SerializedName("checkId")
|
||||
*/
|
||||
protected $checkId;
|
||||
|
||||
/**
|
||||
* @param string $code
|
||||
*/
|
||||
public function setCode(string $code): void
|
||||
{
|
||||
$this->code = $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $checkId
|
||||
*/
|
||||
public function setCheckId(string $checkId): void
|
||||
{
|
||||
$this->checkId = $checkId;
|
||||
}
|
||||
}
|
101
intaro.retailcrm/lib/model/api/smsverificationcreate.php
Normal file
101
intaro.retailcrm/lib/model/api/smsverificationcreate.php
Normal file
|
@ -0,0 +1,101 @@
|
|||
<?php
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationCreate
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api
|
||||
*/
|
||||
class SmsVerificationCreate extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
* Длина кода в сообщении (по умолчанию 4 символа)
|
||||
*
|
||||
* @var integer $length
|
||||
*
|
||||
* @Mapping\Type("integer")
|
||||
* @Mapping\SerializedName("length")
|
||||
*/
|
||||
protected $length;
|
||||
|
||||
/**
|
||||
* Номер телефона для отправки сообщения
|
||||
*
|
||||
* @var string $phone
|
||||
*
|
||||
* @Mapping\Type("string")
|
||||
* @Mapping\SerializedName("phone")
|
||||
*/
|
||||
protected $phone;
|
||||
|
||||
/**
|
||||
* Тип события, для которого необходима верификация
|
||||
*
|
||||
* @var string $actionType
|
||||
*
|
||||
* @Mapping\Type("string")
|
||||
* @Mapping\SerializedName("actionType")
|
||||
*/
|
||||
protected $actionType;
|
||||
|
||||
/**
|
||||
* ID клиента
|
||||
*
|
||||
* @var integer $customerId
|
||||
*
|
||||
* @Mapping\Type("integer")
|
||||
* @Mapping\SerializedName("customerId")
|
||||
*/
|
||||
protected $customerId;
|
||||
|
||||
/**
|
||||
* ID заказа
|
||||
*
|
||||
* @var integer $orderId
|
||||
*
|
||||
* @Mapping\Type("integer")
|
||||
* @Mapping\SerializedName("orderId")
|
||||
*/
|
||||
protected $orderId;
|
||||
|
||||
/**
|
||||
* @param int $length
|
||||
*/
|
||||
public function setLength(int $length): void
|
||||
{
|
||||
$this->length = $length;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $phone
|
||||
*/
|
||||
public function setPhone(string $phone): void
|
||||
{
|
||||
$this->phone = $phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $actionType
|
||||
*/
|
||||
public function setActionType(string $actionType): void
|
||||
{
|
||||
$this->actionType = $actionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $customerId
|
||||
*/
|
||||
public function setCustomerId(int $customerId): void
|
||||
{
|
||||
$this->customerId = $customerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $orderId
|
||||
*/
|
||||
public function setOrderId(int $orderId): void
|
||||
{
|
||||
$this->orderId = $orderId;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue