first commit

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

View File

@@ -0,0 +1,405 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* BankLimitQueryBankLimitInfoDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class BankLimitQueryBankLimitInfoDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'BankLimitQueryBankLimitInfoDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = [
'bankId' => 'string',
'limitOfBill' => 'int',
'limitOfDay' => 'int',
'limitOfMonth' => 'int',
'timesOfDay' => 'int',
'timesOfMonth' => 'int',
'limitMinOfBill' => 'int',
];
/**
* Array of property to format mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerFormats = [
'bankId' => null,
'limitOfBill' => 'int64',
'limitOfDay' => 'int64',
'limitOfMonth' => 'int64',
'timesOfDay' => 'int64',
'timesOfMonth' => 'int64',
'limitMinOfBill' => 'int64',
];
/**
* Array of property to type mappings. Used for (de)serialization
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
* @var string[]
*/
protected static $attributeMap = [
'bankId' => 'bankId',
'limitOfBill' => 'limitOfBill',
'limitOfDay' => 'limitOfDay',
'limitOfMonth' => 'limitOfMonth',
'timesOfDay' => 'timesOfDay',
'timesOfMonth' => 'timesOfMonth',
'limitMinOfBill' => 'limitMinOfBill',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'bankId' => 'setBankId',
'limitOfBill' => 'setLimitOfBill',
'limitOfDay' => 'setLimitOfDay',
'limitOfMonth' => 'setLimitOfMonth',
'timesOfDay' => 'setTimesOfDay',
'timesOfMonth' => 'setTimesOfMonth',
'limitMinOfBill' => 'setLimitMinOfBill',
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'bankId' => 'getBankId',
'limitOfBill' => 'getLimitOfBill',
'limitOfDay' => 'getLimitOfDay',
'limitOfMonth' => 'getLimitOfMonth',
'timesOfDay' => 'getTimesOfDay',
'timesOfMonth' => 'getTimesOfMonth',
'limitMinOfBill' => 'getLimitMinOfBill',
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['bankId'] = isset($data['bankId']) ? $data['bankId'] : null;
$this->container['limitOfBill'] = isset($data['limitOfBill']) ? $data['limitOfBill'] : null;
$this->container['limitOfDay'] = isset($data['limitOfDay']) ? $data['limitOfDay'] : null;
$this->container['limitOfMonth'] = isset($data['limitOfMonth']) ? $data['limitOfMonth'] : null;
$this->container['timesOfDay'] = isset($data['timesOfDay']) ? $data['timesOfDay'] : null;
$this->container['timesOfMonth'] = isset($data['timesOfMonth']) ? $data['timesOfMonth'] : null;
$this->container['limitMinOfBill'] = isset($data['limitMinOfBill']) ? $data['limitMinOfBill'] : null;
}
/**
* Show all the invalid properties with reasons.
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets bankId
* @return string
*/
public function getBankId()
{
return $this->container['bankId'];
}
/**
* Sets bankId
* @param string $bankId 银行编码
* @return $this
*/
public function setBankId($bankId)
{
$this->container['bankId'] = $bankId;
return $this;
}
/**
* Gets limitOfBill
* @return int
*/
public function getLimitOfBill()
{
return $this->container['limitOfBill'];
}
/**
* Sets limitOfBill
* @param int $limitOfBill 单笔限额
* @return $this
*/
public function setLimitOfBill($limitOfBill)
{
$this->container['limitOfBill'] = $limitOfBill;
return $this;
}
/**
* Gets limitOfDay
* @return int
*/
public function getLimitOfDay()
{
return $this->container['limitOfDay'];
}
/**
* Sets limitOfDay
* @param int $limitOfDay 单日限额
* @return $this
*/
public function setLimitOfDay($limitOfDay)
{
$this->container['limitOfDay'] = $limitOfDay;
return $this;
}
/**
* Gets limitOfMonth
* @return int
*/
public function getLimitOfMonth()
{
return $this->container['limitOfMonth'];
}
/**
* Sets limitOfMonth
* @param int $limitOfMonth 单月限额
* @return $this
*/
public function setLimitOfMonth($limitOfMonth)
{
$this->container['limitOfMonth'] = $limitOfMonth;
return $this;
}
/**
* Gets timesOfDay
* @return int
*/
public function getTimesOfDay()
{
return $this->container['timesOfDay'];
}
/**
* Sets timesOfDay
* @param int $timesOfDay 单日限次
* @return $this
*/
public function setTimesOfDay($timesOfDay)
{
$this->container['timesOfDay'] = $timesOfDay;
return $this;
}
/**
* Gets timesOfMonth
* @return int
*/
public function getTimesOfMonth()
{
return $this->container['timesOfMonth'];
}
/**
* Sets timesOfMonth
* @param int $timesOfMonth 单月限次
* @return $this
*/
public function setTimesOfMonth($timesOfMonth)
{
$this->container['timesOfMonth'] = $timesOfMonth;
return $this;
}
/**
* Gets limitMinOfBill
* @return int
*/
public function getLimitMinOfBill()
{
return $this->container['limitMinOfBill'];
}
/**
* Sets limitMinOfBill
* @param int $limitMinOfBill 单笔最小限额
* @return $this
*/
public function setLimitMinOfBill($limitMinOfBill)
{
$this->container['limitMinOfBill'] = $limitMinOfBill;
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,297 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
use ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* BankLimitQueryBankLimitResponseDTOResult Class Doc Comment
* @author Swagger Codegen team
* @package Yeepay\Yop\Sdk\
* @category Class
* @link https://github.com/swagger-api/swagger-codegen
*/
class BankLimitQueryBankLimitResponseDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
* @var string
*/
protected static $swaggerModelName = 'BankLimitQueryBankLimitResponseDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'bankLimitInfo' => '\Yeepay\Yop\Sdk\Service\Cnppay\Model\BankLimitQueryBankLimitInfoDTOResult[]',
];
/**
* Array of property to format mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'bankLimitInfo' => 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',
'bankLimitInfo' => 'bankLimitInfo',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'bankLimitInfo' => 'setBankLimitInfo',
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'bankLimitInfo' => 'getBankLimitInfo',
];
/**
* 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['bankLimitInfo'] = isset($data['bankLimitInfo']) ? $data['bankLimitInfo'] : 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 bankLimitInfo
* @return \Yeepay\Yop\Sdk\Service\Cnppay\Model\BankLimitQueryBankLimitInfoDTOResult[]
*/
public function getBankLimitInfo()
{
return $this->container['bankLimitInfo'];
}
/**
* Sets bankLimitInfo
* @param \Yeepay\Yop\Sdk\Service\Cnppay\Model\BankLimitQueryBankLimitInfoDTOResult[] $bankLimitInfo 银行限额信息
* @return $this
*/
public function setBankLimitInfo($bankLimitInfo)
{
$this->container['bankLimitInfo'] = $bankLimitInfo;
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,41 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
use Yeepay\Yop\Sdk\Model\BaseRequest;
class BankLimitQueryRequest extends BaseRequest
{
/**
* @var string
*/
private $merchantNo;
/**
* Gets merchantNo
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
* @param string $merchantNo
* @return BankLimitQueryRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'bankLimitQuery';
}
}

View File

@@ -0,0 +1,76 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Cnppay\Model;
use Yeepay\Yop\Sdk\Http\Headers;
use Yeepay\Yop\Sdk\Internal\DefaultRequest;
use Yeepay\Yop\Sdk\Internal\Request;
use Yeepay\Yop\Sdk\Model\Transform\RequestMarshaller;
use Yeepay\Yop\Sdk\Utils\UUIDUtils;
class BankLimitQueryRequestMarshaller implements RequestMarshaller
{
/**
* @var BankLimitQueryRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new BankLimitQueryRequestMarshaller();
}
/**
* @return BankLimitQueryRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Cnppay';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/cnppay/bank-limit/query';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param BankLimitQueryRequest $request
* @return Request
*/
public function marshal($request)
{
$internalRequest = new DefaultRequest($this->serviceName);
$internalRequest->setResourcePath($this->resourcePath);
$internalRequest->setHttpMethod($this->httpMethod);
if (!empty($request->getRequestConfig()) && !empty($request->getRequestConfig()->getCustomRequestHeaders())) {
foreach ($request->getRequestConfig()->getCustomRequestHeaders() as $name => $value) {
$internalRequest->addHeader($name, $value);
}
}
if (!isset($internalRequest->getHeaders()[Headers::YOP_REQUEST_ID])) {
$internalRequest->addHeader(Headers::YOP_REQUEST_ID, UUIDUtils::uuid());
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
BankLimitQueryRequestMarshaller::__init();

View File

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

View File

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