first commit

This commit is contained in:
2024-04-01 09:54:43 +08:00
commit 899d816bc3
795 changed files with 130040 additions and 0 deletions

View File

@@ -0,0 +1,119 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseRequest;
class OrderCloseRequest extends BaseRequest
{
/**
* @var string
*/
private $orderId;
/**
* @var string
*/
private $uniqueOrderNo;
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets orderId
* @return string
*/
public function getOrderId()
{
return $this->orderId;
}
/**
* Sets orderId
* @param string $orderId
* @return OrderCloseRequest
*/
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 OrderCloseRequest
*/
public function setUniqueOrderNo($uniqueOrderNo)
{
$this->uniqueOrderNo = $uniqueOrderNo;
return $this;
}
/**
* Gets parentMerchantNo
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
* @param string $parentMerchantNo
* @return OrderCloseRequest
*/
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 OrderCloseRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'orderClose';
}
}

View File

@@ -0,0 +1,93 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\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 OrderCloseRequestMarshaller implements RequestMarshaller
{
/**
* @var OrderCloseRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new OrderCloseRequestMarshaller();
}
/**
* @return OrderCloseRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Trade';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/trade/order/close';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param OrderCloseRequest $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->getOrderId() != null) {
$internalRequest->addParameter('orderId',
ObjectSerializer::sanitizeForSerialization($request->getOrderId(), 'string'));
}
if ($request->getUniqueOrderNo() != null) {
$internalRequest->addParameter('uniqueOrderNo',
ObjectSerializer::sanitizeForSerialization($request->getUniqueOrderNo(), 'string'));
}
if ($request->getParentMerchantNo() != null) {
$internalRequest->addParameter('parentMerchantNo',
ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
}
if ($request->getMerchantNo() != null) {
$internalRequest->addParameter('merchantNo',
ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
OrderCloseRequestMarshaller::__init();

View File

@@ -0,0 +1,36 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseResponse;
class OrderCloseResponse extends BaseResponse
{
/**
* @var OrderCloseResponseOrderCloseDTOResult
*/
private $result;
function getResultClass()
{
return '\Yeepay\Yop\Sdk\Service\Trade\Model\OrderCloseResponseOrderCloseDTOResult';
}
/**
* @param OrderCloseResponseOrderCloseDTOResult $result
*/
function setResult($result)
{
$this->result = $result;
}
/**
* @return OrderCloseResponseOrderCloseDTOResult
*/
function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,374 @@
<?php
/**
* OrderCloseResponseOrderCloseDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* OrderCloseResponseOrderCloseDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class OrderCloseResponseOrderCloseDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'OrderCloseResponseOrderCloseDTOResult';
/**
* 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',
];
/**
* 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,
];
/**
* 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',
];
/**
* 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',
];
/**
* 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',
];
/**
* 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;
}
/**
* 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;
}
/**
* 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));
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
class OrderCloseResponseUnMarshaller extends BaseResponseUnMarshaller
{
/**
* @var OrderCloseResponseUnMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new OrderCloseResponseUnMarshaller();
}
/**
* @return OrderCloseResponseUnMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @return OrderCloseResponse
*/
protected function getResponseInstance()
{
return new OrderCloseResponse();
}
}
OrderCloseResponseUnMarshaller::__init();

View File

@@ -0,0 +1,456 @@
<?php
/**
* OrderCombineQueryPayerInfoResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* OrderCombineQueryPayerInfoResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @description
* @link https://github.com/swagger-api/swagger-codegen
*/
class OrderCombineQueryPayerInfoResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'OrderCombineQueryPayerInfoResult';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = [
'bankId' => 'string',
'accountName' => 'string',
'bankCardNo' => 'string',
'mobilePhoneNo' => 'string',
'cardType' => 'string',
'userID' => 'string',
'unionID' => 'string',
'buyerLogonId' => 'string',
];
/**
* Array of property to format mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerFormats = [
'bankId' => null,
'accountName' => null,
'bankCardNo' => null,
'mobilePhoneNo' => null,
'cardType' => null,
'userID' => null,
'unionID' => null,
'buyerLogonId' => 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 = [
'bankId' => 'bankId',
'accountName' => 'accountName',
'bankCardNo' => 'bankCardNo',
'mobilePhoneNo' => 'mobilePhoneNo',
'cardType' => 'cardType',
'userID' => 'userID',
'unionID' => 'unionID',
'buyerLogonId' => 'buyerLogonId',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'bankId' => 'setBankId',
'accountName' => 'setAccountName',
'bankCardNo' => 'setBankCardNo',
'mobilePhoneNo' => 'setMobilePhoneNo',
'cardType' => 'setCardType',
'userID' => 'setUserID',
'unionID' => 'setUnionID',
'buyerLogonId' => 'setBuyerLogonId',
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'bankId' => 'getBankId',
'accountName' => 'getAccountName',
'bankCardNo' => 'getBankCardNo',
'mobilePhoneNo' => 'getMobilePhoneNo',
'cardType' => 'getCardType',
'userID' => 'getUserID',
'unionID' => 'getUnionID',
'buyerLogonId' => 'getBuyerLogonId',
];
/**
* 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['bankId'] = isset($data['bankId']) ? $data['bankId'] : null;
$this->container['accountName'] = isset($data['accountName']) ? $data['accountName'] : null;
$this->container['bankCardNo'] = isset($data['bankCardNo']) ? $data['bankCardNo'] : null;
$this->container['mobilePhoneNo'] = isset($data['mobilePhoneNo']) ? $data['mobilePhoneNo'] : null;
$this->container['cardType'] = isset($data['cardType']) ? $data['cardType'] : null;
$this->container['userID'] = isset($data['userID']) ? $data['userID'] : null;
$this->container['unionID'] = isset($data['unionID']) ? $data['unionID'] : null;
$this->container['buyerLogonId'] = isset($data['buyerLogonId']) ? $data['buyerLogonId'] : 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 bankId
* @return string
*/
public function getBankId()
{
return $this->container['bankId'];
}
/**
* Sets bankId
* @param string $bankId 银行编号
* @return $this
*/
public function setBankId($bankId)
{
$this->container['bankId'] = $bankId;
return $this;
}
/**
* Gets accountName
* @return string
*/
public function getAccountName()
{
return $this->container['accountName'];
}
/**
* Sets accountName
* @param string $accountName 账户名称
* @return $this
*/
public function setAccountName($accountName)
{
$this->container['accountName'] = $accountName;
return $this;
}
/**
* Gets bankCardNo
* @return string
*/
public function getBankCardNo()
{
return $this->container['bankCardNo'];
}
/**
* Sets bankCardNo
* @param string $bankCardNo 银行卡号
* @return $this
*/
public function setBankCardNo($bankCardNo)
{
$this->container['bankCardNo'] = $bankCardNo;
return $this;
}
/**
* Gets mobilePhoneNo
* @return string
*/
public function getMobilePhoneNo()
{
return $this->container['mobilePhoneNo'];
}
/**
* Sets mobilePhoneNo
* @param string $mobilePhoneNo 手机号
* @return $this
*/
public function setMobilePhoneNo($mobilePhoneNo)
{
$this->container['mobilePhoneNo'] = $mobilePhoneNo;
return $this;
}
/**
* Gets cardType
* @return string
*/
public function getCardType()
{
return $this->container['cardType'];
}
/**
* Sets cardType
* @param string $cardType 卡类型
* @return $this
*/
public function setCardType($cardType)
{
$this->container['cardType'] = $cardType;
return $this;
}
/**
* Gets userID
* @return string
*/
public function getUserID()
{
return $this->container['userID'];
}
/**
* Sets userID
* @param string $userID 用户id
* @return $this
*/
public function setUserID($userID)
{
$this->container['userID'] = $userID;
return $this;
}
/**
* Gets unionID
* @return string
*/
public function getUnionID()
{
return $this->container['unionID'];
}
/**
* Sets unionID
* @param string $unionID unionID
* @return $this
*/
public function setUnionID($unionID)
{
$this->container['unionID'] = $unionID;
return $this;
}
/**
* Gets buyerLogonId
* @return string
*/
public function getBuyerLogonId()
{
return $this->container['buyerLogonId'];
}
/**
* Sets buyerLogonId
* @param string $buyerLogonId 支付宝买家登录账号
* @return $this
*/
public function setBuyerLogonId($buyerLogonId)
{
$this->container['buyerLogonId'] = $buyerLogonId;
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));
}
}

View File

@@ -0,0 +1,67 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseRequest;
class OrderCombineQueryRequest extends BaseRequest
{
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $orderId;
/**
* Gets parentMerchantNo
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
* @param string $parentMerchantNo
* @return OrderCombineQueryRequest
*/
public function setParentMerchantNo($parentMerchantNo)
{
$this->parentMerchantNo = $parentMerchantNo;
return $this;
}
/**
* Gets orderId
* @return string
*/
public function getOrderId()
{
return $this->orderId;
}
/**
* Sets orderId
* @param string $orderId
* @return OrderCombineQueryRequest
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
return $this;
}
public static function getOperationId()
{
return 'orderCombineQuery';
}
}

View File

@@ -0,0 +1,76 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\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 OrderCombineQueryRequestMarshaller implements RequestMarshaller
{
/**
* @var OrderCombineQueryRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new OrderCombineQueryRequestMarshaller();
}
/**
* @return OrderCombineQueryRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Trade';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/trade/order/combine-query';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param OrderCombineQueryRequest $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;
}
}
OrderCombineQueryRequestMarshaller::__init();

View File

@@ -0,0 +1,36 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseResponse;
class OrderCombineQueryResponse extends BaseResponse
{
/**
* @var OrderCombineQueryYopQueryCombineOrderResDTOResult
*/
private $result;
function getResultClass()
{
return '\Yeepay\Yop\Sdk\Service\Trade\Model\OrderCombineQueryYopQueryCombineOrderResDTOResult';
}
/**
* @param OrderCombineQueryYopQueryCombineOrderResDTOResult $result
*/
function setResult($result)
{
$this->result = $result;
}
/**
* @return OrderCombineQueryYopQueryCombineOrderResDTOResult
*/
function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
class OrderCombineQueryResponseUnMarshaller extends BaseResponseUnMarshaller
{
/**
* @var OrderCombineQueryResponseUnMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new OrderCombineQueryResponseUnMarshaller();
}
/**
* @return OrderCombineQueryResponseUnMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @return OrderCombineQueryResponse
*/
protected function getResponseInstance()
{
return new OrderCombineQueryResponse();
}
}
OrderCombineQueryResponseUnMarshaller::__init();

View File

@@ -0,0 +1,671 @@
<?php
/**
* OrderCombineQuerySubOrderInfoDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* OrderCombineQuerySubOrderInfoDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class OrderCombineQuerySubOrderInfoDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'OrderCombineQuerySubOrderInfoDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = [
'merchantNo' => 'string',
'orderId' => 'string',
'uniqueOrderNo' => 'string',
'bankOrderId' => 'string',
'channelOrderId' => 'string',
'orderAmount' => 'float',
'payAmount' => 'float',
'goodsName' => 'string',
'merchantFee' => 'float',
'customerFee' => 'float',
'memo' => 'string',
'status' => 'string',
'payWay' => 'string',
'paySuccessDate' => 'string',
'fundProcessType' => 'string',
'channel' => 'string',
];
/**
* Array of property to format mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerFormats = [
'merchantNo' => null,
'orderId' => null,
'uniqueOrderNo' => null,
'bankOrderId' => null,
'channelOrderId' => null,
'orderAmount' => null,
'payAmount' => null,
'goodsName' => null,
'merchantFee' => null,
'customerFee' => null,
'memo' => null,
'status' => null,
'payWay' => null,
'paySuccessDate' => null,
'fundProcessType' => null,
'channel' => 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 = [
'merchantNo' => 'merchantNo',
'orderId' => 'orderId',
'uniqueOrderNo' => 'uniqueOrderNo',
'bankOrderId' => 'bankOrderId',
'channelOrderId' => 'channelOrderId',
'orderAmount' => 'orderAmount',
'payAmount' => 'payAmount',
'goodsName' => 'goodsName',
'merchantFee' => 'merchantFee',
'customerFee' => 'customerFee',
'memo' => 'memo',
'status' => 'status',
'payWay' => 'payWay',
'paySuccessDate' => 'paySuccessDate',
'fundProcessType' => 'fundProcessType',
'channel' => 'channel',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'merchantNo' => 'setMerchantNo',
'orderId' => 'setOrderId',
'uniqueOrderNo' => 'setUniqueOrderNo',
'bankOrderId' => 'setBankOrderId',
'channelOrderId' => 'setChannelOrderId',
'orderAmount' => 'setOrderAmount',
'payAmount' => 'setPayAmount',
'goodsName' => 'setGoodsName',
'merchantFee' => 'setMerchantFee',
'customerFee' => 'setCustomerFee',
'memo' => 'setMemo',
'status' => 'setStatus',
'payWay' => 'setPayWay',
'paySuccessDate' => 'setPaySuccessDate',
'fundProcessType' => 'setFundProcessType',
'channel' => 'setChannel',
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'merchantNo' => 'getMerchantNo',
'orderId' => 'getOrderId',
'uniqueOrderNo' => 'getUniqueOrderNo',
'bankOrderId' => 'getBankOrderId',
'channelOrderId' => 'getChannelOrderId',
'orderAmount' => 'getOrderAmount',
'payAmount' => 'getPayAmount',
'goodsName' => 'getGoodsName',
'merchantFee' => 'getMerchantFee',
'customerFee' => 'getCustomerFee',
'memo' => 'getMemo',
'status' => 'getStatus',
'payWay' => 'getPayWay',
'paySuccessDate' => 'getPaySuccessDate',
'fundProcessType' => 'getFundProcessType',
'channel' => 'getChannel',
];
/**
* 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['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['bankOrderId'] = isset($data['bankOrderId']) ? $data['bankOrderId'] : null;
$this->container['channelOrderId'] = isset($data['channelOrderId']) ? $data['channelOrderId'] : null;
$this->container['orderAmount'] = isset($data['orderAmount']) ? $data['orderAmount'] : null;
$this->container['payAmount'] = isset($data['payAmount']) ? $data['payAmount'] : null;
$this->container['goodsName'] = isset($data['goodsName']) ? $data['goodsName'] : null;
$this->container['merchantFee'] = isset($data['merchantFee']) ? $data['merchantFee'] : null;
$this->container['customerFee'] = isset($data['customerFee']) ? $data['customerFee'] : null;
$this->container['memo'] = isset($data['memo']) ? $data['memo'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['payWay'] = isset($data['payWay']) ? $data['payWay'] : null;
$this->container['paySuccessDate'] = isset($data['paySuccessDate']) ? $data['paySuccessDate'] : null;
$this->container['fundProcessType'] = isset($data['fundProcessType']) ? $data['fundProcessType'] : null;
$this->container['channel'] = isset($data['channel']) ? $data['channel'] : 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 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 bankOrderId
* @return string
*/
public function getBankOrderId()
{
return $this->container['bankOrderId'];
}
/**
* Sets bankOrderId
* @param string $bankOrderId 银行订单号
* @return $this
*/
public function setBankOrderId($bankOrderId)
{
$this->container['bankOrderId'] = $bankOrderId;
return $this;
}
/**
* Gets channelOrderId
* @return string
*/
public function getChannelOrderId()
{
return $this->container['channelOrderId'];
}
/**
* Sets channelOrderId
* @param string $channelOrderId 渠道订单号
* @return $this
*/
public function setChannelOrderId($channelOrderId)
{
$this->container['channelOrderId'] = $channelOrderId;
return $this;
}
/**
* Gets orderAmount
* @return float
*/
public function getOrderAmount()
{
return $this->container['orderAmount'];
}
/**
* Sets orderAmount
* @param float $orderAmount 订单金额
* @return $this
*/
public function setOrderAmount($orderAmount)
{
$this->container['orderAmount'] = $orderAmount;
return $this;
}
/**
* Gets payAmount
* @return float
*/
public function getPayAmount()
{
return $this->container['payAmount'];
}
/**
* Sets payAmount
* @param float $payAmount 支付金额
* @return $this
*/
public function setPayAmount($payAmount)
{
$this->container['payAmount'] = $payAmount;
return $this;
}
/**
* Gets goodsName
* @return string
*/
public function getGoodsName()
{
return $this->container['goodsName'];
}
/**
* Sets goodsName
* @param string $goodsName 商品描述
* @return $this
*/
public function setGoodsName($goodsName)
{
$this->container['goodsName'] = $goodsName;
return $this;
}
/**
* Gets merchantFee
* @return float
*/
public function getMerchantFee()
{
return $this->container['merchantFee'];
}
/**
* Sets merchantFee
* @param float $merchantFee 商户手续费
* @return $this
*/
public function setMerchantFee($merchantFee)
{
$this->container['merchantFee'] = $merchantFee;
return $this;
}
/**
* Gets customerFee
* @return float
*/
public function getCustomerFee()
{
return $this->container['customerFee'];
}
/**
* Sets customerFee
* @param float $customerFee 用户手续费
* @return $this
*/
public function setCustomerFee($customerFee)
{
$this->container['customerFee'] = $customerFee;
return $this;
}
/**
* Gets memo
* @return string
*/
public function getMemo()
{
return $this->container['memo'];
}
/**
* Sets memo
* @param string $memo 对账备注
* @return $this
*/
public function setMemo($memo)
{
$this->container['memo'] = $memo;
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 payWay
* @return string
*/
public function getPayWay()
{
return $this->container['payWay'];
}
/**
* Sets payWay
* @param string $payWay 支付方式
* @return $this
*/
public function setPayWay($payWay)
{
$this->container['payWay'] = $payWay;
return $this;
}
/**
* Gets paySuccessDate
* @return string
*/
public function getPaySuccessDate()
{
return $this->container['paySuccessDate'];
}
/**
* Sets paySuccessDate
* @param string $paySuccessDate 支付成功时间
* @return $this
*/
public function setPaySuccessDate($paySuccessDate)
{
$this->container['paySuccessDate'] = $paySuccessDate;
return $this;
}
/**
* Gets fundProcessType
* @return string
*/
public function getFundProcessType()
{
return $this->container['fundProcessType'];
}
/**
* Sets fundProcessType
* @param string $fundProcessType 分账标识
* @return $this
*/
public function setFundProcessType($fundProcessType)
{
$this->container['fundProcessType'] = $fundProcessType;
return $this;
}
/**
* Gets channel
* @return string
*/
public function getChannel()
{
return $this->container['channel'];
}
/**
* Sets channel
* @param string $channel 渠道类型
* @return $this
*/
public function setChannel($channel)
{
$this->container['channel'] = $channel;
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));
}
}

View File

@@ -0,0 +1,428 @@
<?php
/**
* OrderCombineQueryYopQueryCombineOrderResDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* OrderCombineQueryYopQueryCombineOrderResDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class OrderCombineQueryYopQueryCombineOrderResDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'OrderCombineQueryYopQueryCombineOrderResDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'parentMerchantNo' => 'string',
'orderId' => 'string',
'token' => 'string',
'subOrderInfoList' => '\Yeepay\Yop\Sdk\Service\Trade\Model\OrderCombineQuerySubOrderInfoDTOResult[]',
'payerInfo' => '\Yeepay\Yop\Sdk\Service\Trade\Model\OrderCombineQueryPayerInfoResult',
];
/**
* Array of property to format mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'parentMerchantNo' => null,
'orderId' => null,
'token' => null,
'subOrderInfoList' => null,
'payerInfo' => 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',
'orderId' => 'orderId',
'token' => 'token',
'subOrderInfoList' => 'subOrderInfoList',
'payerInfo' => 'payerInfo',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'parentMerchantNo' => 'setParentMerchantNo',
'orderId' => 'setOrderId',
'token' => 'setToken',
'subOrderInfoList' => 'setSubOrderInfoList',
'payerInfo' => 'setPayerInfo',
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'parentMerchantNo' => 'getParentMerchantNo',
'orderId' => 'getOrderId',
'token' => 'getToken',
'subOrderInfoList' => 'getSubOrderInfoList',
'payerInfo' => 'getPayerInfo',
];
/**
* 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['orderId'] = isset($data['orderId']) ? $data['orderId'] : null;
$this->container['token'] = isset($data['token']) ? $data['token'] : null;
$this->container['subOrderInfoList'] = isset($data['subOrderInfoList']) ? $data['subOrderInfoList'] : null;
$this->container['payerInfo'] = isset($data['payerInfo']) ? $data['payerInfo'] : 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 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 token
* @return string
*/
public function getToken()
{
return $this->container['token'];
}
/**
* Sets token
* @param string $token 支付token
* @return $this
*/
public function setToken($token)
{
$this->container['token'] = $token;
return $this;
}
/**
* Gets subOrderInfoList
* @return \Yeepay\Yop\Sdk\Service\Trade\Model\OrderCombineQuerySubOrderInfoDTOResult[]
*/
public function getSubOrderInfoList()
{
return $this->container['subOrderInfoList'];
}
/**
* Sets subOrderInfoList
* @param \Yeepay\Yop\Sdk\Service\Trade\Model\OrderCombineQuerySubOrderInfoDTOResult[] $subOrderInfoList 子单信息
* @return $this
*/
public function setSubOrderInfoList($subOrderInfoList)
{
$this->container['subOrderInfoList'] = $subOrderInfoList;
return $this;
}
/**
* Gets payerInfo
* @return \Yeepay\Yop\Sdk\Service\Trade\Model\OrderCombineQueryPayerInfoResult
*/
public function getPayerInfo()
{
return $this->container['payerInfo'];
}
/**
* Sets payerInfo
* @param \Yeepay\Yop\Sdk\Service\Trade\Model\OrderCombineQueryPayerInfoResult $payerInfo 付款方信息
* @return $this
*/
public function setPayerInfo($payerInfo)
{
$this->container['payerInfo'] = $payerInfo;
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));
}
}

View File

@@ -0,0 +1,482 @@
<?php
/**
* OrderQueryChannelPromotionInfoDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* OrderQueryChannelPromotionInfoDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class OrderQueryChannelPromotionInfoDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'OrderQueryChannelPromotionInfoDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = [
'promotionId' => 'string',
'promotionName' => 'string',
'promotionScope' => 'string',
'amount' => 'float',
'activityId' => 'string',
'channelContribute' => 'string',
'merchantContribute' => 'string',
'otherContribute' => 'string',
'memo' => 'string',
];
/**
* Array of property to format mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerFormats = [
'promotionId' => null,
'promotionName' => null,
'promotionScope' => null,
'amount' => null,
'activityId' => null,
'channelContribute' => null,
'merchantContribute' => null,
'otherContribute' => null,
'memo' => 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 = [
'promotionId' => 'promotionId',
'promotionName' => 'promotionName',
'promotionScope' => 'promotionScope',
'amount' => 'amount',
'activityId' => 'activityId',
'channelContribute' => 'channelContribute',
'merchantContribute' => 'merchantContribute',
'otherContribute' => 'otherContribute',
'memo' => 'memo',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'promotionId' => 'setPromotionId',
'promotionName' => 'setPromotionName',
'promotionScope' => 'setPromotionScope',
'amount' => 'setAmount',
'activityId' => 'setActivityId',
'channelContribute' => 'setChannelContribute',
'merchantContribute' => 'setMerchantContribute',
'otherContribute' => 'setOtherContribute',
'memo' => 'setMemo',
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'promotionId' => 'getPromotionId',
'promotionName' => 'getPromotionName',
'promotionScope' => 'getPromotionScope',
'amount' => 'getAmount',
'activityId' => 'getActivityId',
'channelContribute' => 'getChannelContribute',
'merchantContribute' => 'getMerchantContribute',
'otherContribute' => 'getOtherContribute',
'memo' => 'getMemo',
];
/**
* 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['promotionId'] = isset($data['promotionId']) ? $data['promotionId'] : null;
$this->container['promotionName'] = isset($data['promotionName']) ? $data['promotionName'] : null;
$this->container['promotionScope'] = isset($data['promotionScope']) ? $data['promotionScope'] : null;
$this->container['amount'] = isset($data['amount']) ? $data['amount'] : null;
$this->container['activityId'] = isset($data['activityId']) ? $data['activityId'] : null;
$this->container['channelContribute'] = isset($data['channelContribute']) ? $data['channelContribute'] : null;
$this->container['merchantContribute'] = isset($data['merchantContribute']) ? $data['merchantContribute'] : null;
$this->container['otherContribute'] = isset($data['otherContribute']) ? $data['otherContribute'] : null;
$this->container['memo'] = isset($data['memo']) ? $data['memo'] : 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 promotionId
* @return string
*/
public function getPromotionId()
{
return $this->container['promotionId'];
}
/**
* Sets promotionId
* @param string $promotionId 优惠券编码
* @return $this
*/
public function setPromotionId($promotionId)
{
$this->container['promotionId'] = $promotionId;
return $this;
}
/**
* Gets promotionName
* @return string
*/
public function getPromotionName()
{
return $this->container['promotionName'];
}
/**
* Sets promotionName
* @param string $promotionName 优惠券名称
* @return $this
*/
public function setPromotionName($promotionName)
{
$this->container['promotionName'] = $promotionName;
return $this;
}
/**
* Gets promotionScope
* @return string
*/
public function getPromotionScope()
{
return $this->container['promotionScope'];
}
/**
* Sets promotionScope
* @param string $promotionScope 优惠券范围
* @return $this
*/
public function setPromotionScope($promotionScope)
{
$this->container['promotionScope'] = $promotionScope;
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;
}
/**
* Gets activityId
* @return string
*/
public function getActivityId()
{
return $this->container['activityId'];
}
/**
* Sets activityId
* @param string $activityId 优惠券活动id
* @return $this
*/
public function setActivityId($activityId)
{
$this->container['activityId'] = $activityId;
return $this;
}
/**
* Gets channelContribute
* @return string
*/
public function getChannelContribute()
{
return $this->container['channelContribute'];
}
/**
* Sets channelContribute
* @param string $channelContribute 渠道出资
* @return $this
*/
public function setChannelContribute($channelContribute)
{
$this->container['channelContribute'] = $channelContribute;
return $this;
}
/**
* Gets merchantContribute
* @return string
*/
public function getMerchantContribute()
{
return $this->container['merchantContribute'];
}
/**
* Sets merchantContribute
* @param string $merchantContribute 商户出资
* @return $this
*/
public function setMerchantContribute($merchantContribute)
{
$this->container['merchantContribute'] = $merchantContribute;
return $this;
}
/**
* Gets otherContribute
* @return string
*/
public function getOtherContribute()
{
return $this->container['otherContribute'];
}
/**
* Sets otherContribute
* @param string $otherContribute 其他出资
* @return $this
*/
public function setOtherContribute($otherContribute)
{
$this->container['otherContribute'] = $otherContribute;
return $this;
}
/**
* Gets memo
* @return string
*/
public function getMemo()
{
return $this->container['memo'];
}
/**
* Sets memo
* @param string $memo 备注信息
* @return $this
*/
public function setMemo($memo)
{
$this->container['memo'] = $memo;
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));
}
}

View File

@@ -0,0 +1,456 @@
<?php
/**
* OrderQueryPayerInfoResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* OrderQueryPayerInfoResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @description &lt;span style&#x3D;\&quot;caret-color: #333333; color: #333333; font-family: Arial, sans-serif;\&quot;&gt;付款信息&lt;/span&gt;
* @link https://github.com/swagger-api/swagger-codegen
*/
class OrderQueryPayerInfoResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'OrderQueryPayerInfoResult';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = [
'bankId' => 'string',
'accountName' => 'string',
'bankCardNo' => 'string',
'mobilePhoneNo' => 'string',
'cardType' => 'string',
'userID' => 'string',
'unionID' => 'string',
'buyerLogonId' => 'string',
];
/**
* Array of property to format mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerFormats = [
'bankId' => null,
'accountName' => null,
'bankCardNo' => null,
'mobilePhoneNo' => null,
'cardType' => null,
'userID' => null,
'unionID' => null,
'buyerLogonId' => 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 = [
'bankId' => 'bankId',
'accountName' => 'accountName',
'bankCardNo' => 'bankCardNo',
'mobilePhoneNo' => 'mobilePhoneNo',
'cardType' => 'cardType',
'userID' => 'userID',
'unionID' => 'unionID',
'buyerLogonId' => 'buyerLogonId',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'bankId' => 'setBankId',
'accountName' => 'setAccountName',
'bankCardNo' => 'setBankCardNo',
'mobilePhoneNo' => 'setMobilePhoneNo',
'cardType' => 'setCardType',
'userID' => 'setUserID',
'unionID' => 'setUnionID',
'buyerLogonId' => 'setBuyerLogonId',
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'bankId' => 'getBankId',
'accountName' => 'getAccountName',
'bankCardNo' => 'getBankCardNo',
'mobilePhoneNo' => 'getMobilePhoneNo',
'cardType' => 'getCardType',
'userID' => 'getUserID',
'unionID' => 'getUnionID',
'buyerLogonId' => 'getBuyerLogonId',
];
/**
* 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['bankId'] = isset($data['bankId']) ? $data['bankId'] : null;
$this->container['accountName'] = isset($data['accountName']) ? $data['accountName'] : null;
$this->container['bankCardNo'] = isset($data['bankCardNo']) ? $data['bankCardNo'] : null;
$this->container['mobilePhoneNo'] = isset($data['mobilePhoneNo']) ? $data['mobilePhoneNo'] : null;
$this->container['cardType'] = isset($data['cardType']) ? $data['cardType'] : null;
$this->container['userID'] = isset($data['userID']) ? $data['userID'] : null;
$this->container['unionID'] = isset($data['unionID']) ? $data['unionID'] : null;
$this->container['buyerLogonId'] = isset($data['buyerLogonId']) ? $data['buyerLogonId'] : 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 bankId
* @return string
*/
public function getBankId()
{
return $this->container['bankId'];
}
/**
* Sets bankId
* @param string $bankId 银行编号
* @return $this
*/
public function setBankId($bankId)
{
$this->container['bankId'] = $bankId;
return $this;
}
/**
* Gets accountName
* @return string
*/
public function getAccountName()
{
return $this->container['accountName'];
}
/**
* Sets accountName
* @param string $accountName 账户名称
* @return $this
*/
public function setAccountName($accountName)
{
$this->container['accountName'] = $accountName;
return $this;
}
/**
* Gets bankCardNo
* @return string
*/
public function getBankCardNo()
{
return $this->container['bankCardNo'];
}
/**
* Sets bankCardNo
* @param string $bankCardNo 银行卡号
* @return $this
*/
public function setBankCardNo($bankCardNo)
{
$this->container['bankCardNo'] = $bankCardNo;
return $this;
}
/**
* Gets mobilePhoneNo
* @return string
*/
public function getMobilePhoneNo()
{
return $this->container['mobilePhoneNo'];
}
/**
* Sets mobilePhoneNo
* @param string $mobilePhoneNo 手机号
* @return $this
*/
public function setMobilePhoneNo($mobilePhoneNo)
{
$this->container['mobilePhoneNo'] = $mobilePhoneNo;
return $this;
}
/**
* Gets cardType
* @return string
*/
public function getCardType()
{
return $this->container['cardType'];
}
/**
* Sets cardType
* @param string $cardType 卡类型
* @return $this
*/
public function setCardType($cardType)
{
$this->container['cardType'] = $cardType;
return $this;
}
/**
* Gets userID
* @return string
*/
public function getUserID()
{
return $this->container['userID'];
}
/**
* Sets userID
* @param string $userID 用户ID
* @return $this
*/
public function setUserID($userID)
{
$this->container['userID'] = $userID;
return $this;
}
/**
* Gets unionID
* @return string
*/
public function getUnionID()
{
return $this->container['unionID'];
}
/**
* Sets unionID
* @param string $unionID unionID
* @return $this
*/
public function setUnionID($unionID)
{
$this->container['unionID'] = $unionID;
return $this;
}
/**
* Gets buyerLogonId
* @return string
*/
public function getBuyerLogonId()
{
return $this->container['buyerLogonId'];
}
/**
* Sets buyerLogonId
* @param string $buyerLogonId 支付宝买家登录账号
* @return $this
*/
public function setBuyerLogonId($buyerLogonId)
{
$this->container['buyerLogonId'] = $buyerLogonId;
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));
}
}

View File

@@ -0,0 +1,93 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseRequest;
class OrderQueryRequest extends BaseRequest
{
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $orderId;
/**
* Gets parentMerchantNo
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
* @param string $parentMerchantNo
* @return OrderQueryRequest
*/
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 OrderQueryRequest
*/
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 OrderQueryRequest
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
return $this;
}
public static function getOperationId()
{
return 'orderQuery';
}
}

View File

@@ -0,0 +1,76 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\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 OrderQueryRequestMarshaller implements RequestMarshaller
{
/**
* @var OrderQueryRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new OrderQueryRequestMarshaller();
}
/**
* @return OrderQueryRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Trade';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/trade/order/query';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param OrderQueryRequest $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;
}
}
OrderQueryRequestMarshaller::__init();

View File

@@ -0,0 +1,36 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseResponse;
class OrderQueryResponse extends BaseResponse
{
/**
* @var OrderQueryYopQueryOrderResDTOResult
*/
private $result;
function getResultClass()
{
return '\Yeepay\Yop\Sdk\Service\Trade\Model\OrderQueryYopQueryOrderResDTOResult';
}
/**
* @param OrderQueryYopQueryOrderResDTOResult $result
*/
function setResult($result)
{
$this->result = $result;
}
/**
* @return OrderQueryYopQueryOrderResDTOResult
*/
function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
class OrderQueryResponseUnMarshaller extends BaseResponseUnMarshaller
{
/**
* @var OrderQueryResponseUnMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new OrderQueryResponseUnMarshaller();
}
/**
* @return OrderQueryResponseUnMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @return OrderQueryResponse
*/
protected function getResponseInstance()
{
return new OrderQueryResponse();
}
}
OrderQueryResponseUnMarshaller::__init();

View File

@@ -0,0 +1,860 @@
<?php
/**
* OrderQueryYopQueryOrderResDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* OrderQueryYopQueryOrderResDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class OrderQueryYopQueryOrderResDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'OrderQueryYopQueryOrderResDTOResult';
/**
* 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',
'uniqueOrderNo' => 'string',
'status' => 'string',
'orderAmount' => 'float',
'payAmount' => 'float',
'merchantFee' => 'float',
'customerFee' => 'float',
'paySuccessDate' => 'string',
'memo' => 'string',
'payWay' => 'string',
'token' => 'string',
'fundProcessType' => 'string',
'bankOrderId' => 'string',
'channelOrderId' => 'string',
'channel' => 'string',
'realPayAmount' => 'float',
'payerInfo' => '\Yeepay\Yop\Sdk\Service\Trade\Model\OrderQueryPayerInfoResult',
'channelPromotionInfo' => '\Yeepay\Yop\Sdk\Service\Trade\Model\OrderQueryChannelPromotionInfoDTOResult[]',
'ypPromotionInfo' => '\Yeepay\Yop\Sdk\Service\Trade\Model\OrderQueryYpPromotionInfoDTOResult[]',
];
/**
* 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,
'uniqueOrderNo' => null,
'status' => null,
'orderAmount' => null,
'payAmount' => null,
'merchantFee' => null,
'customerFee' => null,
'paySuccessDate' => null,
'memo' => null,
'payWay' => null,
'token' => null,
'fundProcessType' => null,
'bankOrderId' => null,
'channelOrderId' => null,
'channel' => null,
'realPayAmount' => null,
'payerInfo' => null,
'channelPromotionInfo' => null,
'ypPromotionInfo' => 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',
'uniqueOrderNo' => 'uniqueOrderNo',
'status' => 'status',
'orderAmount' => 'orderAmount',
'payAmount' => 'payAmount',
'merchantFee' => 'merchantFee',
'customerFee' => 'customerFee',
'paySuccessDate' => 'paySuccessDate',
'memo' => 'memo',
'payWay' => 'payWay',
'token' => 'token',
'fundProcessType' => 'fundProcessType',
'bankOrderId' => 'bankOrderId',
'channelOrderId' => 'channelOrderId',
'channel' => 'channel',
'realPayAmount' => 'realPayAmount',
'payerInfo' => 'payerInfo',
'channelPromotionInfo' => 'channelPromotionInfo',
'ypPromotionInfo' => 'ypPromotionInfo',
];
/**
* 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',
'uniqueOrderNo' => 'setUniqueOrderNo',
'status' => 'setStatus',
'orderAmount' => 'setOrderAmount',
'payAmount' => 'setPayAmount',
'merchantFee' => 'setMerchantFee',
'customerFee' => 'setCustomerFee',
'paySuccessDate' => 'setPaySuccessDate',
'memo' => 'setMemo',
'payWay' => 'setPayWay',
'token' => 'setToken',
'fundProcessType' => 'setFundProcessType',
'bankOrderId' => 'setBankOrderId',
'channelOrderId' => 'setChannelOrderId',
'channel' => 'setChannel',
'realPayAmount' => 'setRealPayAmount',
'payerInfo' => 'setPayerInfo',
'channelPromotionInfo' => 'setChannelPromotionInfo',
'ypPromotionInfo' => 'setYpPromotionInfo',
];
/**
* 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',
'uniqueOrderNo' => 'getUniqueOrderNo',
'status' => 'getStatus',
'orderAmount' => 'getOrderAmount',
'payAmount' => 'getPayAmount',
'merchantFee' => 'getMerchantFee',
'customerFee' => 'getCustomerFee',
'paySuccessDate' => 'getPaySuccessDate',
'memo' => 'getMemo',
'payWay' => 'getPayWay',
'token' => 'getToken',
'fundProcessType' => 'getFundProcessType',
'bankOrderId' => 'getBankOrderId',
'channelOrderId' => 'getChannelOrderId',
'channel' => 'getChannel',
'realPayAmount' => 'getRealPayAmount',
'payerInfo' => 'getPayerInfo',
'channelPromotionInfo' => 'getChannelPromotionInfo',
'ypPromotionInfo' => 'getYpPromotionInfo',
];
/**
* 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['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['orderAmount'] = isset($data['orderAmount']) ? $data['orderAmount'] : null;
$this->container['payAmount'] = isset($data['payAmount']) ? $data['payAmount'] : null;
$this->container['merchantFee'] = isset($data['merchantFee']) ? $data['merchantFee'] : null;
$this->container['customerFee'] = isset($data['customerFee']) ? $data['customerFee'] : null;
$this->container['paySuccessDate'] = isset($data['paySuccessDate']) ? $data['paySuccessDate'] : null;
$this->container['memo'] = isset($data['memo']) ? $data['memo'] : null;
$this->container['payWay'] = isset($data['payWay']) ? $data['payWay'] : null;
$this->container['token'] = isset($data['token']) ? $data['token'] : null;
$this->container['fundProcessType'] = isset($data['fundProcessType']) ? $data['fundProcessType'] : null;
$this->container['bankOrderId'] = isset($data['bankOrderId']) ? $data['bankOrderId'] : null;
$this->container['channelOrderId'] = isset($data['channelOrderId']) ? $data['channelOrderId'] : null;
$this->container['channel'] = isset($data['channel']) ? $data['channel'] : null;
$this->container['realPayAmount'] = isset($data['realPayAmount']) ? $data['realPayAmount'] : null;
$this->container['payerInfo'] = isset($data['payerInfo']) ? $data['payerInfo'] : null;
$this->container['channelPromotionInfo'] = isset($data['channelPromotionInfo']) ? $data['channelPromotionInfo'] : null;
$this->container['ypPromotionInfo'] = isset($data['ypPromotionInfo']) ? $data['ypPromotionInfo'] : 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 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 orderAmount
* @return float
*/
public function getOrderAmount()
{
return $this->container['orderAmount'];
}
/**
* Sets orderAmount
* @param float $orderAmount 订单金额
* @return $this
*/
public function setOrderAmount($orderAmount)
{
$this->container['orderAmount'] = $orderAmount;
return $this;
}
/**
* Gets payAmount
* @return float
*/
public function getPayAmount()
{
return $this->container['payAmount'];
}
/**
* Sets payAmount
* @param float $payAmount 支付金额
* @return $this
*/
public function setPayAmount($payAmount)
{
$this->container['payAmount'] = $payAmount;
return $this;
}
/**
* Gets merchantFee
* @return float
*/
public function getMerchantFee()
{
return $this->container['merchantFee'];
}
/**
* Sets merchantFee
* @param float $merchantFee 商户手续费
* @return $this
*/
public function setMerchantFee($merchantFee)
{
$this->container['merchantFee'] = $merchantFee;
return $this;
}
/**
* Gets customerFee
* @return float
*/
public function getCustomerFee()
{
return $this->container['customerFee'];
}
/**
* Sets customerFee
* @param float $customerFee 用户手续费
* @return $this
*/
public function setCustomerFee($customerFee)
{
$this->container['customerFee'] = $customerFee;
return $this;
}
/**
* Gets paySuccessDate
* @return string
*/
public function getPaySuccessDate()
{
return $this->container['paySuccessDate'];
}
/**
* Sets paySuccessDate
* @param string $paySuccessDate 支付成功时间
* @return $this
*/
public function setPaySuccessDate($paySuccessDate)
{
$this->container['paySuccessDate'] = $paySuccessDate;
return $this;
}
/**
* Gets memo
* @return string
*/
public function getMemo()
{
return $this->container['memo'];
}
/**
* Sets memo
* @param string $memo 对账备注
* @return $this
*/
public function setMemo($memo)
{
$this->container['memo'] = $memo;
return $this;
}
/**
* Gets payWay
* @return string
*/
public function getPayWay()
{
return $this->container['payWay'];
}
/**
* Sets payWay
* @param string $payWay 支付方式
* @return $this
*/
public function setPayWay($payWay)
{
$this->container['payWay'] = $payWay;
return $this;
}
/**
* Gets token
* @return string
*/
public function getToken()
{
return $this->container['token'];
}
/**
* Sets token
* @param string $token token
* @return $this
*/
public function setToken($token)
{
$this->container['token'] = $token;
return $this;
}
/**
* Gets fundProcessType
* @return string
*/
public function getFundProcessType()
{
return $this->container['fundProcessType'];
}
/**
* Sets fundProcessType
* @param string $fundProcessType 分账都订单标识
* @return $this
*/
public function setFundProcessType($fundProcessType)
{
$this->container['fundProcessType'] = $fundProcessType;
return $this;
}
/**
* Gets bankOrderId
* @return string
*/
public function getBankOrderId()
{
return $this->container['bankOrderId'];
}
/**
* Sets bankOrderId
* @param string $bankOrderId 银行订单号
* @return $this
*/
public function setBankOrderId($bankOrderId)
{
$this->container['bankOrderId'] = $bankOrderId;
return $this;
}
/**
* Gets channelOrderId
* @return string
*/
public function getChannelOrderId()
{
return $this->container['channelOrderId'];
}
/**
* Sets channelOrderId
* @param string $channelOrderId 渠道订单号
* @return $this
*/
public function setChannelOrderId($channelOrderId)
{
$this->container['channelOrderId'] = $channelOrderId;
return $this;
}
/**
* Gets channel
* @return string
*/
public function getChannel()
{
return $this->container['channel'];
}
/**
* Sets channel
* @param string $channel 渠道类型
* @return $this
*/
public function setChannel($channel)
{
$this->container['channel'] = $channel;
return $this;
}
/**
* Gets realPayAmount
* @return float
*/
public function getRealPayAmount()
{
return $this->container['realPayAmount'];
}
/**
* Sets realPayAmount
* @param float $realPayAmount 用户实际支付金额
* @return $this
*/
public function setRealPayAmount($realPayAmount)
{
$this->container['realPayAmount'] = $realPayAmount;
return $this;
}
/**
* Gets payerInfo
* @return \Yeepay\Yop\Sdk\Service\Trade\Model\OrderQueryPayerInfoResult
*/
public function getPayerInfo()
{
return $this->container['payerInfo'];
}
/**
* Sets payerInfo
* @param \Yeepay\Yop\Sdk\Service\Trade\Model\OrderQueryPayerInfoResult $payerInfo 付款信息
* @return $this
*/
public function setPayerInfo($payerInfo)
{
$this->container['payerInfo'] = $payerInfo;
return $this;
}
/**
* Gets channelPromotionInfo
* @return \Yeepay\Yop\Sdk\Service\Trade\Model\OrderQueryChannelPromotionInfoDTOResult[]
*/
public function getChannelPromotionInfo()
{
return $this->container['channelPromotionInfo'];
}
/**
* Sets channelPromotionInfo
* @param \Yeepay\Yop\Sdk\Service\Trade\Model\OrderQueryChannelPromotionInfoDTOResult[] $channelPromotionInfo 渠道侧优惠列表
* @return $this
*/
public function setChannelPromotionInfo($channelPromotionInfo)
{
$this->container['channelPromotionInfo'] = $channelPromotionInfo;
return $this;
}
/**
* Gets ypPromotionInfo
* @return \Yeepay\Yop\Sdk\Service\Trade\Model\OrderQueryYpPromotionInfoDTOResult[]
*/
public function getYpPromotionInfo()
{
return $this->container['ypPromotionInfo'];
}
/**
* Sets ypPromotionInfo
* @param \Yeepay\Yop\Sdk\Service\Trade\Model\OrderQueryYpPromotionInfoDTOResult[] $ypPromotionInfo 易宝优惠列表
* @return $this
*/
public function setYpPromotionInfo($ypPromotionInfo)
{
$this->container['ypPromotionInfo'] = $ypPromotionInfo;
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));
}
}

View File

@@ -0,0 +1,347 @@
<?php
/**
* OrderQueryYpPromotionInfoDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* OrderQueryYpPromotionInfoDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class OrderQueryYpPromotionInfoDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'OrderQueryYpPromotionInfoDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = [
'marketNo' => 'string',
'type' => 'string',
'amount' => 'string',
'contributeMerchant' => 'string',
];
/**
* Array of property to format mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerFormats = [
'marketNo' => null,
'type' => null,
'amount' => null,
'contributeMerchant' => 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 = [
'marketNo' => 'marketNo',
'type' => 'type',
'amount' => 'amount',
'contributeMerchant' => 'contributeMerchant',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'marketNo' => 'setMarketNo',
'type' => 'setType',
'amount' => 'setAmount',
'contributeMerchant' => 'setContributeMerchant',
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'marketNo' => 'getMarketNo',
'type' => 'getType',
'amount' => 'getAmount',
'contributeMerchant' => 'getContributeMerchant',
];
/**
* 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['marketNo'] = isset($data['marketNo']) ? $data['marketNo'] : null;
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
$this->container['amount'] = isset($data['amount']) ? $data['amount'] : null;
$this->container['contributeMerchant'] = isset($data['contributeMerchant']) ? $data['contributeMerchant'] : 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 marketNo
* @return string
*/
public function getMarketNo()
{
return $this->container['marketNo'];
}
/**
* Sets marketNo
* @param string $marketNo 活动编号
* @return $this
*/
public function setMarketNo($marketNo)
{
$this->container['marketNo'] = $marketNo;
return $this;
}
/**
* Gets type
* @return string
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
* @param string $type 活动类型
* @return $this
*/
public function setType($type)
{
$this->container['type'] = $type;
return $this;
}
/**
* Gets amount
* @return string
*/
public function getAmount()
{
return $this->container['amount'];
}
/**
* Sets amount
* @param string $amount 活动金额
* @return $this
*/
public function setAmount($amount)
{
$this->container['amount'] = $amount;
return $this;
}
/**
* Gets contributeMerchant
* @return string
*/
public function getContributeMerchant()
{
return $this->container['contributeMerchant'];
}
/**
* Sets contributeMerchant
* @param string $contributeMerchant 出资方商编
* @return $this
*/
public function setContributeMerchant($contributeMerchant)
{
$this->container['contributeMerchant'] = $contributeMerchant;
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));
}
}

View File

@@ -0,0 +1,353 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseRequest;
class OrderRequest extends BaseRequest
{
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $orderId;
/**
* @var string
*/
private $orderAmount;
/**
* @var string
*/
private $goodsName;
/**
* @var string
*/
private $fundProcessType;
/**
* @var string
*/
private $notifyUrl;
/**
* @var string
*/
private $memo;
/**
* @var string
*/
private $subOrderDetail;
/**
* @var string
*/
private $expiredTime;
/**
* @var string
*/
private $redirectUrl;
/**
* @var string
*/
private $csUrl;
/**
* @var string
*/
private $businessInfo;
/**
* Gets parentMerchantNo
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
* @param string $parentMerchantNo
* @return OrderRequest
*/
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 OrderRequest
*/
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 OrderRequest
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
return $this;
}
/**
* Gets orderAmount
* @return string
*/
public function getOrderAmount()
{
return $this->orderAmount;
}
/**
* Sets orderAmount
* @param string $orderAmount
* @return OrderRequest
*/
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 OrderRequest
*/
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 OrderRequest
*/
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 OrderRequest
*/
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 OrderRequest
*/
public function setMemo($memo)
{
$this->memo = $memo;
return $this;
}
/**
* Gets subOrderDetail
* @return string
*/
public function getSubOrderDetail()
{
return $this->subOrderDetail;
}
/**
* Sets subOrderDetail
* @param string $subOrderDetail
* @return OrderRequest
*/
public function setSubOrderDetail($subOrderDetail)
{
$this->subOrderDetail = $subOrderDetail;
return $this;
}
/**
* Gets expiredTime
* @return string
*/
public function getExpiredTime()
{
return $this->expiredTime;
}
/**
* Sets expiredTime
* @param string $expiredTime
* @return OrderRequest
*/
public function setExpiredTime($expiredTime)
{
$this->expiredTime = $expiredTime;
return $this;
}
/**
* Gets redirectUrl
* @return string
*/
public function getRedirectUrl()
{
return $this->redirectUrl;
}
/**
* Sets redirectUrl
* @param string $redirectUrl
* @return OrderRequest
*/
public function setRedirectUrl($redirectUrl)
{
$this->redirectUrl = $redirectUrl;
return $this;
}
/**
* Gets csUrl
* @return string
*/
public function getCsUrl()
{
return $this->csUrl;
}
/**
* Sets csUrl
* @param string $csUrl
* @return OrderRequest
*/
public function setCsUrl($csUrl)
{
$this->csUrl = $csUrl;
return $this;
}
/**
* Gets businessInfo
* @return string
*/
public function getBusinessInfo()
{
return $this->businessInfo;
}
/**
* Sets businessInfo
* @param string $businessInfo
* @return OrderRequest
*/
public function setBusinessInfo($businessInfo)
{
$this->businessInfo = $businessInfo;
return $this;
}
public static function getOperationId()
{
return 'order';
}
}

View File

@@ -0,0 +1,129 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\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 OrderRequestMarshaller implements RequestMarshaller
{
/**
* @var OrderRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new OrderRequestMarshaller();
}
/**
* @return OrderRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Trade';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/trade/order';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param OrderRequest $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(), 'string'));
}
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'));
}
if ($request->getMemo() != null) {
$internalRequest->addParameter('memo',
ObjectSerializer::sanitizeForSerialization($request->getMemo(), 'string'));
}
if ($request->getSubOrderDetail() != null) {
$internalRequest->addParameter('subOrderDetail',
ObjectSerializer::sanitizeForSerialization($request->getSubOrderDetail(), 'string'));
}
if ($request->getExpiredTime() != null) {
$internalRequest->addParameter('expiredTime',
ObjectSerializer::sanitizeForSerialization($request->getExpiredTime(), 'string'));
}
if ($request->getRedirectUrl() != null) {
$internalRequest->addParameter('redirectUrl',
ObjectSerializer::sanitizeForSerialization($request->getRedirectUrl(), 'string'));
}
if ($request->getCsUrl() != null) {
$internalRequest->addParameter('csUrl',
ObjectSerializer::sanitizeForSerialization($request->getCsUrl(), 'string'));
}
if ($request->getBusinessInfo() != null) {
$internalRequest->addParameter('businessInfo',
ObjectSerializer::sanitizeForSerialization($request->getBusinessInfo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
OrderRequestMarshaller::__init();

View File

@@ -0,0 +1,36 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseResponse;
class OrderResponse extends BaseResponse
{
/**
* @var OrderYopCreateOrderV2ResDTOResult
*/
private $result;
function getResultClass()
{
return '\Yeepay\Yop\Sdk\Service\Trade\Model\OrderYopCreateOrderV2ResDTOResult';
}
/**
* @param OrderYopCreateOrderV2ResDTOResult $result
*/
function setResult($result)
{
$this->result = $result;
}
/**
* @return OrderYopCreateOrderV2ResDTOResult
*/
function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
class OrderResponseUnMarshaller extends BaseResponseUnMarshaller
{
/**
* @var OrderResponseUnMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new OrderResponseUnMarshaller();
}
/**
* @return OrderResponseUnMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @return OrderResponse
*/
protected function getResponseInstance()
{
return new OrderResponse();
}
}
OrderResponseUnMarshaller::__init();

View File

@@ -0,0 +1,482 @@
<?php
/**
* OrderYopCreateOrderV2ResDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* OrderYopCreateOrderV2ResDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class OrderYopCreateOrderV2ResDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'OrderYopCreateOrderV2ResDTOResult';
/**
* 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',
'uniqueOrderNo' => 'string',
'token' => 'string',
'orderAmount' => 'float',
'subOrderInfoList' => '\Yeepay\Yop\Sdk\Service\Trade\Model\OrderYopSubOrderDetailDTOResult[]',
];
/**
* 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,
'uniqueOrderNo' => null,
'token' => null,
'orderAmount' => null,
'subOrderInfoList' => 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',
'uniqueOrderNo' => 'uniqueOrderNo',
'token' => 'token',
'orderAmount' => 'orderAmount',
'subOrderInfoList' => 'subOrderInfoList',
];
/**
* 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',
'uniqueOrderNo' => 'setUniqueOrderNo',
'token' => 'setToken',
'orderAmount' => 'setOrderAmount',
'subOrderInfoList' => 'setSubOrderInfoList',
];
/**
* 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',
'uniqueOrderNo' => 'getUniqueOrderNo',
'token' => 'getToken',
'orderAmount' => 'getOrderAmount',
'subOrderInfoList' => 'getSubOrderInfoList',
];
/**
* 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['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
$this->container['token'] = isset($data['token']) ? $data['token'] : null;
$this->container['orderAmount'] = isset($data['orderAmount']) ? $data['orderAmount'] : null;
$this->container['subOrderInfoList'] = isset($data['subOrderInfoList']) ? $data['subOrderInfoList'] : 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 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 token
* @return string
*/
public function getToken()
{
return $this->container['token'];
}
/**
* Sets token
* @param string $token token
* @return $this
*/
public function setToken($token)
{
$this->container['token'] = $token;
return $this;
}
/**
* Gets orderAmount
* @return float
*/
public function getOrderAmount()
{
return $this->container['orderAmount'];
}
/**
* Sets orderAmount
* @param float $orderAmount 订单金额
* @return $this
*/
public function setOrderAmount($orderAmount)
{
$this->container['orderAmount'] = $orderAmount;
return $this;
}
/**
* Gets subOrderInfoList
* @return \Yeepay\Yop\Sdk\Service\Trade\Model\OrderYopSubOrderDetailDTOResult[]
*/
public function getSubOrderInfoList()
{
return $this->container['subOrderInfoList'];
}
/**
* Sets subOrderInfoList
* @param \Yeepay\Yop\Sdk\Service\Trade\Model\OrderYopSubOrderDetailDTOResult[] $subOrderInfoList 子单域信息
* @return $this
*/
public function setSubOrderInfoList($subOrderInfoList)
{
$this->container['subOrderInfoList'] = $subOrderInfoList;
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));
}
}

View File

@@ -0,0 +1,347 @@
<?php
/**
* OrderYopSubOrderDetailDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* OrderYopSubOrderDetailDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class OrderYopSubOrderDetailDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'OrderYopSubOrderDetailDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = [
'merchantNo' => 'string',
'orderId' => 'string',
'uniqueOrderNo' => 'string',
'orderAmount' => 'float',
];
/**
* Array of property to format mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerFormats = [
'merchantNo' => null,
'orderId' => null,
'uniqueOrderNo' => null,
'orderAmount' => 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 = [
'merchantNo' => 'merchantNo',
'orderId' => 'orderId',
'uniqueOrderNo' => 'uniqueOrderNo',
'orderAmount' => 'orderAmount',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'merchantNo' => 'setMerchantNo',
'orderId' => 'setOrderId',
'uniqueOrderNo' => 'setUniqueOrderNo',
'orderAmount' => 'setOrderAmount',
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'merchantNo' => 'getMerchantNo',
'orderId' => 'getOrderId',
'uniqueOrderNo' => 'getUniqueOrderNo',
'orderAmount' => 'getOrderAmount',
];
/**
* 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['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['orderAmount'] = isset($data['orderAmount']) ? $data['orderAmount'] : 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 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 orderAmount
* @return float
*/
public function getOrderAmount()
{
return $this->container['orderAmount'];
}
/**
* Sets orderAmount
* @param float $orderAmount 订单金额
* @return $this
*/
public function setOrderAmount($orderAmount)
{
$this->container['orderAmount'] = $orderAmount;
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));
}
}

View File

@@ -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.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\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));
}
}

View File

@@ -0,0 +1,93 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseRequest;
class ReceiptDownloadRequest extends BaseRequest
{
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $orderId;
/**
* 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 orderId
* @return string
*/
public function getOrderId()
{
return $this->orderId;
}
/**
* Sets orderId
* @param string $orderId
* @return ReceiptDownloadRequest
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
return $this;
}
public static function getOperationId()
{
return 'receiptDownload';
}
}

View File

@@ -0,0 +1,76 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\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 = 'Trade';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/yos/v1.0/trade/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();

View File

@@ -0,0 +1,36 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseResponse;
class ReceiptDownloadResponse extends BaseResponse
{
/**
* @var ReceiptDownloadReceiptResponseDTOResult
*/
private $result;
function getResultClass()
{
return '\Yeepay\Yop\Sdk\Service\Trade\Model\ReceiptDownloadReceiptResponseDTOResult';
}
/**
* @param ReceiptDownloadReceiptResponseDTOResult $result
*/
function setResult($result)
{
$this->result = $result;
}
/**
* @return ReceiptDownloadReceiptResponseDTOResult
*/
function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\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();

View File

@@ -0,0 +1,119 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseRequest;
class RefundEndRequest extends BaseRequest
{
/**
* @var string
*/
private $orderId;
/**
* @var string
*/
private $refundRequestId;
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets orderId
* @return string
*/
public function getOrderId()
{
return $this->orderId;
}
/**
* Sets orderId
* @param string $orderId
* @return RefundEndRequest
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
return $this;
}
/**
* Gets refundRequestId
* @return string
*/
public function getRefundRequestId()
{
return $this->refundRequestId;
}
/**
* Sets refundRequestId
* @param string $refundRequestId
* @return RefundEndRequest
*/
public function setRefundRequestId($refundRequestId)
{
$this->refundRequestId = $refundRequestId;
return $this;
}
/**
* Gets parentMerchantNo
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
* @param string $parentMerchantNo
* @return RefundEndRequest
*/
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 RefundEndRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'refundEnd';
}
}

View File

@@ -0,0 +1,93 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\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 RefundEndRequestMarshaller implements RequestMarshaller
{
/**
* @var RefundEndRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RefundEndRequestMarshaller();
}
/**
* @return RefundEndRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Trade';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/trade/refund/end';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param RefundEndRequest $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->getOrderId() != null) {
$internalRequest->addParameter('orderId',
ObjectSerializer::sanitizeForSerialization($request->getOrderId(), 'string'));
}
if ($request->getRefundRequestId() != null) {
$internalRequest->addParameter('refundRequestId',
ObjectSerializer::sanitizeForSerialization($request->getRefundRequestId(), 'string'));
}
if ($request->getParentMerchantNo() != null) {
$internalRequest->addParameter('parentMerchantNo',
ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
}
if ($request->getMerchantNo() != null) {
$internalRequest->addParameter('merchantNo',
ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
RefundEndRequestMarshaller::__init();

View File

@@ -0,0 +1,36 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseResponse;
class RefundEndResponse extends BaseResponse
{
/**
* @var RefundEndYopEndRefundResponseDTOResult
*/
private $result;
function getResultClass()
{
return '\Yeepay\Yop\Sdk\Service\Trade\Model\RefundEndYopEndRefundResponseDTOResult';
}
/**
* @param RefundEndYopEndRefundResponseDTOResult $result
*/
function setResult($result)
{
$this->result = $result;
}
/**
* @return RefundEndYopEndRefundResponseDTOResult
*/
function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
class RefundEndResponseUnMarshaller extends BaseResponseUnMarshaller
{
/**
* @var RefundEndResponseUnMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RefundEndResponseUnMarshaller();
}
/**
* @return RefundEndResponseUnMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @return RefundEndResponse
*/
protected function getResponseInstance()
{
return new RefundEndResponse();
}
}
RefundEndResponseUnMarshaller::__init();

View File

@@ -0,0 +1,509 @@
<?php
/**
* RefundEndYopEndRefundResponseDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* RefundEndYopEndRefundResponseDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class RefundEndYopEndRefundResponseDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'RefundEndYopEndRefundResponseDTOResult';
/**
* 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',
'yopMerchantNo' => 'string',
'refundRequestId' => 'string',
'uniqueRefundNo' => 'string',
'status' => 'string',
'refundAmount' => '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,
'yopMerchantNo' => null,
'refundRequestId' => null,
'uniqueRefundNo' => null,
'status' => null,
'refundAmount' => 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',
'yopMerchantNo' => 'yopMerchantNo',
'refundRequestId' => 'refundRequestId',
'uniqueRefundNo' => 'uniqueRefundNo',
'status' => 'status',
'refundAmount' => 'refundAmount',
];
/**
* 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',
'yopMerchantNo' => 'setYopMerchantNo',
'refundRequestId' => 'setRefundRequestId',
'uniqueRefundNo' => 'setUniqueRefundNo',
'status' => 'setStatus',
'refundAmount' => 'setRefundAmount',
];
/**
* 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',
'yopMerchantNo' => 'getYopMerchantNo',
'refundRequestId' => 'getRefundRequestId',
'uniqueRefundNo' => 'getUniqueRefundNo',
'status' => 'getStatus',
'refundAmount' => 'getRefundAmount',
];
/**
* 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['yopMerchantNo'] = isset($data['yopMerchantNo']) ? $data['yopMerchantNo'] : null;
$this->container['refundRequestId'] = isset($data['refundRequestId']) ? $data['refundRequestId'] : null;
$this->container['uniqueRefundNo'] = isset($data['uniqueRefundNo']) ? $data['uniqueRefundNo'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['refundAmount'] = isset($data['refundAmount']) ? $data['refundAmount'] : 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 yopMerchantNo
* @return string
*/
public function getYopMerchantNo()
{
return $this->container['yopMerchantNo'];
}
/**
* Sets yopMerchantNo
* @param string $yopMerchantNo 技术发起方商编
* @return $this
*/
public function setYopMerchantNo($yopMerchantNo)
{
$this->container['yopMerchantNo'] = $yopMerchantNo;
return $this;
}
/**
* Gets refundRequestId
* @return string
*/
public function getRefundRequestId()
{
return $this->container['refundRequestId'];
}
/**
* Sets refundRequestId
* @param string $refundRequestId 商户退款请求号
* @return $this
*/
public function setRefundRequestId($refundRequestId)
{
$this->container['refundRequestId'] = $refundRequestId;
return $this;
}
/**
* Gets uniqueRefundNo
* @return string
*/
public function getUniqueRefundNo()
{
return $this->container['uniqueRefundNo'];
}
/**
* Sets uniqueRefundNo
* @param string $uniqueRefundNo 商户退款请求时对应在易宝的退款单号
* @return $this
*/
public function setUniqueRefundNo($uniqueRefundNo)
{
$this->container['uniqueRefundNo'] = $uniqueRefundNo;
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 refundAmount
* @return string
*/
public function getRefundAmount()
{
return $this->container['refundAmount'];
}
/**
* Sets refundAmount
* @param string $refundAmount 退款申请金额
* @return $this
*/
public function setRefundAmount($refundAmount)
{
$this->container['refundAmount'] = $refundAmount;
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));
}
}

View File

@@ -0,0 +1,275 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseRequest;
class RefundFastRequest extends BaseRequest
{
/**
* @var string
*/
private $orderId;
/**
* @var string
*/
private $refundRequestId;
/**
* @var string
*/
private $refundAmount;
/**
* @var string
*/
private $description;
/**
* @var string
*/
private $refundAccountType;
/**
* @var string
*/
private $notifyUrl;
/**
* @var string
*/
private $memo;
/**
* @var string
*/
private $cardInfo;
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets orderId
* @return string
*/
public function getOrderId()
{
return $this->orderId;
}
/**
* Sets orderId
* @param string $orderId
* @return RefundFastRequest
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
return $this;
}
/**
* Gets refundRequestId
* @return string
*/
public function getRefundRequestId()
{
return $this->refundRequestId;
}
/**
* Sets refundRequestId
* @param string $refundRequestId
* @return RefundFastRequest
*/
public function setRefundRequestId($refundRequestId)
{
$this->refundRequestId = $refundRequestId;
return $this;
}
/**
* Gets refundAmount
* @return string
*/
public function getRefundAmount()
{
return $this->refundAmount;
}
/**
* Sets refundAmount
* @param string $refundAmount
* @return RefundFastRequest
*/
public function setRefundAmount($refundAmount)
{
$this->refundAmount = $refundAmount;
return $this;
}
/**
* Gets description
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Sets description
* @param string $description
* @return RefundFastRequest
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Gets refundAccountType
* @return string
*/
public function getRefundAccountType()
{
return $this->refundAccountType;
}
/**
* Sets refundAccountType
* @param string $refundAccountType
* @return RefundFastRequest
*/
public function setRefundAccountType($refundAccountType)
{
$this->refundAccountType = $refundAccountType;
return $this;
}
/**
* Gets notifyUrl
* @return string
*/
public function getNotifyUrl()
{
return $this->notifyUrl;
}
/**
* Sets notifyUrl
* @param string $notifyUrl
* @return RefundFastRequest
*/
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 RefundFastRequest
*/
public function setMemo($memo)
{
$this->memo = $memo;
return $this;
}
/**
* Gets cardInfo
* @return string
*/
public function getCardInfo()
{
return $this->cardInfo;
}
/**
* Sets cardInfo
* @param string $cardInfo
* @return RefundFastRequest
*/
public function setCardInfo($cardInfo)
{
$this->cardInfo = $cardInfo;
return $this;
}
/**
* Gets parentMerchantNo
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
* @param string $parentMerchantNo
* @return RefundFastRequest
*/
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 RefundFastRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'refundFast';
}
}

View File

@@ -0,0 +1,117 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\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 RefundFastRequestMarshaller implements RequestMarshaller
{
/**
* @var RefundFastRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RefundFastRequestMarshaller();
}
/**
* @return RefundFastRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Trade';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/trade/refund/fast';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param RefundFastRequest $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->getOrderId() != null) {
$internalRequest->addParameter('orderId',
ObjectSerializer::sanitizeForSerialization($request->getOrderId(), 'string'));
}
if ($request->getRefundRequestId() != null) {
$internalRequest->addParameter('refundRequestId',
ObjectSerializer::sanitizeForSerialization($request->getRefundRequestId(), 'string'));
}
if ($request->getRefundAmount() != null) {
$internalRequest->addParameter('refundAmount',
ObjectSerializer::sanitizeForSerialization($request->getRefundAmount(), 'string'));
}
if ($request->getDescription() != null) {
$internalRequest->addParameter('description',
ObjectSerializer::sanitizeForSerialization($request->getDescription(), 'string'));
}
if ($request->getRefundAccountType() != null) {
$internalRequest->addParameter('refundAccountType',
ObjectSerializer::sanitizeForSerialization($request->getRefundAccountType(), '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->getCardInfo() != null) {
$internalRequest->addParameter('cardInfo',
ObjectSerializer::sanitizeForSerialization($request->getCardInfo(), 'string'));
}
if ($request->getParentMerchantNo() != null) {
$internalRequest->addParameter('parentMerchantNo',
ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
}
if ($request->getMerchantNo() != null) {
$internalRequest->addParameter('merchantNo',
ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
RefundFastRequestMarshaller::__init();

View File

@@ -0,0 +1,36 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseResponse;
class RefundFastResponse extends BaseResponse
{
/**
* @var RefundFastYopFastRefundResponseDTOResult
*/
private $result;
function getResultClass()
{
return '\Yeepay\Yop\Sdk\Service\Trade\Model\RefundFastYopFastRefundResponseDTOResult';
}
/**
* @param RefundFastYopFastRefundResponseDTOResult $result
*/
function setResult($result)
{
$this->result = $result;
}
/**
* @return RefundFastYopFastRefundResponseDTOResult
*/
function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
class RefundFastResponseUnMarshaller extends BaseResponseUnMarshaller
{
/**
* @var RefundFastResponseUnMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RefundFastResponseUnMarshaller();
}
/**
* @return RefundFastResponseUnMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @return RefundFastResponse
*/
protected function getResponseInstance()
{
return new RefundFastResponse();
}
}
RefundFastResponseUnMarshaller::__init();

View File

@@ -0,0 +1,509 @@
<?php
/**
* RefundFastYopFastRefundResponseDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* RefundFastYopFastRefundResponseDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class RefundFastYopFastRefundResponseDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'RefundFastYopFastRefundResponseDTOResult';
/**
* 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',
'yopMerchantNo' => 'string',
'refundRequestId' => 'string',
'uniqueRefundNo' => 'string',
'status' => 'string',
'refundAmount' => '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,
'yopMerchantNo' => null,
'refundRequestId' => null,
'uniqueRefundNo' => null,
'status' => null,
'refundAmount' => 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',
'yopMerchantNo' => 'yopMerchantNo',
'refundRequestId' => 'refundRequestId',
'uniqueRefundNo' => 'uniqueRefundNo',
'status' => 'status',
'refundAmount' => 'refundAmount',
];
/**
* 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',
'yopMerchantNo' => 'setYopMerchantNo',
'refundRequestId' => 'setRefundRequestId',
'uniqueRefundNo' => 'setUniqueRefundNo',
'status' => 'setStatus',
'refundAmount' => 'setRefundAmount',
];
/**
* 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',
'yopMerchantNo' => 'getYopMerchantNo',
'refundRequestId' => 'getRefundRequestId',
'uniqueRefundNo' => 'getUniqueRefundNo',
'status' => 'getStatus',
'refundAmount' => 'getRefundAmount',
];
/**
* 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['yopMerchantNo'] = isset($data['yopMerchantNo']) ? $data['yopMerchantNo'] : null;
$this->container['refundRequestId'] = isset($data['refundRequestId']) ? $data['refundRequestId'] : null;
$this->container['uniqueRefundNo'] = isset($data['uniqueRefundNo']) ? $data['uniqueRefundNo'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['refundAmount'] = isset($data['refundAmount']) ? $data['refundAmount'] : 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 yopMerchantNo
* @return string
*/
public function getYopMerchantNo()
{
return $this->container['yopMerchantNo'];
}
/**
* Sets yopMerchantNo
* @param string $yopMerchantNo 技术发起方商彬啊
* @return $this
*/
public function setYopMerchantNo($yopMerchantNo)
{
$this->container['yopMerchantNo'] = $yopMerchantNo;
return $this;
}
/**
* Gets refundRequestId
* @return string
*/
public function getRefundRequestId()
{
return $this->container['refundRequestId'];
}
/**
* Sets refundRequestId
* @param string $refundRequestId 商户退款请求号
* @return $this
*/
public function setRefundRequestId($refundRequestId)
{
$this->container['refundRequestId'] = $refundRequestId;
return $this;
}
/**
* Gets uniqueRefundNo
* @return string
*/
public function getUniqueRefundNo()
{
return $this->container['uniqueRefundNo'];
}
/**
* Sets uniqueRefundNo
* @param string $uniqueRefundNo 商户退款请求时对应在易宝的退款单号
* @return $this
*/
public function setUniqueRefundNo($uniqueRefundNo)
{
$this->container['uniqueRefundNo'] = $uniqueRefundNo;
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 refundAmount
* @return string
*/
public function getRefundAmount()
{
return $this->container['refundAmount'];
}
/**
* Sets refundAmount
* @param string $refundAmount 退款申请金额
* @return $this
*/
public function setRefundAmount($refundAmount)
{
$this->container['refundAmount'] = $refundAmount;
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));
}
}

View File

@@ -0,0 +1,456 @@
<?php
/**
* RefundQueryBankPromotionInfoDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* RefundQueryBankPromotionInfoDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @description
* @link https://github.com/swagger-api/swagger-codegen
*/
class RefundQueryBankPromotionInfoDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'RefundQueryBankPromotionInfoDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = [
'promotionId' => 'string',
'promotionName' => 'string',
'amountRefund' => 'float',
'activityId' => 'string',
'channelContribute' => 'string',
'merchantContribute' => 'string',
'otherContribute' => 'string',
'memo' => 'string',
];
/**
* Array of property to format mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerFormats = [
'promotionId' => null,
'promotionName' => null,
'amountRefund' => null,
'activityId' => null,
'channelContribute' => null,
'merchantContribute' => null,
'otherContribute' => null,
'memo' => 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 = [
'promotionId' => 'promotionId',
'promotionName' => 'promotionName',
'amountRefund' => 'amountRefund',
'activityId' => 'activityId',
'channelContribute' => 'channelContribute',
'merchantContribute' => 'merchantContribute',
'otherContribute' => 'otherContribute',
'memo' => 'memo',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'promotionId' => 'setPromotionId',
'promotionName' => 'setPromotionName',
'amountRefund' => 'setAmountRefund',
'activityId' => 'setActivityId',
'channelContribute' => 'setChannelContribute',
'merchantContribute' => 'setMerchantContribute',
'otherContribute' => 'setOtherContribute',
'memo' => 'setMemo',
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'promotionId' => 'getPromotionId',
'promotionName' => 'getPromotionName',
'amountRefund' => 'getAmountRefund',
'activityId' => 'getActivityId',
'channelContribute' => 'getChannelContribute',
'merchantContribute' => 'getMerchantContribute',
'otherContribute' => 'getOtherContribute',
'memo' => 'getMemo',
];
/**
* 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['promotionId'] = isset($data['promotionId']) ? $data['promotionId'] : null;
$this->container['promotionName'] = isset($data['promotionName']) ? $data['promotionName'] : null;
$this->container['amountRefund'] = isset($data['amountRefund']) ? $data['amountRefund'] : null;
$this->container['activityId'] = isset($data['activityId']) ? $data['activityId'] : null;
$this->container['channelContribute'] = isset($data['channelContribute']) ? $data['channelContribute'] : null;
$this->container['merchantContribute'] = isset($data['merchantContribute']) ? $data['merchantContribute'] : null;
$this->container['otherContribute'] = isset($data['otherContribute']) ? $data['otherContribute'] : null;
$this->container['memo'] = isset($data['memo']) ? $data['memo'] : 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 promotionId
* @return string
*/
public function getPromotionId()
{
return $this->container['promotionId'];
}
/**
* Sets promotionId
* @param string $promotionId 优惠券编码
* @return $this
*/
public function setPromotionId($promotionId)
{
$this->container['promotionId'] = $promotionId;
return $this;
}
/**
* Gets promotionName
* @return string
*/
public function getPromotionName()
{
return $this->container['promotionName'];
}
/**
* Sets promotionName
* @param string $promotionName 优惠券名称
* @return $this
*/
public function setPromotionName($promotionName)
{
$this->container['promotionName'] = $promotionName;
return $this;
}
/**
* Gets amountRefund
* @return float
*/
public function getAmountRefund()
{
return $this->container['amountRefund'];
}
/**
* Sets amountRefund
* @param float $amountRefund 优惠券退回金额
* @return $this
*/
public function setAmountRefund($amountRefund)
{
$this->container['amountRefund'] = $amountRefund;
return $this;
}
/**
* Gets activityId
* @return string
*/
public function getActivityId()
{
return $this->container['activityId'];
}
/**
* Sets activityId
* @param string $activityId 优惠券活动id
* @return $this
*/
public function setActivityId($activityId)
{
$this->container['activityId'] = $activityId;
return $this;
}
/**
* Gets channelContribute
* @return string
*/
public function getChannelContribute()
{
return $this->container['channelContribute'];
}
/**
* Sets channelContribute
* @param string $channelContribute 渠道出资
* @return $this
*/
public function setChannelContribute($channelContribute)
{
$this->container['channelContribute'] = $channelContribute;
return $this;
}
/**
* Gets merchantContribute
* @return string
*/
public function getMerchantContribute()
{
return $this->container['merchantContribute'];
}
/**
* Sets merchantContribute
* @param string $merchantContribute 商户出资
* @return $this
*/
public function setMerchantContribute($merchantContribute)
{
$this->container['merchantContribute'] = $merchantContribute;
return $this;
}
/**
* Gets otherContribute
* @return string
*/
public function getOtherContribute()
{
return $this->container['otherContribute'];
}
/**
* Sets otherContribute
* @param string $otherContribute 其他出资
* @return $this
*/
public function setOtherContribute($otherContribute)
{
$this->container['otherContribute'] = $otherContribute;
return $this;
}
/**
* Gets memo
* @return string
*/
public function getMemo()
{
return $this->container['memo'];
}
/**
* Sets memo
* @param string $memo 备注信息
* @return $this
*/
public function setMemo($memo)
{
$this->container['memo'] = $memo;
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));
}
}

View File

@@ -0,0 +1,752 @@
<?php
/**
* RefundQueryQueryRefundResponseDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* RefundQueryQueryRefundResponseDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class RefundQueryQueryRefundResponseDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'RefundQueryQueryRefundResponseDTOResult';
/**
* 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',
'refundRequestId' => 'string',
'uniqueOrderNo' => 'string',
'uniqueRefundNo' => 'string',
'refundAmount' => 'float',
'returnMerchantFee' => 'float',
'status' => 'string',
'description' => 'string',
'refundRequestDate' => 'string',
'refundSuccessDate' => 'string',
'failReason' => 'string',
'realRefundAmount' => 'float',
'cashRefundFee' => 'float',
'bankPromotionInfoDTOList' => '\Yeepay\Yop\Sdk\Service\Trade\Model\RefundQueryBankPromotionInfoDTOResult[]',
'ypPromotionInfoDTOList' => '\Yeepay\Yop\Sdk\Service\Trade\Model\RefundQueryYpPromotionRefundInfoDTOResult[]',
];
/**
* 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,
'refundRequestId' => null,
'uniqueOrderNo' => null,
'uniqueRefundNo' => null,
'refundAmount' => null,
'returnMerchantFee' => null,
'status' => null,
'description' => null,
'refundRequestDate' => null,
'refundSuccessDate' => null,
'failReason' => null,
'realRefundAmount' => null,
'cashRefundFee' => null,
'bankPromotionInfoDTOList' => null,
'ypPromotionInfoDTOList' => 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',
'refundRequestId' => 'refundRequestId',
'uniqueOrderNo' => 'uniqueOrderNo',
'uniqueRefundNo' => 'uniqueRefundNo',
'refundAmount' => 'refundAmount',
'returnMerchantFee' => 'returnMerchantFee',
'status' => 'status',
'description' => 'description',
'refundRequestDate' => 'refundRequestDate',
'refundSuccessDate' => 'refundSuccessDate',
'failReason' => 'failReason',
'realRefundAmount' => 'realRefundAmount',
'cashRefundFee' => 'cashRefundFee',
'bankPromotionInfoDTOList' => 'bankPromotionInfoDTOList',
'ypPromotionInfoDTOList' => 'ypPromotionInfoDTOList',
];
/**
* 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',
'refundRequestId' => 'setRefundRequestId',
'uniqueOrderNo' => 'setUniqueOrderNo',
'uniqueRefundNo' => 'setUniqueRefundNo',
'refundAmount' => 'setRefundAmount',
'returnMerchantFee' => 'setReturnMerchantFee',
'status' => 'setStatus',
'description' => 'setDescription',
'refundRequestDate' => 'setRefundRequestDate',
'refundSuccessDate' => 'setRefundSuccessDate',
'failReason' => 'setFailReason',
'realRefundAmount' => 'setRealRefundAmount',
'cashRefundFee' => 'setCashRefundFee',
'bankPromotionInfoDTOList' => 'setBankPromotionInfoDTOList',
'ypPromotionInfoDTOList' => 'setYpPromotionInfoDTOList',
];
/**
* 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',
'refundRequestId' => 'getRefundRequestId',
'uniqueOrderNo' => 'getUniqueOrderNo',
'uniqueRefundNo' => 'getUniqueRefundNo',
'refundAmount' => 'getRefundAmount',
'returnMerchantFee' => 'getReturnMerchantFee',
'status' => 'getStatus',
'description' => 'getDescription',
'refundRequestDate' => 'getRefundRequestDate',
'refundSuccessDate' => 'getRefundSuccessDate',
'failReason' => 'getFailReason',
'realRefundAmount' => 'getRealRefundAmount',
'cashRefundFee' => 'getCashRefundFee',
'bankPromotionInfoDTOList' => 'getBankPromotionInfoDTOList',
'ypPromotionInfoDTOList' => 'getYpPromotionInfoDTOList',
];
/**
* 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['refundRequestId'] = isset($data['refundRequestId']) ? $data['refundRequestId'] : null;
$this->container['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
$this->container['uniqueRefundNo'] = isset($data['uniqueRefundNo']) ? $data['uniqueRefundNo'] : null;
$this->container['refundAmount'] = isset($data['refundAmount']) ? $data['refundAmount'] : null;
$this->container['returnMerchantFee'] = isset($data['returnMerchantFee']) ? $data['returnMerchantFee'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['description'] = isset($data['description']) ? $data['description'] : null;
$this->container['refundRequestDate'] = isset($data['refundRequestDate']) ? $data['refundRequestDate'] : null;
$this->container['refundSuccessDate'] = isset($data['refundSuccessDate']) ? $data['refundSuccessDate'] : null;
$this->container['failReason'] = isset($data['failReason']) ? $data['failReason'] : null;
$this->container['realRefundAmount'] = isset($data['realRefundAmount']) ? $data['realRefundAmount'] : null;
$this->container['cashRefundFee'] = isset($data['cashRefundFee']) ? $data['cashRefundFee'] : null;
$this->container['bankPromotionInfoDTOList'] = isset($data['bankPromotionInfoDTOList']) ? $data['bankPromotionInfoDTOList'] : null;
$this->container['ypPromotionInfoDTOList'] = isset($data['ypPromotionInfoDTOList']) ? $data['ypPromotionInfoDTOList'] : 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 refundRequestId
* @return string
*/
public function getRefundRequestId()
{
return $this->container['refundRequestId'];
}
/**
* Sets refundRequestId
* @param string $refundRequestId 商户退款请求号
* @return $this
*/
public function setRefundRequestId($refundRequestId)
{
$this->container['refundRequestId'] = $refundRequestId;
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 uniqueRefundNo
* @return string
*/
public function getUniqueRefundNo()
{
return $this->container['uniqueRefundNo'];
}
/**
* Sets uniqueRefundNo
* @param string $uniqueRefundNo 易宝退款订单号
* @return $this
*/
public function setUniqueRefundNo($uniqueRefundNo)
{
$this->container['uniqueRefundNo'] = $uniqueRefundNo;
return $this;
}
/**
* Gets refundAmount
* @return float
*/
public function getRefundAmount()
{
return $this->container['refundAmount'];
}
/**
* Sets refundAmount
* @param float $refundAmount 退款申请金额
* @return $this
*/
public function setRefundAmount($refundAmount)
{
$this->container['refundAmount'] = $refundAmount;
return $this;
}
/**
* Gets returnMerchantFee
* @return float
*/
public function getReturnMerchantFee()
{
return $this->container['returnMerchantFee'];
}
/**
* Sets returnMerchantFee
* @param float $returnMerchantFee 退回商户手续费
* @return $this
*/
public function setReturnMerchantFee($returnMerchantFee)
{
$this->container['returnMerchantFee'] = $returnMerchantFee;
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 description
* @return string
*/
public function getDescription()
{
return $this->container['description'];
}
/**
* Sets description
* @param string $description 退款原因
* @return $this
*/
public function setDescription($description)
{
$this->container['description'] = $description;
return $this;
}
/**
* Gets refundRequestDate
* @return string
*/
public function getRefundRequestDate()
{
return $this->container['refundRequestDate'];
}
/**
* Sets refundRequestDate
* @param string $refundRequestDate 退款受理时间
* @return $this
*/
public function setRefundRequestDate($refundRequestDate)
{
$this->container['refundRequestDate'] = $refundRequestDate;
return $this;
}
/**
* Gets refundSuccessDate
* @return string
*/
public function getRefundSuccessDate()
{
return $this->container['refundSuccessDate'];
}
/**
* Sets refundSuccessDate
* @param string $refundSuccessDate 退款成功日期
* @return $this
*/
public function setRefundSuccessDate($refundSuccessDate)
{
$this->container['refundSuccessDate'] = $refundSuccessDate;
return $this;
}
/**
* Gets failReason
* @return string
*/
public function getFailReason()
{
return $this->container['failReason'];
}
/**
* Sets failReason
* @param string $failReason 退款失败原因
* @return $this
*/
public function setFailReason($failReason)
{
$this->container['failReason'] = $failReason;
return $this;
}
/**
* Gets realRefundAmount
* @return float
*/
public function getRealRefundAmount()
{
return $this->container['realRefundAmount'];
}
/**
* Sets realRefundAmount
* @param float $realRefundAmount 实际退款金额
* @return $this
*/
public function setRealRefundAmount($realRefundAmount)
{
$this->container['realRefundAmount'] = $realRefundAmount;
return $this;
}
/**
* Gets cashRefundFee
* @return float
*/
public function getCashRefundFee()
{
return $this->container['cashRefundFee'];
}
/**
* Sets cashRefundFee
* @param float $cashRefundFee 用户实退金额
* @return $this
*/
public function setCashRefundFee($cashRefundFee)
{
$this->container['cashRefundFee'] = $cashRefundFee;
return $this;
}
/**
* Gets bankPromotionInfoDTOList
* @return \Yeepay\Yop\Sdk\Service\Trade\Model\RefundQueryBankPromotionInfoDTOResult[]
*/
public function getBankPromotionInfoDTOList()
{
return $this->container['bankPromotionInfoDTOList'];
}
/**
* Sets bankPromotionInfoDTOList
* @param \Yeepay\Yop\Sdk\Service\Trade\Model\RefundQueryBankPromotionInfoDTOResult[] $bankPromotionInfoDTOList 渠道侧优惠退回列表
* @return $this
*/
public function setBankPromotionInfoDTOList($bankPromotionInfoDTOList)
{
$this->container['bankPromotionInfoDTOList'] = $bankPromotionInfoDTOList;
return $this;
}
/**
* Gets ypPromotionInfoDTOList
* @return \Yeepay\Yop\Sdk\Service\Trade\Model\RefundQueryYpPromotionRefundInfoDTOResult[]
*/
public function getYpPromotionInfoDTOList()
{
return $this->container['ypPromotionInfoDTOList'];
}
/**
* Sets ypPromotionInfoDTOList
* @param \Yeepay\Yop\Sdk\Service\Trade\Model\RefundQueryYpPromotionRefundInfoDTOResult[] $ypPromotionInfoDTOList 易宝侧优惠退回列表
* @return $this
*/
public function setYpPromotionInfoDTOList($ypPromotionInfoDTOList)
{
$this->container['ypPromotionInfoDTOList'] = $ypPromotionInfoDTOList;
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));
}
}

View File

@@ -0,0 +1,145 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseRequest;
class RefundQueryRequest extends BaseRequest
{
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $orderId;
/**
* @var string
*/
private $refundRequestId;
/**
* @var string
*/
private $uniqueRefundNo;
/**
* Gets parentMerchantNo
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
* @param string $parentMerchantNo
* @return RefundQueryRequest
*/
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 RefundQueryRequest
*/
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 RefundQueryRequest
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
return $this;
}
/**
* Gets refundRequestId
* @return string
*/
public function getRefundRequestId()
{
return $this->refundRequestId;
}
/**
* Sets refundRequestId
* @param string $refundRequestId
* @return RefundQueryRequest
*/
public function setRefundRequestId($refundRequestId)
{
$this->refundRequestId = $refundRequestId;
return $this;
}
/**
* Gets uniqueRefundNo
* @return string
*/
public function getUniqueRefundNo()
{
return $this->uniqueRefundNo;
}
/**
* Sets uniqueRefundNo
* @param string $uniqueRefundNo
* @return RefundQueryRequest
*/
public function setUniqueRefundNo($uniqueRefundNo)
{
$this->uniqueRefundNo = $uniqueRefundNo;
return $this;
}
public static function getOperationId()
{
return 'refundQuery';
}
}

View File

@@ -0,0 +1,76 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\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 RefundQueryRequestMarshaller implements RequestMarshaller
{
/**
* @var RefundQueryRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RefundQueryRequestMarshaller();
}
/**
* @return RefundQueryRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Trade';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/trade/refund/query';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param RefundQueryRequest $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;
}
}
RefundQueryRequestMarshaller::__init();

View File

@@ -0,0 +1,36 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseResponse;
class RefundQueryResponse extends BaseResponse
{
/**
* @var RefundQueryQueryRefundResponseDTOResult
*/
private $result;
function getResultClass()
{
return '\Yeepay\Yop\Sdk\Service\Trade\Model\RefundQueryQueryRefundResponseDTOResult';
}
/**
* @param RefundQueryQueryRefundResponseDTOResult $result
*/
function setResult($result)
{
$this->result = $result;
}
/**
* @return RefundQueryQueryRefundResponseDTOResult
*/
function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
class RefundQueryResponseUnMarshaller extends BaseResponseUnMarshaller
{
/**
* @var RefundQueryResponseUnMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RefundQueryResponseUnMarshaller();
}
/**
* @return RefundQueryResponseUnMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @return RefundQueryResponse
*/
protected function getResponseInstance()
{
return new RefundQueryResponse();
}
}
RefundQueryResponseUnMarshaller::__init();

View File

@@ -0,0 +1,320 @@
<?php
/**
* RefundQueryYpPromotionRefundInfoDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* RefundQueryYpPromotionRefundInfoDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class RefundQueryYpPromotionRefundInfoDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'RefundQueryYpPromotionRefundInfoDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = [
'marketNo' => 'string',
'ypRefundAmount' => 'string',
'type' => 'string',
];
/**
* Array of property to format mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerFormats = [
'marketNo' => null,
'ypRefundAmount' => null,
'type' => 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 = [
'marketNo' => 'marketNo',
'ypRefundAmount' => 'ypRefundAmount',
'type' => 'type',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'marketNo' => 'setMarketNo',
'ypRefundAmount' => 'setYpRefundAmount',
'type' => 'setType',
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'marketNo' => 'getMarketNo',
'ypRefundAmount' => 'getYpRefundAmount',
'type' => 'getType',
];
/**
* 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['marketNo'] = isset($data['marketNo']) ? $data['marketNo'] : null;
$this->container['ypRefundAmount'] = isset($data['ypRefundAmount']) ? $data['ypRefundAmount'] : null;
$this->container['type'] = isset($data['type']) ? $data['type'] : 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 marketNo
* @return string
*/
public function getMarketNo()
{
return $this->container['marketNo'];
}
/**
* Sets marketNo
* @param string $marketNo 活动编号
* @return $this
*/
public function setMarketNo($marketNo)
{
$this->container['marketNo'] = $marketNo;
return $this;
}
/**
* Gets ypRefundAmount
* @return string
*/
public function getYpRefundAmount()
{
return $this->container['ypRefundAmount'];
}
/**
* Sets ypRefundAmount
* @param string $ypRefundAmount 活动退回金额
* @return $this
*/
public function setYpRefundAmount($ypRefundAmount)
{
$this->container['ypRefundAmount'] = $ypRefundAmount;
return $this;
}
/**
* Gets type
* @return string
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
* @param string $type 自定义营销活动类型
* @return $this
*/
public function setType($type)
{
$this->container['type'] = $type;
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));
}
}

View File

@@ -0,0 +1,301 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseRequest;
class RefundRequest extends BaseRequest
{
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $orderId;
/**
* @var string
*/
private $refundRequestId;
/**
* @var string
*/
private $uniqueOrderNo;
/**
* @var string
*/
private $refundAmount;
/**
* @var string
*/
private $description;
/**
* @var string
*/
private $memo;
/**
* @var string
*/
private $refundAccountType;
/**
* @var string
*/
private $notifyUrl;
/**
* @var string
*/
private $ypPromotionRefundInfo;
/**
* Gets parentMerchantNo
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
* @param string $parentMerchantNo
* @return RefundRequest
*/
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 RefundRequest
*/
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 RefundRequest
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
return $this;
}
/**
* Gets refundRequestId
* @return string
*/
public function getRefundRequestId()
{
return $this->refundRequestId;
}
/**
* Sets refundRequestId
* @param string $refundRequestId
* @return RefundRequest
*/
public function setRefundRequestId($refundRequestId)
{
$this->refundRequestId = $refundRequestId;
return $this;
}
/**
* Gets uniqueOrderNo
* @return string
*/
public function getUniqueOrderNo()
{
return $this->uniqueOrderNo;
}
/**
* Sets uniqueOrderNo
* @param string $uniqueOrderNo
* @return RefundRequest
*/
public function setUniqueOrderNo($uniqueOrderNo)
{
$this->uniqueOrderNo = $uniqueOrderNo;
return $this;
}
/**
* Gets refundAmount
* @return string
*/
public function getRefundAmount()
{
return $this->refundAmount;
}
/**
* Sets refundAmount
* @param string $refundAmount
* @return RefundRequest
*/
public function setRefundAmount($refundAmount)
{
$this->refundAmount = $refundAmount;
return $this;
}
/**
* Gets description
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Sets description
* @param string $description
* @return RefundRequest
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Gets memo
* @return string
*/
public function getMemo()
{
return $this->memo;
}
/**
* Sets memo
* @param string $memo
* @return RefundRequest
*/
public function setMemo($memo)
{
$this->memo = $memo;
return $this;
}
/**
* Gets refundAccountType
* @return string
*/
public function getRefundAccountType()
{
return $this->refundAccountType;
}
/**
* Sets refundAccountType
* @param string $refundAccountType
* @return RefundRequest
*/
public function setRefundAccountType($refundAccountType)
{
$this->refundAccountType = $refundAccountType;
return $this;
}
/**
* Gets notifyUrl
* @return string
*/
public function getNotifyUrl()
{
return $this->notifyUrl;
}
/**
* Sets notifyUrl
* @param string $notifyUrl
* @return RefundRequest
*/
public function setNotifyUrl($notifyUrl)
{
$this->notifyUrl = $notifyUrl;
return $this;
}
/**
* Gets ypPromotionRefundInfo
* @return string
*/
public function getYpPromotionRefundInfo()
{
return $this->ypPromotionRefundInfo;
}
/**
* Sets ypPromotionRefundInfo
* @param string $ypPromotionRefundInfo
* @return RefundRequest
*/
public function setYpPromotionRefundInfo($ypPromotionRefundInfo)
{
$this->ypPromotionRefundInfo = $ypPromotionRefundInfo;
return $this;
}
public static function getOperationId()
{
return 'refund';
}
}

View File

@@ -0,0 +1,121 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\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 RefundRequestMarshaller implements RequestMarshaller
{
/**
* @var RefundRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RefundRequestMarshaller();
}
/**
* @return RefundRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Trade';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/trade/refund';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param RefundRequest $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->getRefundRequestId() != null) {
$internalRequest->addParameter('refundRequestId',
ObjectSerializer::sanitizeForSerialization($request->getRefundRequestId(), 'string'));
}
if ($request->getUniqueOrderNo() != null) {
$internalRequest->addParameter('uniqueOrderNo',
ObjectSerializer::sanitizeForSerialization($request->getUniqueOrderNo(), 'string'));
}
if ($request->getRefundAmount() != null) {
$internalRequest->addParameter('refundAmount',
ObjectSerializer::sanitizeForSerialization($request->getRefundAmount(), 'string'));
}
if ($request->getDescription() != null) {
$internalRequest->addParameter('description',
ObjectSerializer::sanitizeForSerialization($request->getDescription(), 'string'));
}
if ($request->getMemo() != null) {
$internalRequest->addParameter('memo',
ObjectSerializer::sanitizeForSerialization($request->getMemo(), 'string'));
}
if ($request->getRefundAccountType() != null) {
$internalRequest->addParameter('refundAccountType',
ObjectSerializer::sanitizeForSerialization($request->getRefundAccountType(), 'string'));
}
if ($request->getNotifyUrl() != null) {
$internalRequest->addParameter('notifyUrl',
ObjectSerializer::sanitizeForSerialization($request->getNotifyUrl(), 'string'));
}
if ($request->getYpPromotionRefundInfo() != null) {
$internalRequest->addParameter('ypPromotionRefundInfo',
ObjectSerializer::sanitizeForSerialization($request->getYpPromotionRefundInfo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
RefundRequestMarshaller::__init();

View File

@@ -0,0 +1,36 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseResponse;
class RefundResponse extends BaseResponse
{
/**
* @var RefundResponseRefundDTOResult
*/
private $result;
function getResultClass()
{
return '\Yeepay\Yop\Sdk\Service\Trade\Model\RefundResponseRefundDTOResult';
}
/**
* @param RefundResponseRefundDTOResult $result
*/
function setResult($result)
{
$this->result = $result;
}
/**
* @return RefundResponseRefundDTOResult
*/
function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,509 @@
<?php
/**
* RefundResponseRefundDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* RefundResponseRefundDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class RefundResponseRefundDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'RefundResponseRefundDTOResult';
/**
* 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',
'refundRequestId' => 'string',
'uniqueRefundNo' => 'string',
'status' => 'string',
'refundAmount' => 'string',
'refundRequestDate' => '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,
'refundRequestId' => null,
'uniqueRefundNo' => null,
'status' => null,
'refundAmount' => null,
'refundRequestDate' => 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',
'refundRequestId' => 'refundRequestId',
'uniqueRefundNo' => 'uniqueRefundNo',
'status' => 'status',
'refundAmount' => 'refundAmount',
'refundRequestDate' => 'refundRequestDate',
];
/**
* 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',
'refundRequestId' => 'setRefundRequestId',
'uniqueRefundNo' => 'setUniqueRefundNo',
'status' => 'setStatus',
'refundAmount' => 'setRefundAmount',
'refundRequestDate' => 'setRefundRequestDate',
];
/**
* 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',
'refundRequestId' => 'getRefundRequestId',
'uniqueRefundNo' => 'getUniqueRefundNo',
'status' => 'getStatus',
'refundAmount' => 'getRefundAmount',
'refundRequestDate' => 'getRefundRequestDate',
];
/**
* 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['refundRequestId'] = isset($data['refundRequestId']) ? $data['refundRequestId'] : null;
$this->container['uniqueRefundNo'] = isset($data['uniqueRefundNo']) ? $data['uniqueRefundNo'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['refundAmount'] = isset($data['refundAmount']) ? $data['refundAmount'] : null;
$this->container['refundRequestDate'] = isset($data['refundRequestDate']) ? $data['refundRequestDate'] : 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 refundRequestId
* @return string
*/
public function getRefundRequestId()
{
return $this->container['refundRequestId'];
}
/**
* Sets refundRequestId
* @param string $refundRequestId 商户退款请求号
* @return $this
*/
public function setRefundRequestId($refundRequestId)
{
$this->container['refundRequestId'] = $refundRequestId;
return $this;
}
/**
* Gets uniqueRefundNo
* @return string
*/
public function getUniqueRefundNo()
{
return $this->container['uniqueRefundNo'];
}
/**
* Sets uniqueRefundNo
* @param string $uniqueRefundNo 易宝退款订单号
* @return $this
*/
public function setUniqueRefundNo($uniqueRefundNo)
{
$this->container['uniqueRefundNo'] = $uniqueRefundNo;
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 refundAmount
* @return string
*/
public function getRefundAmount()
{
return $this->container['refundAmount'];
}
/**
* Sets refundAmount
* @param string $refundAmount 退款申请金额
* @return $this
*/
public function setRefundAmount($refundAmount)
{
$this->container['refundAmount'] = $refundAmount;
return $this;
}
/**
* Gets refundRequestDate
* @return string
*/
public function getRefundRequestDate()
{
return $this->container['refundRequestDate'];
}
/**
* Sets refundRequestDate
* @param string $refundRequestDate 退款受理时间
* @return $this
*/
public function setRefundRequestDate($refundRequestDate)
{
$this->container['refundRequestDate'] = $refundRequestDate;
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));
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
class RefundResponseUnMarshaller extends BaseResponseUnMarshaller
{
/**
* @var RefundResponseUnMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RefundResponseUnMarshaller();
}
/**
* @return RefundResponseUnMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @return RefundResponse
*/
protected function getResponseInstance()
{
return new RefundResponse();
}
}
RefundResponseUnMarshaller::__init();

View File

@@ -0,0 +1,145 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseRequest;
class RefundSupplyRequest extends BaseRequest
{
/**
* @var string
*/
private $orderId;
/**
* @var string
*/
private $refundRequestId;
/**
* @var string
*/
private $cardInfo;
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets orderId
* @return string
*/
public function getOrderId()
{
return $this->orderId;
}
/**
* Sets orderId
* @param string $orderId
* @return RefundSupplyRequest
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
return $this;
}
/**
* Gets refundRequestId
* @return string
*/
public function getRefundRequestId()
{
return $this->refundRequestId;
}
/**
* Sets refundRequestId
* @param string $refundRequestId
* @return RefundSupplyRequest
*/
public function setRefundRequestId($refundRequestId)
{
$this->refundRequestId = $refundRequestId;
return $this;
}
/**
* Gets cardInfo
* @return string
*/
public function getCardInfo()
{
return $this->cardInfo;
}
/**
* Sets cardInfo
* @param string $cardInfo
* @return RefundSupplyRequest
*/
public function setCardInfo($cardInfo)
{
$this->cardInfo = $cardInfo;
return $this;
}
/**
* Gets parentMerchantNo
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
* @param string $parentMerchantNo
* @return RefundSupplyRequest
*/
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 RefundSupplyRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'refundSupply';
}
}

View File

@@ -0,0 +1,97 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\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 RefundSupplyRequestMarshaller implements RequestMarshaller
{
/**
* @var RefundSupplyRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RefundSupplyRequestMarshaller();
}
/**
* @return RefundSupplyRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Trade';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/trade/refund/supply';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param RefundSupplyRequest $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->getOrderId() != null) {
$internalRequest->addParameter('orderId',
ObjectSerializer::sanitizeForSerialization($request->getOrderId(), 'string'));
}
if ($request->getRefundRequestId() != null) {
$internalRequest->addParameter('refundRequestId',
ObjectSerializer::sanitizeForSerialization($request->getRefundRequestId(), 'string'));
}
if ($request->getCardInfo() != null) {
$internalRequest->addParameter('cardInfo',
ObjectSerializer::sanitizeForSerialization($request->getCardInfo(), 'string'));
}
if ($request->getParentMerchantNo() != null) {
$internalRequest->addParameter('parentMerchantNo',
ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
}
if ($request->getMerchantNo() != null) {
$internalRequest->addParameter('merchantNo',
ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
RefundSupplyRequestMarshaller::__init();

View File

@@ -0,0 +1,36 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\BaseResponse;
class RefundSupplyResponse extends BaseResponse
{
/**
* @var RefundSupplyYopSupplyCardInfoRefundResponseDTOResult
*/
private $result;
function getResultClass()
{
return '\Yeepay\Yop\Sdk\Service\Trade\Model\RefundSupplyYopSupplyCardInfoRefundResponseDTOResult';
}
/**
* @param RefundSupplyYopSupplyCardInfoRefundResponseDTOResult $result
*/
function setResult($result)
{
$this->result = $result;
}
/**
* @return RefundSupplyYopSupplyCardInfoRefundResponseDTOResult
*/
function getResult()
{
return $this->result;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade\Model;
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
class RefundSupplyResponseUnMarshaller extends BaseResponseUnMarshaller
{
/**
* @var RefundSupplyResponseUnMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RefundSupplyResponseUnMarshaller();
}
/**
* @return RefundSupplyResponseUnMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @return RefundSupplyResponse
*/
protected function getResponseInstance()
{
return new RefundSupplyResponse();
}
}
RefundSupplyResponseUnMarshaller::__init();

View File

@@ -0,0 +1,509 @@
<?php
/**
* RefundSupplyYopSupplyCardInfoRefundResponseDTOResult
* PHP version 5
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 标准交易
* <p>名称(中文):新交易下单接口<br />名称英文xx.waropr-hessian.war<br />简介:合单支付下单与标准收款内部下单接口合并<br />wiki文档地址http://wiki.yeepay.com/pages/viewpage.action?pageId=122095805(4.新api分组相关接口规划)<br />预计项目上线时间2020年6月9日<br />归属/拟申请的sp编码可选opr<br />期望api分组编码、名称可选trade(标准交易)<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\Trade\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* RefundSupplyYopSupplyCardInfoRefundResponseDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class RefundSupplyYopSupplyCardInfoRefundResponseDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'RefundSupplyYopSupplyCardInfoRefundResponseDTOResult';
/**
* 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',
'yopMerchantNo' => 'string',
'refundRequestId' => 'string',
'uniqueRefundNo' => 'string',
'status' => 'string',
'refundAmount' => '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,
'yopMerchantNo' => null,
'refundRequestId' => null,
'uniqueRefundNo' => null,
'status' => null,
'refundAmount' => 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',
'yopMerchantNo' => 'yopMerchantNo',
'refundRequestId' => 'refundRequestId',
'uniqueRefundNo' => 'uniqueRefundNo',
'status' => 'status',
'refundAmount' => 'refundAmount',
];
/**
* 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',
'yopMerchantNo' => 'setYopMerchantNo',
'refundRequestId' => 'setRefundRequestId',
'uniqueRefundNo' => 'setUniqueRefundNo',
'status' => 'setStatus',
'refundAmount' => 'setRefundAmount',
];
/**
* 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',
'yopMerchantNo' => 'getYopMerchantNo',
'refundRequestId' => 'getRefundRequestId',
'uniqueRefundNo' => 'getUniqueRefundNo',
'status' => 'getStatus',
'refundAmount' => 'getRefundAmount',
];
/**
* 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['yopMerchantNo'] = isset($data['yopMerchantNo']) ? $data['yopMerchantNo'] : null;
$this->container['refundRequestId'] = isset($data['refundRequestId']) ? $data['refundRequestId'] : null;
$this->container['uniqueRefundNo'] = isset($data['uniqueRefundNo']) ? $data['uniqueRefundNo'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['refundAmount'] = isset($data['refundAmount']) ? $data['refundAmount'] : 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 yopMerchantNo
* @return string
*/
public function getYopMerchantNo()
{
return $this->container['yopMerchantNo'];
}
/**
* Sets yopMerchantNo
* @param string $yopMerchantNo yop请求商编
* @return $this
*/
public function setYopMerchantNo($yopMerchantNo)
{
$this->container['yopMerchantNo'] = $yopMerchantNo;
return $this;
}
/**
* Gets refundRequestId
* @return string
*/
public function getRefundRequestId()
{
return $this->container['refundRequestId'];
}
/**
* Sets refundRequestId
* @param string $refundRequestId 商户退款请求号
* @return $this
*/
public function setRefundRequestId($refundRequestId)
{
$this->container['refundRequestId'] = $refundRequestId;
return $this;
}
/**
* Gets uniqueRefundNo
* @return string
*/
public function getUniqueRefundNo()
{
return $this->container['uniqueRefundNo'];
}
/**
* Sets uniqueRefundNo
* @param string $uniqueRefundNo 商户退款请求对应在易宝的退款单号
* @return $this
*/
public function setUniqueRefundNo($uniqueRefundNo)
{
$this->container['uniqueRefundNo'] = $uniqueRefundNo;
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 refundAmount
* @return string
*/
public function getRefundAmount()
{
return $this->container['refundAmount'];
}
/**
* Sets refundAmount
* @param string $refundAmount 退款金额
* @return $this
*/
public function setRefundAmount($refundAmount)
{
$this->container['refundAmount'] = $refundAmount;
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));
}
}

View File

@@ -0,0 +1,226 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade;
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\Trade\Model as Model;
class TradeClient
{
/**
* @var ClientHandler
*/
private $clientHandler;
/**
* TradeClient constructor.
* @param ClientParams $clientParams
*/
function __construct(ClientParams $clientParams)
{
$this->clientHandler = new ClientHandler($clientParams);
}
/**
* @param Model\OrderRequest $request
* @return Model\OrderResponse
* @throws YopClientException
*/
public function order(Model\OrderRequest $request)
{
if ($request == null) {
throw new YopClientException("request is required.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\OrderRequestMarshaller::getInstance(),
Model\OrderResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
/**
* @param Model\OrderCloseRequest $request
* @return Model\OrderCloseResponse
* @throws YopClientException
*/
public function orderClose(Model\OrderCloseRequest $request)
{
if ($request == null) {
throw new YopClientException("request is required.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\OrderCloseRequestMarshaller::getInstance(),
Model\OrderCloseResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
/**
* @param Model\OrderCombineQueryRequest $request
* @return Model\OrderCombineQueryResponse
* @throws YopClientException
*/
public function orderCombineQuery(Model\OrderCombineQueryRequest $request)
{
if ($request == null) {
throw new YopClientException("request is required.");
}
if ($request->getParentMerchantNo() == null) {
throw new YopClientException("request.parentMerchantNo is required.");
}
if ($request->getOrderId() == null) {
throw new YopClientException("request.orderId is required.");
}
$clientExecutionParams = new ClientExecutionParams($request,
Model\OrderCombineQueryRequestMarshaller::getInstance(),
Model\OrderCombineQueryResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
/**
* @param Model\OrderQueryRequest $request
* @return Model\OrderQueryResponse
* @throws YopClientException
*/
public function orderQuery(Model\OrderQueryRequest $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.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\OrderQueryRequestMarshaller::getInstance(),
Model\OrderQueryResponseUnMarshaller::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->getOrderId() == null) {
throw new YopClientException("request.orderId is required.");
}
$clientExecutionParams = new ClientExecutionParams($request,
Model\ReceiptDownloadRequestMarshaller::getInstance(),
Model\ReceiptDownloadResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
/**
* @param Model\RefundRequest $request
* @return Model\RefundResponse
* @throws YopClientException
*/
public function refund(Model\RefundRequest $request)
{
if ($request == null) {
throw new YopClientException("request is required.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\RefundRequestMarshaller::getInstance(),
Model\RefundResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
/**
* @param Model\RefundEndRequest $request
* @return Model\RefundEndResponse
* @throws YopClientException
*/
public function refundEnd(Model\RefundEndRequest $request)
{
if ($request == null) {
throw new YopClientException("request is required.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\RefundEndRequestMarshaller::getInstance(),
Model\RefundEndResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
/**
* @param Model\RefundFastRequest $request
* @return Model\RefundFastResponse
* @throws YopClientException
*/
public function refundFast(Model\RefundFastRequest $request)
{
if ($request == null) {
throw new YopClientException("request is required.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\RefundFastRequestMarshaller::getInstance(),
Model\RefundFastResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
/**
* @param Model\RefundQueryRequest $request
* @return Model\RefundQueryResponse
* @throws YopClientException
*/
public function refundQuery(Model\RefundQueryRequest $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->getRefundRequestId() == null) {
throw new YopClientException("request.refundRequestId is required.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\RefundQueryRequestMarshaller::getInstance(),
Model\RefundQueryResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
/**
* @param Model\RefundSupplyRequest $request
* @return Model\RefundSupplyResponse
* @throws YopClientException
*/
public function refundSupply(Model\RefundSupplyRequest $request)
{
if ($request == null) {
throw new YopClientException("request is required.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\RefundSupplyRequestMarshaller::getInstance(),
Model\RefundSupplyResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
}

View File

@@ -0,0 +1,88 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Trade;
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 TradeClientBuilder
{
/**
* @var AuthorizationReqRegistry
*/
private static $authorizationReqRegistry;
public static function __init()
{
self::$authorizationReqRegistry = new AuthorityReqRegistryImpl();
self::$authorizationReqRegistry->register('order',
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('orderClose',
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('orderCombineQuery',
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('orderQuery',
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('receiptDownload',
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('refund',
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('refundEnd',
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('refundFast',
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('refundQuery',
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('refundSupply',
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
}
/**
* @var ClientParams
*/
private $clientParams;
/**
* TradeClientBuilder constructor.
* @param ClientParams $clientParams
*/
public function __construct(ClientParams $clientParams)
{
$this->clientParams = $clientParams;
}
public function build()
{
return new TradeClient($this->clientParams);
}
/**
* @param $config AppSdkConfig|array|AppSdkConfigProvider
* @return TradeClientBuilder
* @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 TradeClientBuilder($clientParams);
}
}
TradeClientBuilder::__init();