first commit
This commit is contained in:
234
lib/Service/Divide/DivideClient.php
Normal file
234
lib/Service/Divide/DivideClient.php
Normal file
@@ -0,0 +1,234 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide;
|
||||
|
||||
use Yeepay\Yop\Sdk\Client\ClientExecutionParams;
|
||||
use Yeepay\Yop\Sdk\Client\ClientHandler;
|
||||
use Yeepay\Yop\Sdk\Client\ClientParams;
|
||||
use Yeepay\Yop\Sdk\Exception\YopClientException;
|
||||
use Yeepay\Yop\Sdk\Service\Divide\Model as Model;
|
||||
|
||||
class DivideClient
|
||||
{
|
||||
|
||||
/**
|
||||
* @var ClientHandler
|
||||
*/
|
||||
private $clientHandler;
|
||||
|
||||
/**
|
||||
* DivideClient constructor.
|
||||
* @param ClientParams $clientParams
|
||||
*/
|
||||
function __construct(ClientParams $clientParams)
|
||||
{
|
||||
$this->clientHandler = new ClientHandler($clientParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\ApplyRequest $request
|
||||
* @return Model\ApplyResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function apply(Model\ApplyRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request, Model\ApplyRequestMarshaller::getInstance(),
|
||||
Model\ApplyResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\BackRequest $request
|
||||
* @return Model\BackResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function back(Model\BackRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request, Model\BackRequestMarshaller::getInstance(),
|
||||
Model\BackResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\BackQueryRequest $request
|
||||
* @return Model\BackQueryResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function backQuery(Model\BackQueryRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
if ($request->getParentMerchantNo() == null) {
|
||||
throw new YopClientException("request.parentMerchantNo is required.");
|
||||
}
|
||||
if ($request->getMerchantNo() == null) {
|
||||
throw new YopClientException("request.merchantNo is required.");
|
||||
}
|
||||
if ($request->getOrderId() == null) {
|
||||
throw new YopClientException("request.orderId is required.");
|
||||
}
|
||||
if ($request->getUniqueOrderNo() == null) {
|
||||
throw new YopClientException("request.uniqueOrderNo is required.");
|
||||
}
|
||||
if ($request->getDivideBackRequestId() == null) {
|
||||
throw new YopClientException("request.divideBackRequestId is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request, Model\BackQueryRequestMarshaller::getInstance(),
|
||||
Model\BackQueryResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\CompleteRequest $request
|
||||
* @return Model\CompleteResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function complete(Model\CompleteRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request, Model\CompleteRequestMarshaller::getInstance(),
|
||||
Model\CompleteResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\DivideRequest $request
|
||||
* @return Model\DivideResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function divide(Model\DivideRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request, Model\DivideRequestMarshaller::getInstance(),
|
||||
Model\DivideResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\DividebackRequest $request
|
||||
* @return Model\DividebackResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function divideback(Model\DividebackRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request, Model\DividebackRequestMarshaller::getInstance(),
|
||||
Model\DividebackResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\DividebackQueryRequest $request
|
||||
* @return Model\DividebackQueryResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function dividebackQuery(Model\DividebackQueryRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
if ($request->getParentMerchantNo() == null) {
|
||||
throw new YopClientException("request.parentMerchantNo is required.");
|
||||
}
|
||||
if ($request->getMerchantNo() == null) {
|
||||
throw new YopClientException("request.merchantNo is required.");
|
||||
}
|
||||
if ($request->getOrderId() == null) {
|
||||
throw new YopClientException("request.orderId is required.");
|
||||
}
|
||||
if ($request->getUniqueOrderNo() == null) {
|
||||
throw new YopClientException("request.uniqueOrderNo is required.");
|
||||
}
|
||||
if ($request->getDivideBackRequestId() == null) {
|
||||
throw new YopClientException("request.divideBackRequestId is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request,
|
||||
Model\DividebackQueryRequestMarshaller::getInstance(),
|
||||
Model\DividebackQueryResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\QueryRequest $request
|
||||
* @return Model\QueryResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function query(Model\QueryRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
if ($request->getParentMerchantNo() == null) {
|
||||
throw new YopClientException("request.parentMerchantNo is required.");
|
||||
}
|
||||
if ($request->getMerchantNo() == null) {
|
||||
throw new YopClientException("request.merchantNo is required.");
|
||||
}
|
||||
if ($request->getDivideRequestId() == null) {
|
||||
throw new YopClientException("request.divideRequestId is required.");
|
||||
}
|
||||
if ($request->getOrderId() == null) {
|
||||
throw new YopClientException("request.orderId is required.");
|
||||
}
|
||||
if ($request->getUniqueOrderNo() == null) {
|
||||
throw new YopClientException("request.uniqueOrderNo is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request, Model\QueryRequestMarshaller::getInstance(),
|
||||
Model\QueryResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\ReceiptDownloadRequest $request
|
||||
* @return Model\ReceiptDownloadResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function receiptDownload(Model\ReceiptDownloadRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
if ($request->getParentMerchantNo() == null) {
|
||||
throw new YopClientException("request.parentMerchantNo is required.");
|
||||
}
|
||||
if ($request->getMerchantNo() == null) {
|
||||
throw new YopClientException("request.merchantNo is required.");
|
||||
}
|
||||
if ($request->getUniqueOrderNo() == null) {
|
||||
throw new YopClientException("request.uniqueOrderNo is required.");
|
||||
}
|
||||
if ($request->getDivideRequestId() == null) {
|
||||
throw new YopClientException("request.divideRequestId is required.");
|
||||
}
|
||||
if ($request->getLedgerNo() == null) {
|
||||
throw new YopClientException("request.ledgerNo is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request,
|
||||
Model\ReceiptDownloadRequestMarshaller::getInstance(),
|
||||
Model\ReceiptDownloadResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
}
|
||||
86
lib/Service/Divide/DivideClientBuilder.php
Normal file
86
lib/Service/Divide/DivideClientBuilder.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide;
|
||||
|
||||
use Yeepay\Yop\Sdk\Auth\AuthorityReqRegistryImpl;
|
||||
use Yeepay\Yop\Sdk\Auth\AuthorizationReqRegistry;
|
||||
use Yeepay\Yop\Sdk\Auth\AuthorizationReqSupport;
|
||||
use Yeepay\Yop\Sdk\Client\ClientParams;
|
||||
use Yeepay\Yop\Sdk\Client\Support\ClientParamsSupport;
|
||||
use Yeepay\Yop\Sdk\Config\AppSdkConfig;
|
||||
use Yeepay\Yop\Sdk\Config\AppSdkConfigProvider;
|
||||
use Yeepay\Yop\Sdk\Config\DefaultAppSdkConfigProvider;
|
||||
use Yeepay\Yop\Sdk\Exception\YopClientException;
|
||||
|
||||
class DivideClientBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* @var AuthorizationReqRegistry
|
||||
*/
|
||||
private static $authorizationReqRegistry;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$authorizationReqRegistry = new AuthorityReqRegistryImpl();
|
||||
self::$authorizationReqRegistry->register('apply',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
self::$authorizationReqRegistry->register('back',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
self::$authorizationReqRegistry->register('backQuery',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
self::$authorizationReqRegistry->register('complete',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
self::$authorizationReqRegistry->register('divide',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
self::$authorizationReqRegistry->register('divideback',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
self::$authorizationReqRegistry->register('dividebackQuery',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
self::$authorizationReqRegistry->register('query',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
self::$authorizationReqRegistry->register('receiptDownload',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @var ClientParams
|
||||
*/
|
||||
private $clientParams;
|
||||
|
||||
/**
|
||||
* DivideClientBuilder constructor.
|
||||
* @param ClientParams $clientParams
|
||||
*/
|
||||
public function __construct(ClientParams $clientParams)
|
||||
{
|
||||
$this->clientParams = $clientParams;
|
||||
}
|
||||
|
||||
public function build()
|
||||
{
|
||||
return new DivideClient($this->clientParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $config AppSdkConfig|array|AppSdkConfigProvider
|
||||
* @return DivideClientBuilder
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public static function builder($config)
|
||||
{
|
||||
$appSdkConfigProvider = null;
|
||||
if ($config instanceof AppSdkConfigProvider) {
|
||||
$appSdkConfigProvider = $config;
|
||||
} else {
|
||||
$appSdkConfigProvider = new DefaultAppSdkConfigProvider($config);
|
||||
}
|
||||
$clientParams = ClientParamsSupport::generateClientParams($appSdkConfigProvider);
|
||||
$clientParams->setAuthorizationReqRegistry(self::$authorizationReqRegistry);
|
||||
|
||||
return new DivideClientBuilder($clientParams);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DivideClientBuilder::__init();
|
||||
197
lib/Service/Divide/Model/ApplyRequest.php
Normal file
197
lib/Service/Divide/Model/ApplyRequest.php
Normal file
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class ApplyRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $parentMerchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $orderId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $uniqueOrderNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideRequestId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideDetail;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $accountLinkInfo;
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->parentMerchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo
|
||||
* @return ApplyRequest
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->parentMerchantNo = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return ApplyRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->orderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId
|
||||
* @return ApplyRequest
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->orderId = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->uniqueOrderNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo
|
||||
* @return ApplyRequest
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->uniqueOrderNo = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->divideRequestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId
|
||||
* @return ApplyRequest
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->divideRequestId = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideDetail
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideDetail()
|
||||
{
|
||||
return $this->divideDetail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideDetail
|
||||
* @param string $divideDetail
|
||||
* @return ApplyRequest
|
||||
*/
|
||||
public function setDivideDetail($divideDetail)
|
||||
{
|
||||
$this->divideDetail = $divideDetail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets accountLinkInfo
|
||||
* @return string
|
||||
*/
|
||||
public function getAccountLinkInfo()
|
||||
{
|
||||
return $this->accountLinkInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets accountLinkInfo
|
||||
* @param string $accountLinkInfo
|
||||
* @return ApplyRequest
|
||||
*/
|
||||
public function setAccountLinkInfo($accountLinkInfo)
|
||||
{
|
||||
$this->accountLinkInfo = $accountLinkInfo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'apply';
|
||||
}
|
||||
|
||||
}
|
||||
105
lib/Service/Divide/Model/ApplyRequestMarshaller.php
Normal file
105
lib/Service/Divide/Model/ApplyRequestMarshaller.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Http\Headers;
|
||||
use Yeepay\Yop\Sdk\Internal\DefaultRequest;
|
||||
use Yeepay\Yop\Sdk\Internal\Request;
|
||||
use Yeepay\Yop\Sdk\Model\Transform\RequestMarshaller;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
use Yeepay\Yop\Sdk\Utils\UUIDUtils;
|
||||
|
||||
class ApplyRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var ApplyRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new ApplyRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ApplyRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Divide';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'POST';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/rest/v1.0/divide/apply';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param ApplyRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
if (!empty($request->getRequestConfig()) && !empty($request->getRequestConfig()->getCustomRequestHeaders())) {
|
||||
foreach ($request->getRequestConfig()->getCustomRequestHeaders() as $name => $value) {
|
||||
$internalRequest->addHeader($name, $value);
|
||||
}
|
||||
}
|
||||
if (!isset($internalRequest->getHeaders()[Headers::YOP_REQUEST_ID])) {
|
||||
$internalRequest->addHeader(Headers::YOP_REQUEST_ID, UUIDUtils::uuid());
|
||||
}
|
||||
if ($request->getParentMerchantNo() != null) {
|
||||
$internalRequest->addParameter('parentMerchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
|
||||
}
|
||||
if ($request->getMerchantNo() != null) {
|
||||
$internalRequest->addParameter('merchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
|
||||
}
|
||||
if ($request->getOrderId() != null) {
|
||||
$internalRequest->addParameter('orderId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getOrderId(), 'string'));
|
||||
}
|
||||
if ($request->getUniqueOrderNo() != null) {
|
||||
$internalRequest->addParameter('uniqueOrderNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getUniqueOrderNo(), 'string'));
|
||||
}
|
||||
if ($request->getDivideRequestId() != null) {
|
||||
$internalRequest->addParameter('divideRequestId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDivideRequestId(), 'string'));
|
||||
}
|
||||
if ($request->getDivideDetail() != null) {
|
||||
$internalRequest->addParameter('divideDetail',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDivideDetail(), 'string'));
|
||||
}
|
||||
if ($request->getAccountLinkInfo() != null) {
|
||||
$internalRequest->addParameter('accountLinkInfo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getAccountLinkInfo(), 'string'));
|
||||
}
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ApplyRequestMarshaller::__init();
|
||||
36
lib/Service/Divide/Model/ApplyResponse.php
Normal file
36
lib/Service/Divide/Model/ApplyResponse.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseResponse;
|
||||
|
||||
class ApplyResponse extends BaseResponse
|
||||
{
|
||||
|
||||
/**
|
||||
* @var ApplyYopOrderDivideResDTOResult
|
||||
*/
|
||||
private $result;
|
||||
|
||||
function getResultClass()
|
||||
{
|
||||
return '\Yeepay\Yop\Sdk\Service\Divide\Model\ApplyYopOrderDivideResDTOResult';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ApplyYopOrderDivideResDTOResult $result
|
||||
*/
|
||||
function setResult($result)
|
||||
{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ApplyYopOrderDivideResDTOResult
|
||||
*/
|
||||
function getResult()
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
}
|
||||
38
lib/Service/Divide/Model/ApplyResponseUnMarshaller.php
Normal file
38
lib/Service/Divide/Model/ApplyResponseUnMarshaller.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
|
||||
|
||||
class ApplyResponseUnMarshaller extends BaseResponseUnMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var ApplyResponseUnMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new ApplyResponseUnMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ApplyResponseUnMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ApplyResponse
|
||||
*/
|
||||
protected function getResponseInstance()
|
||||
{
|
||||
return new ApplyResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ApplyResponseUnMarshaller::__init();
|
||||
428
lib/Service/Divide/Model/ApplyYopOrderDivideResDTOResult.php
Normal file
428
lib/Service/Divide/Model/ApplyYopOrderDivideResDTOResult.php
Normal file
@@ -0,0 +1,428 @@
|
||||
<?php
|
||||
/**
|
||||
* ApplyYopOrderDivideResDTOResult
|
||||
* PHP version 5
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
|
||||
/**
|
||||
* 分账
|
||||
* <p>名称(中文):分账<br />名称(英文,xx.war):opr-hessian.war<br />简介:中台收款交易支持分账<br />wiki文档地址:http://wiki.yeepay.com/pages/viewpage.action?pageId=108380664<br />预计项目上线时间:2020年6月9日<br />归属/拟申请的sp编码(可选):opr<br />期望api分组编码、名称(可选):divide(分账)<br />涉及的接口:申请分账、分账查询、分账资金归还/分账退回、分账退回查询</p>
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 3.0.13
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use ArrayAccess;
|
||||
use Yeepay\Yop\Sdk\Model\ModelInterface;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* ApplyYopOrderDivideResDTOResult Class Doc Comment
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class ApplyYopOrderDivideResDTOResult implements ModelInterface, ArrayAccess
|
||||
{
|
||||
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'ApplyYopOrderDivideResDTOResult';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = [
|
||||
'code' => 'string',
|
||||
'message' => 'string',
|
||||
'orderId' => 'string',
|
||||
'uniqueOrderNo' => 'string',
|
||||
'divideRequestId' => 'string',
|
||||
'status' => 'string',
|
||||
'divideDetail' => 'string',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerFormats = [
|
||||
'code' => null,
|
||||
'message' => null,
|
||||
'orderId' => null,
|
||||
'uniqueOrderNo' => null,
|
||||
'divideRequestId' => null,
|
||||
'status' => null,
|
||||
'divideDetail' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'code' => 'code',
|
||||
'message' => 'message',
|
||||
'orderId' => 'orderId',
|
||||
'uniqueOrderNo' => 'uniqueOrderNo',
|
||||
'divideRequestId' => 'divideRequestId',
|
||||
'status' => 'status',
|
||||
'divideDetail' => 'divideDetail',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'code' => 'setCode',
|
||||
'message' => 'setMessage',
|
||||
'orderId' => 'setOrderId',
|
||||
'uniqueOrderNo' => 'setUniqueOrderNo',
|
||||
'divideRequestId' => 'setDivideRequestId',
|
||||
'status' => 'setStatus',
|
||||
'divideDetail' => 'setDivideDetail',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'code' => 'getCode',
|
||||
'message' => 'getMessage',
|
||||
'orderId' => 'getOrderId',
|
||||
'uniqueOrderNo' => 'getUniqueOrderNo',
|
||||
'divideRequestId' => 'getDivideRequestId',
|
||||
'status' => 'getStatus',
|
||||
'divideDetail' => 'getDivideDetail',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
$this->container['orderId'] = isset($data['orderId']) ? $data['orderId'] : null;
|
||||
$this->container['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
|
||||
$this->container['divideRequestId'] = isset($data['divideRequestId']) ? $data['divideRequestId'] : null;
|
||||
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
|
||||
$this->container['divideDetail'] = isset($data['divideDetail']) ? $data['divideDetail'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets code
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->container['code'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets code
|
||||
* @param string $code 返回码
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->container['code'] = $code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets message
|
||||
* @param string $message 返回信息
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->container['message'] = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->container['orderId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId 商户收款请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->container['orderId'] = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->container['uniqueOrderNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo 易宝收款订单号
|
||||
* @return $this
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->container['uniqueOrderNo'] = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->container['divideRequestId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId 商户分账请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->container['divideRequestId'] = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status
|
||||
* @param string $status 分账状态
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->container['status'] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideDetail
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideDetail()
|
||||
{
|
||||
return $this->container['divideDetail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideDetail
|
||||
* @param string $divideDetail 分账详情
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideDetail($divideDetail)
|
||||
{
|
||||
$this->container['divideDetail'] = $divideDetail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
145
lib/Service/Divide/Model/BackQueryRequest.php
Normal file
145
lib/Service/Divide/Model/BackQueryRequest.php
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class BackQueryRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $parentMerchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $orderId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $uniqueOrderNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideBackRequestId;
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->parentMerchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo
|
||||
* @return BackQueryRequest
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->parentMerchantNo = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return BackQueryRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->orderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId
|
||||
* @return BackQueryRequest
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->orderId = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->uniqueOrderNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo
|
||||
* @return BackQueryRequest
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->uniqueOrderNo = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackRequestId()
|
||||
{
|
||||
return $this->divideBackRequestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackRequestId
|
||||
* @param string $divideBackRequestId
|
||||
* @return BackQueryRequest
|
||||
*/
|
||||
public function setDivideBackRequestId($divideBackRequestId)
|
||||
{
|
||||
$this->divideBackRequestId = $divideBackRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'backQuery';
|
||||
}
|
||||
|
||||
}
|
||||
76
lib/Service/Divide/Model/BackQueryRequestMarshaller.php
Normal file
76
lib/Service/Divide/Model/BackQueryRequestMarshaller.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Http\Headers;
|
||||
use Yeepay\Yop\Sdk\Internal\DefaultRequest;
|
||||
use Yeepay\Yop\Sdk\Internal\Request;
|
||||
use Yeepay\Yop\Sdk\Model\Transform\RequestMarshaller;
|
||||
use Yeepay\Yop\Sdk\Utils\UUIDUtils;
|
||||
|
||||
class BackQueryRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var BackQueryRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new BackQueryRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BackQueryRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Divide';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'GET';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/rest/v1.0/divide/back/query';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param BackQueryRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
if (!empty($request->getRequestConfig()) && !empty($request->getRequestConfig()->getCustomRequestHeaders())) {
|
||||
foreach ($request->getRequestConfig()->getCustomRequestHeaders() as $name => $value) {
|
||||
$internalRequest->addHeader($name, $value);
|
||||
}
|
||||
}
|
||||
if (!isset($internalRequest->getHeaders()[Headers::YOP_REQUEST_ID])) {
|
||||
$internalRequest->addHeader(Headers::YOP_REQUEST_ID, UUIDUtils::uuid());
|
||||
}
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BackQueryRequestMarshaller::__init();
|
||||
36
lib/Service/Divide/Model/BackQueryResponse.php
Normal file
36
lib/Service/Divide/Model/BackQueryResponse.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseResponse;
|
||||
|
||||
class BackQueryResponse extends BaseResponse
|
||||
{
|
||||
|
||||
/**
|
||||
* @var BackQueryYopQueryDivideBackResDTOResult
|
||||
*/
|
||||
private $result;
|
||||
|
||||
function getResultClass()
|
||||
{
|
||||
return '\Yeepay\Yop\Sdk\Service\Divide\Model\BackQueryYopQueryDivideBackResDTOResult';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BackQueryYopQueryDivideBackResDTOResult $result
|
||||
*/
|
||||
function setResult($result)
|
||||
{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BackQueryYopQueryDivideBackResDTOResult
|
||||
*/
|
||||
function getResult()
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
}
|
||||
38
lib/Service/Divide/Model/BackQueryResponseUnMarshaller.php
Normal file
38
lib/Service/Divide/Model/BackQueryResponseUnMarshaller.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
|
||||
|
||||
class BackQueryResponseUnMarshaller extends BaseResponseUnMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var BackQueryResponseUnMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new BackQueryResponseUnMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BackQueryResponseUnMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BackQueryResponse
|
||||
*/
|
||||
protected function getResponseInstance()
|
||||
{
|
||||
return new BackQueryResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BackQueryResponseUnMarshaller::__init();
|
||||
@@ -0,0 +1,563 @@
|
||||
<?php
|
||||
/**
|
||||
* BackQueryYopQueryDivideBackResDTOResult
|
||||
* PHP version 5
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
|
||||
/**
|
||||
* 分账
|
||||
* <p>名称(中文):分账<br />名称(英文,xx.war):opr-hessian.war<br />简介:中台收款交易支持分账<br />wiki文档地址:http://wiki.yeepay.com/pages/viewpage.action?pageId=108380664<br />预计项目上线时间:2020年6月9日<br />归属/拟申请的sp编码(可选):opr<br />期望api分组编码、名称(可选):divide(分账)<br />涉及的接口:申请分账、分账查询、分账资金归还/分账退回、分账退回查询</p>
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 3.0.13
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use ArrayAccess;
|
||||
use Yeepay\Yop\Sdk\Model\ModelInterface;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BackQueryYopQueryDivideBackResDTOResult Class Doc Comment
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class BackQueryYopQueryDivideBackResDTOResult implements ModelInterface, ArrayAccess
|
||||
{
|
||||
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'BackQueryYopQueryDivideBackResDTOResult';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = [
|
||||
'code' => 'string',
|
||||
'message' => 'string',
|
||||
'bizSystemNo' => 'string',
|
||||
'parentMerchantNo' => 'string',
|
||||
'merchantNo' => 'string',
|
||||
'orderId' => 'string',
|
||||
'uniqueOrderNo' => 'string',
|
||||
'divideRequestId' => 'string',
|
||||
'divideBackRequestId' => 'string',
|
||||
'uniqueDivideBackNo' => 'string',
|
||||
'divideBackDetail' => 'string',
|
||||
'status' => 'string',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerFormats = [
|
||||
'code' => null,
|
||||
'message' => null,
|
||||
'bizSystemNo' => null,
|
||||
'parentMerchantNo' => null,
|
||||
'merchantNo' => null,
|
||||
'orderId' => null,
|
||||
'uniqueOrderNo' => null,
|
||||
'divideRequestId' => null,
|
||||
'divideBackRequestId' => null,
|
||||
'uniqueDivideBackNo' => null,
|
||||
'divideBackDetail' => null,
|
||||
'status' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'code' => 'code',
|
||||
'message' => 'message',
|
||||
'bizSystemNo' => 'bizSystemNo',
|
||||
'parentMerchantNo' => 'parentMerchantNo',
|
||||
'merchantNo' => 'merchantNo',
|
||||
'orderId' => 'orderId',
|
||||
'uniqueOrderNo' => 'uniqueOrderNo',
|
||||
'divideRequestId' => 'divideRequestId',
|
||||
'divideBackRequestId' => 'divideBackRequestId',
|
||||
'uniqueDivideBackNo' => 'uniqueDivideBackNo',
|
||||
'divideBackDetail' => 'divideBackDetail',
|
||||
'status' => 'status',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'code' => 'setCode',
|
||||
'message' => 'setMessage',
|
||||
'bizSystemNo' => 'setBizSystemNo',
|
||||
'parentMerchantNo' => 'setParentMerchantNo',
|
||||
'merchantNo' => 'setMerchantNo',
|
||||
'orderId' => 'setOrderId',
|
||||
'uniqueOrderNo' => 'setUniqueOrderNo',
|
||||
'divideRequestId' => 'setDivideRequestId',
|
||||
'divideBackRequestId' => 'setDivideBackRequestId',
|
||||
'uniqueDivideBackNo' => 'setUniqueDivideBackNo',
|
||||
'divideBackDetail' => 'setDivideBackDetail',
|
||||
'status' => 'setStatus',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'code' => 'getCode',
|
||||
'message' => 'getMessage',
|
||||
'bizSystemNo' => 'getBizSystemNo',
|
||||
'parentMerchantNo' => 'getParentMerchantNo',
|
||||
'merchantNo' => 'getMerchantNo',
|
||||
'orderId' => 'getOrderId',
|
||||
'uniqueOrderNo' => 'getUniqueOrderNo',
|
||||
'divideRequestId' => 'getDivideRequestId',
|
||||
'divideBackRequestId' => 'getDivideBackRequestId',
|
||||
'uniqueDivideBackNo' => 'getUniqueDivideBackNo',
|
||||
'divideBackDetail' => 'getDivideBackDetail',
|
||||
'status' => 'getStatus',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
$this->container['bizSystemNo'] = isset($data['bizSystemNo']) ? $data['bizSystemNo'] : null;
|
||||
$this->container['parentMerchantNo'] = isset($data['parentMerchantNo']) ? $data['parentMerchantNo'] : null;
|
||||
$this->container['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : null;
|
||||
$this->container['orderId'] = isset($data['orderId']) ? $data['orderId'] : null;
|
||||
$this->container['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
|
||||
$this->container['divideRequestId'] = isset($data['divideRequestId']) ? $data['divideRequestId'] : null;
|
||||
$this->container['divideBackRequestId'] = isset($data['divideBackRequestId']) ? $data['divideBackRequestId'] : null;
|
||||
$this->container['uniqueDivideBackNo'] = isset($data['uniqueDivideBackNo']) ? $data['uniqueDivideBackNo'] : null;
|
||||
$this->container['divideBackDetail'] = isset($data['divideBackDetail']) ? $data['divideBackDetail'] : null;
|
||||
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets code
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->container['code'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets code
|
||||
* @param string $code 返回码
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->container['code'] = $code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets message
|
||||
* @param string $message 返回信息描述
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->container['message'] = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets bizSystemNo
|
||||
* @return string
|
||||
*/
|
||||
public function getBizSystemNo()
|
||||
{
|
||||
return $this->container['bizSystemNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bizSystemNo
|
||||
* @param string $bizSystemNo 业务方标识
|
||||
* @return $this
|
||||
*/
|
||||
public function setBizSystemNo($bizSystemNo)
|
||||
{
|
||||
$this->container['bizSystemNo'] = $bizSystemNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->container['parentMerchantNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo 发起方商编
|
||||
* @return $this
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->container['parentMerchantNo'] = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->container['merchantNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo 商户编号
|
||||
* @return $this
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->container['merchantNo'] = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->container['orderId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId 商户收款请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->container['orderId'] = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->container['uniqueOrderNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo 易宝收款订单号
|
||||
* @return $this
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->container['uniqueOrderNo'] = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->container['divideRequestId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId 商户分账请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->container['divideRequestId'] = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackRequestId()
|
||||
{
|
||||
return $this->container['divideBackRequestId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackRequestId
|
||||
* @param string $divideBackRequestId 商户分账资金归还请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideBackRequestId($divideBackRequestId)
|
||||
{
|
||||
$this->container['divideBackRequestId'] = $divideBackRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueDivideBackNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueDivideBackNo()
|
||||
{
|
||||
return $this->container['uniqueDivideBackNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueDivideBackNo
|
||||
* @param string $uniqueDivideBackNo 易宝分账资金归还订单号
|
||||
* @return $this
|
||||
*/
|
||||
public function setUniqueDivideBackNo($uniqueDivideBackNo)
|
||||
{
|
||||
$this->container['uniqueDivideBackNo'] = $uniqueDivideBackNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackDetail
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackDetail()
|
||||
{
|
||||
return $this->container['divideBackDetail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackDetail
|
||||
* @param string $divideBackDetail 分账资金归还详情
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideBackDetail($divideBackDetail)
|
||||
{
|
||||
$this->container['divideBackDetail'] = $divideBackDetail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status
|
||||
* @param string $status 分账资金归还状态
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->container['status'] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
197
lib/Service/Divide/Model/BackRequest.php
Normal file
197
lib/Service/Divide/Model/BackRequest.php
Normal file
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class BackRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $parentMerchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideBackRequestId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideRequestId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $orderId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $uniqueOrderNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideBackDetail;
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->parentMerchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo
|
||||
* @return BackRequest
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->parentMerchantNo = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return BackRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackRequestId()
|
||||
{
|
||||
return $this->divideBackRequestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackRequestId
|
||||
* @param string $divideBackRequestId
|
||||
* @return BackRequest
|
||||
*/
|
||||
public function setDivideBackRequestId($divideBackRequestId)
|
||||
{
|
||||
$this->divideBackRequestId = $divideBackRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->divideRequestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId
|
||||
* @return BackRequest
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->divideRequestId = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->orderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId
|
||||
* @return BackRequest
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->orderId = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->uniqueOrderNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo
|
||||
* @return BackRequest
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->uniqueOrderNo = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackDetail
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackDetail()
|
||||
{
|
||||
return $this->divideBackDetail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackDetail
|
||||
* @param string $divideBackDetail
|
||||
* @return BackRequest
|
||||
*/
|
||||
public function setDivideBackDetail($divideBackDetail)
|
||||
{
|
||||
$this->divideBackDetail = $divideBackDetail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'back';
|
||||
}
|
||||
|
||||
}
|
||||
105
lib/Service/Divide/Model/BackRequestMarshaller.php
Normal file
105
lib/Service/Divide/Model/BackRequestMarshaller.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Http\Headers;
|
||||
use Yeepay\Yop\Sdk\Internal\DefaultRequest;
|
||||
use Yeepay\Yop\Sdk\Internal\Request;
|
||||
use Yeepay\Yop\Sdk\Model\Transform\RequestMarshaller;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
use Yeepay\Yop\Sdk\Utils\UUIDUtils;
|
||||
|
||||
class BackRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var BackRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new BackRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BackRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Divide';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'POST';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/rest/v1.0/divide/back';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param BackRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
if (!empty($request->getRequestConfig()) && !empty($request->getRequestConfig()->getCustomRequestHeaders())) {
|
||||
foreach ($request->getRequestConfig()->getCustomRequestHeaders() as $name => $value) {
|
||||
$internalRequest->addHeader($name, $value);
|
||||
}
|
||||
}
|
||||
if (!isset($internalRequest->getHeaders()[Headers::YOP_REQUEST_ID])) {
|
||||
$internalRequest->addHeader(Headers::YOP_REQUEST_ID, UUIDUtils::uuid());
|
||||
}
|
||||
if ($request->getParentMerchantNo() != null) {
|
||||
$internalRequest->addParameter('parentMerchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
|
||||
}
|
||||
if ($request->getMerchantNo() != null) {
|
||||
$internalRequest->addParameter('merchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
|
||||
}
|
||||
if ($request->getDivideBackRequestId() != null) {
|
||||
$internalRequest->addParameter('divideBackRequestId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDivideBackRequestId(), 'string'));
|
||||
}
|
||||
if ($request->getDivideRequestId() != null) {
|
||||
$internalRequest->addParameter('divideRequestId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDivideRequestId(), 'string'));
|
||||
}
|
||||
if ($request->getOrderId() != null) {
|
||||
$internalRequest->addParameter('orderId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getOrderId(), 'string'));
|
||||
}
|
||||
if ($request->getUniqueOrderNo() != null) {
|
||||
$internalRequest->addParameter('uniqueOrderNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getUniqueOrderNo(), 'string'));
|
||||
}
|
||||
if ($request->getDivideBackDetail() != null) {
|
||||
$internalRequest->addParameter('divideBackDetail',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDivideBackDetail(), 'string'));
|
||||
}
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BackRequestMarshaller::__init();
|
||||
36
lib/Service/Divide/Model/BackResponse.php
Normal file
36
lib/Service/Divide/Model/BackResponse.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseResponse;
|
||||
|
||||
class BackResponse extends BaseResponse
|
||||
{
|
||||
|
||||
/**
|
||||
* @var BackYopDivideBackResDTOResult
|
||||
*/
|
||||
private $result;
|
||||
|
||||
function getResultClass()
|
||||
{
|
||||
return '\Yeepay\Yop\Sdk\Service\Divide\Model\BackYopDivideBackResDTOResult';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BackYopDivideBackResDTOResult $result
|
||||
*/
|
||||
function setResult($result)
|
||||
{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BackYopDivideBackResDTOResult
|
||||
*/
|
||||
function getResult()
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
}
|
||||
38
lib/Service/Divide/Model/BackResponseUnMarshaller.php
Normal file
38
lib/Service/Divide/Model/BackResponseUnMarshaller.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
|
||||
|
||||
class BackResponseUnMarshaller extends BaseResponseUnMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var BackResponseUnMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new BackResponseUnMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BackResponseUnMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BackResponse
|
||||
*/
|
||||
protected function getResponseInstance()
|
||||
{
|
||||
return new BackResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BackResponseUnMarshaller::__init();
|
||||
563
lib/Service/Divide/Model/BackYopDivideBackResDTOResult.php
Normal file
563
lib/Service/Divide/Model/BackYopDivideBackResDTOResult.php
Normal file
@@ -0,0 +1,563 @@
|
||||
<?php
|
||||
/**
|
||||
* BackYopDivideBackResDTOResult
|
||||
* PHP version 5
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
|
||||
/**
|
||||
* 分账
|
||||
* <p>名称(中文):分账<br />名称(英文,xx.war):opr-hessian.war<br />简介:中台收款交易支持分账<br />wiki文档地址:http://wiki.yeepay.com/pages/viewpage.action?pageId=108380664<br />预计项目上线时间:2020年6月9日<br />归属/拟申请的sp编码(可选):opr<br />期望api分组编码、名称(可选):divide(分账)<br />涉及的接口:申请分账、分账查询、分账资金归还/分账退回、分账退回查询</p>
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 3.0.13
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use ArrayAccess;
|
||||
use Yeepay\Yop\Sdk\Model\ModelInterface;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BackYopDivideBackResDTOResult Class Doc Comment
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class BackYopDivideBackResDTOResult implements ModelInterface, ArrayAccess
|
||||
{
|
||||
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'BackYopDivideBackResDTOResult';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = [
|
||||
'code' => 'string',
|
||||
'message' => 'string',
|
||||
'bizSystemNo' => 'string',
|
||||
'parentMerchantNo' => 'string',
|
||||
'merchantNo' => 'string',
|
||||
'orderId' => 'string',
|
||||
'uniqueOrderNo' => 'string',
|
||||
'divideRequestId' => 'string',
|
||||
'divideBackRequestId' => 'string',
|
||||
'uniqueDivideBackNo' => 'string',
|
||||
'divideBackDetail' => 'string',
|
||||
'status' => 'string',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerFormats = [
|
||||
'code' => null,
|
||||
'message' => null,
|
||||
'bizSystemNo' => null,
|
||||
'parentMerchantNo' => null,
|
||||
'merchantNo' => null,
|
||||
'orderId' => null,
|
||||
'uniqueOrderNo' => null,
|
||||
'divideRequestId' => null,
|
||||
'divideBackRequestId' => null,
|
||||
'uniqueDivideBackNo' => null,
|
||||
'divideBackDetail' => null,
|
||||
'status' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'code' => 'code',
|
||||
'message' => 'message',
|
||||
'bizSystemNo' => 'bizSystemNo',
|
||||
'parentMerchantNo' => 'parentMerchantNo',
|
||||
'merchantNo' => 'merchantNo',
|
||||
'orderId' => 'orderId',
|
||||
'uniqueOrderNo' => 'uniqueOrderNo',
|
||||
'divideRequestId' => 'divideRequestId',
|
||||
'divideBackRequestId' => 'divideBackRequestId',
|
||||
'uniqueDivideBackNo' => 'uniqueDivideBackNo',
|
||||
'divideBackDetail' => 'divideBackDetail',
|
||||
'status' => 'status',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'code' => 'setCode',
|
||||
'message' => 'setMessage',
|
||||
'bizSystemNo' => 'setBizSystemNo',
|
||||
'parentMerchantNo' => 'setParentMerchantNo',
|
||||
'merchantNo' => 'setMerchantNo',
|
||||
'orderId' => 'setOrderId',
|
||||
'uniqueOrderNo' => 'setUniqueOrderNo',
|
||||
'divideRequestId' => 'setDivideRequestId',
|
||||
'divideBackRequestId' => 'setDivideBackRequestId',
|
||||
'uniqueDivideBackNo' => 'setUniqueDivideBackNo',
|
||||
'divideBackDetail' => 'setDivideBackDetail',
|
||||
'status' => 'setStatus',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'code' => 'getCode',
|
||||
'message' => 'getMessage',
|
||||
'bizSystemNo' => 'getBizSystemNo',
|
||||
'parentMerchantNo' => 'getParentMerchantNo',
|
||||
'merchantNo' => 'getMerchantNo',
|
||||
'orderId' => 'getOrderId',
|
||||
'uniqueOrderNo' => 'getUniqueOrderNo',
|
||||
'divideRequestId' => 'getDivideRequestId',
|
||||
'divideBackRequestId' => 'getDivideBackRequestId',
|
||||
'uniqueDivideBackNo' => 'getUniqueDivideBackNo',
|
||||
'divideBackDetail' => 'getDivideBackDetail',
|
||||
'status' => 'getStatus',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
$this->container['bizSystemNo'] = isset($data['bizSystemNo']) ? $data['bizSystemNo'] : null;
|
||||
$this->container['parentMerchantNo'] = isset($data['parentMerchantNo']) ? $data['parentMerchantNo'] : null;
|
||||
$this->container['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : null;
|
||||
$this->container['orderId'] = isset($data['orderId']) ? $data['orderId'] : null;
|
||||
$this->container['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
|
||||
$this->container['divideRequestId'] = isset($data['divideRequestId']) ? $data['divideRequestId'] : null;
|
||||
$this->container['divideBackRequestId'] = isset($data['divideBackRequestId']) ? $data['divideBackRequestId'] : null;
|
||||
$this->container['uniqueDivideBackNo'] = isset($data['uniqueDivideBackNo']) ? $data['uniqueDivideBackNo'] : null;
|
||||
$this->container['divideBackDetail'] = isset($data['divideBackDetail']) ? $data['divideBackDetail'] : null;
|
||||
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets code
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->container['code'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets code
|
||||
* @param string $code 返回码
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->container['code'] = $code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets message
|
||||
* @param string $message 返回信息描述
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->container['message'] = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets bizSystemNo
|
||||
* @return string
|
||||
*/
|
||||
public function getBizSystemNo()
|
||||
{
|
||||
return $this->container['bizSystemNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bizSystemNo
|
||||
* @param string $bizSystemNo 业务方标识
|
||||
* @return $this
|
||||
*/
|
||||
public function setBizSystemNo($bizSystemNo)
|
||||
{
|
||||
$this->container['bizSystemNo'] = $bizSystemNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->container['parentMerchantNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo 发起方商编
|
||||
* @return $this
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->container['parentMerchantNo'] = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->container['merchantNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo 商户编号
|
||||
* @return $this
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->container['merchantNo'] = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->container['orderId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId 商户收款请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->container['orderId'] = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->container['uniqueOrderNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo 易宝收款订单号
|
||||
* @return $this
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->container['uniqueOrderNo'] = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->container['divideRequestId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId 商户分账请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->container['divideRequestId'] = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackRequestId()
|
||||
{
|
||||
return $this->container['divideBackRequestId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackRequestId
|
||||
* @param string $divideBackRequestId 商户分账资金归还请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideBackRequestId($divideBackRequestId)
|
||||
{
|
||||
$this->container['divideBackRequestId'] = $divideBackRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueDivideBackNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueDivideBackNo()
|
||||
{
|
||||
return $this->container['uniqueDivideBackNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueDivideBackNo
|
||||
* @param string $uniqueDivideBackNo 易宝分账资金归还订单号
|
||||
* @return $this
|
||||
*/
|
||||
public function setUniqueDivideBackNo($uniqueDivideBackNo)
|
||||
{
|
||||
$this->container['uniqueDivideBackNo'] = $uniqueDivideBackNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackDetail
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackDetail()
|
||||
{
|
||||
return $this->container['divideBackDetail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackDetail
|
||||
* @param string $divideBackDetail 分账资金归还明细
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideBackDetail($divideBackDetail)
|
||||
{
|
||||
$this->container['divideBackDetail'] = $divideBackDetail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status
|
||||
* @param string $status 分账资金归还状态
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->container['status'] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
171
lib/Service/Divide/Model/CompleteRequest.php
Normal file
171
lib/Service/Divide/Model/CompleteRequest.php
Normal file
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class CompleteRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $parentMerchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $orderId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $uniqueOrderNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideRequestId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideDetailDesc;
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->parentMerchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo
|
||||
* @return CompleteRequest
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->parentMerchantNo = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return CompleteRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->orderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId
|
||||
* @return CompleteRequest
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->orderId = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->uniqueOrderNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo
|
||||
* @return CompleteRequest
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->uniqueOrderNo = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->divideRequestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId
|
||||
* @return CompleteRequest
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->divideRequestId = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideDetailDesc
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideDetailDesc()
|
||||
{
|
||||
return $this->divideDetailDesc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideDetailDesc
|
||||
* @param string $divideDetailDesc
|
||||
* @return CompleteRequest
|
||||
*/
|
||||
public function setDivideDetailDesc($divideDetailDesc)
|
||||
{
|
||||
$this->divideDetailDesc = $divideDetailDesc;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'complete';
|
||||
}
|
||||
|
||||
}
|
||||
101
lib/Service/Divide/Model/CompleteRequestMarshaller.php
Normal file
101
lib/Service/Divide/Model/CompleteRequestMarshaller.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Http\Headers;
|
||||
use Yeepay\Yop\Sdk\Internal\DefaultRequest;
|
||||
use Yeepay\Yop\Sdk\Internal\Request;
|
||||
use Yeepay\Yop\Sdk\Model\Transform\RequestMarshaller;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
use Yeepay\Yop\Sdk\Utils\UUIDUtils;
|
||||
|
||||
class CompleteRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var CompleteRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new CompleteRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return CompleteRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Divide';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'POST';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/rest/v1.0/divide/complete';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param CompleteRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
if (!empty($request->getRequestConfig()) && !empty($request->getRequestConfig()->getCustomRequestHeaders())) {
|
||||
foreach ($request->getRequestConfig()->getCustomRequestHeaders() as $name => $value) {
|
||||
$internalRequest->addHeader($name, $value);
|
||||
}
|
||||
}
|
||||
if (!isset($internalRequest->getHeaders()[Headers::YOP_REQUEST_ID])) {
|
||||
$internalRequest->addHeader(Headers::YOP_REQUEST_ID, UUIDUtils::uuid());
|
||||
}
|
||||
if ($request->getParentMerchantNo() != null) {
|
||||
$internalRequest->addParameter('parentMerchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
|
||||
}
|
||||
if ($request->getMerchantNo() != null) {
|
||||
$internalRequest->addParameter('merchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
|
||||
}
|
||||
if ($request->getOrderId() != null) {
|
||||
$internalRequest->addParameter('orderId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getOrderId(), 'string'));
|
||||
}
|
||||
if ($request->getUniqueOrderNo() != null) {
|
||||
$internalRequest->addParameter('uniqueOrderNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getUniqueOrderNo(), 'string'));
|
||||
}
|
||||
if ($request->getDivideRequestId() != null) {
|
||||
$internalRequest->addParameter('divideRequestId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDivideRequestId(), 'string'));
|
||||
}
|
||||
if ($request->getDivideDetailDesc() != null) {
|
||||
$internalRequest->addParameter('divideDetailDesc',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDivideDetailDesc(), 'string'));
|
||||
}
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CompleteRequestMarshaller::__init();
|
||||
36
lib/Service/Divide/Model/CompleteResponse.php
Normal file
36
lib/Service/Divide/Model/CompleteResponse.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseResponse;
|
||||
|
||||
class CompleteResponse extends BaseResponse
|
||||
{
|
||||
|
||||
/**
|
||||
* @var CompleteYopOrderEndDivideResDTOResult
|
||||
*/
|
||||
private $result;
|
||||
|
||||
function getResultClass()
|
||||
{
|
||||
return '\Yeepay\Yop\Sdk\Service\Divide\Model\CompleteYopOrderEndDivideResDTOResult';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CompleteYopOrderEndDivideResDTOResult $result
|
||||
*/
|
||||
function setResult($result)
|
||||
{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return CompleteYopOrderEndDivideResDTOResult
|
||||
*/
|
||||
function getResult()
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
}
|
||||
38
lib/Service/Divide/Model/CompleteResponseUnMarshaller.php
Normal file
38
lib/Service/Divide/Model/CompleteResponseUnMarshaller.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
|
||||
|
||||
class CompleteResponseUnMarshaller extends BaseResponseUnMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var CompleteResponseUnMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new CompleteResponseUnMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return CompleteResponseUnMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return CompleteResponse
|
||||
*/
|
||||
protected function getResponseInstance()
|
||||
{
|
||||
return new CompleteResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CompleteResponseUnMarshaller::__init();
|
||||
@@ -0,0 +1,347 @@
|
||||
<?php
|
||||
/**
|
||||
* CompleteYopOrderEndDivideResDTOResult
|
||||
* PHP version 5
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
|
||||
/**
|
||||
* 分账
|
||||
* <p>名称(中文):分账<br />名称(英文,xx.war):opr-hessian.war<br />简介:中台收款交易支持分账<br />wiki文档地址:http://wiki.yeepay.com/pages/viewpage.action?pageId=108380664<br />预计项目上线时间:2020年6月9日<br />归属/拟申请的sp编码(可选):opr<br />期望api分组编码、名称(可选):divide(分账)<br />涉及的接口:申请分账、分账查询、分账资金归还/分账退回、分账退回查询</p>
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 3.0.13
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use ArrayAccess;
|
||||
use Yeepay\Yop\Sdk\Model\ModelInterface;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CompleteYopOrderEndDivideResDTOResult Class Doc Comment
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class CompleteYopOrderEndDivideResDTOResult implements ModelInterface, ArrayAccess
|
||||
{
|
||||
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'CompleteYopOrderEndDivideResDTOResult';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = [
|
||||
'code' => 'string',
|
||||
'message' => 'string',
|
||||
'divideStatus' => 'string',
|
||||
'amount' => 'float',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerFormats = [
|
||||
'code' => null,
|
||||
'message' => null,
|
||||
'divideStatus' => null,
|
||||
'amount' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'code' => 'code',
|
||||
'message' => 'message',
|
||||
'divideStatus' => 'divideStatus',
|
||||
'amount' => 'amount',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'code' => 'setCode',
|
||||
'message' => 'setMessage',
|
||||
'divideStatus' => 'setDivideStatus',
|
||||
'amount' => 'setAmount',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'code' => 'getCode',
|
||||
'message' => 'getMessage',
|
||||
'divideStatus' => 'getDivideStatus',
|
||||
'amount' => 'getAmount',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
$this->container['divideStatus'] = isset($data['divideStatus']) ? $data['divideStatus'] : null;
|
||||
$this->container['amount'] = isset($data['amount']) ? $data['amount'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets code
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->container['code'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets code
|
||||
* @param string $code 返回码
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->container['code'] = $code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets message
|
||||
* @param string $message 返回信息
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->container['message'] = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideStatus
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideStatus()
|
||||
{
|
||||
return $this->container['divideStatus'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideStatus
|
||||
* @param string $divideStatus 分账状态
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideStatus($divideStatus)
|
||||
{
|
||||
$this->container['divideStatus'] = $divideStatus;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets amount
|
||||
* @return float
|
||||
*/
|
||||
public function getAmount()
|
||||
{
|
||||
return $this->container['amount'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets amount
|
||||
* @param float $amount 分账金额
|
||||
* @return $this
|
||||
*/
|
||||
public function setAmount($amount)
|
||||
{
|
||||
$this->container['amount'] = $amount;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
171
lib/Service/Divide/Model/DivideRequest.php
Normal file
171
lib/Service/Divide/Model/DivideRequest.php
Normal file
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class DivideRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $parentMerchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $orderId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $uniqueOrderNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideRequestId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideDetail;
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->parentMerchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo
|
||||
* @return DivideRequest
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->parentMerchantNo = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return DivideRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->orderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId
|
||||
* @return DivideRequest
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->orderId = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->uniqueOrderNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo
|
||||
* @return DivideRequest
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->uniqueOrderNo = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->divideRequestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId
|
||||
* @return DivideRequest
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->divideRequestId = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideDetail
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideDetail()
|
||||
{
|
||||
return $this->divideDetail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideDetail
|
||||
* @param string $divideDetail
|
||||
* @return DivideRequest
|
||||
*/
|
||||
public function setDivideDetail($divideDetail)
|
||||
{
|
||||
$this->divideDetail = $divideDetail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'divide';
|
||||
}
|
||||
|
||||
}
|
||||
101
lib/Service/Divide/Model/DivideRequestMarshaller.php
Normal file
101
lib/Service/Divide/Model/DivideRequestMarshaller.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Http\Headers;
|
||||
use Yeepay\Yop\Sdk\Internal\DefaultRequest;
|
||||
use Yeepay\Yop\Sdk\Internal\Request;
|
||||
use Yeepay\Yop\Sdk\Model\Transform\RequestMarshaller;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
use Yeepay\Yop\Sdk\Utils\UUIDUtils;
|
||||
|
||||
class DivideRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var DivideRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new DivideRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DivideRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Divide';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'POST';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/rest/v1.0/divide/divide';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param DivideRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
if (!empty($request->getRequestConfig()) && !empty($request->getRequestConfig()->getCustomRequestHeaders())) {
|
||||
foreach ($request->getRequestConfig()->getCustomRequestHeaders() as $name => $value) {
|
||||
$internalRequest->addHeader($name, $value);
|
||||
}
|
||||
}
|
||||
if (!isset($internalRequest->getHeaders()[Headers::YOP_REQUEST_ID])) {
|
||||
$internalRequest->addHeader(Headers::YOP_REQUEST_ID, UUIDUtils::uuid());
|
||||
}
|
||||
if ($request->getParentMerchantNo() != null) {
|
||||
$internalRequest->addParameter('parentMerchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
|
||||
}
|
||||
if ($request->getMerchantNo() != null) {
|
||||
$internalRequest->addParameter('merchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
|
||||
}
|
||||
if ($request->getOrderId() != null) {
|
||||
$internalRequest->addParameter('orderId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getOrderId(), 'string'));
|
||||
}
|
||||
if ($request->getUniqueOrderNo() != null) {
|
||||
$internalRequest->addParameter('uniqueOrderNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getUniqueOrderNo(), 'string'));
|
||||
}
|
||||
if ($request->getDivideRequestId() != null) {
|
||||
$internalRequest->addParameter('divideRequestId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDivideRequestId(), 'string'));
|
||||
}
|
||||
if ($request->getDivideDetail() != null) {
|
||||
$internalRequest->addParameter('divideDetail',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDivideDetail(), 'string'));
|
||||
}
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DivideRequestMarshaller::__init();
|
||||
36
lib/Service/Divide/Model/DivideResponse.php
Normal file
36
lib/Service/Divide/Model/DivideResponse.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseResponse;
|
||||
|
||||
class DivideResponse extends BaseResponse
|
||||
{
|
||||
|
||||
/**
|
||||
* @var DivideYopOrderDivideResDTOResult
|
||||
*/
|
||||
private $result;
|
||||
|
||||
function getResultClass()
|
||||
{
|
||||
return '\Yeepay\Yop\Sdk\Service\Divide\Model\DivideYopOrderDivideResDTOResult';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DivideYopOrderDivideResDTOResult $result
|
||||
*/
|
||||
function setResult($result)
|
||||
{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DivideYopOrderDivideResDTOResult
|
||||
*/
|
||||
function getResult()
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
}
|
||||
38
lib/Service/Divide/Model/DivideResponseUnMarshaller.php
Normal file
38
lib/Service/Divide/Model/DivideResponseUnMarshaller.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
|
||||
|
||||
class DivideResponseUnMarshaller extends BaseResponseUnMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var DivideResponseUnMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new DivideResponseUnMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DivideResponseUnMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DivideResponse
|
||||
*/
|
||||
protected function getResponseInstance()
|
||||
{
|
||||
return new DivideResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DivideResponseUnMarshaller::__init();
|
||||
428
lib/Service/Divide/Model/DivideYopOrderDivideResDTOResult.php
Normal file
428
lib/Service/Divide/Model/DivideYopOrderDivideResDTOResult.php
Normal file
@@ -0,0 +1,428 @@
|
||||
<?php
|
||||
/**
|
||||
* DivideYopOrderDivideResDTOResult
|
||||
* PHP version 5
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
|
||||
/**
|
||||
* 分账
|
||||
* <p>名称(中文):分账<br />名称(英文,xx.war):opr-hessian.war<br />简介:中台收款交易支持分账<br />wiki文档地址:http://wiki.yeepay.com/pages/viewpage.action?pageId=108380664<br />预计项目上线时间:2020年6月9日<br />归属/拟申请的sp编码(可选):opr<br />期望api分组编码、名称(可选):divide(分账)<br />涉及的接口:申请分账、分账查询、分账资金归还/分账退回、分账退回查询</p>
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 3.0.13
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use ArrayAccess;
|
||||
use Yeepay\Yop\Sdk\Model\ModelInterface;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DivideYopOrderDivideResDTOResult Class Doc Comment
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class DivideYopOrderDivideResDTOResult implements ModelInterface, ArrayAccess
|
||||
{
|
||||
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'DivideYopOrderDivideResDTOResult';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = [
|
||||
'code' => 'string',
|
||||
'message' => 'string',
|
||||
'orderId' => 'string',
|
||||
'uniqueOrderNo' => 'string',
|
||||
'divideRequestId' => 'string',
|
||||
'status' => 'string',
|
||||
'divideDetail' => 'string',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerFormats = [
|
||||
'code' => null,
|
||||
'message' => null,
|
||||
'orderId' => null,
|
||||
'uniqueOrderNo' => null,
|
||||
'divideRequestId' => null,
|
||||
'status' => null,
|
||||
'divideDetail' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'code' => 'code',
|
||||
'message' => 'message',
|
||||
'orderId' => 'orderId',
|
||||
'uniqueOrderNo' => 'uniqueOrderNo',
|
||||
'divideRequestId' => 'divideRequestId',
|
||||
'status' => 'status',
|
||||
'divideDetail' => 'divideDetail',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'code' => 'setCode',
|
||||
'message' => 'setMessage',
|
||||
'orderId' => 'setOrderId',
|
||||
'uniqueOrderNo' => 'setUniqueOrderNo',
|
||||
'divideRequestId' => 'setDivideRequestId',
|
||||
'status' => 'setStatus',
|
||||
'divideDetail' => 'setDivideDetail',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'code' => 'getCode',
|
||||
'message' => 'getMessage',
|
||||
'orderId' => 'getOrderId',
|
||||
'uniqueOrderNo' => 'getUniqueOrderNo',
|
||||
'divideRequestId' => 'getDivideRequestId',
|
||||
'status' => 'getStatus',
|
||||
'divideDetail' => 'getDivideDetail',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
$this->container['orderId'] = isset($data['orderId']) ? $data['orderId'] : null;
|
||||
$this->container['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
|
||||
$this->container['divideRequestId'] = isset($data['divideRequestId']) ? $data['divideRequestId'] : null;
|
||||
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
|
||||
$this->container['divideDetail'] = isset($data['divideDetail']) ? $data['divideDetail'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets code
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->container['code'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets code
|
||||
* @param string $code 返回码
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->container['code'] = $code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets message
|
||||
* @param string $message 返回信息
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->container['message'] = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->container['orderId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId 商户收款请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->container['orderId'] = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->container['uniqueOrderNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo 易宝收款订单号
|
||||
* @return $this
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->container['uniqueOrderNo'] = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->container['divideRequestId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId 商户分账请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->container['divideRequestId'] = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status
|
||||
* @param string $status 分账状态
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->container['status'] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideDetail
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideDetail()
|
||||
{
|
||||
return $this->container['divideDetail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideDetail
|
||||
* @param string $divideDetail 分账详情
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideDetail($divideDetail)
|
||||
{
|
||||
$this->container['divideDetail'] = $divideDetail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
145
lib/Service/Divide/Model/DividebackQueryRequest.php
Normal file
145
lib/Service/Divide/Model/DividebackQueryRequest.php
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class DividebackQueryRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $parentMerchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $orderId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $uniqueOrderNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideBackRequestId;
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->parentMerchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo
|
||||
* @return DividebackQueryRequest
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->parentMerchantNo = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return DividebackQueryRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->orderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId
|
||||
* @return DividebackQueryRequest
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->orderId = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->uniqueOrderNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo
|
||||
* @return DividebackQueryRequest
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->uniqueOrderNo = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackRequestId()
|
||||
{
|
||||
return $this->divideBackRequestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackRequestId
|
||||
* @param string $divideBackRequestId
|
||||
* @return DividebackQueryRequest
|
||||
*/
|
||||
public function setDivideBackRequestId($divideBackRequestId)
|
||||
{
|
||||
$this->divideBackRequestId = $divideBackRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'dividebackQuery';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Http\Headers;
|
||||
use Yeepay\Yop\Sdk\Internal\DefaultRequest;
|
||||
use Yeepay\Yop\Sdk\Internal\Request;
|
||||
use Yeepay\Yop\Sdk\Model\Transform\RequestMarshaller;
|
||||
use Yeepay\Yop\Sdk\Utils\UUIDUtils;
|
||||
|
||||
class DividebackQueryRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var DividebackQueryRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new DividebackQueryRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DividebackQueryRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Divide';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'GET';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/rest/v1.0/divide/divideback-query';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param DividebackQueryRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
if (!empty($request->getRequestConfig()) && !empty($request->getRequestConfig()->getCustomRequestHeaders())) {
|
||||
foreach ($request->getRequestConfig()->getCustomRequestHeaders() as $name => $value) {
|
||||
$internalRequest->addHeader($name, $value);
|
||||
}
|
||||
}
|
||||
if (!isset($internalRequest->getHeaders()[Headers::YOP_REQUEST_ID])) {
|
||||
$internalRequest->addHeader(Headers::YOP_REQUEST_ID, UUIDUtils::uuid());
|
||||
}
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DividebackQueryRequestMarshaller::__init();
|
||||
36
lib/Service/Divide/Model/DividebackQueryResponse.php
Normal file
36
lib/Service/Divide/Model/DividebackQueryResponse.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseResponse;
|
||||
|
||||
class DividebackQueryResponse extends BaseResponse
|
||||
{
|
||||
|
||||
/**
|
||||
* @var DividebackQueryYopQueryDivideBackResDTOResult
|
||||
*/
|
||||
private $result;
|
||||
|
||||
function getResultClass()
|
||||
{
|
||||
return '\Yeepay\Yop\Sdk\Service\Divide\Model\DividebackQueryYopQueryDivideBackResDTOResult';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DividebackQueryYopQueryDivideBackResDTOResult $result
|
||||
*/
|
||||
function setResult($result)
|
||||
{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DividebackQueryYopQueryDivideBackResDTOResult
|
||||
*/
|
||||
function getResult()
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
|
||||
|
||||
class DividebackQueryResponseUnMarshaller extends BaseResponseUnMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var DividebackQueryResponseUnMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new DividebackQueryResponseUnMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DividebackQueryResponseUnMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DividebackQueryResponse
|
||||
*/
|
||||
protected function getResponseInstance()
|
||||
{
|
||||
return new DividebackQueryResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DividebackQueryResponseUnMarshaller::__init();
|
||||
@@ -0,0 +1,590 @@
|
||||
<?php
|
||||
/**
|
||||
* DividebackQueryYopQueryDivideBackResDTOResult
|
||||
* PHP version 5
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
|
||||
/**
|
||||
* 分账
|
||||
* <p>名称(中文):分账<br />名称(英文,xx.war):opr-hessian.war<br />简介:中台收款交易支持分账<br />wiki文档地址:http://wiki.yeepay.com/pages/viewpage.action?pageId=108380664<br />预计项目上线时间:2020年6月9日<br />归属/拟申请的sp编码(可选):opr<br />期望api分组编码、名称(可选):divide(分账)<br />涉及的接口:申请分账、分账查询、分账资金归还/分账退回、分账退回查询</p>
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 3.0.13
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use ArrayAccess;
|
||||
use Yeepay\Yop\Sdk\Model\ModelInterface;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DividebackQueryYopQueryDivideBackResDTOResult Class Doc Comment
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class DividebackQueryYopQueryDivideBackResDTOResult implements ModelInterface, ArrayAccess
|
||||
{
|
||||
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'DividebackQueryYopQueryDivideBackResDTOResult';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = [
|
||||
'code' => 'string',
|
||||
'message' => 'string',
|
||||
'bizSystemNo' => 'string',
|
||||
'parentMerchantNo' => 'string',
|
||||
'merchantNo' => 'string',
|
||||
'orderId' => 'string',
|
||||
'uniqueOrderNo' => 'string',
|
||||
'divideRequestId' => 'string',
|
||||
'divideBackRequestId' => 'string',
|
||||
'uniqueDivideBackNo' => 'string',
|
||||
'divideBackDetail' => 'string',
|
||||
'status' => 'string',
|
||||
'errorMessage' => 'string',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerFormats = [
|
||||
'code' => null,
|
||||
'message' => null,
|
||||
'bizSystemNo' => null,
|
||||
'parentMerchantNo' => null,
|
||||
'merchantNo' => null,
|
||||
'orderId' => null,
|
||||
'uniqueOrderNo' => null,
|
||||
'divideRequestId' => null,
|
||||
'divideBackRequestId' => null,
|
||||
'uniqueDivideBackNo' => null,
|
||||
'divideBackDetail' => null,
|
||||
'status' => null,
|
||||
'errorMessage' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'code' => 'code',
|
||||
'message' => 'message',
|
||||
'bizSystemNo' => 'bizSystemNo',
|
||||
'parentMerchantNo' => 'parentMerchantNo',
|
||||
'merchantNo' => 'merchantNo',
|
||||
'orderId' => 'orderId',
|
||||
'uniqueOrderNo' => 'uniqueOrderNo',
|
||||
'divideRequestId' => 'divideRequestId',
|
||||
'divideBackRequestId' => 'divideBackRequestId',
|
||||
'uniqueDivideBackNo' => 'uniqueDivideBackNo',
|
||||
'divideBackDetail' => 'divideBackDetail',
|
||||
'status' => 'status',
|
||||
'errorMessage' => 'errorMessage',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'code' => 'setCode',
|
||||
'message' => 'setMessage',
|
||||
'bizSystemNo' => 'setBizSystemNo',
|
||||
'parentMerchantNo' => 'setParentMerchantNo',
|
||||
'merchantNo' => 'setMerchantNo',
|
||||
'orderId' => 'setOrderId',
|
||||
'uniqueOrderNo' => 'setUniqueOrderNo',
|
||||
'divideRequestId' => 'setDivideRequestId',
|
||||
'divideBackRequestId' => 'setDivideBackRequestId',
|
||||
'uniqueDivideBackNo' => 'setUniqueDivideBackNo',
|
||||
'divideBackDetail' => 'setDivideBackDetail',
|
||||
'status' => 'setStatus',
|
||||
'errorMessage' => 'setErrorMessage',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'code' => 'getCode',
|
||||
'message' => 'getMessage',
|
||||
'bizSystemNo' => 'getBizSystemNo',
|
||||
'parentMerchantNo' => 'getParentMerchantNo',
|
||||
'merchantNo' => 'getMerchantNo',
|
||||
'orderId' => 'getOrderId',
|
||||
'uniqueOrderNo' => 'getUniqueOrderNo',
|
||||
'divideRequestId' => 'getDivideRequestId',
|
||||
'divideBackRequestId' => 'getDivideBackRequestId',
|
||||
'uniqueDivideBackNo' => 'getUniqueDivideBackNo',
|
||||
'divideBackDetail' => 'getDivideBackDetail',
|
||||
'status' => 'getStatus',
|
||||
'errorMessage' => 'getErrorMessage',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
$this->container['bizSystemNo'] = isset($data['bizSystemNo']) ? $data['bizSystemNo'] : null;
|
||||
$this->container['parentMerchantNo'] = isset($data['parentMerchantNo']) ? $data['parentMerchantNo'] : null;
|
||||
$this->container['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : null;
|
||||
$this->container['orderId'] = isset($data['orderId']) ? $data['orderId'] : null;
|
||||
$this->container['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
|
||||
$this->container['divideRequestId'] = isset($data['divideRequestId']) ? $data['divideRequestId'] : null;
|
||||
$this->container['divideBackRequestId'] = isset($data['divideBackRequestId']) ? $data['divideBackRequestId'] : null;
|
||||
$this->container['uniqueDivideBackNo'] = isset($data['uniqueDivideBackNo']) ? $data['uniqueDivideBackNo'] : null;
|
||||
$this->container['divideBackDetail'] = isset($data['divideBackDetail']) ? $data['divideBackDetail'] : null;
|
||||
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
|
||||
$this->container['errorMessage'] = isset($data['errorMessage']) ? $data['errorMessage'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets code
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->container['code'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets code
|
||||
* @param string $code 返回码
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->container['code'] = $code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets message
|
||||
* @param string $message 返回信息描述
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->container['message'] = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets bizSystemNo
|
||||
* @return string
|
||||
*/
|
||||
public function getBizSystemNo()
|
||||
{
|
||||
return $this->container['bizSystemNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bizSystemNo
|
||||
* @param string $bizSystemNo 业务方标识
|
||||
* @return $this
|
||||
*/
|
||||
public function setBizSystemNo($bizSystemNo)
|
||||
{
|
||||
$this->container['bizSystemNo'] = $bizSystemNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->container['parentMerchantNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo 发起方商编
|
||||
* @return $this
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->container['parentMerchantNo'] = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->container['merchantNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo 商户编号
|
||||
* @return $this
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->container['merchantNo'] = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->container['orderId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId 商户收款请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->container['orderId'] = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->container['uniqueOrderNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo 易宝收款订单号
|
||||
* @return $this
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->container['uniqueOrderNo'] = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->container['divideRequestId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId 商户分账请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->container['divideRequestId'] = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackRequestId()
|
||||
{
|
||||
return $this->container['divideBackRequestId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackRequestId
|
||||
* @param string $divideBackRequestId 商户分账资金归还请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideBackRequestId($divideBackRequestId)
|
||||
{
|
||||
$this->container['divideBackRequestId'] = $divideBackRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueDivideBackNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueDivideBackNo()
|
||||
{
|
||||
return $this->container['uniqueDivideBackNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueDivideBackNo
|
||||
* @param string $uniqueDivideBackNo 易宝分账资金归还订单号
|
||||
* @return $this
|
||||
*/
|
||||
public function setUniqueDivideBackNo($uniqueDivideBackNo)
|
||||
{
|
||||
$this->container['uniqueDivideBackNo'] = $uniqueDivideBackNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackDetail
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackDetail()
|
||||
{
|
||||
return $this->container['divideBackDetail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackDetail
|
||||
* @param string $divideBackDetail 分账资金归还详情
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideBackDetail($divideBackDetail)
|
||||
{
|
||||
$this->container['divideBackDetail'] = $divideBackDetail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status
|
||||
* @param string $status 分账资金归还状态
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->container['status'] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets errorMessage
|
||||
* @return string
|
||||
*/
|
||||
public function getErrorMessage()
|
||||
{
|
||||
return $this->container['errorMessage'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets errorMessage
|
||||
* @param string $errorMessage 错误描述
|
||||
* @return $this
|
||||
*/
|
||||
public function setErrorMessage($errorMessage)
|
||||
{
|
||||
$this->container['errorMessage'] = $errorMessage;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
197
lib/Service/Divide/Model/DividebackRequest.php
Normal file
197
lib/Service/Divide/Model/DividebackRequest.php
Normal file
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class DividebackRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $parentMerchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideBackRequestId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideRequestId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $orderId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $uniqueOrderNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideBackDetail;
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->parentMerchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo
|
||||
* @return DividebackRequest
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->parentMerchantNo = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return DividebackRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackRequestId()
|
||||
{
|
||||
return $this->divideBackRequestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackRequestId
|
||||
* @param string $divideBackRequestId
|
||||
* @return DividebackRequest
|
||||
*/
|
||||
public function setDivideBackRequestId($divideBackRequestId)
|
||||
{
|
||||
$this->divideBackRequestId = $divideBackRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->divideRequestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId
|
||||
* @return DividebackRequest
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->divideRequestId = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->orderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId
|
||||
* @return DividebackRequest
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->orderId = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->uniqueOrderNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo
|
||||
* @return DividebackRequest
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->uniqueOrderNo = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackDetail
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackDetail()
|
||||
{
|
||||
return $this->divideBackDetail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackDetail
|
||||
* @param string $divideBackDetail
|
||||
* @return DividebackRequest
|
||||
*/
|
||||
public function setDivideBackDetail($divideBackDetail)
|
||||
{
|
||||
$this->divideBackDetail = $divideBackDetail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'divideback';
|
||||
}
|
||||
|
||||
}
|
||||
105
lib/Service/Divide/Model/DividebackRequestMarshaller.php
Normal file
105
lib/Service/Divide/Model/DividebackRequestMarshaller.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Http\Headers;
|
||||
use Yeepay\Yop\Sdk\Internal\DefaultRequest;
|
||||
use Yeepay\Yop\Sdk\Internal\Request;
|
||||
use Yeepay\Yop\Sdk\Model\Transform\RequestMarshaller;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
use Yeepay\Yop\Sdk\Utils\UUIDUtils;
|
||||
|
||||
class DividebackRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var DividebackRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new DividebackRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DividebackRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Divide';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'POST';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/rest/v1.0/divide/divideback';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param DividebackRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
if (!empty($request->getRequestConfig()) && !empty($request->getRequestConfig()->getCustomRequestHeaders())) {
|
||||
foreach ($request->getRequestConfig()->getCustomRequestHeaders() as $name => $value) {
|
||||
$internalRequest->addHeader($name, $value);
|
||||
}
|
||||
}
|
||||
if (!isset($internalRequest->getHeaders()[Headers::YOP_REQUEST_ID])) {
|
||||
$internalRequest->addHeader(Headers::YOP_REQUEST_ID, UUIDUtils::uuid());
|
||||
}
|
||||
if ($request->getParentMerchantNo() != null) {
|
||||
$internalRequest->addParameter('parentMerchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
|
||||
}
|
||||
if ($request->getMerchantNo() != null) {
|
||||
$internalRequest->addParameter('merchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
|
||||
}
|
||||
if ($request->getDivideBackRequestId() != null) {
|
||||
$internalRequest->addParameter('divideBackRequestId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDivideBackRequestId(), 'string'));
|
||||
}
|
||||
if ($request->getDivideRequestId() != null) {
|
||||
$internalRequest->addParameter('divideRequestId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDivideRequestId(), 'string'));
|
||||
}
|
||||
if ($request->getOrderId() != null) {
|
||||
$internalRequest->addParameter('orderId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getOrderId(), 'string'));
|
||||
}
|
||||
if ($request->getUniqueOrderNo() != null) {
|
||||
$internalRequest->addParameter('uniqueOrderNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getUniqueOrderNo(), 'string'));
|
||||
}
|
||||
if ($request->getDivideBackDetail() != null) {
|
||||
$internalRequest->addParameter('divideBackDetail',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDivideBackDetail(), 'string'));
|
||||
}
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DividebackRequestMarshaller::__init();
|
||||
36
lib/Service/Divide/Model/DividebackResponse.php
Normal file
36
lib/Service/Divide/Model/DividebackResponse.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseResponse;
|
||||
|
||||
class DividebackResponse extends BaseResponse
|
||||
{
|
||||
|
||||
/**
|
||||
* @var DividebackYopDivideBackResDTOResult
|
||||
*/
|
||||
private $result;
|
||||
|
||||
function getResultClass()
|
||||
{
|
||||
return '\Yeepay\Yop\Sdk\Service\Divide\Model\DividebackYopDivideBackResDTOResult';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DividebackYopDivideBackResDTOResult $result
|
||||
*/
|
||||
function setResult($result)
|
||||
{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DividebackYopDivideBackResDTOResult
|
||||
*/
|
||||
function getResult()
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
}
|
||||
38
lib/Service/Divide/Model/DividebackResponseUnMarshaller.php
Normal file
38
lib/Service/Divide/Model/DividebackResponseUnMarshaller.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
|
||||
|
||||
class DividebackResponseUnMarshaller extends BaseResponseUnMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var DividebackResponseUnMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new DividebackResponseUnMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DividebackResponseUnMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DividebackResponse
|
||||
*/
|
||||
protected function getResponseInstance()
|
||||
{
|
||||
return new DividebackResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DividebackResponseUnMarshaller::__init();
|
||||
563
lib/Service/Divide/Model/DividebackYopDivideBackResDTOResult.php
Normal file
563
lib/Service/Divide/Model/DividebackYopDivideBackResDTOResult.php
Normal file
@@ -0,0 +1,563 @@
|
||||
<?php
|
||||
/**
|
||||
* DividebackYopDivideBackResDTOResult
|
||||
* PHP version 5
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
|
||||
/**
|
||||
* 分账
|
||||
* <p>名称(中文):分账<br />名称(英文,xx.war):opr-hessian.war<br />简介:中台收款交易支持分账<br />wiki文档地址:http://wiki.yeepay.com/pages/viewpage.action?pageId=108380664<br />预计项目上线时间:2020年6月9日<br />归属/拟申请的sp编码(可选):opr<br />期望api分组编码、名称(可选):divide(分账)<br />涉及的接口:申请分账、分账查询、分账资金归还/分账退回、分账退回查询</p>
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 3.0.13
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use ArrayAccess;
|
||||
use Yeepay\Yop\Sdk\Model\ModelInterface;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DividebackYopDivideBackResDTOResult Class Doc Comment
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class DividebackYopDivideBackResDTOResult implements ModelInterface, ArrayAccess
|
||||
{
|
||||
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'DividebackYopDivideBackResDTOResult';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = [
|
||||
'code' => 'string',
|
||||
'message' => 'string',
|
||||
'bizSystemNo' => 'string',
|
||||
'parentMerchantNo' => 'string',
|
||||
'merchantNo' => 'string',
|
||||
'orderId' => 'string',
|
||||
'uniqueOrderNo' => 'string',
|
||||
'divideRequestId' => 'string',
|
||||
'divideBackRequestId' => 'string',
|
||||
'uniqueDivideBackNo' => 'string',
|
||||
'divideBackDetail' => 'string',
|
||||
'status' => 'string',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerFormats = [
|
||||
'code' => null,
|
||||
'message' => null,
|
||||
'bizSystemNo' => null,
|
||||
'parentMerchantNo' => null,
|
||||
'merchantNo' => null,
|
||||
'orderId' => null,
|
||||
'uniqueOrderNo' => null,
|
||||
'divideRequestId' => null,
|
||||
'divideBackRequestId' => null,
|
||||
'uniqueDivideBackNo' => null,
|
||||
'divideBackDetail' => null,
|
||||
'status' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'code' => 'code',
|
||||
'message' => 'message',
|
||||
'bizSystemNo' => 'bizSystemNo',
|
||||
'parentMerchantNo' => 'parentMerchantNo',
|
||||
'merchantNo' => 'merchantNo',
|
||||
'orderId' => 'orderId',
|
||||
'uniqueOrderNo' => 'uniqueOrderNo',
|
||||
'divideRequestId' => 'divideRequestId',
|
||||
'divideBackRequestId' => 'divideBackRequestId',
|
||||
'uniqueDivideBackNo' => 'uniqueDivideBackNo',
|
||||
'divideBackDetail' => 'divideBackDetail',
|
||||
'status' => 'status',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'code' => 'setCode',
|
||||
'message' => 'setMessage',
|
||||
'bizSystemNo' => 'setBizSystemNo',
|
||||
'parentMerchantNo' => 'setParentMerchantNo',
|
||||
'merchantNo' => 'setMerchantNo',
|
||||
'orderId' => 'setOrderId',
|
||||
'uniqueOrderNo' => 'setUniqueOrderNo',
|
||||
'divideRequestId' => 'setDivideRequestId',
|
||||
'divideBackRequestId' => 'setDivideBackRequestId',
|
||||
'uniqueDivideBackNo' => 'setUniqueDivideBackNo',
|
||||
'divideBackDetail' => 'setDivideBackDetail',
|
||||
'status' => 'setStatus',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'code' => 'getCode',
|
||||
'message' => 'getMessage',
|
||||
'bizSystemNo' => 'getBizSystemNo',
|
||||
'parentMerchantNo' => 'getParentMerchantNo',
|
||||
'merchantNo' => 'getMerchantNo',
|
||||
'orderId' => 'getOrderId',
|
||||
'uniqueOrderNo' => 'getUniqueOrderNo',
|
||||
'divideRequestId' => 'getDivideRequestId',
|
||||
'divideBackRequestId' => 'getDivideBackRequestId',
|
||||
'uniqueDivideBackNo' => 'getUniqueDivideBackNo',
|
||||
'divideBackDetail' => 'getDivideBackDetail',
|
||||
'status' => 'getStatus',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
$this->container['bizSystemNo'] = isset($data['bizSystemNo']) ? $data['bizSystemNo'] : null;
|
||||
$this->container['parentMerchantNo'] = isset($data['parentMerchantNo']) ? $data['parentMerchantNo'] : null;
|
||||
$this->container['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : null;
|
||||
$this->container['orderId'] = isset($data['orderId']) ? $data['orderId'] : null;
|
||||
$this->container['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
|
||||
$this->container['divideRequestId'] = isset($data['divideRequestId']) ? $data['divideRequestId'] : null;
|
||||
$this->container['divideBackRequestId'] = isset($data['divideBackRequestId']) ? $data['divideBackRequestId'] : null;
|
||||
$this->container['uniqueDivideBackNo'] = isset($data['uniqueDivideBackNo']) ? $data['uniqueDivideBackNo'] : null;
|
||||
$this->container['divideBackDetail'] = isset($data['divideBackDetail']) ? $data['divideBackDetail'] : null;
|
||||
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets code
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->container['code'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets code
|
||||
* @param string $code 返回码
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->container['code'] = $code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets message
|
||||
* @param string $message 返回信息描述
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->container['message'] = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets bizSystemNo
|
||||
* @return string
|
||||
*/
|
||||
public function getBizSystemNo()
|
||||
{
|
||||
return $this->container['bizSystemNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bizSystemNo
|
||||
* @param string $bizSystemNo 业务方标识
|
||||
* @return $this
|
||||
*/
|
||||
public function setBizSystemNo($bizSystemNo)
|
||||
{
|
||||
$this->container['bizSystemNo'] = $bizSystemNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->container['parentMerchantNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo 发起方商编
|
||||
* @return $this
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->container['parentMerchantNo'] = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->container['merchantNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo 商户编号
|
||||
* @return $this
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->container['merchantNo'] = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->container['orderId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId 商户收款请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->container['orderId'] = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->container['uniqueOrderNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo 易宝收款订单号
|
||||
* @return $this
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->container['uniqueOrderNo'] = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->container['divideRequestId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId 商户分账请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->container['divideRequestId'] = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackRequestId()
|
||||
{
|
||||
return $this->container['divideBackRequestId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackRequestId
|
||||
* @param string $divideBackRequestId 商户分账资金归还请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideBackRequestId($divideBackRequestId)
|
||||
{
|
||||
$this->container['divideBackRequestId'] = $divideBackRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueDivideBackNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueDivideBackNo()
|
||||
{
|
||||
return $this->container['uniqueDivideBackNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueDivideBackNo
|
||||
* @param string $uniqueDivideBackNo 易宝分账资金归还订单号(在资金归还后易宝返回的分账资金归还订单号)
|
||||
* @return $this
|
||||
*/
|
||||
public function setUniqueDivideBackNo($uniqueDivideBackNo)
|
||||
{
|
||||
$this->container['uniqueDivideBackNo'] = $uniqueDivideBackNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideBackDetail
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideBackDetail()
|
||||
{
|
||||
return $this->container['divideBackDetail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideBackDetail
|
||||
* @param string $divideBackDetail 分账资金归还明细
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideBackDetail($divideBackDetail)
|
||||
{
|
||||
$this->container['divideBackDetail'] = $divideBackDetail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status
|
||||
* @param string $status 分账资金归还状态
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->container['status'] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
145
lib/Service/Divide/Model/QueryRequest.php
Normal file
145
lib/Service/Divide/Model/QueryRequest.php
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class QueryRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $parentMerchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideRequestId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $orderId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $uniqueOrderNo;
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->parentMerchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo
|
||||
* @return QueryRequest
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->parentMerchantNo = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return QueryRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->divideRequestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId
|
||||
* @return QueryRequest
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->divideRequestId = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->orderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId
|
||||
* @return QueryRequest
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->orderId = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->uniqueOrderNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo
|
||||
* @return QueryRequest
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->uniqueOrderNo = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'query';
|
||||
}
|
||||
|
||||
}
|
||||
76
lib/Service/Divide/Model/QueryRequestMarshaller.php
Normal file
76
lib/Service/Divide/Model/QueryRequestMarshaller.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Http\Headers;
|
||||
use Yeepay\Yop\Sdk\Internal\DefaultRequest;
|
||||
use Yeepay\Yop\Sdk\Internal\Request;
|
||||
use Yeepay\Yop\Sdk\Model\Transform\RequestMarshaller;
|
||||
use Yeepay\Yop\Sdk\Utils\UUIDUtils;
|
||||
|
||||
class QueryRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var QueryRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new QueryRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return QueryRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Divide';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'GET';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/rest/v1.0/divide/query';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param QueryRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
if (!empty($request->getRequestConfig()) && !empty($request->getRequestConfig()->getCustomRequestHeaders())) {
|
||||
foreach ($request->getRequestConfig()->getCustomRequestHeaders() as $name => $value) {
|
||||
$internalRequest->addHeader($name, $value);
|
||||
}
|
||||
}
|
||||
if (!isset($internalRequest->getHeaders()[Headers::YOP_REQUEST_ID])) {
|
||||
$internalRequest->addHeader(Headers::YOP_REQUEST_ID, UUIDUtils::uuid());
|
||||
}
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
QueryRequestMarshaller::__init();
|
||||
36
lib/Service/Divide/Model/QueryResponse.php
Normal file
36
lib/Service/Divide/Model/QueryResponse.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseResponse;
|
||||
|
||||
class QueryResponse extends BaseResponse
|
||||
{
|
||||
|
||||
/**
|
||||
* @var QueryYopQueryOrderDivideResDTOResult
|
||||
*/
|
||||
private $result;
|
||||
|
||||
function getResultClass()
|
||||
{
|
||||
return '\Yeepay\Yop\Sdk\Service\Divide\Model\QueryYopQueryOrderDivideResDTOResult';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param QueryYopQueryOrderDivideResDTOResult $result
|
||||
*/
|
||||
function setResult($result)
|
||||
{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return QueryYopQueryOrderDivideResDTOResult
|
||||
*/
|
||||
function getResult()
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
}
|
||||
38
lib/Service/Divide/Model/QueryResponseUnMarshaller.php
Normal file
38
lib/Service/Divide/Model/QueryResponseUnMarshaller.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
|
||||
|
||||
class QueryResponseUnMarshaller extends BaseResponseUnMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var QueryResponseUnMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new QueryResponseUnMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return QueryResponseUnMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return QueryResponse
|
||||
*/
|
||||
protected function getResponseInstance()
|
||||
{
|
||||
return new QueryResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
QueryResponseUnMarshaller::__init();
|
||||
@@ -0,0 +1,482 @@
|
||||
<?php
|
||||
/**
|
||||
* QueryYopQueryOrderDivideResDTOResult
|
||||
* PHP version 5
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
|
||||
/**
|
||||
* 分账
|
||||
* <p>名称(中文):分账<br />名称(英文,xx.war):opr-hessian.war<br />简介:中台收款交易支持分账<br />wiki文档地址:http://wiki.yeepay.com/pages/viewpage.action?pageId=108380664<br />预计项目上线时间:2020年6月9日<br />归属/拟申请的sp编码(可选):opr<br />期望api分组编码、名称(可选):divide(分账)<br />涉及的接口:申请分账、分账查询、分账资金归还/分账退回、分账退回查询</p>
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 3.0.13
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use ArrayAccess;
|
||||
use Yeepay\Yop\Sdk\Model\ModelInterface;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* QueryYopQueryOrderDivideResDTOResult Class Doc Comment
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class QueryYopQueryOrderDivideResDTOResult implements ModelInterface, ArrayAccess
|
||||
{
|
||||
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'QueryYopQueryOrderDivideResDTOResult';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = [
|
||||
'code' => 'string',
|
||||
'message' => 'string',
|
||||
'parentMerchantNo' => 'string',
|
||||
'merchantNo' => 'string',
|
||||
'orderId' => 'string',
|
||||
'divideRequestId' => 'string',
|
||||
'uniqueOrderNo' => 'string',
|
||||
'status' => 'string',
|
||||
'divideDetail' => 'string',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerFormats = [
|
||||
'code' => null,
|
||||
'message' => null,
|
||||
'parentMerchantNo' => null,
|
||||
'merchantNo' => null,
|
||||
'orderId' => null,
|
||||
'divideRequestId' => null,
|
||||
'uniqueOrderNo' => null,
|
||||
'status' => null,
|
||||
'divideDetail' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'code' => 'code',
|
||||
'message' => 'message',
|
||||
'parentMerchantNo' => 'parentMerchantNo',
|
||||
'merchantNo' => 'merchantNo',
|
||||
'orderId' => 'orderId',
|
||||
'divideRequestId' => 'divideRequestId',
|
||||
'uniqueOrderNo' => 'uniqueOrderNo',
|
||||
'status' => 'status',
|
||||
'divideDetail' => 'divideDetail',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'code' => 'setCode',
|
||||
'message' => 'setMessage',
|
||||
'parentMerchantNo' => 'setParentMerchantNo',
|
||||
'merchantNo' => 'setMerchantNo',
|
||||
'orderId' => 'setOrderId',
|
||||
'divideRequestId' => 'setDivideRequestId',
|
||||
'uniqueOrderNo' => 'setUniqueOrderNo',
|
||||
'status' => 'setStatus',
|
||||
'divideDetail' => 'setDivideDetail',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'code' => 'getCode',
|
||||
'message' => 'getMessage',
|
||||
'parentMerchantNo' => 'getParentMerchantNo',
|
||||
'merchantNo' => 'getMerchantNo',
|
||||
'orderId' => 'getOrderId',
|
||||
'divideRequestId' => 'getDivideRequestId',
|
||||
'uniqueOrderNo' => 'getUniqueOrderNo',
|
||||
'status' => 'getStatus',
|
||||
'divideDetail' => 'getDivideDetail',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
$this->container['parentMerchantNo'] = isset($data['parentMerchantNo']) ? $data['parentMerchantNo'] : null;
|
||||
$this->container['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : null;
|
||||
$this->container['orderId'] = isset($data['orderId']) ? $data['orderId'] : null;
|
||||
$this->container['divideRequestId'] = isset($data['divideRequestId']) ? $data['divideRequestId'] : null;
|
||||
$this->container['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
|
||||
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
|
||||
$this->container['divideDetail'] = isset($data['divideDetail']) ? $data['divideDetail'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets code
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->container['code'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets code
|
||||
* @param string $code 返回码
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->container['code'] = $code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets message
|
||||
* @param string $message 返回信息
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->container['message'] = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->container['parentMerchantNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo 发起方商编
|
||||
* @return $this
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->container['parentMerchantNo'] = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->container['merchantNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo 商户编号
|
||||
* @return $this
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->container['merchantNo'] = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets orderId
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->container['orderId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderId
|
||||
* @param string $orderId 商户收款请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->container['orderId'] = $orderId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->container['divideRequestId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId 商户分账请求号
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->container['divideRequestId'] = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->container['uniqueOrderNo'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo 易宝收款订单号
|
||||
* @return $this
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->container['uniqueOrderNo'] = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status
|
||||
* @param string $status 分账状态
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->container['status'] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideDetail
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideDetail()
|
||||
{
|
||||
return $this->container['divideDetail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideDetail
|
||||
* @param string $divideDetail 分账详情
|
||||
* @return $this
|
||||
*/
|
||||
public function setDivideDetail($divideDetail)
|
||||
{
|
||||
$this->container['divideDetail'] = $divideDetail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,320 @@
|
||||
<?php
|
||||
/**
|
||||
* ReceiptDownloadReceiptResponseDTOResult
|
||||
* PHP version 5
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
|
||||
/**
|
||||
* 分账
|
||||
* <p>名称(中文):分账<br />名称(英文,xx.war):opr-hessian.war<br />简介:中台收款交易支持分账<br />wiki文档地址:http://wiki.yeepay.com/pages/viewpage.action?pageId=108380664<br />预计项目上线时间:2020年6月9日<br />归属/拟申请的sp编码(可选):opr<br />期望api分组编码、名称(可选):divide(分账)<br />涉及的接口:申请分账、分账查询、分账资金归还/分账退回、分账退回查询</p>
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 3.0.13
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use ArrayAccess;
|
||||
use Yeepay\Yop\Sdk\Model\ModelInterface;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* ReceiptDownloadReceiptResponseDTOResult Class Doc Comment
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class ReceiptDownloadReceiptResponseDTOResult implements ModelInterface, ArrayAccess
|
||||
{
|
||||
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'ReceiptDownloadReceiptResponseDTOResult';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = [
|
||||
'code' => 'string',
|
||||
'message' => 'string',
|
||||
'data' => 'string',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerFormats = [
|
||||
'code' => null,
|
||||
'message' => null,
|
||||
'data' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'code' => 'code',
|
||||
'message' => 'message',
|
||||
'data' => 'data',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'code' => 'setCode',
|
||||
'message' => 'setMessage',
|
||||
'data' => 'setData',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'code' => 'getCode',
|
||||
'message' => 'getMessage',
|
||||
'data' => 'getData',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
$this->container['data'] = isset($data['data']) ? $data['data'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets code
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->container['code'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets code
|
||||
* @param string $code 返回码
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->container['code'] = $code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets message
|
||||
* @param string $message 返回信息
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->container['message'] = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets data
|
||||
* @return string
|
||||
*/
|
||||
public function getData()
|
||||
{
|
||||
return $this->container['data'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets data
|
||||
* @param string $data 回单信息
|
||||
* @return $this
|
||||
*/
|
||||
public function setData($data)
|
||||
{
|
||||
$this->container['data'] = $data;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
145
lib/Service/Divide/Model/ReceiptDownloadRequest.php
Normal file
145
lib/Service/Divide/Model/ReceiptDownloadRequest.php
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class ReceiptDownloadRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $parentMerchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $uniqueOrderNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideRequestId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $ledgerNo;
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->parentMerchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
* @param string $parentMerchantNo
|
||||
* @return ReceiptDownloadRequest
|
||||
*/
|
||||
public function setParentMerchantNo($parentMerchantNo)
|
||||
{
|
||||
$this->parentMerchantNo = $parentMerchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return ReceiptDownloadRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uniqueOrderNo
|
||||
* @return string
|
||||
*/
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->uniqueOrderNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uniqueOrderNo
|
||||
* @param string $uniqueOrderNo
|
||||
* @return ReceiptDownloadRequest
|
||||
*/
|
||||
public function setUniqueOrderNo($uniqueOrderNo)
|
||||
{
|
||||
$this->uniqueOrderNo = $uniqueOrderNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets divideRequestId
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideRequestId()
|
||||
{
|
||||
return $this->divideRequestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideRequestId
|
||||
* @param string $divideRequestId
|
||||
* @return ReceiptDownloadRequest
|
||||
*/
|
||||
public function setDivideRequestId($divideRequestId)
|
||||
{
|
||||
$this->divideRequestId = $divideRequestId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets ledgerNo
|
||||
* @return string
|
||||
*/
|
||||
public function getLedgerNo()
|
||||
{
|
||||
return $this->ledgerNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets ledgerNo
|
||||
* @param string $ledgerNo
|
||||
* @return ReceiptDownloadRequest
|
||||
*/
|
||||
public function setLedgerNo($ledgerNo)
|
||||
{
|
||||
$this->ledgerNo = $ledgerNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'receiptDownload';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Http\Headers;
|
||||
use Yeepay\Yop\Sdk\Internal\DefaultRequest;
|
||||
use Yeepay\Yop\Sdk\Internal\Request;
|
||||
use Yeepay\Yop\Sdk\Model\Transform\RequestMarshaller;
|
||||
use Yeepay\Yop\Sdk\Utils\UUIDUtils;
|
||||
|
||||
class ReceiptDownloadRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var ReceiptDownloadRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new ReceiptDownloadRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ReceiptDownloadRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Divide';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'GET';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/yos/v1.0/divide/receipt/download';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param ReceiptDownloadRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
if (!empty($request->getRequestConfig()) && !empty($request->getRequestConfig()->getCustomRequestHeaders())) {
|
||||
foreach ($request->getRequestConfig()->getCustomRequestHeaders() as $name => $value) {
|
||||
$internalRequest->addHeader($name, $value);
|
||||
}
|
||||
}
|
||||
if (!isset($internalRequest->getHeaders()[Headers::YOP_REQUEST_ID])) {
|
||||
$internalRequest->addHeader(Headers::YOP_REQUEST_ID, UUIDUtils::uuid());
|
||||
}
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ReceiptDownloadRequestMarshaller::__init();
|
||||
36
lib/Service/Divide/Model/ReceiptDownloadResponse.php
Normal file
36
lib/Service/Divide/Model/ReceiptDownloadResponse.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseResponse;
|
||||
|
||||
class ReceiptDownloadResponse extends BaseResponse
|
||||
{
|
||||
|
||||
/**
|
||||
* @var ReceiptDownloadReceiptResponseDTOResult
|
||||
*/
|
||||
private $result;
|
||||
|
||||
function getResultClass()
|
||||
{
|
||||
return '\Yeepay\Yop\Sdk\Service\Divide\Model\ReceiptDownloadReceiptResponseDTOResult';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ReceiptDownloadReceiptResponseDTOResult $result
|
||||
*/
|
||||
function setResult($result)
|
||||
{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ReceiptDownloadReceiptResponseDTOResult
|
||||
*/
|
||||
function getResult()
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Divide\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
|
||||
|
||||
class ReceiptDownloadResponseUnMarshaller extends BaseResponseUnMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var ReceiptDownloadResponseUnMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new ReceiptDownloadResponseUnMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ReceiptDownloadResponseUnMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ReceiptDownloadResponse
|
||||
*/
|
||||
protected function getResponseInstance()
|
||||
{
|
||||
return new ReceiptDownloadResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ReceiptDownloadResponseUnMarshaller::__init();
|
||||
Reference in New Issue
Block a user