增加聚合支付托管下单

This commit is contained in:
2024-04-01 17:07:53 +08:00
parent 899d816bc3
commit f8299b36aa
1291 changed files with 220566 additions and 169 deletions

View File

@@ -0,0 +1,362 @@
<?php
/**
* ActivityListQueryActivityPageListQueryResponseResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* ActivityListQueryActivityPageListQueryResponseResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class ActivityListQueryActivityPageListQueryResponseResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'ActivityListQueryActivityPageListQueryResponseResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'activityList' => '\Yeepay\Yop\Sdk\Service\Promtion\Model\ActivityListQueryActivityQueryInfoResult[]'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'activityList' => 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',
'activityList' => 'activityList'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'activityList' => 'setActivityList'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'activityList' => 'getActivityList'
];
/**
* 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['activityList'] = isset($data['activityList']) ? $data['activityList'] : 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 activityList
*
* @return \Yeepay\Yop\Sdk\Service\Promtion\Model\ActivityListQueryActivityQueryInfoResult[]
*/
public function getActivityList()
{
return $this->container['activityList'];
}
/**
* Sets activityList
*
* @param \Yeepay\Yop\Sdk\Service\Promtion\Model\ActivityListQueryActivityQueryInfoResult[] $activityList 活动列表
*
* @return $this
*/
public function setActivityList($activityList)
{
$this->container['activityList'] = $activityList;
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));
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class ActivityListQueryRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $merchantActivityNo;
/**
* @var string
*/
private $marketingNo;
/**
* @var string
*/
private $activityStatus;
/**
* @var int
*/
private $pageNo;
/**
* @var int
*/
private $pageSize;
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return ActivityListQueryRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets merchantActivityNo
*
* @return string
*/
public function getMerchantActivityNo()
{
return $this->merchantActivityNo;
}
/**
* Sets merchantActivityNo
*
* @param string $merchantActivityNo
* @return ActivityListQueryRequest
*/
public function setMerchantActivityNo($merchantActivityNo)
{
$this->merchantActivityNo = $merchantActivityNo;
return $this;
}
/**
* Gets marketingNo
*
* @return string
*/
public function getMarketingNo()
{
return $this->marketingNo;
}
/**
* Sets marketingNo
*
* @param string $marketingNo
* @return ActivityListQueryRequest
*/
public function setMarketingNo($marketingNo)
{
$this->marketingNo = $marketingNo;
return $this;
}
/**
* Gets activityStatus
*
* @return string
*/
public function getActivityStatus()
{
return $this->activityStatus;
}
/**
* Sets activityStatus
*
* @param string $activityStatus
* @return ActivityListQueryRequest
*/
public function setActivityStatus($activityStatus)
{
$this->activityStatus = $activityStatus;
return $this;
}
/**
* Gets pageNo
*
* @return int
*/
public function getPageNo()
{
return $this->pageNo;
}
/**
* Sets pageNo
*
* @param int $pageNo
* @return ActivityListQueryRequest
*/
public function setPageNo($pageNo)
{
$this->pageNo = $pageNo;
return $this;
}
/**
* Gets pageSize
*
* @return int
*/
public function getPageSize()
{
return $this->pageSize;
}
/**
* Sets pageSize
*
* @param int $pageSize
* @return ActivityListQueryRequest
*/
public function setPageSize($pageSize)
{
$this->pageSize = $pageSize;
return $this;
}
public static function getOperationId()
{
return 'activityListQuery';
}
}

View File

@@ -0,0 +1,95 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 ActivityListQueryRequestMarshaller implements RequestMarshaller
{
/**
* @var ActivityListQueryRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new ActivityListQueryRequestMarshaller();
}
/**
* @return ActivityListQueryRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/activity/list-query';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param ActivityListQueryRequest $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->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
if($request->getMerchantActivityNo() != null){
$internalRequest->addParameter('merchantActivityNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantActivityNo(), 'string'));
}
if($request->getMarketingNo() != null){
$internalRequest->addParameter('marketingNo', ObjectSerializer::sanitizeForSerialization($request->getMarketingNo(), 'string'));
}
if($request->getActivityStatus() != null){
$internalRequest->addParameter('activityStatus', ObjectSerializer::sanitizeForSerialization($request->getActivityStatus(), 'string'));
}
if($request->getPageNo() != null){
$internalRequest->addParameter('pageNo', ObjectSerializer::sanitizeForSerialization($request->getPageNo(), 'int', 'int32'));
}
if($request->getPageSize() != null){
$internalRequest->addParameter('pageSize', ObjectSerializer::sanitizeForSerialization($request->getPageSize(), 'int', 'int32'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
ActivityListQueryRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,367 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class AddRightsRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $rightsCode;
/**
* @var string
*/
private $startEffectDate;
/**
* @var string
*/
private $endEffectDate;
/**
* @var string
*/
private $brandNo;
/**
* @var string
*/
private $title;
/**
* @var string
*/
private $ruleDesc;
/**
* @var string
*/
private $periodType;
/**
* @var int
*/
private $period;
/**
* @var int
*/
private $frequency;
/**
* @var string
*/
private $businessType;
/**
* @var string
*/
private $userNo;
/**
* @var string
*/
private $productNo;
/**
* @var string
*/
private $productName;
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return AddRightsRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets rightsCode
*
* @return string
*/
public function getRightsCode()
{
return $this->rightsCode;
}
/**
* Sets rightsCode
*
* @param string $rightsCode
* @return AddRightsRequest
*/
public function setRightsCode($rightsCode)
{
$this->rightsCode = $rightsCode;
return $this;
}
/**
* Gets startEffectDate
*
* @return string
*/
public function getStartEffectDate()
{
return $this->startEffectDate;
}
/**
* Sets startEffectDate
*
* @param string $startEffectDate
* @return AddRightsRequest
*/
public function setStartEffectDate($startEffectDate)
{
$this->startEffectDate = $startEffectDate;
return $this;
}
/**
* Gets endEffectDate
*
* @return string
*/
public function getEndEffectDate()
{
return $this->endEffectDate;
}
/**
* Sets endEffectDate
*
* @param string $endEffectDate
* @return AddRightsRequest
*/
public function setEndEffectDate($endEffectDate)
{
$this->endEffectDate = $endEffectDate;
return $this;
}
/**
* Gets brandNo
*
* @return string
*/
public function getBrandNo()
{
return $this->brandNo;
}
/**
* Sets brandNo
*
* @param string $brandNo
* @return AddRightsRequest
*/
public function setBrandNo($brandNo)
{
$this->brandNo = $brandNo;
return $this;
}
/**
* Gets title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Sets title
*
* @param string $title
* @return AddRightsRequest
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Gets ruleDesc
*
* @return string
*/
public function getRuleDesc()
{
return $this->ruleDesc;
}
/**
* Sets ruleDesc
*
* @param string $ruleDesc
* @return AddRightsRequest
*/
public function setRuleDesc($ruleDesc)
{
$this->ruleDesc = $ruleDesc;
return $this;
}
/**
* Gets periodType
*
* @return string
*/
public function getPeriodType()
{
return $this->periodType;
}
/**
* Sets periodType
*
* @param string $periodType
* @return AddRightsRequest
*/
public function setPeriodType($periodType)
{
$this->periodType = $periodType;
return $this;
}
/**
* Gets period
*
* @return int
*/
public function getPeriod()
{
return $this->period;
}
/**
* Sets period
*
* @param int $period
* @return AddRightsRequest
*/
public function setPeriod($period)
{
$this->period = $period;
return $this;
}
/**
* Gets frequency
*
* @return int
*/
public function getFrequency()
{
return $this->frequency;
}
/**
* Sets frequency
*
* @param int $frequency
* @return AddRightsRequest
*/
public function setFrequency($frequency)
{
$this->frequency = $frequency;
return $this;
}
/**
* Gets businessType
*
* @return string
*/
public function getBusinessType()
{
return $this->businessType;
}
/**
* Sets businessType
*
* @param string $businessType
* @return AddRightsRequest
*/
public function setBusinessType($businessType)
{
$this->businessType = $businessType;
return $this;
}
/**
* Gets userNo
*
* @return string
*/
public function getUserNo()
{
return $this->userNo;
}
/**
* Sets userNo
*
* @param string $userNo
* @return AddRightsRequest
*/
public function setUserNo($userNo)
{
$this->userNo = $userNo;
return $this;
}
/**
* Gets productNo
*
* @return string
*/
public function getProductNo()
{
return $this->productNo;
}
/**
* Sets productNo
*
* @param string $productNo
* @return AddRightsRequest
*/
public function setProductNo($productNo)
{
$this->productNo = $productNo;
return $this;
}
/**
* Gets productName
*
* @return string
*/
public function getProductName()
{
return $this->productName;
}
/**
* Sets productName
*
* @param string $productName
* @return AddRightsRequest
*/
public function setProductName($productName)
{
$this->productName = $productName;
return $this;
}
public static function getOperationId()
{
return 'add_rights';
}
}

View File

@@ -0,0 +1,119 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 AddRightsRequestMarshaller implements RequestMarshaller
{
/**
* @var AddRightsRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new AddRightsRequestMarshaller();
}
/**
* @return AddRightsRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/add-rights';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param AddRightsRequest $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->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
if($request->getRightsCode() != null){
$internalRequest->addParameter('rightsCode', ObjectSerializer::sanitizeForSerialization($request->getRightsCode(), 'string'));
}
if($request->getStartEffectDate() != null){
$internalRequest->addParameter('startEffectDate', ObjectSerializer::sanitizeForSerialization($request->getStartEffectDate(), 'string'));
}
if($request->getEndEffectDate() != null){
$internalRequest->addParameter('endEffectDate', ObjectSerializer::sanitizeForSerialization($request->getEndEffectDate(), 'string'));
}
if($request->getBrandNo() != null){
$internalRequest->addParameter('brandNo', ObjectSerializer::sanitizeForSerialization($request->getBrandNo(), 'string'));
}
if($request->getTitle() != null){
$internalRequest->addParameter('title', ObjectSerializer::sanitizeForSerialization($request->getTitle(), 'string'));
}
if($request->getRuleDesc() != null){
$internalRequest->addParameter('ruleDesc', ObjectSerializer::sanitizeForSerialization($request->getRuleDesc(), 'string'));
}
if($request->getPeriodType() != null){
$internalRequest->addParameter('periodType', ObjectSerializer::sanitizeForSerialization($request->getPeriodType(), 'string'));
}
if($request->getPeriod() != null){
$internalRequest->addParameter('period', ObjectSerializer::sanitizeForSerialization($request->getPeriod(), 'int', 'int32'));
}
if($request->getFrequency() != null){
$internalRequest->addParameter('frequency', ObjectSerializer::sanitizeForSerialization($request->getFrequency(), 'int', 'int32'));
}
if($request->getBusinessType() != null){
$internalRequest->addParameter('businessType', ObjectSerializer::sanitizeForSerialization($request->getBusinessType(), 'string'));
}
if($request->getUserNo() != null){
$internalRequest->addParameter('userNo', ObjectSerializer::sanitizeForSerialization($request->getUserNo(), 'string'));
}
if($request->getProductNo() != null){
$internalRequest->addParameter('productNo', ObjectSerializer::sanitizeForSerialization($request->getProductNo(), 'string'));
}
if($request->getProductName() != null){
$internalRequest->addParameter('productName', ObjectSerializer::sanitizeForSerialization($request->getProductName(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
AddRightsRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,333 @@
<?php
/**
* BaseResponse
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* BaseResponse Class Doc Comment
*
* @category Class
* @description 请修改我
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class BaseResponse implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'BaseResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => 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'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage'
];
/**
* 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;
}
/**
* 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 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 message
*
* @return $this
*/
public function setMessage($message)
{
$this->container['message'] = $message;
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,362 @@
<?php
/**
* CouponApplyCouponApplyResponseResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* CouponApplyCouponApplyResponseResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CouponApplyCouponApplyResponseResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'CouponApplyCouponApplyResponseResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'couponNo' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'couponNo' => 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',
'couponNo' => 'couponNo'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'couponNo' => 'setCouponNo'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'couponNo' => 'getCouponNo'
];
/**
* 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['couponNo'] = isset($data['couponNo']) ? $data['couponNo'] : 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 couponNo
*
* @return string
*/
public function getCouponNo()
{
return $this->container['couponNo'];
}
/**
* Sets couponNo
*
* @param string $couponNo 优惠券码
*
* @return $this
*/
public function setCouponNo($couponNo)
{
$this->container['couponNo'] = $couponNo;
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,142 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class CouponApplyRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $requestNo;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $merchantUserNo;
/**
* @var string
*/
private $merchantActivityNo;
/**
* @var string
*/
private $marketingNo;
/**
* Gets requestNo
*
* @return string
*/
public function getRequestNo()
{
return $this->requestNo;
}
/**
* Sets requestNo
*
* @param string $requestNo
* @return CouponApplyRequest
*/
public function setRequestNo($requestNo)
{
$this->requestNo = $requestNo;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return CouponApplyRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets merchantUserNo
*
* @return string
*/
public function getMerchantUserNo()
{
return $this->merchantUserNo;
}
/**
* Sets merchantUserNo
*
* @param string $merchantUserNo
* @return CouponApplyRequest
*/
public function setMerchantUserNo($merchantUserNo)
{
$this->merchantUserNo = $merchantUserNo;
return $this;
}
/**
* Gets merchantActivityNo
*
* @return string
*/
public function getMerchantActivityNo()
{
return $this->merchantActivityNo;
}
/**
* Sets merchantActivityNo
*
* @param string $merchantActivityNo
* @return CouponApplyRequest
*/
public function setMerchantActivityNo($merchantActivityNo)
{
$this->merchantActivityNo = $merchantActivityNo;
return $this;
}
/**
* Gets marketingNo
*
* @return string
*/
public function getMarketingNo()
{
return $this->marketingNo;
}
/**
* Sets marketingNo
*
* @param string $marketingNo
* @return CouponApplyRequest
*/
public function setMarketingNo($marketingNo)
{
$this->marketingNo = $marketingNo;
return $this;
}
public static function getOperationId()
{
return 'couponApply';
}
}

View File

@@ -0,0 +1,92 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 CouponApplyRequestMarshaller implements RequestMarshaller
{
/**
* @var CouponApplyRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new CouponApplyRequestMarshaller();
}
/**
* @return CouponApplyRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/coupon/apply';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param CouponApplyRequest $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->getRequestNo() != null){
$internalRequest->addParameter('requestNo', ObjectSerializer::sanitizeForSerialization($request->getRequestNo(), 'string'));
}
if($request->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
if($request->getMerchantUserNo() != null){
$internalRequest->addParameter('merchantUserNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantUserNo(), 'string'));
}
if($request->getMerchantActivityNo() != null){
$internalRequest->addParameter('merchantActivityNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantActivityNo(), 'string'));
}
if($request->getMarketingNo() != null){
$internalRequest->addParameter('marketingNo', ObjectSerializer::sanitizeForSerialization($request->getMarketingNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
CouponApplyRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,422 @@
<?php
/**
* CouponListQueryCouponPageListQueryResponseResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* CouponListQueryCouponPageListQueryResponseResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CouponListQueryCouponPageListQueryResponseResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'CouponListQueryCouponPageListQueryResponseResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'merchantNo' => 'string',
'merchantUsrNo' => 'string',
'couponInfoList' => '\Yeepay\Yop\Sdk\Service\Promtion\Model\CouponListQueryCouponQueryInfoResult[]'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'merchantNo' => null,
'merchantUsrNo' => null,
'couponInfoList' => 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',
'merchantNo' => 'merchantNo',
'merchantUsrNo' => 'merchantUsrNo',
'couponInfoList' => 'couponInfoList'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'merchantNo' => 'setMerchantNo',
'merchantUsrNo' => 'setMerchantUsrNo',
'couponInfoList' => 'setCouponInfoList'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'merchantNo' => 'getMerchantNo',
'merchantUsrNo' => 'getMerchantUsrNo',
'couponInfoList' => 'getCouponInfoList'
];
/**
* 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['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : null;
$this->container['merchantUsrNo'] = isset($data['merchantUsrNo']) ? $data['merchantUsrNo'] : null;
$this->container['couponInfoList'] = isset($data['couponInfoList']) ? $data['couponInfoList'] : 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 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 merchantUsrNo
*
* @return string
*/
public function getMerchantUsrNo()
{
return $this->container['merchantUsrNo'];
}
/**
* Sets merchantUsrNo
*
* @param string $merchantUsrNo 用户标识
*
* @return $this
*/
public function setMerchantUsrNo($merchantUsrNo)
{
$this->container['merchantUsrNo'] = $merchantUsrNo;
return $this;
}
/**
* Gets couponInfoList
*
* @return \Yeepay\Yop\Sdk\Service\Promtion\Model\CouponListQueryCouponQueryInfoResult[]
*/
public function getCouponInfoList()
{
return $this->container['couponInfoList'];
}
/**
* Sets couponInfoList
*
* @param \Yeepay\Yop\Sdk\Service\Promtion\Model\CouponListQueryCouponQueryInfoResult[] $couponInfoList 优惠券列表
*
* @return $this
*/
public function setCouponInfoList($couponInfoList)
{
$this->container['couponInfoList'] = $couponInfoList;
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,333 @@
<?php
/**
* CouponListQueryCouponProductRuleResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* CouponListQueryCouponProductRuleResult Class Doc Comment
*
* @category Class
* @description 支持产品规则
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CouponListQueryCouponProductRuleResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'CouponListQueryCouponProductRuleResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'productType' => 'string',
'productIds' => 'string[]'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'productType' => null,
'productIds' => 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 = [
'productType' => 'productType',
'productIds' => 'productIds'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'productType' => 'setProductType',
'productIds' => 'setProductIds'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'productType' => 'getProductType',
'productIds' => 'getProductIds'
];
/**
* 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['productType'] = isset($data['productType']) ? $data['productType'] : null;
$this->container['productIds'] = isset($data['productIds']) ? $data['productIds'] : 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 productType
*
* @return string
*/
public function getProductType()
{
return $this->container['productType'];
}
/**
* Sets productType
*
* @param string $productType 产品类型
*
* @return $this
*/
public function setProductType($productType)
{
$this->container['productType'] = $productType;
return $this;
}
/**
* Gets productIds
*
* @return string[]
*/
public function getProductIds()
{
return $this->container['productIds'];
}
/**
* Sets productIds
*
* @param string[] $productIds 产品ID列表
*
* @return $this
*/
public function setProductIds($productIds)
{
$this->container['productIds'] = $productIds;
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,663 @@
<?php
/**
* CouponListQueryCouponQueryInfoResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* CouponListQueryCouponQueryInfoResult Class Doc Comment
*
* @category Class
* @description
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CouponListQueryCouponQueryInfoResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'CouponListQueryCouponQueryInfoResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'couponNo' => 'string',
'couponName' => 'string',
'couponType' => 'string',
'minUseAmount' => 'string',
'preferentialAmount' => 'string',
'discountRatio' => 'string',
'maxPreferentialAmount' => 'string',
'productRule' => '\Yeepay\Yop\Sdk\Service\Promtion\Model\CouponListQueryCouponProductRuleResult',
'applyTime' => 'string',
'effectTime' => 'string',
'expireTme' => 'string',
'couponRemark' => 'string',
'couponStatus' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'couponNo' => null,
'couponName' => null,
'couponType' => null,
'minUseAmount' => null,
'preferentialAmount' => null,
'discountRatio' => null,
'maxPreferentialAmount' => null,
'productRule' => null,
'applyTime' => 'date-time',
'effectTime' => 'date-time',
'expireTme' => 'date-time',
'couponRemark' => null,
'couponStatus' => 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 = [
'couponNo' => 'couponNo',
'couponName' => 'couponName',
'couponType' => 'couponType',
'minUseAmount' => 'minUseAmount',
'preferentialAmount' => 'preferentialAmount',
'discountRatio' => 'discountRatio',
'maxPreferentialAmount' => 'maxPreferentialAmount',
'productRule' => 'productRule',
'applyTime' => 'applyTime',
'effectTime' => 'effectTime',
'expireTme' => 'expireTme',
'couponRemark' => 'couponRemark',
'couponStatus' => 'couponStatus'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'couponNo' => 'setCouponNo',
'couponName' => 'setCouponName',
'couponType' => 'setCouponType',
'minUseAmount' => 'setMinUseAmount',
'preferentialAmount' => 'setPreferentialAmount',
'discountRatio' => 'setDiscountRatio',
'maxPreferentialAmount' => 'setMaxPreferentialAmount',
'productRule' => 'setProductRule',
'applyTime' => 'setApplyTime',
'effectTime' => 'setEffectTime',
'expireTme' => 'setExpireTme',
'couponRemark' => 'setCouponRemark',
'couponStatus' => 'setCouponStatus'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'couponNo' => 'getCouponNo',
'couponName' => 'getCouponName',
'couponType' => 'getCouponType',
'minUseAmount' => 'getMinUseAmount',
'preferentialAmount' => 'getPreferentialAmount',
'discountRatio' => 'getDiscountRatio',
'maxPreferentialAmount' => 'getMaxPreferentialAmount',
'productRule' => 'getProductRule',
'applyTime' => 'getApplyTime',
'effectTime' => 'getEffectTime',
'expireTme' => 'getExpireTme',
'couponRemark' => 'getCouponRemark',
'couponStatus' => 'getCouponStatus'
];
/**
* 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['couponNo'] = isset($data['couponNo']) ? $data['couponNo'] : null;
$this->container['couponName'] = isset($data['couponName']) ? $data['couponName'] : null;
$this->container['couponType'] = isset($data['couponType']) ? $data['couponType'] : null;
$this->container['minUseAmount'] = isset($data['minUseAmount']) ? $data['minUseAmount'] : null;
$this->container['preferentialAmount'] = isset($data['preferentialAmount']) ? $data['preferentialAmount'] : null;
$this->container['discountRatio'] = isset($data['discountRatio']) ? $data['discountRatio'] : null;
$this->container['maxPreferentialAmount'] = isset($data['maxPreferentialAmount']) ? $data['maxPreferentialAmount'] : null;
$this->container['productRule'] = isset($data['productRule']) ? $data['productRule'] : null;
$this->container['applyTime'] = isset($data['applyTime']) ? $data['applyTime'] : null;
$this->container['effectTime'] = isset($data['effectTime']) ? $data['effectTime'] : null;
$this->container['expireTme'] = isset($data['expireTme']) ? $data['expireTme'] : null;
$this->container['couponRemark'] = isset($data['couponRemark']) ? $data['couponRemark'] : null;
$this->container['couponStatus'] = isset($data['couponStatus']) ? $data['couponStatus'] : 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 couponNo
*
* @return string
*/
public function getCouponNo()
{
return $this->container['couponNo'];
}
/**
* Sets couponNo
*
* @param string $couponNo 优惠券码
*
* @return $this
*/
public function setCouponNo($couponNo)
{
$this->container['couponNo'] = $couponNo;
return $this;
}
/**
* Gets couponName
*
* @return string
*/
public function getCouponName()
{
return $this->container['couponName'];
}
/**
* Sets couponName
*
* @param string $couponName 优惠券名称
*
* @return $this
*/
public function setCouponName($couponName)
{
$this->container['couponName'] = $couponName;
return $this;
}
/**
* Gets couponType
*
* @return string
*/
public function getCouponType()
{
return $this->container['couponType'];
}
/**
* Sets couponType
*
* @param string $couponType 优惠券类型
*
* @return $this
*/
public function setCouponType($couponType)
{
$this->container['couponType'] = $couponType;
return $this;
}
/**
* Gets minUseAmount
*
* @return string
*/
public function getMinUseAmount()
{
return $this->container['minUseAmount'];
}
/**
* Sets minUseAmount
*
* @param string $minUseAmount 最小使用金额
*
* @return $this
*/
public function setMinUseAmount($minUseAmount)
{
$this->container['minUseAmount'] = $minUseAmount;
return $this;
}
/**
* Gets preferentialAmount
*
* @return string
*/
public function getPreferentialAmount()
{
return $this->container['preferentialAmount'];
}
/**
* Sets preferentialAmount
*
* @param string $preferentialAmount 优惠金额
*
* @return $this
*/
public function setPreferentialAmount($preferentialAmount)
{
$this->container['preferentialAmount'] = $preferentialAmount;
return $this;
}
/**
* Gets discountRatio
*
* @return string
*/
public function getDiscountRatio()
{
return $this->container['discountRatio'];
}
/**
* Sets discountRatio
*
* @param string $discountRatio 折扣比例
*
* @return $this
*/
public function setDiscountRatio($discountRatio)
{
$this->container['discountRatio'] = $discountRatio;
return $this;
}
/**
* Gets maxPreferentialAmount
*
* @return string
*/
public function getMaxPreferentialAmount()
{
return $this->container['maxPreferentialAmount'];
}
/**
* Sets maxPreferentialAmount
*
* @param string $maxPreferentialAmount 最大优惠金额
*
* @return $this
*/
public function setMaxPreferentialAmount($maxPreferentialAmount)
{
$this->container['maxPreferentialAmount'] = $maxPreferentialAmount;
return $this;
}
/**
* Gets productRule
*
* @return \Yeepay\Yop\Sdk\Service\Promtion\Model\CouponListQueryCouponProductRuleResult
*/
public function getProductRule()
{
return $this->container['productRule'];
}
/**
* Sets productRule
*
* @param \Yeepay\Yop\Sdk\Service\Promtion\Model\CouponListQueryCouponProductRuleResult $productRule 支持产品规则
*
* @return $this
*/
public function setProductRule($productRule)
{
$this->container['productRule'] = $productRule;
return $this;
}
/**
* Gets applyTime
*
* @return string
*/
public function getApplyTime()
{
return $this->container['applyTime'];
}
/**
* Sets applyTime
*
* @param string $applyTime 申请时间
*
* @return $this
*/
public function setApplyTime($applyTime)
{
$this->container['applyTime'] = $applyTime;
return $this;
}
/**
* Gets effectTime
*
* @return string
*/
public function getEffectTime()
{
return $this->container['effectTime'];
}
/**
* Sets effectTime
*
* @param string $effectTime 生效时间
*
* @return $this
*/
public function setEffectTime($effectTime)
{
$this->container['effectTime'] = $effectTime;
return $this;
}
/**
* Gets expireTme
*
* @return string
*/
public function getExpireTme()
{
return $this->container['expireTme'];
}
/**
* Sets expireTme
*
* @param string $expireTme 失效时间
*
* @return $this
*/
public function setExpireTme($expireTme)
{
$this->container['expireTme'] = $expireTme;
return $this;
}
/**
* Gets couponRemark
*
* @return string
*/
public function getCouponRemark()
{
return $this->container['couponRemark'];
}
/**
* Sets couponRemark
*
* @param string $couponRemark 优惠券说明
*
* @return $this
*/
public function setCouponRemark($couponRemark)
{
$this->container['couponRemark'] = $couponRemark;
return $this;
}
/**
* Gets couponStatus
*
* @return string
*/
public function getCouponStatus()
{
return $this->container['couponStatus'];
}
/**
* Sets couponStatus
*
* @param string $couponStatus 优惠券状态
*
* @return $this
*/
public function setCouponStatus($couponStatus)
{
$this->container['couponStatus'] = $couponStatus;
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,217 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class CouponListQueryRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $merchantUserNo;
/**
* @var string
*/
private $couponStatus;
/**
* @var string
*/
private $couponType;
/**
* @var string
*/
private $startTime;
/**
* @var string
*/
private $endTime;
/**
* @var int
*/
private $pageNo;
/**
* @var int
*/
private $pageSize;
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return CouponListQueryRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets merchantUserNo
*
* @return string
*/
public function getMerchantUserNo()
{
return $this->merchantUserNo;
}
/**
* Sets merchantUserNo
*
* @param string $merchantUserNo
* @return CouponListQueryRequest
*/
public function setMerchantUserNo($merchantUserNo)
{
$this->merchantUserNo = $merchantUserNo;
return $this;
}
/**
* Gets couponStatus
*
* @return string
*/
public function getCouponStatus()
{
return $this->couponStatus;
}
/**
* Sets couponStatus
*
* @param string $couponStatus
* @return CouponListQueryRequest
*/
public function setCouponStatus($couponStatus)
{
$this->couponStatus = $couponStatus;
return $this;
}
/**
* Gets couponType
*
* @return string
*/
public function getCouponType()
{
return $this->couponType;
}
/**
* Sets couponType
*
* @param string $couponType
* @return CouponListQueryRequest
*/
public function setCouponType($couponType)
{
$this->couponType = $couponType;
return $this;
}
/**
* Gets startTime
*
* @return string
*/
public function getStartTime()
{
return $this->startTime;
}
/**
* Sets startTime
*
* @param string $startTime
* @return CouponListQueryRequest
*/
public function setStartTime($startTime)
{
$this->startTime = $startTime;
return $this;
}
/**
* Gets endTime
*
* @return string
*/
public function getEndTime()
{
return $this->endTime;
}
/**
* Sets endTime
*
* @param string $endTime
* @return CouponListQueryRequest
*/
public function setEndTime($endTime)
{
$this->endTime = $endTime;
return $this;
}
/**
* Gets pageNo
*
* @return int
*/
public function getPageNo()
{
return $this->pageNo;
}
/**
* Sets pageNo
*
* @param int $pageNo
* @return CouponListQueryRequest
*/
public function setPageNo($pageNo)
{
$this->pageNo = $pageNo;
return $this;
}
/**
* Gets pageSize
*
* @return int
*/
public function getPageSize()
{
return $this->pageSize;
}
/**
* Sets pageSize
*
* @param int $pageSize
* @return CouponListQueryRequest
*/
public function setPageSize($pageSize)
{
$this->pageSize = $pageSize;
return $this;
}
public static function getOperationId()
{
return 'couponListQuery';
}
}

View File

@@ -0,0 +1,101 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 CouponListQueryRequestMarshaller implements RequestMarshaller
{
/**
* @var CouponListQueryRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new CouponListQueryRequestMarshaller();
}
/**
* @return CouponListQueryRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/coupon/list-query';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param CouponListQueryRequest $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->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
if($request->getMerchantUserNo() != null){
$internalRequest->addParameter('merchantUserNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantUserNo(), 'string'));
}
if($request->getCouponStatus() != null){
$internalRequest->addParameter('couponStatus', ObjectSerializer::sanitizeForSerialization($request->getCouponStatus(), 'string'));
}
if($request->getCouponType() != null){
$internalRequest->addParameter('couponType', ObjectSerializer::sanitizeForSerialization($request->getCouponType(), 'string'));
}
if($request->getStartTime() != null){
$internalRequest->addParameter('startTime', ObjectSerializer::sanitizeForSerialization($request->getStartTime(), 'string', 'date-time'));
}
if($request->getEndTime() != null){
$internalRequest->addParameter('endTime', ObjectSerializer::sanitizeForSerialization($request->getEndTime(), 'string'));
}
if($request->getPageNo() != null){
$internalRequest->addParameter('pageNo', ObjectSerializer::sanitizeForSerialization($request->getPageNo(), 'int', 'int32'));
}
if($request->getPageSize() != null){
$internalRequest->addParameter('pageSize', ObjectSerializer::sanitizeForSerialization($request->getPageSize(), 'int', 'int32'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
CouponListQueryRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,513 @@
<?php
/**
* CreateRightsQrCodeAdapterRespDTO
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* CreateRightsQrCodeAdapterRespDTO Class Doc Comment
*
* @category Class
* @description 请修改我
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateRightsQrCodeAdapterRespDTO implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'CreateRightsQrCodeAdapterRespDTO';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'rightsQrCode' => 'string',
'expireTime' => 'string',
'ruleDesc' => 'string',
'rightsCode' => 'string',
'rightsTitle' => 'string',
'message' => 'string',
'merchantNo' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'rightsQrCode' => null,
'expireTime' => null,
'ruleDesc' => null,
'rightsCode' => null,
'rightsTitle' => null,
'message' => null,
'merchantNo' => 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',
'rightsQrCode' => 'rightsQrCode',
'expireTime' => 'expireTime',
'ruleDesc' => 'ruleDesc',
'rightsCode' => 'rightsCode',
'rightsTitle' => 'rightsTitle',
'message' => 'message',
'merchantNo' => 'merchantNo'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'rightsQrCode' => 'setRightsQrCode',
'expireTime' => 'setExpireTime',
'ruleDesc' => 'setRuleDesc',
'rightsCode' => 'setRightsCode',
'rightsTitle' => 'setRightsTitle',
'message' => 'setMessage',
'merchantNo' => 'setMerchantNo'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'rightsQrCode' => 'getRightsQrCode',
'expireTime' => 'getExpireTime',
'ruleDesc' => 'getRuleDesc',
'rightsCode' => 'getRightsCode',
'rightsTitle' => 'getRightsTitle',
'message' => 'getMessage',
'merchantNo' => 'getMerchantNo'
];
/**
* 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['rightsQrCode'] = isset($data['rightsQrCode']) ? $data['rightsQrCode'] : null;
$this->container['expireTime'] = isset($data['expireTime']) ? $data['expireTime'] : null;
$this->container['ruleDesc'] = isset($data['ruleDesc']) ? $data['ruleDesc'] : null;
$this->container['rightsCode'] = isset($data['rightsCode']) ? $data['rightsCode'] : null;
$this->container['rightsTitle'] = isset($data['rightsTitle']) ? $data['rightsTitle'] : null;
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
$this->container['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : 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 code
*
* @return $this
*/
public function setCode($code)
{
$this->container['code'] = $code;
return $this;
}
/**
* Gets rightsQrCode
*
* @return string
*/
public function getRightsQrCode()
{
return $this->container['rightsQrCode'];
}
/**
* Sets rightsQrCode
*
* @param string $rightsQrCode rightsQrCode
*
* @return $this
*/
public function setRightsQrCode($rightsQrCode)
{
$this->container['rightsQrCode'] = $rightsQrCode;
return $this;
}
/**
* Gets expireTime
*
* @return string
*/
public function getExpireTime()
{
return $this->container['expireTime'];
}
/**
* Sets expireTime
*
* @param string $expireTime expireTime
*
* @return $this
*/
public function setExpireTime($expireTime)
{
$this->container['expireTime'] = $expireTime;
return $this;
}
/**
* Gets ruleDesc
*
* @return string
*/
public function getRuleDesc()
{
return $this->container['ruleDesc'];
}
/**
* Sets ruleDesc
*
* @param string $ruleDesc ruleDesc
*
* @return $this
*/
public function setRuleDesc($ruleDesc)
{
$this->container['ruleDesc'] = $ruleDesc;
return $this;
}
/**
* Gets rightsCode
*
* @return string
*/
public function getRightsCode()
{
return $this->container['rightsCode'];
}
/**
* Sets rightsCode
*
* @param string $rightsCode rightsCode
*
* @return $this
*/
public function setRightsCode($rightsCode)
{
$this->container['rightsCode'] = $rightsCode;
return $this;
}
/**
* Gets rightsTitle
*
* @return string
*/
public function getRightsTitle()
{
return $this->container['rightsTitle'];
}
/**
* Sets rightsTitle
*
* @param string $rightsTitle rightsTitle
*
* @return $this
*/
public function setRightsTitle($rightsTitle)
{
$this->container['rightsTitle'] = $rightsTitle;
return $this;
}
/**
* Gets message
*
* @return string
*/
public function getMessage()
{
return $this->container['message'];
}
/**
* Sets message
*
* @param string $message message
*
* @return $this
*/
public function setMessage($message)
{
$this->container['message'] = $message;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->container['merchantNo'];
}
/**
* Sets merchantNo
*
* @param string $merchantNo merchantNo
*
* @return $this
*/
public function setMerchantNo($merchantNo)
{
$this->container['merchantNo'] = $merchantNo;
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,117 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class CreateRightsQrcodeAdapterRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $operatedMerchantNo;
/**
* @var string
*/
private $rightsCode;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $userNo;
/**
* Gets operatedMerchantNo
*
* @return string
*/
public function getOperatedMerchantNo()
{
return $this->operatedMerchantNo;
}
/**
* Sets operatedMerchantNo
*
* @param string $operatedMerchantNo
* @return CreateRightsQrcodeAdapterRequest
*/
public function setOperatedMerchantNo($operatedMerchantNo)
{
$this->operatedMerchantNo = $operatedMerchantNo;
return $this;
}
/**
* Gets rightsCode
*
* @return string
*/
public function getRightsCode()
{
return $this->rightsCode;
}
/**
* Sets rightsCode
*
* @param string $rightsCode
* @return CreateRightsQrcodeAdapterRequest
*/
public function setRightsCode($rightsCode)
{
$this->rightsCode = $rightsCode;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return CreateRightsQrcodeAdapterRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets userNo
*
* @return string
*/
public function getUserNo()
{
return $this->userNo;
}
/**
* Sets userNo
*
* @param string $userNo
* @return CreateRightsQrcodeAdapterRequest
*/
public function setUserNo($userNo)
{
$this->userNo = $userNo;
return $this;
}
public static function getOperationId()
{
return 'create_rights_qrcode_adapter';
}
}

View File

@@ -0,0 +1,89 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 CreateRightsQrcodeAdapterRequestMarshaller implements RequestMarshaller
{
/**
* @var CreateRightsQrcodeAdapterRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new CreateRightsQrcodeAdapterRequestMarshaller();
}
/**
* @return CreateRightsQrcodeAdapterRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/rights/create-qrcode';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param CreateRightsQrcodeAdapterRequest $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->getOperatedMerchantNo() != null){
$internalRequest->addParameter('operatedMerchantNo', ObjectSerializer::sanitizeForSerialization($request->getOperatedMerchantNo(), 'string'));
}
if($request->getRightsCode() != null){
$internalRequest->addParameter('rightsCode', ObjectSerializer::sanitizeForSerialization($request->getRightsCode(), 'string'));
}
if($request->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
if($request->getUserNo() != null){
$internalRequest->addParameter('userNo', ObjectSerializer::sanitizeForSerialization($request->getUserNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
CreateRightsQrcodeAdapterRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,67 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class FrozenRightsRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $productNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets productNo
*
* @return string
*/
public function getProductNo()
{
return $this->productNo;
}
/**
* Sets productNo
*
* @param string $productNo
* @return FrozenRightsRequest
*/
public function setProductNo($productNo)
{
$this->productNo = $productNo;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return FrozenRightsRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'frozen_rights';
}
}

View File

@@ -0,0 +1,83 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 FrozenRightsRequestMarshaller implements RequestMarshaller
{
/**
* @var FrozenRightsRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new FrozenRightsRequestMarshaller();
}
/**
* @return FrozenRightsRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/rights/frozen-rights';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param FrozenRightsRequest $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->getProductNo() != null){
$internalRequest->addParameter('productNo', ObjectSerializer::sanitizeForSerialization($request->getProductNo(), 'string'));
}
if($request->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
FrozenRightsRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,512 @@
<?php
/**
* PointCreateAccountCreateResponseDTOResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* PointCreateAccountCreateResponseDTOResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class PointCreateAccountCreateResponseDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'PointCreateAccountCreateResponseDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'parentMerchantNo' => 'string',
'merchantNo' => 'string',
'merchantUserNo' => 'string',
'status' => 'string',
'pointAccountNo' => 'string',
'pointAccountType' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'parentMerchantNo' => null,
'merchantNo' => null,
'merchantUserNo' => null,
'status' => null,
'pointAccountNo' => null,
'pointAccountType' => 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',
'merchantUserNo' => 'merchantUserNo',
'status' => 'status',
'pointAccountNo' => 'pointAccountNo',
'pointAccountType' => 'pointAccountType'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'parentMerchantNo' => 'setParentMerchantNo',
'merchantNo' => 'setMerchantNo',
'merchantUserNo' => 'setMerchantUserNo',
'status' => 'setStatus',
'pointAccountNo' => 'setPointAccountNo',
'pointAccountType' => 'setPointAccountType'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'parentMerchantNo' => 'getParentMerchantNo',
'merchantNo' => 'getMerchantNo',
'merchantUserNo' => 'getMerchantUserNo',
'status' => 'getStatus',
'pointAccountNo' => 'getPointAccountNo',
'pointAccountType' => 'getPointAccountType'
];
/**
* 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['merchantUserNo'] = isset($data['merchantUserNo']) ? $data['merchantUserNo'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['pointAccountNo'] = isset($data['pointAccountNo']) ? $data['pointAccountNo'] : null;
$this->container['pointAccountType'] = isset($data['pointAccountType']) ? $data['pointAccountType'] : 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 merchantUserNo
*
* @return string
*/
public function getMerchantUserNo()
{
return $this->container['merchantUserNo'];
}
/**
* Sets merchantUserNo
*
* @param string $merchantUserNo 商户用户ID
*
* @return $this
*/
public function setMerchantUserNo($merchantUserNo)
{
$this->container['merchantUserNo'] = $merchantUserNo;
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 pointAccountNo
*
* @return string
*/
public function getPointAccountNo()
{
return $this->container['pointAccountNo'];
}
/**
* Sets pointAccountNo
*
* @param string $pointAccountNo 易宝积分账户编号
*
* @return $this
*/
public function setPointAccountNo($pointAccountNo)
{
$this->container['pointAccountNo'] = $pointAccountNo;
return $this;
}
/**
* Gets pointAccountType
*
* @return string
*/
public function getPointAccountType()
{
return $this->container['pointAccountType'];
}
/**
* Sets pointAccountType
*
* @param string $pointAccountType 账户类型
*
* @return $this
*/
public function setPointAccountType($pointAccountType)
{
$this->container['pointAccountType'] = $pointAccountType;
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,92 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class PointCreateRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $merchantUserNo;
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return PointCreateRequest
*/
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 PointCreateRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets merchantUserNo
*
* @return string
*/
public function getMerchantUserNo()
{
return $this->merchantUserNo;
}
/**
* Sets merchantUserNo
*
* @param string $merchantUserNo
* @return PointCreateRequest
*/
public function setMerchantUserNo($merchantUserNo)
{
$this->merchantUserNo = $merchantUserNo;
return $this;
}
public static function getOperationId()
{
return 'pointCreate';
}
}

View File

@@ -0,0 +1,86 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 PointCreateRequestMarshaller implements RequestMarshaller
{
/**
* @var PointCreateRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new PointCreateRequestMarshaller();
}
/**
* @return PointCreateRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/point/create';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param PointCreateRequest $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->getMerchantUserNo() != null){
$internalRequest->addParameter('merchantUserNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantUserNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
PointCreateRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,392 @@
<?php
/**
* PointOperatePointAccountOperateResponseDTOResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* PointOperatePointAccountOperateResponseDTOResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class PointOperatePointAccountOperateResponseDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'PointOperatePointAccountOperateResponseDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'unionPointNo' => 'string',
'status' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'unionPointNo' => 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',
'unionPointNo' => 'unionPointNo',
'status' => 'status'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'unionPointNo' => 'setUnionPointNo',
'status' => 'setStatus'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'unionPointNo' => 'getUnionPointNo',
'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['unionPointNo'] = isset($data['unionPointNo']) ? $data['unionPointNo'] : 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 unionPointNo
*
* @return string
*/
public function getUnionPointNo()
{
return $this->container['unionPointNo'];
}
/**
* Sets unionPointNo
*
* @param string $unionPointNo 易宝订单号
*
* @return $this
*/
public function setUnionPointNo($unionPointNo)
{
$this->container['unionPointNo'] = $unionPointNo;
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));
}
}

View File

@@ -0,0 +1,192 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class PointOperateRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $requestId;
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $merchantUserNo;
/**
* @var float
*/
private $point;
/**
* @var string
*/
private $payDirection;
/**
* @var string
*/
private $remark;
/**
* Gets requestId
*
* @return string
*/
public function getRequestId()
{
return $this->requestId;
}
/**
* Sets requestId
*
* @param string $requestId
* @return PointOperateRequest
*/
public function setRequestId($requestId)
{
$this->requestId = $requestId;
return $this;
}
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return PointOperateRequest
*/
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 PointOperateRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets merchantUserNo
*
* @return string
*/
public function getMerchantUserNo()
{
return $this->merchantUserNo;
}
/**
* Sets merchantUserNo
*
* @param string $merchantUserNo
* @return PointOperateRequest
*/
public function setMerchantUserNo($merchantUserNo)
{
$this->merchantUserNo = $merchantUserNo;
return $this;
}
/**
* Gets point
*
* @return float
*/
public function getPoint()
{
return $this->point;
}
/**
* Sets point
*
* @param float $point
* @return PointOperateRequest
*/
public function setPoint($point)
{
$this->point = $point;
return $this;
}
/**
* Gets payDirection
*
* @return string
*/
public function getPayDirection()
{
return $this->payDirection;
}
/**
* Sets payDirection
*
* @param string $payDirection
* @return PointOperateRequest
*/
public function setPayDirection($payDirection)
{
$this->payDirection = $payDirection;
return $this;
}
/**
* Gets remark
*
* @return string
*/
public function getRemark()
{
return $this->remark;
}
/**
* Sets remark
*
* @param string $remark
* @return PointOperateRequest
*/
public function setRemark($remark)
{
$this->remark = $remark;
return $this;
}
public static function getOperationId()
{
return 'pointOperate';
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 PointOperateRequestMarshaller implements RequestMarshaller
{
/**
* @var PointOperateRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new PointOperateRequestMarshaller();
}
/**
* @return PointOperateRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/point/operate';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param PointOperateRequest $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->getRequestId() != null){
$internalRequest->addParameter('requestId', ObjectSerializer::sanitizeForSerialization($request->getRequestId(), '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'));
}
if($request->getMerchantUserNo() != null){
$internalRequest->addParameter('merchantUserNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantUserNo(), 'string'));
}
if($request->getPoint() != null){
$internalRequest->addParameter('point', ObjectSerializer::sanitizeForSerialization($request->getPoint(), 'float'));
}
if($request->getPayDirection() != null){
$internalRequest->addParameter('payDirection', ObjectSerializer::sanitizeForSerialization($request->getPayDirection(), 'string'));
}
if($request->getRemark() != null){
$internalRequest->addParameter('remark', ObjectSerializer::sanitizeForSerialization($request->getRemark(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
PointOperateRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,542 @@
<?php
/**
* PointQueryPointAccountQueryResponseDTOResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* PointQueryPointAccountQueryResponseDTOResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class PointQueryPointAccountQueryResponseDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'PointQueryPointAccountQueryResponseDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'parentMerchantNo' => 'string',
'merchantNo' => 'string',
'merchantUserNo' => 'string',
'pointAccountStatus' => 'string',
'pointAccountNo' => 'string',
'pointAccountType' => 'string',
'point' => 'float'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'parentMerchantNo' => null,
'merchantNo' => null,
'merchantUserNo' => null,
'pointAccountStatus' => null,
'pointAccountNo' => null,
'pointAccountType' => null,
'point' => 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',
'merchantUserNo' => 'merchantUserNo',
'pointAccountStatus' => 'pointAccountStatus',
'pointAccountNo' => 'pointAccountNo',
'pointAccountType' => 'pointAccountType',
'point' => 'point'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'parentMerchantNo' => 'setParentMerchantNo',
'merchantNo' => 'setMerchantNo',
'merchantUserNo' => 'setMerchantUserNo',
'pointAccountStatus' => 'setPointAccountStatus',
'pointAccountNo' => 'setPointAccountNo',
'pointAccountType' => 'setPointAccountType',
'point' => 'setPoint'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'parentMerchantNo' => 'getParentMerchantNo',
'merchantNo' => 'getMerchantNo',
'merchantUserNo' => 'getMerchantUserNo',
'pointAccountStatus' => 'getPointAccountStatus',
'pointAccountNo' => 'getPointAccountNo',
'pointAccountType' => 'getPointAccountType',
'point' => 'getPoint'
];
/**
* 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['merchantUserNo'] = isset($data['merchantUserNo']) ? $data['merchantUserNo'] : null;
$this->container['pointAccountStatus'] = isset($data['pointAccountStatus']) ? $data['pointAccountStatus'] : null;
$this->container['pointAccountNo'] = isset($data['pointAccountNo']) ? $data['pointAccountNo'] : null;
$this->container['pointAccountType'] = isset($data['pointAccountType']) ? $data['pointAccountType'] : null;
$this->container['point'] = isset($data['point']) ? $data['point'] : 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 merchantUserNo
*
* @return string
*/
public function getMerchantUserNo()
{
return $this->container['merchantUserNo'];
}
/**
* Sets merchantUserNo
*
* @param string $merchantUserNo 商户用户ID
*
* @return $this
*/
public function setMerchantUserNo($merchantUserNo)
{
$this->container['merchantUserNo'] = $merchantUserNo;
return $this;
}
/**
* Gets pointAccountStatus
*
* @return string
*/
public function getPointAccountStatus()
{
return $this->container['pointAccountStatus'];
}
/**
* Sets pointAccountStatus
*
* @param string $pointAccountStatus 账户状态
*
* @return $this
*/
public function setPointAccountStatus($pointAccountStatus)
{
$this->container['pointAccountStatus'] = $pointAccountStatus;
return $this;
}
/**
* Gets pointAccountNo
*
* @return string
*/
public function getPointAccountNo()
{
return $this->container['pointAccountNo'];
}
/**
* Sets pointAccountNo
*
* @param string $pointAccountNo 易宝积分账户编号
*
* @return $this
*/
public function setPointAccountNo($pointAccountNo)
{
$this->container['pointAccountNo'] = $pointAccountNo;
return $this;
}
/**
* Gets pointAccountType
*
* @return string
*/
public function getPointAccountType()
{
return $this->container['pointAccountType'];
}
/**
* Sets pointAccountType
*
* @param string $pointAccountType 账户类型
*
* @return $this
*/
public function setPointAccountType($pointAccountType)
{
$this->container['pointAccountType'] = $pointAccountType;
return $this;
}
/**
* Gets point
*
* @return float
*/
public function getPoint()
{
return $this->container['point'];
}
/**
* Sets point
*
* @param float $point 积分数
*
* @return $this
*/
public function setPoint($point)
{
$this->container['point'] = $point;
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,92 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class PointQueryRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $merchantUserNo;
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return PointQueryRequest
*/
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 PointQueryRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets merchantUserNo
*
* @return string
*/
public function getMerchantUserNo()
{
return $this->merchantUserNo;
}
/**
* Sets merchantUserNo
*
* @param string $merchantUserNo
* @return PointQueryRequest
*/
public function setMerchantUserNo($merchantUserNo)
{
$this->merchantUserNo = $merchantUserNo;
return $this;
}
public static function getOperationId()
{
return 'pointQuery';
}
}

View File

@@ -0,0 +1,86 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 PointQueryRequestMarshaller implements RequestMarshaller
{
/**
* @var PointQueryRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new PointQueryRequestMarshaller();
}
/**
* @return PointQueryRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/point/query';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param PointQueryRequest $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->getMerchantUserNo() != null){
$internalRequest->addParameter('merchantUserNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantUserNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
PointQueryRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,192 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class QueryConsumeRecordAdapterRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $operatedMerchantNo;
/**
* @var string
*/
private $userNo;
/**
* @var int
*/
private $pageNo;
/**
* @var int
*/
private $pageSize;
/**
* @var string
*/
private $consumeTimeEnd;
/**
* @var string
*/
private $consumeTimeStart;
/**
* @var string
*/
private $merchantNo;
/**
* Gets operatedMerchantNo
*
* @return string
*/
public function getOperatedMerchantNo()
{
return $this->operatedMerchantNo;
}
/**
* Sets operatedMerchantNo
*
* @param string $operatedMerchantNo
* @return QueryConsumeRecordAdapterRequest
*/
public function setOperatedMerchantNo($operatedMerchantNo)
{
$this->operatedMerchantNo = $operatedMerchantNo;
return $this;
}
/**
* Gets userNo
*
* @return string
*/
public function getUserNo()
{
return $this->userNo;
}
/**
* Sets userNo
*
* @param string $userNo
* @return QueryConsumeRecordAdapterRequest
*/
public function setUserNo($userNo)
{
$this->userNo = $userNo;
return $this;
}
/**
* Gets pageNo
*
* @return int
*/
public function getPageNo()
{
return $this->pageNo;
}
/**
* Sets pageNo
*
* @param int $pageNo
* @return QueryConsumeRecordAdapterRequest
*/
public function setPageNo($pageNo)
{
$this->pageNo = $pageNo;
return $this;
}
/**
* Gets pageSize
*
* @return int
*/
public function getPageSize()
{
return $this->pageSize;
}
/**
* Sets pageSize
*
* @param int $pageSize
* @return QueryConsumeRecordAdapterRequest
*/
public function setPageSize($pageSize)
{
$this->pageSize = $pageSize;
return $this;
}
/**
* Gets consumeTimeEnd
*
* @return string
*/
public function getConsumeTimeEnd()
{
return $this->consumeTimeEnd;
}
/**
* Sets consumeTimeEnd
*
* @param string $consumeTimeEnd
* @return QueryConsumeRecordAdapterRequest
*/
public function setConsumeTimeEnd($consumeTimeEnd)
{
$this->consumeTimeEnd = $consumeTimeEnd;
return $this;
}
/**
* Gets consumeTimeStart
*
* @return string
*/
public function getConsumeTimeStart()
{
return $this->consumeTimeStart;
}
/**
* Sets consumeTimeStart
*
* @param string $consumeTimeStart
* @return QueryConsumeRecordAdapterRequest
*/
public function setConsumeTimeStart($consumeTimeStart)
{
$this->consumeTimeStart = $consumeTimeStart;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return QueryConsumeRecordAdapterRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'query_consume_record_adapter';
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 QueryConsumeRecordAdapterRequestMarshaller implements RequestMarshaller
{
/**
* @var QueryConsumeRecordAdapterRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new QueryConsumeRecordAdapterRequestMarshaller();
}
/**
* @return QueryConsumeRecordAdapterRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/rights/query-consume-records';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param QueryConsumeRecordAdapterRequest $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->getOperatedMerchantNo() != null){
$internalRequest->addParameter('operatedMerchantNo', ObjectSerializer::sanitizeForSerialization($request->getOperatedMerchantNo(), 'string'));
}
if($request->getUserNo() != null){
$internalRequest->addParameter('userNo', ObjectSerializer::sanitizeForSerialization($request->getUserNo(), 'string'));
}
if($request->getPageNo() != null){
$internalRequest->addParameter('pageNo', ObjectSerializer::sanitizeForSerialization($request->getPageNo(), 'int', 'int32'));
}
if($request->getPageSize() != null){
$internalRequest->addParameter('pageSize', ObjectSerializer::sanitizeForSerialization($request->getPageSize(), 'int', 'int32'));
}
if($request->getConsumeTimeEnd() != null){
$internalRequest->addParameter('consumeTimeEnd', ObjectSerializer::sanitizeForSerialization($request->getConsumeTimeEnd(), 'string'));
}
if($request->getConsumeTimeStart() != null){
$internalRequest->addParameter('consumeTimeStart', ObjectSerializer::sanitizeForSerialization($request->getConsumeTimeStart(), 'string'));
}
if($request->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
QueryConsumeRecordAdapterRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,363 @@
<?php
/**
* QueryRightsConsumeAdapterRespDTO
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* QueryRightsConsumeAdapterRespDTO Class Doc Comment
*
* @category Class
* @description 请修改我
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class QueryRightsConsumeAdapterRespDTO implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'QueryRightsConsumeAdapterRespDTO';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'rightsConsumeList' => '\Yeepay\Yop\Sdk\Service\Promtion\Model\RightsConsumeDto[]',
'message' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'rightsConsumeList' => null,
'message' => 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',
'rightsConsumeList' => 'rightsConsumeList',
'message' => 'message'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'rightsConsumeList' => 'setRightsConsumeList',
'message' => 'setMessage'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'rightsConsumeList' => 'getRightsConsumeList',
'message' => 'getMessage'
];
/**
* 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['rightsConsumeList'] = isset($data['rightsConsumeList']) ? $data['rightsConsumeList'] : null;
$this->container['message'] = isset($data['message']) ? $data['message'] : 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 code
*
* @return $this
*/
public function setCode($code)
{
$this->container['code'] = $code;
return $this;
}
/**
* Gets rightsConsumeList
*
* @return \Yeepay\Yop\Sdk\Service\Promtion\Model\RightsConsumeDto[]
*/
public function getRightsConsumeList()
{
return $this->container['rightsConsumeList'];
}
/**
* Sets rightsConsumeList
*
* @param \Yeepay\Yop\Sdk\Service\Promtion\Model\RightsConsumeDto[] $rightsConsumeList rightsConsumeList
*
* @return $this
*/
public function setRightsConsumeList($rightsConsumeList)
{
$this->container['rightsConsumeList'] = $rightsConsumeList;
return $this;
}
/**
* Gets message
*
* @return string
*/
public function getMessage()
{
return $this->container['message'];
}
/**
* Sets message
*
* @param string $message message
*
* @return $this
*/
public function setMessage($message)
{
$this->container['message'] = $message;
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,363 @@
<?php
/**
* QueryRightsListAdapterRespDTO
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* QueryRightsListAdapterRespDTO Class Doc Comment
*
* @category Class
* @description 请修改我
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class QueryRightsListAdapterRespDTO implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'QueryRightsListAdapterRespDTO';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'rightsList' => '\Yeepay\Yop\Sdk\Service\Promtion\Model\RightsDto[]',
'message' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'rightsList' => null,
'message' => 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',
'rightsList' => 'rightsList',
'message' => 'message'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'rightsList' => 'setRightsList',
'message' => 'setMessage'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'rightsList' => 'getRightsList',
'message' => 'getMessage'
];
/**
* 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['rightsList'] = isset($data['rightsList']) ? $data['rightsList'] : null;
$this->container['message'] = isset($data['message']) ? $data['message'] : 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 code
*
* @return $this
*/
public function setCode($code)
{
$this->container['code'] = $code;
return $this;
}
/**
* Gets rightsList
*
* @return \Yeepay\Yop\Sdk\Service\Promtion\Model\RightsDto[]
*/
public function getRightsList()
{
return $this->container['rightsList'];
}
/**
* Sets rightsList
*
* @param \Yeepay\Yop\Sdk\Service\Promtion\Model\RightsDto[] $rightsList rightsList
*
* @return $this
*/
public function setRightsList($rightsList)
{
$this->container['rightsList'] = $rightsList;
return $this;
}
/**
* Gets message
*
* @return string
*/
public function getMessage()
{
return $this->container['message'];
}
/**
* Sets message
*
* @param string $message message
*
* @return $this
*/
public function setMessage($message)
{
$this->container['message'] = $message;
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,142 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class QueryRightsRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $userNo;
/**
* @var int
*/
private $pageNo;
/**
* @var int
*/
private $pageSize;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $operatedMerchantNo;
/**
* Gets userNo
*
* @return string
*/
public function getUserNo()
{
return $this->userNo;
}
/**
* Sets userNo
*
* @param string $userNo
* @return QueryRightsRequest
*/
public function setUserNo($userNo)
{
$this->userNo = $userNo;
return $this;
}
/**
* Gets pageNo
*
* @return int
*/
public function getPageNo()
{
return $this->pageNo;
}
/**
* Sets pageNo
*
* @param int $pageNo
* @return QueryRightsRequest
*/
public function setPageNo($pageNo)
{
$this->pageNo = $pageNo;
return $this;
}
/**
* Gets pageSize
*
* @return int
*/
public function getPageSize()
{
return $this->pageSize;
}
/**
* Sets pageSize
*
* @param int $pageSize
* @return QueryRightsRequest
*/
public function setPageSize($pageSize)
{
$this->pageSize = $pageSize;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return QueryRightsRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets operatedMerchantNo
*
* @return string
*/
public function getOperatedMerchantNo()
{
return $this->operatedMerchantNo;
}
/**
* Sets operatedMerchantNo
*
* @param string $operatedMerchantNo
* @return QueryRightsRequest
*/
public function setOperatedMerchantNo($operatedMerchantNo)
{
$this->operatedMerchantNo = $operatedMerchantNo;
return $this;
}
public static function getOperationId()
{
return 'query_rights';
}
}

View File

@@ -0,0 +1,92 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 QueryRightsRequestMarshaller implements RequestMarshaller
{
/**
* @var QueryRightsRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new QueryRightsRequestMarshaller();
}
/**
* @return QueryRightsRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/rights/query-rights';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param QueryRightsRequest $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->getUserNo() != null){
$internalRequest->addParameter('userNo', ObjectSerializer::sanitizeForSerialization($request->getUserNo(), 'string'));
}
if($request->getPageNo() != null){
$internalRequest->addParameter('pageNo', ObjectSerializer::sanitizeForSerialization($request->getPageNo(), 'int', 'int32'));
}
if($request->getPageSize() != null){
$internalRequest->addParameter('pageSize', ObjectSerializer::sanitizeForSerialization($request->getPageSize(), 'int', 'int32'));
}
if($request->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
if($request->getOperatedMerchantNo() != null){
$internalRequest->addParameter('operatedMerchantNo', ObjectSerializer::sanitizeForSerialization($request->getOperatedMerchantNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
QueryRightsRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,453 @@
<?php
/**
* RightsConsumeDto
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* RightsConsumeDto Class Doc Comment
*
* @category Class
* @description 请修改我
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class RightsConsumeDto implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'RightsConsumeDto';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'consumeTime' => 'string',
'brandName' => 'string',
'rightsCode' => 'string',
'rightsTitle' => 'string',
'requestNo' => 'string',
'consumeStatus' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'consumeTime' => null,
'brandName' => null,
'rightsCode' => null,
'rightsTitle' => null,
'requestNo' => null,
'consumeStatus' => 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 = [
'consumeTime' => 'consumeTime',
'brandName' => 'brandName',
'rightsCode' => 'rightsCode',
'rightsTitle' => 'rightsTitle',
'requestNo' => 'requestNo',
'consumeStatus' => 'consumeStatus'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'consumeTime' => 'setConsumeTime',
'brandName' => 'setBrandName',
'rightsCode' => 'setRightsCode',
'rightsTitle' => 'setRightsTitle',
'requestNo' => 'setRequestNo',
'consumeStatus' => 'setConsumeStatus'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'consumeTime' => 'getConsumeTime',
'brandName' => 'getBrandName',
'rightsCode' => 'getRightsCode',
'rightsTitle' => 'getRightsTitle',
'requestNo' => 'getRequestNo',
'consumeStatus' => 'getConsumeStatus'
];
/**
* 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['consumeTime'] = isset($data['consumeTime']) ? $data['consumeTime'] : null;
$this->container['brandName'] = isset($data['brandName']) ? $data['brandName'] : null;
$this->container['rightsCode'] = isset($data['rightsCode']) ? $data['rightsCode'] : null;
$this->container['rightsTitle'] = isset($data['rightsTitle']) ? $data['rightsTitle'] : null;
$this->container['requestNo'] = isset($data['requestNo']) ? $data['requestNo'] : null;
$this->container['consumeStatus'] = isset($data['consumeStatus']) ? $data['consumeStatus'] : 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 consumeTime
*
* @return string
*/
public function getConsumeTime()
{
return $this->container['consumeTime'];
}
/**
* Sets consumeTime
*
* @param string $consumeTime consumeTime
*
* @return $this
*/
public function setConsumeTime($consumeTime)
{
$this->container['consumeTime'] = $consumeTime;
return $this;
}
/**
* Gets brandName
*
* @return string
*/
public function getBrandName()
{
return $this->container['brandName'];
}
/**
* Sets brandName
*
* @param string $brandName brandName
*
* @return $this
*/
public function setBrandName($brandName)
{
$this->container['brandName'] = $brandName;
return $this;
}
/**
* Gets rightsCode
*
* @return string
*/
public function getRightsCode()
{
return $this->container['rightsCode'];
}
/**
* Sets rightsCode
*
* @param string $rightsCode rightsCode
*
* @return $this
*/
public function setRightsCode($rightsCode)
{
$this->container['rightsCode'] = $rightsCode;
return $this;
}
/**
* Gets rightsTitle
*
* @return string
*/
public function getRightsTitle()
{
return $this->container['rightsTitle'];
}
/**
* Sets rightsTitle
*
* @param string $rightsTitle rightsTitle
*
* @return $this
*/
public function setRightsTitle($rightsTitle)
{
$this->container['rightsTitle'] = $rightsTitle;
return $this;
}
/**
* Gets requestNo
*
* @return string
*/
public function getRequestNo()
{
return $this->container['requestNo'];
}
/**
* Sets requestNo
*
* @param string $requestNo requestNo
*
* @return $this
*/
public function setRequestNo($requestNo)
{
$this->container['requestNo'] = $requestNo;
return $this;
}
/**
* Gets consumeStatus
*
* @return string
*/
public function getConsumeStatus()
{
return $this->container['consumeStatus'];
}
/**
* Sets consumeStatus
*
* @param string $consumeStatus consumeStatus
*
* @return $this
*/
public function setConsumeStatus($consumeStatus)
{
$this->container['consumeStatus'] = $consumeStatus;
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,117 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class RightsCreateQrcodeRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $operatedMerchantNo;
/**
* @var string
*/
private $rightsCode;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $userNo;
/**
* Gets operatedMerchantNo
*
* @return string
*/
public function getOperatedMerchantNo()
{
return $this->operatedMerchantNo;
}
/**
* Sets operatedMerchantNo
*
* @param string $operatedMerchantNo
* @return RightsCreateQrcodeRequest
*/
public function setOperatedMerchantNo($operatedMerchantNo)
{
$this->operatedMerchantNo = $operatedMerchantNo;
return $this;
}
/**
* Gets rightsCode
*
* @return string
*/
public function getRightsCode()
{
return $this->rightsCode;
}
/**
* Sets rightsCode
*
* @param string $rightsCode
* @return RightsCreateQrcodeRequest
*/
public function setRightsCode($rightsCode)
{
$this->rightsCode = $rightsCode;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return RightsCreateQrcodeRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets userNo
*
* @return string
*/
public function getUserNo()
{
return $this->userNo;
}
/**
* Sets userNo
*
* @param string $userNo
* @return RightsCreateQrcodeRequest
*/
public function setUserNo($userNo)
{
$this->userNo = $userNo;
return $this;
}
public static function getOperationId()
{
return 'rightsCreateQrcode';
}
}

View File

@@ -0,0 +1,89 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 RightsCreateQrcodeRequestMarshaller implements RequestMarshaller
{
/**
* @var RightsCreateQrcodeRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RightsCreateQrcodeRequestMarshaller();
}
/**
* @return RightsCreateQrcodeRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/rights/create-qrcode';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param RightsCreateQrcodeRequest $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->getOperatedMerchantNo() != null){
$internalRequest->addParameter('operatedMerchantNo', ObjectSerializer::sanitizeForSerialization($request->getOperatedMerchantNo(), 'string'));
}
if($request->getRightsCode() != null){
$internalRequest->addParameter('rightsCode', ObjectSerializer::sanitizeForSerialization($request->getRightsCode(), 'string'));
}
if($request->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
if($request->getUserNo() != null){
$internalRequest->addParameter('userNo', ObjectSerializer::sanitizeForSerialization($request->getUserNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
RightsCreateQrcodeRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,423 @@
<?php
/**
* RightsDto
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* RightsDto Class Doc Comment
*
* @category Class
* @description 请修改我
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class RightsDto implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'RightsDto';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'endEffectDate' => 'string',
'rightsCode' => 'string',
'rightsTitle' => 'string',
'brandNo' => 'string',
'merchantNo' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'endEffectDate' => null,
'rightsCode' => null,
'rightsTitle' => null,
'brandNo' => null,
'merchantNo' => 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 = [
'endEffectDate' => 'endEffectDate',
'rightsCode' => 'rightsCode',
'rightsTitle' => 'rightsTitle',
'brandNo' => 'brandNo',
'merchantNo' => 'merchantNo'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'endEffectDate' => 'setEndEffectDate',
'rightsCode' => 'setRightsCode',
'rightsTitle' => 'setRightsTitle',
'brandNo' => 'setBrandNo',
'merchantNo' => 'setMerchantNo'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'endEffectDate' => 'getEndEffectDate',
'rightsCode' => 'getRightsCode',
'rightsTitle' => 'getRightsTitle',
'brandNo' => 'getBrandNo',
'merchantNo' => 'getMerchantNo'
];
/**
* 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['endEffectDate'] = isset($data['endEffectDate']) ? $data['endEffectDate'] : null;
$this->container['rightsCode'] = isset($data['rightsCode']) ? $data['rightsCode'] : null;
$this->container['rightsTitle'] = isset($data['rightsTitle']) ? $data['rightsTitle'] : null;
$this->container['brandNo'] = isset($data['brandNo']) ? $data['brandNo'] : null;
$this->container['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : 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 endEffectDate
*
* @return string
*/
public function getEndEffectDate()
{
return $this->container['endEffectDate'];
}
/**
* Sets endEffectDate
*
* @param string $endEffectDate endEffectDate
*
* @return $this
*/
public function setEndEffectDate($endEffectDate)
{
$this->container['endEffectDate'] = $endEffectDate;
return $this;
}
/**
* Gets rightsCode
*
* @return string
*/
public function getRightsCode()
{
return $this->container['rightsCode'];
}
/**
* Sets rightsCode
*
* @param string $rightsCode rightsCode
*
* @return $this
*/
public function setRightsCode($rightsCode)
{
$this->container['rightsCode'] = $rightsCode;
return $this;
}
/**
* Gets rightsTitle
*
* @return string
*/
public function getRightsTitle()
{
return $this->container['rightsTitle'];
}
/**
* Sets rightsTitle
*
* @param string $rightsTitle rightsTitle
*
* @return $this
*/
public function setRightsTitle($rightsTitle)
{
$this->container['rightsTitle'] = $rightsTitle;
return $this;
}
/**
* Gets brandNo
*
* @return string
*/
public function getBrandNo()
{
return $this->container['brandNo'];
}
/**
* Sets brandNo
*
* @param string $brandNo brandNo
*
* @return $this
*/
public function setBrandNo($brandNo)
{
$this->container['brandNo'] = $brandNo;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->container['merchantNo'];
}
/**
* Sets merchantNo
*
* @param string $merchantNo merchantNo
*
* @return $this
*/
public function setMerchantNo($merchantNo)
{
$this->container['merchantNo'] = $merchantNo;
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\Promtion\Model;
class RightsFrozenRightsRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $productNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets productNo
*
* @return string
*/
public function getProductNo()
{
return $this->productNo;
}
/**
* Sets productNo
*
* @param string $productNo
* @return RightsFrozenRightsRequest
*/
public function setProductNo($productNo)
{
$this->productNo = $productNo;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return RightsFrozenRightsRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'rightsFrozenRights';
}
}

View File

@@ -0,0 +1,83 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 RightsFrozenRightsRequestMarshaller implements RequestMarshaller
{
/**
* @var RightsFrozenRightsRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RightsFrozenRightsRequestMarshaller();
}
/**
* @return RightsFrozenRightsRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/rights/frozen-rights';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param RightsFrozenRightsRequest $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->getProductNo() != null){
$internalRequest->addParameter('productNo', ObjectSerializer::sanitizeForSerialization($request->getProductNo(), 'string'));
}
if($request->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
RightsFrozenRightsRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,192 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class RightsQueryConsumeRecordsRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $operatedMerchantNo;
/**
* @var string
*/
private $userNo;
/**
* @var int
*/
private $pageNo;
/**
* @var int
*/
private $pageSize;
/**
* @var string
*/
private $consumeTimeEnd;
/**
* @var string
*/
private $consumeTimeStart;
/**
* @var string
*/
private $merchantNo;
/**
* Gets operatedMerchantNo
*
* @return string
*/
public function getOperatedMerchantNo()
{
return $this->operatedMerchantNo;
}
/**
* Sets operatedMerchantNo
*
* @param string $operatedMerchantNo
* @return RightsQueryConsumeRecordsRequest
*/
public function setOperatedMerchantNo($operatedMerchantNo)
{
$this->operatedMerchantNo = $operatedMerchantNo;
return $this;
}
/**
* Gets userNo
*
* @return string
*/
public function getUserNo()
{
return $this->userNo;
}
/**
* Sets userNo
*
* @param string $userNo
* @return RightsQueryConsumeRecordsRequest
*/
public function setUserNo($userNo)
{
$this->userNo = $userNo;
return $this;
}
/**
* Gets pageNo
*
* @return int
*/
public function getPageNo()
{
return $this->pageNo;
}
/**
* Sets pageNo
*
* @param int $pageNo
* @return RightsQueryConsumeRecordsRequest
*/
public function setPageNo($pageNo)
{
$this->pageNo = $pageNo;
return $this;
}
/**
* Gets pageSize
*
* @return int
*/
public function getPageSize()
{
return $this->pageSize;
}
/**
* Sets pageSize
*
* @param int $pageSize
* @return RightsQueryConsumeRecordsRequest
*/
public function setPageSize($pageSize)
{
$this->pageSize = $pageSize;
return $this;
}
/**
* Gets consumeTimeEnd
*
* @return string
*/
public function getConsumeTimeEnd()
{
return $this->consumeTimeEnd;
}
/**
* Sets consumeTimeEnd
*
* @param string $consumeTimeEnd
* @return RightsQueryConsumeRecordsRequest
*/
public function setConsumeTimeEnd($consumeTimeEnd)
{
$this->consumeTimeEnd = $consumeTimeEnd;
return $this;
}
/**
* Gets consumeTimeStart
*
* @return string
*/
public function getConsumeTimeStart()
{
return $this->consumeTimeStart;
}
/**
* Sets consumeTimeStart
*
* @param string $consumeTimeStart
* @return RightsQueryConsumeRecordsRequest
*/
public function setConsumeTimeStart($consumeTimeStart)
{
$this->consumeTimeStart = $consumeTimeStart;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return RightsQueryConsumeRecordsRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'rightsQueryConsumeRecords';
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 RightsQueryConsumeRecordsRequestMarshaller implements RequestMarshaller
{
/**
* @var RightsQueryConsumeRecordsRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RightsQueryConsumeRecordsRequestMarshaller();
}
/**
* @return RightsQueryConsumeRecordsRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/rights/query-consume-records';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param RightsQueryConsumeRecordsRequest $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->getOperatedMerchantNo() != null){
$internalRequest->addParameter('operatedMerchantNo', ObjectSerializer::sanitizeForSerialization($request->getOperatedMerchantNo(), 'string'));
}
if($request->getUserNo() != null){
$internalRequest->addParameter('userNo', ObjectSerializer::sanitizeForSerialization($request->getUserNo(), 'string'));
}
if($request->getPageNo() != null){
$internalRequest->addParameter('pageNo', ObjectSerializer::sanitizeForSerialization($request->getPageNo(), 'int', 'int32'));
}
if($request->getPageSize() != null){
$internalRequest->addParameter('pageSize', ObjectSerializer::sanitizeForSerialization($request->getPageSize(), 'int', 'int32'));
}
if($request->getConsumeTimeEnd() != null){
$internalRequest->addParameter('consumeTimeEnd', ObjectSerializer::sanitizeForSerialization($request->getConsumeTimeEnd(), 'string'));
}
if($request->getConsumeTimeStart() != null){
$internalRequest->addParameter('consumeTimeStart', ObjectSerializer::sanitizeForSerialization($request->getConsumeTimeStart(), 'string'));
}
if($request->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
RightsQueryConsumeRecordsRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,142 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class RightsQueryRightsRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $userNo;
/**
* @var int
*/
private $pageNo;
/**
* @var int
*/
private $pageSize;
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $operatedMerchantNo;
/**
* Gets userNo
*
* @return string
*/
public function getUserNo()
{
return $this->userNo;
}
/**
* Sets userNo
*
* @param string $userNo
* @return RightsQueryRightsRequest
*/
public function setUserNo($userNo)
{
$this->userNo = $userNo;
return $this;
}
/**
* Gets pageNo
*
* @return int
*/
public function getPageNo()
{
return $this->pageNo;
}
/**
* Sets pageNo
*
* @param int $pageNo
* @return RightsQueryRightsRequest
*/
public function setPageNo($pageNo)
{
$this->pageNo = $pageNo;
return $this;
}
/**
* Gets pageSize
*
* @return int
*/
public function getPageSize()
{
return $this->pageSize;
}
/**
* Sets pageSize
*
* @param int $pageSize
* @return RightsQueryRightsRequest
*/
public function setPageSize($pageSize)
{
$this->pageSize = $pageSize;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return RightsQueryRightsRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets operatedMerchantNo
*
* @return string
*/
public function getOperatedMerchantNo()
{
return $this->operatedMerchantNo;
}
/**
* Sets operatedMerchantNo
*
* @param string $operatedMerchantNo
* @return RightsQueryRightsRequest
*/
public function setOperatedMerchantNo($operatedMerchantNo)
{
$this->operatedMerchantNo = $operatedMerchantNo;
return $this;
}
public static function getOperationId()
{
return 'rightsQueryRights';
}
}

View File

@@ -0,0 +1,92 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 RightsQueryRightsRequestMarshaller implements RequestMarshaller
{
/**
* @var RightsQueryRightsRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RightsQueryRightsRequestMarshaller();
}
/**
* @return RightsQueryRightsRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/rights/query-rights';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param RightsQueryRightsRequest $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->getUserNo() != null){
$internalRequest->addParameter('userNo', ObjectSerializer::sanitizeForSerialization($request->getUserNo(), 'string'));
}
if($request->getPageNo() != null){
$internalRequest->addParameter('pageNo', ObjectSerializer::sanitizeForSerialization($request->getPageNo(), 'int', 'int32'));
}
if($request->getPageSize() != null){
$internalRequest->addParameter('pageSize', ObjectSerializer::sanitizeForSerialization($request->getPageSize(), 'int', 'int32'));
}
if($request->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
if($request->getOperatedMerchantNo() != null){
$internalRequest->addParameter('operatedMerchantNo', ObjectSerializer::sanitizeForSerialization($request->getOperatedMerchantNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
RightsQueryRightsRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,92 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class RightsTransferRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $userNo;
/**
* @var string
*/
private $productNo;
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return RightsTransferRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets userNo
*
* @return string
*/
public function getUserNo()
{
return $this->userNo;
}
/**
* Sets userNo
*
* @param string $userNo
* @return RightsTransferRequest
*/
public function setUserNo($userNo)
{
$this->userNo = $userNo;
return $this;
}
/**
* Gets productNo
*
* @return string
*/
public function getProductNo()
{
return $this->productNo;
}
/**
* Sets productNo
*
* @param string $productNo
* @return RightsTransferRequest
*/
public function setProductNo($productNo)
{
$this->productNo = $productNo;
return $this;
}
public static function getOperationId()
{
return 'rights_transfer';
}
}

View File

@@ -0,0 +1,86 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 RightsTransferRequestMarshaller implements RequestMarshaller
{
/**
* @var RightsTransferRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new RightsTransferRequestMarshaller();
}
/**
* @return RightsTransferRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/rights-transfer';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param RightsTransferRequest $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->getMerchantNo() != null){
$internalRequest->addParameter('merchantNo', ObjectSerializer::sanitizeForSerialization($request->getMerchantNo(), 'string'));
}
if($request->getUserNo() != null){
$internalRequest->addParameter('userNo', ObjectSerializer::sanitizeForSerialization($request->getUserNo(), 'string'));
}
if($request->getProductNo() != null){
$internalRequest->addParameter('productNo', ObjectSerializer::sanitizeForSerialization($request->getProductNo(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
RightsTransferRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,217 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class SubsidyApplyRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $orderId;
/**
* @var string
*/
private $uniqueOrderNo;
/**
* @var string
*/
private $subsidyRequestId;
/**
* @var string
*/
private $subsidyAmount;
/**
* @var string
*/
private $assumeMerchantNo;
/**
* @var string
*/
private $memo;
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets orderId
*
* @return string
*/
public function getOrderId()
{
return $this->orderId;
}
/**
* Sets orderId
*
* @param string $orderId
* @return SubsidyApplyRequest
*/
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 SubsidyApplyRequest
*/
public function setUniqueOrderNo($uniqueOrderNo)
{
$this->uniqueOrderNo = $uniqueOrderNo;
return $this;
}
/**
* Gets subsidyRequestId
*
* @return string
*/
public function getSubsidyRequestId()
{
return $this->subsidyRequestId;
}
/**
* Sets subsidyRequestId
*
* @param string $subsidyRequestId
* @return SubsidyApplyRequest
*/
public function setSubsidyRequestId($subsidyRequestId)
{
$this->subsidyRequestId = $subsidyRequestId;
return $this;
}
/**
* Gets subsidyAmount
*
* @return string
*/
public function getSubsidyAmount()
{
return $this->subsidyAmount;
}
/**
* Sets subsidyAmount
*
* @param string $subsidyAmount
* @return SubsidyApplyRequest
*/
public function setSubsidyAmount($subsidyAmount)
{
$this->subsidyAmount = $subsidyAmount;
return $this;
}
/**
* Gets assumeMerchantNo
*
* @return string
*/
public function getAssumeMerchantNo()
{
return $this->assumeMerchantNo;
}
/**
* Sets assumeMerchantNo
*
* @param string $assumeMerchantNo
* @return SubsidyApplyRequest
*/
public function setAssumeMerchantNo($assumeMerchantNo)
{
$this->assumeMerchantNo = $assumeMerchantNo;
return $this;
}
/**
* Gets memo
*
* @return string
*/
public function getMemo()
{
return $this->memo;
}
/**
* Sets memo
*
* @param string $memo
* @return SubsidyApplyRequest
*/
public function setMemo($memo)
{
$this->memo = $memo;
return $this;
}
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return SubsidyApplyRequest
*/
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 SubsidyApplyRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'subsidyApply';
}
}

View File

@@ -0,0 +1,101 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 SubsidyApplyRequestMarshaller implements RequestMarshaller
{
/**
* @var SubsidyApplyRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new SubsidyApplyRequestMarshaller();
}
/**
* @return SubsidyApplyRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/subsidy/apply';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param SubsidyApplyRequest $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->getSubsidyRequestId() != null){
$internalRequest->addParameter('subsidyRequestId', ObjectSerializer::sanitizeForSerialization($request->getSubsidyRequestId(), 'string'));
}
if($request->getSubsidyAmount() != null){
$internalRequest->addParameter('subsidyAmount', ObjectSerializer::sanitizeForSerialization($request->getSubsidyAmount(), 'string'));
}
if($request->getAssumeMerchantNo() != null){
$internalRequest->addParameter('assumeMerchantNo', ObjectSerializer::sanitizeForSerialization($request->getAssumeMerchantNo(), 'string'));
}
if($request->getMemo() != null){
$internalRequest->addParameter('memo', ObjectSerializer::sanitizeForSerialization($request->getMemo(), '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;
}
}
SubsidyApplyRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,482 @@
<?php
/**
* SubsidyApplyYopSubsidyResDTOResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* SubsidyApplyYopSubsidyResDTOResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class SubsidyApplyYopSubsidyResDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'SubsidyApplyYopSubsidyResDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'subsidyOrderNo' => 'string',
'status' => 'string',
'subsidyAmount' => 'string',
'assumeMerchantNo' => 'string',
'failReason' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'subsidyOrderNo' => null,
'status' => null,
'subsidyAmount' => null,
'assumeMerchantNo' => null,
'failReason' => 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',
'subsidyOrderNo' => 'subsidyOrderNo',
'status' => 'status',
'subsidyAmount' => 'subsidyAmount',
'assumeMerchantNo' => 'assumeMerchantNo',
'failReason' => 'failReason'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'subsidyOrderNo' => 'setSubsidyOrderNo',
'status' => 'setStatus',
'subsidyAmount' => 'setSubsidyAmount',
'assumeMerchantNo' => 'setAssumeMerchantNo',
'failReason' => 'setFailReason'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'subsidyOrderNo' => 'getSubsidyOrderNo',
'status' => 'getStatus',
'subsidyAmount' => 'getSubsidyAmount',
'assumeMerchantNo' => 'getAssumeMerchantNo',
'failReason' => 'getFailReason'
];
/**
* 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['subsidyOrderNo'] = isset($data['subsidyOrderNo']) ? $data['subsidyOrderNo'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['subsidyAmount'] = isset($data['subsidyAmount']) ? $data['subsidyAmount'] : null;
$this->container['assumeMerchantNo'] = isset($data['assumeMerchantNo']) ? $data['assumeMerchantNo'] : null;
$this->container['failReason'] = isset($data['failReason']) ? $data['failReason'] : 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 subsidyOrderNo
*
* @return string
*/
public function getSubsidyOrderNo()
{
return $this->container['subsidyOrderNo'];
}
/**
* Sets subsidyOrderNo
*
* @param string $subsidyOrderNo 易宝补贴订单号
*
* @return $this
*/
public function setSubsidyOrderNo($subsidyOrderNo)
{
$this->container['subsidyOrderNo'] = $subsidyOrderNo;
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 subsidyAmount
*
* @return string
*/
public function getSubsidyAmount()
{
return $this->container['subsidyAmount'];
}
/**
* Sets subsidyAmount
*
* @param string $subsidyAmount 补贴金额
*
* @return $this
*/
public function setSubsidyAmount($subsidyAmount)
{
$this->container['subsidyAmount'] = $subsidyAmount;
return $this;
}
/**
* Gets assumeMerchantNo
*
* @return string
*/
public function getAssumeMerchantNo()
{
return $this->container['assumeMerchantNo'];
}
/**
* Sets assumeMerchantNo
*
* @param string $assumeMerchantNo 出资方商编
*
* @return $this
*/
public function setAssumeMerchantNo($assumeMerchantNo)
{
$this->container['assumeMerchantNo'] = $assumeMerchantNo;
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;
}
/**
* 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,117 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class SubsidyBackQueryRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $subsidyRequestId;
/**
* @var string
*/
private $subsidyBackRequestId;
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets subsidyRequestId
*
* @return string
*/
public function getSubsidyRequestId()
{
return $this->subsidyRequestId;
}
/**
* Sets subsidyRequestId
*
* @param string $subsidyRequestId
* @return SubsidyBackQueryRequest
*/
public function setSubsidyRequestId($subsidyRequestId)
{
$this->subsidyRequestId = $subsidyRequestId;
return $this;
}
/**
* Gets subsidyBackRequestId
*
* @return string
*/
public function getSubsidyBackRequestId()
{
return $this->subsidyBackRequestId;
}
/**
* Sets subsidyBackRequestId
*
* @param string $subsidyBackRequestId
* @return SubsidyBackQueryRequest
*/
public function setSubsidyBackRequestId($subsidyBackRequestId)
{
$this->subsidyBackRequestId = $subsidyBackRequestId;
return $this;
}
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return SubsidyBackQueryRequest
*/
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 SubsidyBackQueryRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'subsidyBackQuery';
}
}

View File

@@ -0,0 +1,89 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 SubsidyBackQueryRequestMarshaller implements RequestMarshaller
{
/**
* @var SubsidyBackQueryRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new SubsidyBackQueryRequestMarshaller();
}
/**
* @return SubsidyBackQueryRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/subsidy/back/query';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param SubsidyBackQueryRequest $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->getSubsidyRequestId() != null){
$internalRequest->addParameter('subsidyRequestId', ObjectSerializer::sanitizeForSerialization($request->getSubsidyRequestId(), 'string'));
}
if($request->getSubsidyBackRequestId() != null){
$internalRequest->addParameter('subsidyBackRequestId', ObjectSerializer::sanitizeForSerialization($request->getSubsidyBackRequestId(), '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;
}
}
SubsidyBackQueryRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,452 @@
<?php
/**
* SubsidyBackQueryYopQuerySubsidyBackResDTOResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* SubsidyBackQueryYopQuerySubsidyBackResDTOResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class SubsidyBackQueryYopQuerySubsidyBackResDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'SubsidyBackQueryYopQuerySubsidyBackResDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'status' => 'string',
'subsidyBackOrderNo' => 'string',
'subsidyBackAmount' => 'float',
'failReason' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'status' => null,
'subsidyBackOrderNo' => null,
'subsidyBackAmount' => null,
'failReason' => 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',
'status' => 'status',
'subsidyBackOrderNo' => 'subsidyBackOrderNo',
'subsidyBackAmount' => 'subsidyBackAmount',
'failReason' => 'failReason'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'status' => 'setStatus',
'subsidyBackOrderNo' => 'setSubsidyBackOrderNo',
'subsidyBackAmount' => 'setSubsidyBackAmount',
'failReason' => 'setFailReason'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'status' => 'getStatus',
'subsidyBackOrderNo' => 'getSubsidyBackOrderNo',
'subsidyBackAmount' => 'getSubsidyBackAmount',
'failReason' => 'getFailReason'
];
/**
* 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['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['subsidyBackOrderNo'] = isset($data['subsidyBackOrderNo']) ? $data['subsidyBackOrderNo'] : null;
$this->container['subsidyBackAmount'] = isset($data['subsidyBackAmount']) ? $data['subsidyBackAmount'] : null;
$this->container['failReason'] = isset($data['failReason']) ? $data['failReason'] : 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 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 subsidyBackOrderNo
*
* @return string
*/
public function getSubsidyBackOrderNo()
{
return $this->container['subsidyBackOrderNo'];
}
/**
* Sets subsidyBackOrderNo
*
* @param string $subsidyBackOrderNo 易宝补贴退回订单号
*
* @return $this
*/
public function setSubsidyBackOrderNo($subsidyBackOrderNo)
{
$this->container['subsidyBackOrderNo'] = $subsidyBackOrderNo;
return $this;
}
/**
* Gets subsidyBackAmount
*
* @return float
*/
public function getSubsidyBackAmount()
{
return $this->container['subsidyBackAmount'];
}
/**
* Sets subsidyBackAmount
*
* @param float $subsidyBackAmount 补贴退回金额
*
* @return $this
*/
public function setSubsidyBackAmount($subsidyBackAmount)
{
$this->container['subsidyBackAmount'] = $subsidyBackAmount;
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;
}
/**
* 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,217 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class SubsidyBackRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $orderId;
/**
* @var string
*/
private $subsidyRequestId;
/**
* @var string
*/
private $subsidyBackRequestId;
/**
* @var string
*/
private $subsidyBackAmount;
/**
* @var string
*/
private $returnAccountType;
/**
* @var string
*/
private $memo;
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets orderId
*
* @return string
*/
public function getOrderId()
{
return $this->orderId;
}
/**
* Sets orderId
*
* @param string $orderId
* @return SubsidyBackRequest
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
return $this;
}
/**
* Gets subsidyRequestId
*
* @return string
*/
public function getSubsidyRequestId()
{
return $this->subsidyRequestId;
}
/**
* Sets subsidyRequestId
*
* @param string $subsidyRequestId
* @return SubsidyBackRequest
*/
public function setSubsidyRequestId($subsidyRequestId)
{
$this->subsidyRequestId = $subsidyRequestId;
return $this;
}
/**
* Gets subsidyBackRequestId
*
* @return string
*/
public function getSubsidyBackRequestId()
{
return $this->subsidyBackRequestId;
}
/**
* Sets subsidyBackRequestId
*
* @param string $subsidyBackRequestId
* @return SubsidyBackRequest
*/
public function setSubsidyBackRequestId($subsidyBackRequestId)
{
$this->subsidyBackRequestId = $subsidyBackRequestId;
return $this;
}
/**
* Gets subsidyBackAmount
*
* @return string
*/
public function getSubsidyBackAmount()
{
return $this->subsidyBackAmount;
}
/**
* Sets subsidyBackAmount
*
* @param string $subsidyBackAmount
* @return SubsidyBackRequest
*/
public function setSubsidyBackAmount($subsidyBackAmount)
{
$this->subsidyBackAmount = $subsidyBackAmount;
return $this;
}
/**
* Gets returnAccountType
*
* @return string
*/
public function getReturnAccountType()
{
return $this->returnAccountType;
}
/**
* Sets returnAccountType
*
* @param string $returnAccountType
* @return SubsidyBackRequest
*/
public function setReturnAccountType($returnAccountType)
{
$this->returnAccountType = $returnAccountType;
return $this;
}
/**
* Gets memo
*
* @return string
*/
public function getMemo()
{
return $this->memo;
}
/**
* Sets memo
*
* @param string $memo
* @return SubsidyBackRequest
*/
public function setMemo($memo)
{
$this->memo = $memo;
return $this;
}
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return SubsidyBackRequest
*/
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 SubsidyBackRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'subsidyBack';
}
}

View File

@@ -0,0 +1,101 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 SubsidyBackRequestMarshaller implements RequestMarshaller
{
/**
* @var SubsidyBackRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new SubsidyBackRequestMarshaller();
}
/**
* @return SubsidyBackRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/subsidy/back';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param SubsidyBackRequest $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->getSubsidyRequestId() != null){
$internalRequest->addParameter('subsidyRequestId', ObjectSerializer::sanitizeForSerialization($request->getSubsidyRequestId(), 'string'));
}
if($request->getSubsidyBackRequestId() != null){
$internalRequest->addParameter('subsidyBackRequestId', ObjectSerializer::sanitizeForSerialization($request->getSubsidyBackRequestId(), 'string'));
}
if($request->getSubsidyBackAmount() != null){
$internalRequest->addParameter('subsidyBackAmount', ObjectSerializer::sanitizeForSerialization($request->getSubsidyBackAmount(), 'string'));
}
if($request->getReturnAccountType() != null){
$internalRequest->addParameter('returnAccountType', ObjectSerializer::sanitizeForSerialization($request->getReturnAccountType(), 'string'));
}
if($request->getMemo() != null){
$internalRequest->addParameter('memo', ObjectSerializer::sanitizeForSerialization($request->getMemo(), '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;
}
}
SubsidyBackRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,482 @@
<?php
/**
* SubsidyBackYopSubsidyBackResDTOResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* SubsidyBackYopSubsidyBackResDTOResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class SubsidyBackYopSubsidyBackResDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'SubsidyBackYopSubsidyBackResDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'subsidyOrderNo' => 'string',
'subsidyBackOrderNo' => 'string',
'status' => 'string',
'subsidyBackAmount' => 'string',
'failReason' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'subsidyOrderNo' => null,
'subsidyBackOrderNo' => null,
'status' => null,
'subsidyBackAmount' => null,
'failReason' => 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',
'subsidyOrderNo' => 'subsidyOrderNo',
'subsidyBackOrderNo' => 'subsidyBackOrderNo',
'status' => 'status',
'subsidyBackAmount' => 'subsidyBackAmount',
'failReason' => 'failReason'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'subsidyOrderNo' => 'setSubsidyOrderNo',
'subsidyBackOrderNo' => 'setSubsidyBackOrderNo',
'status' => 'setStatus',
'subsidyBackAmount' => 'setSubsidyBackAmount',
'failReason' => 'setFailReason'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'subsidyOrderNo' => 'getSubsidyOrderNo',
'subsidyBackOrderNo' => 'getSubsidyBackOrderNo',
'status' => 'getStatus',
'subsidyBackAmount' => 'getSubsidyBackAmount',
'failReason' => 'getFailReason'
];
/**
* 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['subsidyOrderNo'] = isset($data['subsidyOrderNo']) ? $data['subsidyOrderNo'] : null;
$this->container['subsidyBackOrderNo'] = isset($data['subsidyBackOrderNo']) ? $data['subsidyBackOrderNo'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['subsidyBackAmount'] = isset($data['subsidyBackAmount']) ? $data['subsidyBackAmount'] : null;
$this->container['failReason'] = isset($data['failReason']) ? $data['failReason'] : 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 subsidyOrderNo
*
* @return string
*/
public function getSubsidyOrderNo()
{
return $this->container['subsidyOrderNo'];
}
/**
* Sets subsidyOrderNo
*
* @param string $subsidyOrderNo 易宝补贴订单号
*
* @return $this
*/
public function setSubsidyOrderNo($subsidyOrderNo)
{
$this->container['subsidyOrderNo'] = $subsidyOrderNo;
return $this;
}
/**
* Gets subsidyBackOrderNo
*
* @return string
*/
public function getSubsidyBackOrderNo()
{
return $this->container['subsidyBackOrderNo'];
}
/**
* Sets subsidyBackOrderNo
*
* @param string $subsidyBackOrderNo 易宝补贴退回订单号
*
* @return $this
*/
public function setSubsidyBackOrderNo($subsidyBackOrderNo)
{
$this->container['subsidyBackOrderNo'] = $subsidyBackOrderNo;
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 subsidyBackAmount
*
* @return string
*/
public function getSubsidyBackAmount()
{
return $this->container['subsidyBackAmount'];
}
/**
* Sets subsidyBackAmount
*
* @param string $subsidyBackAmount 补贴退回金额
*
* @return $this
*/
public function setSubsidyBackAmount($subsidyBackAmount)
{
$this->container['subsidyBackAmount'] = $subsidyBackAmount;
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;
}
/**
* 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,117 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
class SubsidyQueryRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $orderId;
/**
* @var string
*/
private $subsidyRequestId;
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets orderId
*
* @return string
*/
public function getOrderId()
{
return $this->orderId;
}
/**
* Sets orderId
*
* @param string $orderId
* @return SubsidyQueryRequest
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
return $this;
}
/**
* Gets subsidyRequestId
*
* @return string
*/
public function getSubsidyRequestId()
{
return $this->subsidyRequestId;
}
/**
* Sets subsidyRequestId
*
* @param string $subsidyRequestId
* @return SubsidyQueryRequest
*/
public function setSubsidyRequestId($subsidyRequestId)
{
$this->subsidyRequestId = $subsidyRequestId;
return $this;
}
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return SubsidyQueryRequest
*/
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 SubsidyQueryRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'subsidyQuery';
}
}

View File

@@ -0,0 +1,89 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Promtion\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 SubsidyQueryRequestMarshaller implements RequestMarshaller
{
/**
* @var SubsidyQueryRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new SubsidyQueryRequestMarshaller();
}
/**
* @return SubsidyQueryRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Promtion';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/promtion/subsidy/query';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param SubsidyQueryRequest $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->getSubsidyRequestId() != null){
$internalRequest->addParameter('subsidyRequestId', ObjectSerializer::sanitizeForSerialization($request->getSubsidyRequestId(), '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;
}
}
SubsidyQueryRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,512 @@
<?php
/**
* SubsidyQueryYopQuerySubsidyResDTOResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 营销
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\Promtion\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* SubsidyQueryYopQuerySubsidyResDTOResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class SubsidyQueryYopQuerySubsidyResDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'SubsidyQueryYopQuerySubsidyResDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'uniqueOrderNo' => 'string',
'subsidyOrderNo' => 'string',
'status' => 'string',
'subsidyAmount' => 'string',
'assumeMerchantNo' => 'string',
'failReason' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'uniqueOrderNo' => null,
'subsidyOrderNo' => null,
'status' => null,
'subsidyAmount' => null,
'assumeMerchantNo' => null,
'failReason' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'code' => 'code',
'message' => 'message',
'uniqueOrderNo' => 'uniqueOrderNo',
'subsidyOrderNo' => 'subsidyOrderNo',
'status' => 'status',
'subsidyAmount' => 'subsidyAmount',
'assumeMerchantNo' => 'assumeMerchantNo',
'failReason' => 'failReason'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'uniqueOrderNo' => 'setUniqueOrderNo',
'subsidyOrderNo' => 'setSubsidyOrderNo',
'status' => 'setStatus',
'subsidyAmount' => 'setSubsidyAmount',
'assumeMerchantNo' => 'setAssumeMerchantNo',
'failReason' => 'setFailReason'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'uniqueOrderNo' => 'getUniqueOrderNo',
'subsidyOrderNo' => 'getSubsidyOrderNo',
'status' => 'getStatus',
'subsidyAmount' => 'getSubsidyAmount',
'assumeMerchantNo' => 'getAssumeMerchantNo',
'failReason' => 'getFailReason'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
$this->container['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
$this->container['subsidyOrderNo'] = isset($data['subsidyOrderNo']) ? $data['subsidyOrderNo'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['subsidyAmount'] = isset($data['subsidyAmount']) ? $data['subsidyAmount'] : null;
$this->container['assumeMerchantNo'] = isset($data['assumeMerchantNo']) ? $data['assumeMerchantNo'] : null;
$this->container['failReason'] = isset($data['failReason']) ? $data['failReason'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets code
*
* @return string
*/
public function getCode()
{
return $this->container['code'];
}
/**
* Sets code
*
* @param string $code 返回码
*
* @return $this
*/
public function setCode($code)
{
$this->container['code'] = $code;
return $this;
}
/**
* Gets message
*
* @return string
*/
public function getMessage()
{
return $this->container['message'];
}
/**
* Sets message
*
* @param string $message 返回信息
*
* @return $this
*/
public function setMessage($message)
{
$this->container['message'] = $message;
return $this;
}
/**
* Gets uniqueOrderNo
*
* @return string
*/
public function getUniqueOrderNo()
{
return $this->container['uniqueOrderNo'];
}
/**
* Sets uniqueOrderNo
*
* @param string $uniqueOrderNo 易宝交易流水号
*
* @return $this
*/
public function setUniqueOrderNo($uniqueOrderNo)
{
$this->container['uniqueOrderNo'] = $uniqueOrderNo;
return $this;
}
/**
* Gets subsidyOrderNo
*
* @return string
*/
public function getSubsidyOrderNo()
{
return $this->container['subsidyOrderNo'];
}
/**
* Sets subsidyOrderNo
*
* @param string $subsidyOrderNo 易宝补贴订单号
*
* @return $this
*/
public function setSubsidyOrderNo($subsidyOrderNo)
{
$this->container['subsidyOrderNo'] = $subsidyOrderNo;
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 subsidyAmount
*
* @return string
*/
public function getSubsidyAmount()
{
return $this->container['subsidyAmount'];
}
/**
* Sets subsidyAmount
*
* @param string $subsidyAmount 补贴金额
*
* @return $this
*/
public function setSubsidyAmount($subsidyAmount)
{
$this->container['subsidyAmount'] = $subsidyAmount;
return $this;
}
/**
* Gets assumeMerchantNo
*
* @return string
*/
public function getAssumeMerchantNo()
{
return $this->container['assumeMerchantNo'];
}
/**
* Sets assumeMerchantNo
*
* @param string $assumeMerchantNo 出资方商编
*
* @return $this
*/
public function setAssumeMerchantNo($assumeMerchantNo)
{
$this->container['assumeMerchantNo'] = $assumeMerchantNo;
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;
}
/**
* 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));
}
}