first commit
This commit is contained in:
67
lib/Service/Std/Model/BillDividedaydownloadRequest.php
Normal file
67
lib/Service/Std/Model/BillDividedaydownloadRequest.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class BillDividedaydownloadRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $dayString;
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return BillDividedaydownloadRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets dayString
|
||||
* @return string
|
||||
*/
|
||||
public function getDayString()
|
||||
{
|
||||
return $this->dayString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets dayString
|
||||
* @param string $dayString
|
||||
* @return BillDividedaydownloadRequest
|
||||
*/
|
||||
public function setDayString($dayString)
|
||||
{
|
||||
$this->dayString = $dayString;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'billDividedaydownload';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\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 BillDividedaydownloadRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var BillDividedaydownloadRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new BillDividedaydownloadRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BillDividedaydownloadRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Std';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'GET';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/yos/v1.0/std/bill/dividedaydownload';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param BillDividedaydownloadRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
$internalRequest->setYosFlag(true);
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BillDividedaydownloadRequestMarshaller::__init();
|
||||
@@ -0,0 +1,347 @@
|
||||
<?php
|
||||
/**
|
||||
* BillFundbillApplyManualGenerationResponseDTOResult
|
||||
* PHP version 5
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
|
||||
/**
|
||||
* 标准版
|
||||
* <p>标准版</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\Std\Model;
|
||||
|
||||
use ArrayAccess;
|
||||
use Yeepay\Yop\Sdk\Model\ModelInterface;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BillFundbillApplyManualGenerationResponseDTOResult Class Doc Comment
|
||||
* @author Swagger Codegen team
|
||||
* @package Yeepay\Yop\Sdk\
|
||||
* @category Class
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class BillFundbillApplyManualGenerationResponseDTOResult implements ModelInterface, ArrayAccess
|
||||
{
|
||||
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'BillFundbillApplyManualGenerationResponseDTOResult';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = [
|
||||
'code' => 'string',
|
||||
'message' => 'string',
|
||||
'fileId' => 'string',
|
||||
'status' => 'string',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerFormats = [
|
||||
'code' => null,
|
||||
'message' => null,
|
||||
'fileId' => null,
|
||||
'status' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'code' => 'code',
|
||||
'message' => 'message',
|
||||
'fileId' => 'fileId',
|
||||
'status' => 'status',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'code' => 'setCode',
|
||||
'message' => 'setMessage',
|
||||
'fileId' => 'setFileId',
|
||||
'status' => 'setStatus',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'code' => 'getCode',
|
||||
'message' => 'getMessage',
|
||||
'fileId' => 'getFileId',
|
||||
'status' => 'getStatus',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
$this->container['fileId'] = isset($data['fileId']) ? $data['fileId'] : null;
|
||||
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets code
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->container['code'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets code
|
||||
* @param string $code 响应码
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->container['code'] = $code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets message
|
||||
* @param string $message 响应信息
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->container['message'] = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets fileId
|
||||
* @return string
|
||||
*/
|
||||
public function getFileId()
|
||||
{
|
||||
return $this->container['fileId'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets fileId
|
||||
* @param string $fileId 文件id
|
||||
* @return $this
|
||||
*/
|
||||
public function setFileId($fileId)
|
||||
{
|
||||
$this->container['fileId'] = $fileId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status
|
||||
* @param string $status 文件生成的状态
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->container['status'] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
145
lib/Service/Std/Model/BillFundbillApplyRequest.php
Normal file
145
lib/Service/Std/Model/BillFundbillApplyRequest.php
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class BillFundbillApplyRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $startDate;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $endDate;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $accountType;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $notifyUrl;
|
||||
|
||||
/**
|
||||
* Gets startDate
|
||||
* @return string
|
||||
*/
|
||||
public function getStartDate()
|
||||
{
|
||||
return $this->startDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets startDate
|
||||
* @param string $startDate
|
||||
* @return BillFundbillApplyRequest
|
||||
*/
|
||||
public function setStartDate($startDate)
|
||||
{
|
||||
$this->startDate = $startDate;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets endDate
|
||||
* @return string
|
||||
*/
|
||||
public function getEndDate()
|
||||
{
|
||||
return $this->endDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets endDate
|
||||
* @param string $endDate
|
||||
* @return BillFundbillApplyRequest
|
||||
*/
|
||||
public function setEndDate($endDate)
|
||||
{
|
||||
$this->endDate = $endDate;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return BillFundbillApplyRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets accountType
|
||||
* @return string
|
||||
*/
|
||||
public function getAccountType()
|
||||
{
|
||||
return $this->accountType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets accountType
|
||||
* @param string $accountType
|
||||
* @return BillFundbillApplyRequest
|
||||
*/
|
||||
public function setAccountType($accountType)
|
||||
{
|
||||
$this->accountType = $accountType;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets notifyUrl
|
||||
* @return string
|
||||
*/
|
||||
public function getNotifyUrl()
|
||||
{
|
||||
return $this->notifyUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets notifyUrl
|
||||
* @param string $notifyUrl
|
||||
* @return BillFundbillApplyRequest
|
||||
*/
|
||||
public function setNotifyUrl($notifyUrl)
|
||||
{
|
||||
$this->notifyUrl = $notifyUrl;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'billFundbillApply';
|
||||
}
|
||||
|
||||
}
|
||||
97
lib/Service/Std/Model/BillFundbillApplyRequestMarshaller.php
Normal file
97
lib/Service/Std/Model/BillFundbillApplyRequestMarshaller.php
Normal file
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\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 BillFundbillApplyRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var BillFundbillApplyRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new BillFundbillApplyRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BillFundbillApplyRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Std';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'POST';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/rest/v1.0/std/bill/fundbill/apply';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param BillFundbillApplyRequest $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->getStartDate() != null) {
|
||||
$internalRequest->addParameter('startDate',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getStartDate(), 'string'));
|
||||
}
|
||||
if ($request->getEndDate() != null) {
|
||||
$internalRequest->addParameter('endDate',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getEndDate(), 'string'));
|
||||
}
|
||||
if ($request->getMerchantNo() != null) {
|
||||
$internalRequest->addParameter('merchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
|
||||
}
|
||||
if ($request->getAccountType() != null) {
|
||||
$internalRequest->addParameter('accountType',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getAccountType(), 'string'));
|
||||
}
|
||||
if ($request->getNotifyUrl() != null) {
|
||||
$internalRequest->addParameter('notifyUrl',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getNotifyUrl(), 'string'));
|
||||
}
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BillFundbillApplyRequestMarshaller::__init();
|
||||
36
lib/Service/Std/Model/BillFundbillApplyResponse.php
Normal file
36
lib/Service/Std/Model/BillFundbillApplyResponse.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseResponse;
|
||||
|
||||
class BillFundbillApplyResponse extends BaseResponse
|
||||
{
|
||||
|
||||
/**
|
||||
* @var BillFundbillApplyManualGenerationResponseDTOResult
|
||||
*/
|
||||
private $result;
|
||||
|
||||
function getResultClass()
|
||||
{
|
||||
return '\Yeepay\Yop\Sdk\Service\Std\Model\BillFundbillApplyManualGenerationResponseDTOResult';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BillFundbillApplyManualGenerationResponseDTOResult $result
|
||||
*/
|
||||
function setResult($result)
|
||||
{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BillFundbillApplyManualGenerationResponseDTOResult
|
||||
*/
|
||||
function getResult()
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
|
||||
|
||||
class BillFundbillApplyResponseUnMarshaller extends BaseResponseUnMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var BillFundbillApplyResponseUnMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new BillFundbillApplyResponseUnMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BillFundbillApplyResponseUnMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BillFundbillApplyResponse
|
||||
*/
|
||||
protected function getResponseInstance()
|
||||
{
|
||||
return new BillFundbillApplyResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BillFundbillApplyResponseUnMarshaller::__init();
|
||||
67
lib/Service/Std/Model/BillFundbillDownloadRequest.php
Normal file
67
lib/Service/Std/Model/BillFundbillDownloadRequest.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class BillFundbillDownloadRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $fileId;
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return BillFundbillDownloadRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets fileId
|
||||
* @return string
|
||||
*/
|
||||
public function getFileId()
|
||||
{
|
||||
return $this->fileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets fileId
|
||||
* @param string $fileId
|
||||
* @return BillFundbillDownloadRequest
|
||||
*/
|
||||
public function setFileId($fileId)
|
||||
{
|
||||
$this->fileId = $fileId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'billFundbillDownload';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\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 BillFundbillDownloadRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var BillFundbillDownloadRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new BillFundbillDownloadRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BillFundbillDownloadRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Std';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'GET';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/yos/v1.0/std/bill/fundbill/download';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param BillFundbillDownloadRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
$internalRequest->setYosFlag(true);
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BillFundbillDownloadRequestMarshaller::__init();
|
||||
93
lib/Service/Std/Model/BillTradedaydownloadRequest.php
Normal file
93
lib/Service/Std/Model/BillTradedaydownloadRequest.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class BillTradedaydownloadRequest extends BaseRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $merchantNo;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $dayString;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $dataType;
|
||||
|
||||
/**
|
||||
* Gets merchantNo
|
||||
* @return string
|
||||
*/
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->merchantNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets merchantNo
|
||||
* @param string $merchantNo
|
||||
* @return BillTradedaydownloadRequest
|
||||
*/
|
||||
public function setMerchantNo($merchantNo)
|
||||
{
|
||||
$this->merchantNo = $merchantNo;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets dayString
|
||||
* @return string
|
||||
*/
|
||||
public function getDayString()
|
||||
{
|
||||
return $this->dayString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets dayString
|
||||
* @param string $dayString
|
||||
* @return BillTradedaydownloadRequest
|
||||
*/
|
||||
public function setDayString($dayString)
|
||||
{
|
||||
$this->dayString = $dayString;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets dataType
|
||||
* @return string
|
||||
*/
|
||||
public function getDataType()
|
||||
{
|
||||
return $this->dataType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets dataType
|
||||
* @param string $dataType
|
||||
* @return BillTradedaydownloadRequest
|
||||
*/
|
||||
public function setDataType($dataType)
|
||||
{
|
||||
$this->dataType = $dataType;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'billTradedaydownload';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\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 BillTradedaydownloadRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var BillTradedaydownloadRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new BillTradedaydownloadRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BillTradedaydownloadRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Std';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'POST';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/yos/v1.0/std/bill/tradedaydownload';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param BillTradedaydownloadRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
$internalRequest->setYosFlag(true);
|
||||
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->getMerchantNo() != null) {
|
||||
$internalRequest->addParameter('merchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
|
||||
}
|
||||
if ($request->getDayString() != null) {
|
||||
$internalRequest->addParameter('dayString',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDayString(), 'string'));
|
||||
}
|
||||
if ($request->getDataType() != null) {
|
||||
$internalRequest->addParameter('dataType',
|
||||
ObjectSerializer::sanitizeForSerialization($request->getDataType(), 'string'));
|
||||
}
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BillTradedaydownloadRequestMarshaller::__init();
|
||||
86
lib/Service/Std/Model/TradeOrderRequest.php
Normal file
86
lib/Service/Std/Model/TradeOrderRequest.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseRequest;
|
||||
|
||||
class TradeOrderRequest extends BaseRequest
|
||||
{
|
||||
|
||||
private $parentMerchantNo;
|
||||
|
||||
private $merchantNo;
|
||||
|
||||
private $orderId;
|
||||
|
||||
private $orderAmount;
|
||||
|
||||
private $notifyUrl;
|
||||
|
||||
private $goodsParamExt;
|
||||
|
||||
private $timeoutExpress;
|
||||
|
||||
private $timeoutExpressType;
|
||||
|
||||
private $requestDate;
|
||||
|
||||
private $redirectUrl;
|
||||
|
||||
private $paymentParamExt;
|
||||
|
||||
private $industryParamExt;
|
||||
|
||||
private $riskParamExt;
|
||||
|
||||
private $memo;
|
||||
|
||||
private $assureType;
|
||||
|
||||
private $csUrl;
|
||||
|
||||
private $fundProcessType;
|
||||
|
||||
private $divideDetail;
|
||||
|
||||
private $timeoutNotifyUrl;
|
||||
|
||||
private $assurePeriod;
|
||||
|
||||
private $queryParamsExt;
|
||||
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
if (strlen($name) >= 3) {
|
||||
$fixed = strtolower(substr($name, 0, 3));
|
||||
$key = '';
|
||||
if (strlen($name) > 3) {
|
||||
$key = lcfirst(substr($name, 3));
|
||||
}
|
||||
if ($fixed == 'get' && $key != '') {
|
||||
return $this->$key;
|
||||
} elseif ($fixed == 'set' && $key != '') {
|
||||
$value = $arguments[0];
|
||||
$this->$key = $value;
|
||||
|
||||
return $this;
|
||||
} elseif ($fixed == 'get' && $key == '') {
|
||||
$tkey = $arguments[0];
|
||||
|
||||
return $this->$tkey;
|
||||
} elseif ($fixed == 'set' && $key == '') {
|
||||
$tkey = $arguments[0];
|
||||
$value = $arguments[1];
|
||||
$this->$tkey = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function getOperationId()
|
||||
{
|
||||
return 'tradeOrder';
|
||||
}
|
||||
|
||||
}
|
||||
162
lib/Service/Std/Model/TradeOrderRequestMarshaller.php
Normal file
162
lib/Service/Std/Model/TradeOrderRequestMarshaller.php
Normal file
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\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 TradeOrderRequestMarshaller implements RequestMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var TradeOrderRequestMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new TradeOrderRequestMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return TradeOrderRequestMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serviceName = 'Std';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $httpMethod = 'POST';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $resourcePath = '/rest/v1.0/std/trade/order';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $contentType = 'application/x-www-form-urlencoded';
|
||||
|
||||
/**
|
||||
* @param \Yeepay\Yop\Sdk\Service\Std\Model\TradeOrderRequest $request
|
||||
* @return Request
|
||||
*/
|
||||
public function marshal($request)
|
||||
{
|
||||
$internalRequest = new DefaultRequest($this->serviceName);
|
||||
$internalRequest->setResourcePath($this->resourcePath);
|
||||
$internalRequest->setHttpMethod($this->httpMethod);
|
||||
$internalRequest->setYosFlag(true);
|
||||
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->get('parentMerchantNo') != null) {
|
||||
$internalRequest->addParameter('parentMerchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('parentMerchantNo'), 'string'));
|
||||
}
|
||||
if ($request->get('merchantNo') != null) {
|
||||
$internalRequest->addParameter('merchantNo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('merchantNo'), 'string'));
|
||||
}
|
||||
if ($request->get('orderId') != null) {
|
||||
$internalRequest->addParameter('orderId',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('orderId'), 'string'));
|
||||
}
|
||||
if ($request->get('orderAmount') != null) {
|
||||
$internalRequest->addParameter('orderAmount',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('orderAmount'), 'string'));
|
||||
}
|
||||
if ($request->get('notifyUrl') != null) {
|
||||
$internalRequest->addParameter('notifyUrl',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('notifyUrl'), 'string'));
|
||||
}
|
||||
if ($request->get('goodsParamExt') != null) {
|
||||
$internalRequest->addParameter('goodsParamExt',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('goodsParamExt'), 'string'));
|
||||
}
|
||||
if ($request->get('timeoutExpress') != null) {
|
||||
$internalRequest->addParameter('timeoutExpress',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('timeoutExpress'), 'integer'));
|
||||
}
|
||||
if ($request->get('timeoutExpressType') != null) {
|
||||
$internalRequest->addParameter('timeoutExpressType',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('timeoutExpressType'), 'string'));
|
||||
}
|
||||
if ($request->get('requestDate') != null) {
|
||||
$internalRequest->addParameter('requestDate',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('requestDate'), 'string'));
|
||||
}
|
||||
if ($request->get('redirectUrl') != null) {
|
||||
$internalRequest->addParameter('redirectUrl',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('redirectUrl'), 'string'));
|
||||
}
|
||||
if ($request->get('paymentParamExt') != null) {
|
||||
$internalRequest->addParameter('paymentParamExt',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('paymentParamExt'), 'string'));
|
||||
}
|
||||
if ($request->get('industryParamExt') != null) {
|
||||
$internalRequest->addParameter('industryParamExt',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('industryParamExt'), 'string'));
|
||||
}
|
||||
if ($request->get('riskParamExt') != null) {
|
||||
$internalRequest->addParameter('riskParamExt',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('riskParamExt'), 'string'));
|
||||
}
|
||||
if ($request->get('memo') != null) {
|
||||
$internalRequest->addParameter('memo',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('memo'), 'string'));
|
||||
}
|
||||
if ($request->get('assureType') != null) {
|
||||
$internalRequest->addParameter('assureType',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('assureType'), 'string'));
|
||||
}
|
||||
if ($request->get('csUrl') != null) {
|
||||
$internalRequest->addParameter('csUrl',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('csUrl'), 'string'));
|
||||
}
|
||||
if ($request->get('fundProcessType') != null) {
|
||||
$internalRequest->addParameter('fundProcessType',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('fundProcessType'), 'string'));
|
||||
}
|
||||
if ($request->get('divideDetail') != null) {
|
||||
$internalRequest->addParameter('divideDetail',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('divideDetail'), 'string'));
|
||||
}
|
||||
if ($request->get('timeoutNotifyUrl') != null) {
|
||||
$internalRequest->addParameter('timeoutNotifyUrl',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('timeoutNotifyUrl'), 'string'));
|
||||
}
|
||||
if ($request->get('assurePeriod') != null) {
|
||||
$internalRequest->addParameter('assurePeriod',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('assurePeriod'), 'string'));
|
||||
}
|
||||
if ($request->get('queryParamsExt') != null) {
|
||||
$internalRequest->addParameter('queryParamsExt',
|
||||
ObjectSerializer::sanitizeForSerialization($request->get('queryParamsExt'), 'string'));
|
||||
}
|
||||
|
||||
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
|
||||
|
||||
return $internalRequest;
|
||||
}
|
||||
|
||||
}
|
||||
TradeOrderRequestMarshaller::__init();
|
||||
38
lib/Service/Std/Model/TradeOrderRequestUnMarshaller.php
Normal file
38
lib/Service/Std/Model/TradeOrderRequestUnMarshaller.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\Transform\BaseResponseUnMarshaller;
|
||||
|
||||
class TradeOrderRequestUnMarshaller extends BaseResponseUnMarshaller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var TradeOrderRequestUnMarshaller
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$instance = new TradeOrderRequestUnMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return TradeOrderRequestUnMarshaller
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Yeepay\Yop\Sdk\Service\Std\Model\TradeOrderResponse
|
||||
*/
|
||||
protected function getResponseInstance()
|
||||
{
|
||||
return new TradeOrderResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TradeOrderRequestUnMarshaller::__init();
|
||||
34
lib/Service/Std/Model/TradeOrderResponse.php
Normal file
34
lib/Service/Std/Model/TradeOrderResponse.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\Model;
|
||||
|
||||
use Yeepay\Yop\Sdk\Model\BaseResponse;
|
||||
|
||||
class TradeOrderResponse extends BaseResponse
|
||||
{
|
||||
/**
|
||||
* @var TradeOrderResponseDTOResult
|
||||
*/
|
||||
private $result;
|
||||
|
||||
function getResultClass()
|
||||
{
|
||||
return '\Yeepay\Yop\Sdk\Service\Std\Model\TradeOrderResponseDTOResult';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TradeOrderResponseDTOResult $result
|
||||
*/
|
||||
function setResult($result)
|
||||
{
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return TradeOrderResponseDTOResult
|
||||
*/
|
||||
function getResult()
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
}
|
||||
388
lib/Service/Std/Model/TradeOrderResponseDTOResult.php
Normal file
388
lib/Service/Std/Model/TradeOrderResponseDTOResult.php
Normal file
@@ -0,0 +1,388 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std\Model;
|
||||
|
||||
use ArrayAccess;
|
||||
use Yeepay\Yop\Sdk\Model\ModelInterface;
|
||||
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
|
||||
|
||||
class TradeOrderResponseDTOResult implements ModelInterface, ArrayAccess
|
||||
{
|
||||
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'TradeOrderResponseDTOResult';
|
||||
|
||||
/**
|
||||
* 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',
|
||||
'goodsParamExt' => 'string',
|
||||
'memo' => 'string',
|
||||
'token' => 'string',
|
||||
'fundProcessType' => '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,
|
||||
'uniqueOrderNo' => null,
|
||||
'goodsParamExt' => null,
|
||||
'memo' => null,
|
||||
'token' => null,
|
||||
'fundProcessType' => 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',
|
||||
'goodsParamExt' => 'goodsParamExt',
|
||||
'memo' => 'memo',
|
||||
'token' => 'token',
|
||||
'fundProcessType' => 'fundProcessType',
|
||||
];
|
||||
|
||||
/**
|
||||
* 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',
|
||||
'goodsParamExt' => 'setGoodsParamExt',
|
||||
'memo' => 'setMemo',
|
||||
'token' => 'setToken',
|
||||
'fundProcessType' => 'setFundProcessType',
|
||||
];
|
||||
|
||||
/**
|
||||
* 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',
|
||||
'goodsParamExt' => 'getGoodsParamExt',
|
||||
'memo' => 'getMemo',
|
||||
'token' => 'getToken',
|
||||
'fundProcessType' => 'getFundProcessType',
|
||||
];
|
||||
|
||||
/**
|
||||
* 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['goodsParamExt'] = isset($data['goodsParamExt']) ? $data['goodsParamExt'] : null;
|
||||
$this->container['memo'] = isset($data['memo']) ? $data['memo'] : null;
|
||||
$this->container['token'] = isset($data['token']) ? $data['token'] : null;
|
||||
$this->container['fundProcessType'] = isset($data['fundProcessType']) ? $data['fundProcessType'] : 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;
|
||||
}
|
||||
|
||||
public function setCode($value = '')
|
||||
{
|
||||
$this->container['code'] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setMessage($value = '')
|
||||
{
|
||||
$this->container['message'] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setParentMerchantNo($value = '')
|
||||
{
|
||||
$this->container['parentMerchantNo'] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setMerchantNo($value = '')
|
||||
{
|
||||
$this->container['merchantNo'] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setOrderId($value = '')
|
||||
{
|
||||
$this->container['orderId'] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUniqueOrderNo($value = '')
|
||||
{
|
||||
$this->container['uniqueOrderNo'] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setGoodsParamExt($value = '')
|
||||
{
|
||||
$this->container['goodsParamExt'] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setMemo($value = '')
|
||||
{
|
||||
$this->container['memo'] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setToken($value = '')
|
||||
{
|
||||
$this->container['token'] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setFundProcessType($value = '')
|
||||
{
|
||||
$this->container['fundProcessType'] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCode()
|
||||
{
|
||||
return $this->container['code'] ?? '';
|
||||
}
|
||||
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'] ?? '';
|
||||
}
|
||||
|
||||
public function getParentMerchantNo()
|
||||
{
|
||||
return $this->container['parentMerchantNo'] ?? '';
|
||||
}
|
||||
|
||||
public function getMerchantNo()
|
||||
{
|
||||
return $this->container['merchantNo'] ?? '';
|
||||
}
|
||||
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->container['orderId'] ?? '';
|
||||
}
|
||||
|
||||
public function getUniqueOrderNo()
|
||||
{
|
||||
return $this->container['uniqueOrderNo'] ?? '';
|
||||
}
|
||||
|
||||
public function getGoodsParamExt()
|
||||
{
|
||||
return $this->container['goodsParamExt'] ?? '';
|
||||
}
|
||||
|
||||
public function getMemo()
|
||||
{
|
||||
return $this->container['memo'] ?? '';
|
||||
}
|
||||
|
||||
public function getToken()
|
||||
{
|
||||
return $this->container['token'] ?? '';
|
||||
}
|
||||
|
||||
public function getFundProcessType()
|
||||
{
|
||||
return $this->container['fundProcessType'] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 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));
|
||||
}
|
||||
|
||||
}
|
||||
121
lib/Service/Std/StdClient.php
Normal file
121
lib/Service/Std/StdClient.php
Normal file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std;
|
||||
|
||||
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\Model\YosDownloadResponse;
|
||||
use Yeepay\Yop\Sdk\Model\YosDownloadResponseUnMarshaller;
|
||||
use Yeepay\Yop\Sdk\Service\Std\Model as Model;
|
||||
|
||||
class StdClient
|
||||
{
|
||||
|
||||
/**
|
||||
* @var ClientHandler
|
||||
*/
|
||||
private $clientHandler;
|
||||
|
||||
/**
|
||||
* StdClient constructor.
|
||||
* @param ClientParams $clientParams
|
||||
*/
|
||||
function __construct(ClientParams $clientParams)
|
||||
{
|
||||
$this->clientHandler = new ClientHandler($clientParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\BillDividedaydownloadRequest $request
|
||||
* @return YosDownloadResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function billDividedaydownload(Model\BillDividedaydownloadRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request,
|
||||
Model\BillDividedaydownloadRequestMarshaller::getInstance(),
|
||||
YosDownloadResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\BillFundbillApplyRequest $request
|
||||
* @return Model\BillFundbillApplyResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function billFundbillApply(Model\BillFundbillApplyRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request,
|
||||
Model\BillFundbillApplyRequestMarshaller::getInstance(),
|
||||
Model\BillFundbillApplyResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\BillFundbillDownloadRequest $request
|
||||
* @return YosDownloadResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function billFundbillDownload(Model\BillFundbillDownloadRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
if ($request->getMerchantNo() == null) {
|
||||
throw new YopClientException("request.merchantNo is required.");
|
||||
}
|
||||
if ($request->getFileId() == null) {
|
||||
throw new YopClientException("request.fileId is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request,
|
||||
Model\BillFundbillDownloadRequestMarshaller::getInstance(),
|
||||
YosDownloadResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\BillTradedaydownloadRequest $request
|
||||
* @return YosDownloadResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function billTradedaydownload(Model\BillTradedaydownloadRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request,
|
||||
Model\BillTradedaydownloadRequestMarshaller::getInstance(),
|
||||
YosDownloadResponseUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model\TradeOrderRequest $request
|
||||
* @return Model\TradeOrderResponse
|
||||
* @throws YopClientException
|
||||
*/
|
||||
public function tradeOrder(Model\TradeOrderRequest $request)
|
||||
{
|
||||
if ($request == null) {
|
||||
throw new YopClientException("request is required.");
|
||||
}
|
||||
$clientExecutionParams = new ClientExecutionParams($request,
|
||||
Model\TradeOrderRequestMarshaller::getInstance(),
|
||||
Model\TradeOrderRequestUnMarshaller::getInstance());
|
||||
|
||||
return $this->clientHandler->execute($clientExecutionParams);
|
||||
}
|
||||
|
||||
}
|
||||
79
lib/Service/Std/StdClientBuilder.php
Normal file
79
lib/Service/Std/StdClientBuilder.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Service\Std;
|
||||
|
||||
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 StdClientBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* @var AuthorizationReqRegistry
|
||||
*/
|
||||
private static $authorizationReqRegistry;
|
||||
|
||||
public static function __init()
|
||||
{
|
||||
self::$authorizationReqRegistry = new AuthorityReqRegistryImpl();
|
||||
self::$authorizationReqRegistry->register('billDividedaydownload',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
self::$authorizationReqRegistry->register('billFundbillApply',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
self::$authorizationReqRegistry->register('billFundbillDownload',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
self::$authorizationReqRegistry->register('billTradedaydownload',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
self::$authorizationReqRegistry->register('tradeOrder',
|
||||
AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @var ClientParams
|
||||
*/
|
||||
private $clientParams;
|
||||
|
||||
/**
|
||||
* StdClientBuilder constructor.
|
||||
* @param ClientParams $clientParams
|
||||
*/
|
||||
public function __construct(ClientParams $clientParams)
|
||||
{
|
||||
$this->clientParams = $clientParams;
|
||||
}
|
||||
|
||||
public function build()
|
||||
{
|
||||
return new StdClient($this->clientParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $config AppSdkConfig|array|AppSdkConfigProvider
|
||||
* @return StdClientBuilder
|
||||
* @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 StdClientBuilder($clientParams);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
StdClientBuilder::__init();
|
||||
Reference in New Issue
Block a user