增加聚合支付托管下单
This commit is contained in:
517
lib/Service/Cashier/Model/UnifiedOrderRequest.php
Normal file
517
lib/Service/Cashier/Model/UnifiedOrderRequest.php
Normal file
@@ -0,0 +1,517 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Cashier\Model;
|
||||
|
||||
|
||||
class UnifiedOrderRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $parentMerchantNo;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $orderId;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
private $orderAmount;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $goodsName;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $fundProcessType;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $notifyUrl;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $memo;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $expiredTime;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $returnUrl;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $csNotifyUrl;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $businessInfo;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $payerInfo;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $limitPayType;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $cardType;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $aggParam;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $noCardParam;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $productInfo;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideDetail;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $divideNotifyUrl;
|
||||
|
||||
/**
|
||||
* Gets parentMerchantNo
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->parentMerchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets parentMerchantNo
|
||||
*
|
||||
* @param string $parentMerchantNo
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
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 UnifiedOrderRequest
|
||||
*/
|
||||
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 UnifiedOrderRequest
|
||||
*/
|
||||
public function setOrderId($orderId)
|
||||
{
|
||||
$this->orderId = $orderId;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets orderAmount
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getOrderAmount()
|
||||
{
|
||||
return $this->orderAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets orderAmount
|
||||
*
|
||||
* @param float $orderAmount
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setOrderAmount($orderAmount)
|
||||
{
|
||||
$this->orderAmount = $orderAmount;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets goodsName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getGoodsName()
|
||||
{
|
||||
return $this->goodsName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets goodsName
|
||||
*
|
||||
* @param string $goodsName
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setGoodsName($goodsName)
|
||||
{
|
||||
$this->goodsName = $goodsName;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets fundProcessType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFundProcessType()
|
||||
{
|
||||
return $this->fundProcessType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets fundProcessType
|
||||
*
|
||||
* @param string $fundProcessType
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setFundProcessType($fundProcessType)
|
||||
{
|
||||
$this->fundProcessType = $fundProcessType;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets notifyUrl
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets notifyUrl
|
||||
*
|
||||
* @param string $notifyUrl
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl = $notifyUrl;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets memo
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMemo()
|
||||
{
|
||||
return $this->memo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets memo
|
||||
*
|
||||
* @param string $memo
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setMemo($memo)
|
||||
{
|
||||
$this->memo = $memo;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets expiredTime
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getExpiredTime()
|
||||
{
|
||||
return $this->expiredTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets expiredTime
|
||||
*
|
||||
* @param string $expiredTime
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setExpiredTime($expiredTime)
|
||||
{
|
||||
$this->expiredTime = $expiredTime;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets returnUrl
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getReturnUrl()
|
||||
{
|
||||
return $this->returnUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets returnUrl
|
||||
*
|
||||
* @param string $returnUrl
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setReturnUrl($returnUrl)
|
||||
{
|
||||
$this->returnUrl = $returnUrl;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets csNotifyUrl
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCsNotifyUrl()
|
||||
{
|
||||
return $this->csNotifyUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets csNotifyUrl
|
||||
*
|
||||
* @param string $csNotifyUrl
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setCsNotifyUrl($csNotifyUrl)
|
||||
{
|
||||
$this->csNotifyUrl = $csNotifyUrl;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets businessInfo
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBusinessInfo()
|
||||
{
|
||||
return $this->businessInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets businessInfo
|
||||
*
|
||||
* @param string $businessInfo
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setBusinessInfo($businessInfo)
|
||||
{
|
||||
$this->businessInfo = $businessInfo;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets payerInfo
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPayerInfo()
|
||||
{
|
||||
return $this->payerInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets payerInfo
|
||||
*
|
||||
* @param string $payerInfo
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setPayerInfo($payerInfo)
|
||||
{
|
||||
$this->payerInfo = $payerInfo;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets limitPayType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLimitPayType()
|
||||
{
|
||||
return $this->limitPayType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets limitPayType
|
||||
*
|
||||
* @param string $limitPayType
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setLimitPayType($limitPayType)
|
||||
{
|
||||
$this->limitPayType = $limitPayType;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets cardType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCardType()
|
||||
{
|
||||
return $this->cardType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets cardType
|
||||
*
|
||||
* @param string $cardType
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setCardType($cardType)
|
||||
{
|
||||
$this->cardType = $cardType;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets aggParam
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAggParam()
|
||||
{
|
||||
return $this->aggParam;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets aggParam
|
||||
*
|
||||
* @param string $aggParam
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setAggParam($aggParam)
|
||||
{
|
||||
$this->aggParam = $aggParam;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets noCardParam
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNoCardParam()
|
||||
{
|
||||
return $this->noCardParam;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets noCardParam
|
||||
*
|
||||
* @param string $noCardParam
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setNoCardParam($noCardParam)
|
||||
{
|
||||
$this->noCardParam = $noCardParam;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets productInfo
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getProductInfo()
|
||||
{
|
||||
return $this->productInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets productInfo
|
||||
*
|
||||
* @param string $productInfo
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setProductInfo($productInfo)
|
||||
{
|
||||
$this->productInfo = $productInfo;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets divideDetail
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideDetail()
|
||||
{
|
||||
return $this->divideDetail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideDetail
|
||||
*
|
||||
* @param string $divideDetail
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setDivideDetail($divideDetail)
|
||||
{
|
||||
$this->divideDetail = $divideDetail;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Gets divideNotifyUrl
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDivideNotifyUrl()
|
||||
{
|
||||
return $this->divideNotifyUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets divideNotifyUrl
|
||||
*
|
||||
* @param string $divideNotifyUrl
|
||||
* @return UnifiedOrderRequest
|
||||
*/
|
||||
public function setDivideNotifyUrl($divideNotifyUrl)
|
||||
{
|
||||
$this->divideNotifyUrl = $divideNotifyUrl;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'unifiedOrder';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
137
lib/Service/Cashier/Model/UnifiedOrderRequestMarshaller.php
Normal file
137
lib/Service/Cashier/Model/UnifiedOrderRequestMarshaller.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Cashier\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 UnifiedOrderRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
/**
|
||||
* @var UnifiedOrderRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new UnifiedOrderRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return UnifiedOrderRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Cashier';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'POST';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/rest/v1.0/cashier/unified/order';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
|
||||
/**
|
||||
* @param UnifiedOrderRequest $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->getOrderAmount() != null){
|
||||
$internalRequest->addParameter('orderAmount', ObjectSerializer::sanitizeForSerialization($request->getOrderAmount(), 'float'));
|
||||
}
|
||||
if($request->getGoodsName() != null){
|
||||
$internalRequest->addParameter('goodsName', ObjectSerializer::sanitizeForSerialization($request->getGoodsName(), 'string'));
|
||||
}
|
||||
if($request->getFundProcessType() != null){
|
||||
$internalRequest->addParameter('fundProcessType', ObjectSerializer::sanitizeForSerialization($request->getFundProcessType(), 'string'));
|
||||
}
|
||||
if($request->getNotifyUrl() != null){
|
||||
$internalRequest->addParameter('notifyUrl', ObjectSerializer::sanitizeForSerialization($request->getNotifyUrl(), 'string', 'url'));
|
||||
}
|
||||
if($request->getMemo() != null){
|
||||
$internalRequest->addParameter('memo', ObjectSerializer::sanitizeForSerialization($request->getMemo(), 'string'));
|
||||
}
|
||||
if($request->getExpiredTime() != null){
|
||||
$internalRequest->addParameter('expiredTime', ObjectSerializer::sanitizeForSerialization($request->getExpiredTime(), 'string', 'date-time'));
|
||||
}
|
||||
if($request->getReturnUrl() != null){
|
||||
$internalRequest->addParameter('returnUrl', ObjectSerializer::sanitizeForSerialization($request->getReturnUrl(), 'string', 'url'));
|
||||
}
|
||||
if($request->getCsNotifyUrl() != null){
|
||||
$internalRequest->addParameter('csNotifyUrl', ObjectSerializer::sanitizeForSerialization($request->getCsNotifyUrl(), 'string', 'url'));
|
||||
}
|
||||
if($request->getBusinessInfo() != null){
|
||||
$internalRequest->addParameter('businessInfo', ObjectSerializer::sanitizeForSerialization($request->getBusinessInfo(), 'string'));
|
||||
}
|
||||
if($request->getPayerInfo() != null){
|
||||
$internalRequest->addParameter('payerInfo', ObjectSerializer::sanitizeForSerialization($request->getPayerInfo(), 'string'));
|
||||
}
|
||||
if($request->getLimitPayType() != null){
|
||||
$internalRequest->addParameter('limitPayType', ObjectSerializer::sanitizeForSerialization($request->getLimitPayType(), 'string'));
|
||||
}
|
||||
if($request->getCardType() != null){
|
||||
$internalRequest->addParameter('cardType', ObjectSerializer::sanitizeForSerialization($request->getCardType(), 'string'));
|
||||
}
|
||||
if($request->getAggParam() != null){
|
||||
$internalRequest->addParameter('aggParam', ObjectSerializer::sanitizeForSerialization($request->getAggParam(), 'string'));
|
||||
}
|
||||
if($request->getNoCardParam() != null){
|
||||
$internalRequest->addParameter('noCardParam', ObjectSerializer::sanitizeForSerialization($request->getNoCardParam(), 'string'));
|
||||
}
|
||||
if($request->getProductInfo() != null){
|
||||
$internalRequest->addParameter('productInfo', ObjectSerializer::sanitizeForSerialization($request->getProductInfo(), 'string'));
|
||||
}
|
||||
if($request->getDivideDetail() != null){
|
||||
$internalRequest->addParameter('divideDetail', ObjectSerializer::sanitizeForSerialization($request->getDivideDetail(), 'string'));
|
||||
}
|
||||
if($request->getDivideNotifyUrl() != null){
|
||||
$internalRequest->addParameter('divideNotifyUrl', ObjectSerializer::sanitizeForSerialization($request->getDivideNotifyUrl(), 'string'));
|
||||
}
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
}
|
||||
UnifiedOrderRequestMarshaller::__init();
|
||||
34
lib/Service/Cashier/Model/UnifiedOrderResponse.php
Normal file
34
lib/Service/Cashier/Model/UnifiedOrderResponse.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Cashier\Model;
|
||||
|
||||
|
||||
class UnifiedOrderResponse extends \Yeepay\Yop\Sdk\Model\BaseResponse
|
||||
{
|
||||
/**
|
||||
* @var UnifiedOrderUnifiedCashierOrderResponseDTOResult
|
||||
*/
|
||||
private $result;
|
||||
|
||||
function getResultClass()
|
||||
{
|
||||
return '\Yeepay\Yop\Sdk\Service\Cashier\Model\UnifiedOrderUnifiedCashierOrderResponseDTOResult';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param UnifiedOrderUnifiedCashierOrderResponseDTOResult $result
|
||||
*/
|
||||
function setResult($result)
|
||||
{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return UnifiedOrderUnifiedCashierOrderResponseDTOResult
|
||||
*/
|
||||
function getResult()
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Cashier\Model;
|
||||
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
|
||||
|
||||
class UnifiedOrderResponseUnMarshaller extends BaseResponseUnMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var UnifiedOrderResponseUnMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new UnifiedOrderResponseUnMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return UnifiedOrderResponseUnMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return UnifiedOrderResponse
|
||||
*/
|
||||
protected function getResponseInstance()
|
||||
{
|
||||
return new UnifiedOrderResponse();
|
||||
}
|
||||
}
|
||||
|
||||
UnifiedOrderResponseUnMarshaller::__init();
|
||||
@@ -0,0 +1,392 @@
|
||||
<?php
|
||||
/**
|
||||
* UnifiedOrderUnifiedCashierOrderResponseDTOResult
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @author Swagger Codegen team
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
|
||||
/**
|
||||
* 商家收银台
|
||||
*
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: 1.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\Cashier\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use Yeepay\Yop\Sdk\Model\ModelInterface;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* UnifiedOrderUnifiedCashierOrderResponseDTOResult Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @author Swagger Codegen team
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class UnifiedOrderUnifiedCashierOrderResponseDTOResult implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'UnifiedOrderUnifiedCashierOrderResponseDTOResult';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = [
|
||||
'code' => 'string',
|
||||
'message' => 'string',
|
||||
'uniqueOrderNo' => 'string',
|
||||
'cashierUrl' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerFormats = [
|
||||
'code' => null,
|
||||
'message' => null,
|
||||
'uniqueOrderNo' => null,
|
||||
'cashierUrl' => 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',
|
||||
'uniqueOrderNo' => 'uniqueOrderNo',
|
||||
'cashierUrl' => 'cashierUrl'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'code' => 'setCode',
|
||||
'message' => 'setMessage',
|
||||
'uniqueOrderNo' => 'setUniqueOrderNo',
|
||||
'cashierUrl' => 'setCashierUrl'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'code' => 'getCode',
|
||||
'message' => 'getMessage',
|
||||
'uniqueOrderNo' => 'getUniqueOrderNo',
|
||||
'cashierUrl' => 'getCashierUrl'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
|
||||
$this->container['cashierUrl'] = isset($data['cashierUrl']) ? $data['cashierUrl'] : 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 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 cashierUrl
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCashierUrl()
|
||||
{
|
||||
return $this->container['cashierUrl'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets cashierUrl
|
||||
*
|
||||
* @param string $cashierUrl 收银台链接
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCashierUrl($cashierUrl)
|
||||
{
|
||||
$this->container['cashierUrl'] = $cashierUrl;
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user