增加聚合支付托管下单

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,120 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Invoice;
use Yeepay\Yop\Sdk\Client\ClientExecutionParams;
use Yeepay\Yop\Sdk\Client\ClientHandler;
use Yeepay\Yop\Sdk\Client\ClientParams;
use Yeepay\Yop\Sdk\Exception\YopClientException;
use Yeepay\Yop\Sdk\Service\Invoice\Model as Model;
class InvoiceClient
{
/**
* @var ClientHandler
*/
private $clientHandler;
/**
* InvoiceClient constructor.
* @param ClientParams $clientParams
*/
function __construct(ClientParams $clientParams)
{
$this->clientHandler = new ClientHandler($clientParams);
}
/**
* @param Model\ApplyRequest $request
* @return Model\ApplyResponse
* @throws YopClientException
*/
public function apply(Model\ApplyRequest $request)
{
if ($request == null) {
throw new YopClientException("request is required.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\ApplyRequestMarshaller::getInstance(),
Model\ApplyResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
/**
* @param Model\FeeQueryRequest $request
* @return Model\FeeQueryResponse
* @throws YopClientException
*/
public function feeQuery(Model\FeeQueryRequest $request)
{
if ($request == null) {
throw new YopClientException("request is required.");
}
if ($request->getMerchantNo() == null) {
throw new YopClientException("request.merchantNo is required.");
}
if ($request->getParentMerchantNo() == null) {
throw new YopClientException("request.parentMerchantNo is required.");
}
if ($request->getChargingDateStart() == null) {
throw new YopClientException("request.chargingDateStart is required.");
}
if ($request->getChargingDateEnd() == null) {
throw new YopClientException("request.chargingDateEnd is required.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\FeeQueryRequestMarshaller::getInstance(),
Model\FeeQueryResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
/**
* @param Model\InfoModifyRequest $request
* @return Model\InfoModifyResponse
* @throws YopClientException
*/
public function infoModify(Model\InfoModifyRequest $request)
{
if ($request == null) {
throw new YopClientException("request is required.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\InfoModifyRequestMarshaller::getInstance(),
Model\InfoModifyResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
/**
* @param Model\InfoQueryRequest $request
* @return Model\InfoQueryResponse
* @throws YopClientException
*/
public function infoQuery(Model\InfoQueryRequest $request)
{
if ($request == null) {
throw new YopClientException("request is required.");
}
if ($request->getParentMerchantNo() == null) {
throw new YopClientException("request.parentMerchantNo is required.");
}
if ($request->getMerchantNo() == null) {
throw new YopClientException("request.merchantNo is required.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\InfoQueryRequestMarshaller::getInstance(),
Model\InfoQueryResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
/**
* @param Model\RecordQueryRequest $request
* @return Model\RecordQueryResponse
* @throws YopClientException
*/
public function recordQuery(Model\RecordQueryRequest $request)
{
if ($request == null) {
throw new YopClientException("request is required.");
}
if ($request->getParentMerchantNo() == null) {
throw new YopClientException("request.parentMerchantNo is required.");
}
$clientExecutionParams = new ClientExecutionParams($request, Model\RecordQueryRequestMarshaller::getInstance(),
Model\RecordQueryResponseUnMarshaller::getInstance());
return $this->clientHandler->execute($clientExecutionParams);
}
}

View File

@@ -0,0 +1,72 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Invoice;
use Yeepay\Yop\Sdk\Auth\AuthorityReqRegistryImpl;
use Yeepay\Yop\Sdk\Auth\AuthorizationReqRegistry;
use Yeepay\Yop\Sdk\Auth\AuthorizationReqSupport;
use Yeepay\Yop\Sdk\Client\ClientParams;
use Yeepay\Yop\Sdk\Client\Support\ClientParamsSupport;
use Yeepay\Yop\Sdk\Config\AppSdkConfig;
use Yeepay\Yop\Sdk\Config\AppSdkConfigProvider;
use Yeepay\Yop\Sdk\Config\DefaultAppSdkConfigProvider;
use Yeepay\Yop\Sdk\Exception\YopClientException;
class InvoiceClientBuilder
{
/**
* @var AuthorizationReqRegistry
*/
private static $authorizationReqRegistry;
public static function __init()
{
self::$authorizationReqRegistry = new AuthorityReqRegistryImpl();
self::$authorizationReqRegistry->register('apply', AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('feeQuery', AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('infoModify', AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('infoQuery', AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
self::$authorizationReqRegistry->register('recordQuery', AuthorizationReqSupport::getAuthorizationReq('YOP-RSA2048-SHA256'));
}
/**
* @var ClientParams
*/
private $clientParams;
/**
* InvoiceClientBuilder constructor.
* @param ClientParams $clientParams
*/
public function __construct(ClientParams $clientParams)
{
$this->clientParams = $clientParams;
}
public function build()
{
return new InvoiceClient($this->clientParams);
}
/**
* @param $config AppSdkConfig|array|AppSdkConfigProvider
* @return InvoiceClientBuilder
* @throws YopClientException
*/
public static function builder($config)
{
$appSdkConfigProvider = null;
if ($config instanceof AppSdkConfigProvider) {
$appSdkConfigProvider = $config;
} else {
$appSdkConfigProvider = new DefaultAppSdkConfigProvider($config);
}
$clientParams = ClientParamsSupport::generateClientParams($appSdkConfigProvider);
$clientParams->setAuthorizationReqRegistry(self::$authorizationReqRegistry);
return new InvoiceClientBuilder($clientParams);
}
}
InvoiceClientBuilder::__init();

View File

@@ -0,0 +1,662 @@
<?php
/**
* ApplyApplyInvoiceYOPResponseDtoResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 发票服务
*
* <p>基于中台商户实际开票场景,提供给商户维护开票规则、票面信息,查询票面信息,申请开具手续费发票,查询开票记录,查询实收手续费金额的服务</p>
*
* 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\Invoice\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* ApplyApplyInvoiceYOPResponseDtoResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class ApplyApplyInvoiceYOPResponseDtoResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'ApplyApplyInvoiceYOPResponseDtoResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'merchantNo' => 'string',
'customerRequestNo' => 'string',
'code' => 'string',
'message' => 'string',
'status' => 'string',
'createDate' => 'string',
'chargingDateStart' => 'string',
'chargingDateEnd' => 'string',
'chargingMode' => 'string',
'invoiceForm' => 'string',
'amount' => 'float',
'notifyType' => 'string',
'issueInvoiceDtoList' => '\Yeepay\Yop\Sdk\Service\Invoice\Model\ApplyIssueInvoiceDtoResult[]'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'merchantNo' => null,
'customerRequestNo' => null,
'code' => null,
'message' => null,
'status' => null,
'createDate' => 'date-time',
'chargingDateStart' => 'date-time',
'chargingDateEnd' => 'date-time',
'chargingMode' => null,
'invoiceForm' => null,
'amount' => null,
'notifyType' => null,
'issueInvoiceDtoList' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'merchantNo' => 'merchantNo',
'customerRequestNo' => 'customerRequestNo',
'code' => 'code',
'message' => 'message',
'status' => 'status',
'createDate' => 'createDate',
'chargingDateStart' => 'chargingDateStart',
'chargingDateEnd' => 'chargingDateEnd',
'chargingMode' => 'chargingMode',
'invoiceForm' => 'invoiceForm',
'amount' => 'amount',
'notifyType' => 'notifyType',
'issueInvoiceDtoList' => 'issueInvoiceDtoList'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'merchantNo' => 'setMerchantNo',
'customerRequestNo' => 'setCustomerRequestNo',
'code' => 'setCode',
'message' => 'setMessage',
'status' => 'setStatus',
'createDate' => 'setCreateDate',
'chargingDateStart' => 'setChargingDateStart',
'chargingDateEnd' => 'setChargingDateEnd',
'chargingMode' => 'setChargingMode',
'invoiceForm' => 'setInvoiceForm',
'amount' => 'setAmount',
'notifyType' => 'setNotifyType',
'issueInvoiceDtoList' => 'setIssueInvoiceDtoList'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'merchantNo' => 'getMerchantNo',
'customerRequestNo' => 'getCustomerRequestNo',
'code' => 'getCode',
'message' => 'getMessage',
'status' => 'getStatus',
'createDate' => 'getCreateDate',
'chargingDateStart' => 'getChargingDateStart',
'chargingDateEnd' => 'getChargingDateEnd',
'chargingMode' => 'getChargingMode',
'invoiceForm' => 'getInvoiceForm',
'amount' => 'getAmount',
'notifyType' => 'getNotifyType',
'issueInvoiceDtoList' => 'getIssueInvoiceDtoList'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : null;
$this->container['customerRequestNo'] = isset($data['customerRequestNo']) ? $data['customerRequestNo'] : 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['createDate'] = isset($data['createDate']) ? $data['createDate'] : null;
$this->container['chargingDateStart'] = isset($data['chargingDateStart']) ? $data['chargingDateStart'] : null;
$this->container['chargingDateEnd'] = isset($data['chargingDateEnd']) ? $data['chargingDateEnd'] : null;
$this->container['chargingMode'] = isset($data['chargingMode']) ? $data['chargingMode'] : null;
$this->container['invoiceForm'] = isset($data['invoiceForm']) ? $data['invoiceForm'] : null;
$this->container['amount'] = isset($data['amount']) ? $data['amount'] : null;
$this->container['notifyType'] = isset($data['notifyType']) ? $data['notifyType'] : null;
$this->container['issueInvoiceDtoList'] = isset($data['issueInvoiceDtoList']) ? $data['issueInvoiceDtoList'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->container['merchantNo'];
}
/**
* Sets merchantNo
*
* @param string $merchantNo 商编
*
* @return $this
*/
public function setMerchantNo($merchantNo)
{
$this->container['merchantNo'] = $merchantNo;
return $this;
}
/**
* Gets customerRequestNo
*
* @return string
*/
public function getCustomerRequestNo()
{
return $this->container['customerRequestNo'];
}
/**
* Sets customerRequestNo
*
* @param string $customerRequestNo 请求号
*
* @return $this
*/
public function setCustomerRequestNo($customerRequestNo)
{
$this->container['customerRequestNo'] = $customerRequestNo;
return $this;
}
/**
* 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 createDate
*
* @return string
*/
public function getCreateDate()
{
return $this->container['createDate'];
}
/**
* Sets createDate
*
* @param string $createDate 申请时间
*
* @return $this
*/
public function setCreateDate($createDate)
{
$this->container['createDate'] = $createDate;
return $this;
}
/**
* Gets chargingDateStart
*
* @return string
*/
public function getChargingDateStart()
{
return $this->container['chargingDateStart'];
}
/**
* Sets chargingDateStart
*
* @param string $chargingDateStart 收费开始时间
*
* @return $this
*/
public function setChargingDateStart($chargingDateStart)
{
$this->container['chargingDateStart'] = $chargingDateStart;
return $this;
}
/**
* Gets chargingDateEnd
*
* @return string
*/
public function getChargingDateEnd()
{
return $this->container['chargingDateEnd'];
}
/**
* Sets chargingDateEnd
*
* @param string $chargingDateEnd 收费结束时间
*
* @return $this
*/
public function setChargingDateEnd($chargingDateEnd)
{
$this->container['chargingDateEnd'] = $chargingDateEnd;
return $this;
}
/**
* Gets chargingMode
*
* @return string
*/
public function getChargingMode()
{
return $this->container['chargingMode'];
}
/**
* Sets chargingMode
*
* @param string $chargingMode 计费模式
*
* @return $this
*/
public function setChargingMode($chargingMode)
{
$this->container['chargingMode'] = $chargingMode;
return $this;
}
/**
* Gets invoiceForm
*
* @return string
*/
public function getInvoiceForm()
{
return $this->container['invoiceForm'];
}
/**
* Sets invoiceForm
*
* @param string $invoiceForm 发票形式
*
* @return $this
*/
public function setInvoiceForm($invoiceForm)
{
$this->container['invoiceForm'] = $invoiceForm;
return $this;
}
/**
* Gets amount
*
* @return float
*/
public function getAmount()
{
return $this->container['amount'];
}
/**
* Sets amount
*
* @param float $amount 收费金额
*
* @return $this
*/
public function setAmount($amount)
{
$this->container['amount'] = $amount;
return $this;
}
/**
* Gets notifyType
*
* @return string
*/
public function getNotifyType()
{
return $this->container['notifyType'];
}
/**
* Sets notifyType
*
* @param string $notifyType 通知类型
*
* @return $this
*/
public function setNotifyType($notifyType)
{
$this->container['notifyType'] = $notifyType;
return $this;
}
/**
* Gets issueInvoiceDtoList
*
* @return \Yeepay\Yop\Sdk\Service\Invoice\Model\ApplyIssueInvoiceDtoResult[]
*/
public function getIssueInvoiceDtoList()
{
return $this->container['issueInvoiceDtoList'];
}
/**
* Sets issueInvoiceDtoList
*
* @param \Yeepay\Yop\Sdk\Service\Invoice\Model\ApplyIssueInvoiceDtoResult[] $issueInvoiceDtoList 开票记录列表
*
* @return $this
*/
public function setIssueInvoiceDtoList($issueInvoiceDtoList)
{
$this->container['issueInvoiceDtoList'] = $issueInvoiceDtoList;
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,512 @@
<?php
/**
* ApplyIssueInvoiceDtoResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 发票服务
*
* <p>基于中台商户实际开票场景,提供给商户维护开票规则、票面信息,查询票面信息,申请开具手续费发票,查询开票记录,查询实收手续费金额的服务</p>
*
* 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\Invoice\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* ApplyIssueInvoiceDtoResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class ApplyIssueInvoiceDtoResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'ApplyIssueInvoiceDtoResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'totalPriceTax' => 'float',
'invoiceStatus' => 'string',
'isExpress' => 'string',
'pdfUrl' => 'string',
'pdfUrlCh' => 'string',
'log' => 'string',
'expressCompany' => 'string',
'expressNumber' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'totalPriceTax' => null,
'invoiceStatus' => null,
'isExpress' => null,
'pdfUrl' => null,
'pdfUrlCh' => null,
'log' => null,
'expressCompany' => null,
'expressNumber' => 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 = [
'totalPriceTax' => 'totalPriceTax',
'invoiceStatus' => 'invoiceStatus',
'isExpress' => 'isExpress',
'pdfUrl' => 'pdfUrl',
'pdfUrlCh' => 'pdfUrlCh',
'log' => 'log',
'expressCompany' => 'expressCompany',
'expressNumber' => 'expressNumber'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'totalPriceTax' => 'setTotalPriceTax',
'invoiceStatus' => 'setInvoiceStatus',
'isExpress' => 'setIsExpress',
'pdfUrl' => 'setPdfUrl',
'pdfUrlCh' => 'setPdfUrlCh',
'log' => 'setLog',
'expressCompany' => 'setExpressCompany',
'expressNumber' => 'setExpressNumber'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'totalPriceTax' => 'getTotalPriceTax',
'invoiceStatus' => 'getInvoiceStatus',
'isExpress' => 'getIsExpress',
'pdfUrl' => 'getPdfUrl',
'pdfUrlCh' => 'getPdfUrlCh',
'log' => 'getLog',
'expressCompany' => 'getExpressCompany',
'expressNumber' => 'getExpressNumber'
];
/**
* 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['totalPriceTax'] = isset($data['totalPriceTax']) ? $data['totalPriceTax'] : null;
$this->container['invoiceStatus'] = isset($data['invoiceStatus']) ? $data['invoiceStatus'] : null;
$this->container['isExpress'] = isset($data['isExpress']) ? $data['isExpress'] : null;
$this->container['pdfUrl'] = isset($data['pdfUrl']) ? $data['pdfUrl'] : null;
$this->container['pdfUrlCh'] = isset($data['pdfUrlCh']) ? $data['pdfUrlCh'] : null;
$this->container['log'] = isset($data['log']) ? $data['log'] : null;
$this->container['expressCompany'] = isset($data['expressCompany']) ? $data['expressCompany'] : null;
$this->container['expressNumber'] = isset($data['expressNumber']) ? $data['expressNumber'] : 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 totalPriceTax
*
* @return float
*/
public function getTotalPriceTax()
{
return $this->container['totalPriceTax'];
}
/**
* Sets totalPriceTax
*
* @param float $totalPriceTax 手续费
*
* @return $this
*/
public function setTotalPriceTax($totalPriceTax)
{
$this->container['totalPriceTax'] = $totalPriceTax;
return $this;
}
/**
* Gets invoiceStatus
*
* @return string
*/
public function getInvoiceStatus()
{
return $this->container['invoiceStatus'];
}
/**
* Sets invoiceStatus
*
* @param string $invoiceStatus 开票状态
*
* @return $this
*/
public function setInvoiceStatus($invoiceStatus)
{
$this->container['invoiceStatus'] = $invoiceStatus;
return $this;
}
/**
* Gets isExpress
*
* @return string
*/
public function getIsExpress()
{
return $this->container['isExpress'];
}
/**
* Sets isExpress
*
* @param string $isExpress 是否邮寄
*
* @return $this
*/
public function setIsExpress($isExpress)
{
$this->container['isExpress'] = $isExpress;
return $this;
}
/**
* Gets pdfUrl
*
* @return string
*/
public function getPdfUrl()
{
return $this->container['pdfUrl'];
}
/**
* Sets pdfUrl
*
* @param string $pdfUrl 已开发票地址
*
* @return $this
*/
public function setPdfUrl($pdfUrl)
{
$this->container['pdfUrl'] = $pdfUrl;
return $this;
}
/**
* Gets pdfUrlCh
*
* @return string
*/
public function getPdfUrlCh()
{
return $this->container['pdfUrlCh'];
}
/**
* Sets pdfUrlCh
*
* @param string $pdfUrlCh 冲红发票地址
*
* @return $this
*/
public function setPdfUrlCh($pdfUrlCh)
{
$this->container['pdfUrlCh'] = $pdfUrlCh;
return $this;
}
/**
* Gets log
*
* @return string
*/
public function getLog()
{
return $this->container['log'];
}
/**
* Sets log
*
* @param string $log 失败原因
*
* @return $this
*/
public function setLog($log)
{
$this->container['log'] = $log;
return $this;
}
/**
* Gets expressCompany
*
* @return string
*/
public function getExpressCompany()
{
return $this->container['expressCompany'];
}
/**
* Sets expressCompany
*
* @param string $expressCompany 快递公司
*
* @return $this
*/
public function setExpressCompany($expressCompany)
{
$this->container['expressCompany'] = $expressCompany;
return $this;
}
/**
* Gets expressNumber
*
* @return string
*/
public function getExpressNumber()
{
return $this->container['expressNumber'];
}
/**
* Sets expressNumber
*
* @param string $expressNumber 快递单号
*
* @return $this
*/
public function setExpressNumber($expressNumber)
{
$this->container['expressNumber'] = $expressNumber;
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,167 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Invoice\Model;
class ApplyRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $customerRequestNo;
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $chargingDateStart;
/**
* @var string
*/
private $chargingDateEnd;
/**
* @var string
*/
private $notifyUrl;
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return ApplyRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets customerRequestNo
*
* @return string
*/
public function getCustomerRequestNo()
{
return $this->customerRequestNo;
}
/**
* Sets customerRequestNo
*
* @param string $customerRequestNo
* @return ApplyRequest
*/
public function setCustomerRequestNo($customerRequestNo)
{
$this->customerRequestNo = $customerRequestNo;
return $this;
}
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return ApplyRequest
*/
public function setParentMerchantNo($parentMerchantNo)
{
$this->parentMerchantNo = $parentMerchantNo;
return $this;
}
/**
* Gets chargingDateStart
*
* @return string
*/
public function getChargingDateStart()
{
return $this->chargingDateStart;
}
/**
* Sets chargingDateStart
*
* @param string $chargingDateStart
* @return ApplyRequest
*/
public function setChargingDateStart($chargingDateStart)
{
$this->chargingDateStart = $chargingDateStart;
return $this;
}
/**
* Gets chargingDateEnd
*
* @return string
*/
public function getChargingDateEnd()
{
return $this->chargingDateEnd;
}
/**
* Sets chargingDateEnd
*
* @param string $chargingDateEnd
* @return ApplyRequest
*/
public function setChargingDateEnd($chargingDateEnd)
{
$this->chargingDateEnd = $chargingDateEnd;
return $this;
}
/**
* Gets notifyUrl
*
* @return string
*/
public function getNotifyUrl()
{
return $this->notifyUrl;
}
/**
* Sets notifyUrl
*
* @param string $notifyUrl
* @return ApplyRequest
*/
public function setNotifyUrl($notifyUrl)
{
$this->notifyUrl = $notifyUrl;
return $this;
}
public static function getOperationId()
{
return 'apply';
}
}

View File

@@ -0,0 +1,95 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Invoice\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 ApplyRequestMarshaller implements RequestMarshaller
{
/**
* @var ApplyRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new ApplyRequestMarshaller();
}
/**
* @return ApplyRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Invoice';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/invoice/apply';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param ApplyRequest $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->getCustomerRequestNo() != null){
$internalRequest->addParameter('customerRequestNo', ObjectSerializer::sanitizeForSerialization($request->getCustomerRequestNo(), 'string'));
}
if($request->getParentMerchantNo() != null){
$internalRequest->addParameter('parentMerchantNo', ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
}
if($request->getChargingDateStart() != null){
$internalRequest->addParameter('chargingDateStart', ObjectSerializer::sanitizeForSerialization($request->getChargingDateStart(), 'string', 'date-time'));
}
if($request->getChargingDateEnd() != null){
$internalRequest->addParameter('chargingDateEnd', ObjectSerializer::sanitizeForSerialization($request->getChargingDateEnd(), 'string', 'date-time'));
}
if($request->getNotifyUrl() != null){
$internalRequest->addParameter('notifyUrl', ObjectSerializer::sanitizeForSerialization($request->getNotifyUrl(), 'string'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
ApplyRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,452 @@
<?php
/**
* FeeQueryGetFeeResponseDtoResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 发票服务
*
* <p>基于中台商户实际开票场景,提供给商户维护开票规则、票面信息,查询票面信息,申请开具手续费发票,查询开票记录,查询实收手续费金额的服务</p>
*
* 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\Invoice\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* FeeQueryGetFeeResponseDtoResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class FeeQueryGetFeeResponseDtoResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'FeeQueryGetFeeResponseDtoResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'merchantNo' => 'string',
'chargingDateStart' => 'string',
'chargingDateEnd' => 'string',
'amount' => 'float',
'code' => 'string',
'message' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'merchantNo' => null,
'chargingDateStart' => 'date-time',
'chargingDateEnd' => 'date-time',
'amount' => null,
'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 = [
'merchantNo' => 'merchantNo',
'chargingDateStart' => 'chargingDateStart',
'chargingDateEnd' => 'chargingDateEnd',
'amount' => 'amount',
'code' => 'code',
'message' => 'message'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'merchantNo' => 'setMerchantNo',
'chargingDateStart' => 'setChargingDateStart',
'chargingDateEnd' => 'setChargingDateEnd',
'amount' => 'setAmount',
'code' => 'setCode',
'message' => 'setMessage'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'merchantNo' => 'getMerchantNo',
'chargingDateStart' => 'getChargingDateStart',
'chargingDateEnd' => 'getChargingDateEnd',
'amount' => 'getAmount',
'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['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : null;
$this->container['chargingDateStart'] = isset($data['chargingDateStart']) ? $data['chargingDateStart'] : null;
$this->container['chargingDateEnd'] = isset($data['chargingDateEnd']) ? $data['chargingDateEnd'] : null;
$this->container['amount'] = isset($data['amount']) ? $data['amount'] : 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 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 chargingDateStart
*
* @return string
*/
public function getChargingDateStart()
{
return $this->container['chargingDateStart'];
}
/**
* Sets chargingDateStart
*
* @param string $chargingDateStart 收费开始日期
*
* @return $this
*/
public function setChargingDateStart($chargingDateStart)
{
$this->container['chargingDateStart'] = $chargingDateStart;
return $this;
}
/**
* Gets chargingDateEnd
*
* @return string
*/
public function getChargingDateEnd()
{
return $this->container['chargingDateEnd'];
}
/**
* Sets chargingDateEnd
*
* @param string $chargingDateEnd 收费结束日期
*
* @return $this
*/
public function setChargingDateEnd($chargingDateEnd)
{
$this->container['chargingDateEnd'] = $chargingDateEnd;
return $this;
}
/**
* Gets amount
*
* @return float
*/
public function getAmount()
{
return $this->container['amount'];
}
/**
* Sets amount
*
* @param float $amount 开票金额
*
* @return $this
*/
public function setAmount($amount)
{
$this->container['amount'] = $amount;
return $this;
}
/**
* Gets 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;
}
/**
* 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\Invoice\Model;
class FeeQueryRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $chargingDateStart;
/**
* @var string
*/
private $chargingDateEnd;
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return FeeQueryRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return FeeQueryRequest
*/
public function setParentMerchantNo($parentMerchantNo)
{
$this->parentMerchantNo = $parentMerchantNo;
return $this;
}
/**
* Gets chargingDateStart
*
* @return string
*/
public function getChargingDateStart()
{
return $this->chargingDateStart;
}
/**
* Sets chargingDateStart
*
* @param string $chargingDateStart
* @return FeeQueryRequest
*/
public function setChargingDateStart($chargingDateStart)
{
$this->chargingDateStart = $chargingDateStart;
return $this;
}
/**
* Gets chargingDateEnd
*
* @return string
*/
public function getChargingDateEnd()
{
return $this->chargingDateEnd;
}
/**
* Sets chargingDateEnd
*
* @param string $chargingDateEnd
* @return FeeQueryRequest
*/
public function setChargingDateEnd($chargingDateEnd)
{
$this->chargingDateEnd = $chargingDateEnd;
return $this;
}
public static function getOperationId()
{
return 'feeQuery';
}
}

View File

@@ -0,0 +1,89 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Invoice\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 FeeQueryRequestMarshaller implements RequestMarshaller
{
/**
* @var FeeQueryRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new FeeQueryRequestMarshaller();
}
/**
* @return FeeQueryRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Invoice';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/invoice/fee/query';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param FeeQueryRequest $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->getParentMerchantNo() != null){
$internalRequest->addParameter('parentMerchantNo', ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
}
if($request->getChargingDateStart() != null){
$internalRequest->addParameter('chargingDateStart', ObjectSerializer::sanitizeForSerialization($request->getChargingDateStart(), 'string', 'date-time'));
}
if($request->getChargingDateEnd() != null){
$internalRequest->addParameter('chargingDateEnd', ObjectSerializer::sanitizeForSerialization($request->getChargingDateEnd(), 'string', 'date-time'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
FeeQueryRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,422 @@
<?php
/**
* InfoModifyAddOrModifyInvoiceInfoResponseDtoResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 发票服务
*
* <p>基于中台商户实际开票场景,提供给商户维护开票规则、票面信息,查询票面信息,申请开具手续费发票,查询开票记录,查询实收手续费金额的服务</p>
*
* 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\Invoice\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* InfoModifyAddOrModifyInvoiceInfoResponseDtoResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class InfoModifyAddOrModifyInvoiceInfoResponseDtoResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'InfoModifyAddOrModifyInvoiceInfoResponseDtoResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'merchantNo' => 'string',
'customerRequestNo' => 'string',
'code' => 'string',
'message' => 'string',
'status' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'merchantNo' => null,
'customerRequestNo' => null,
'code' => null,
'message' => 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 = [
'merchantNo' => 'merchantNo',
'customerRequestNo' => 'customerRequestNo',
'code' => 'code',
'message' => 'message',
'status' => 'status'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'merchantNo' => 'setMerchantNo',
'customerRequestNo' => 'setCustomerRequestNo',
'code' => 'setCode',
'message' => 'setMessage',
'status' => 'setStatus'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'merchantNo' => 'getMerchantNo',
'customerRequestNo' => 'getCustomerRequestNo',
'code' => 'getCode',
'message' => 'getMessage',
'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['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : null;
$this->container['customerRequestNo'] = isset($data['customerRequestNo']) ? $data['customerRequestNo'] : 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;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->container['merchantNo'];
}
/**
* Sets merchantNo
*
* @param string $merchantNo 商编
*
* @return $this
*/
public function setMerchantNo($merchantNo)
{
$this->container['merchantNo'] = $merchantNo;
return $this;
}
/**
* Gets customerRequestNo
*
* @return string
*/
public function getCustomerRequestNo()
{
return $this->container['customerRequestNo'];
}
/**
* Sets customerRequestNo
*
* @param string $customerRequestNo 请求号
*
* @return $this
*/
public function setCustomerRequestNo($customerRequestNo)
{
$this->container['customerRequestNo'] = $customerRequestNo;
return $this;
}
/**
* 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;
}
/**
* 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,517 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Invoice\Model;
class InfoModifyRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $merchantNo;
/**
* @var string
*/
private $customerRequestNo;
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $mode;
/**
* @var string
*/
private $invoiceType;
/**
* @var string
*/
private $invoiceForm;
/**
* @var string
*/
private $linkman;
/**
* @var string
*/
private $linkmanPhone;
/**
* @var string
*/
private $postalAddress;
/**
* @var string
*/
private $postalCode;
/**
* @var string
*/
private $taxpayerId;
/**
* @var string
*/
private $invoicePhone;
/**
* @var string
*/
private $invoiceAddress;
/**
* @var string
*/
private $bankName;
/**
* @var string
*/
private $accountNo;
/**
* @var string
*/
private $email;
/**
* @var string
*/
private $remark;
/**
* @var string
*/
private $standardType;
/**
* @var string
*/
private $unit;
/**
* @var int
*/
private $quantity;
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return InfoModifyRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
/**
* Gets customerRequestNo
*
* @return string
*/
public function getCustomerRequestNo()
{
return $this->customerRequestNo;
}
/**
* Sets customerRequestNo
*
* @param string $customerRequestNo
* @return InfoModifyRequest
*/
public function setCustomerRequestNo($customerRequestNo)
{
$this->customerRequestNo = $customerRequestNo;
return $this;
}
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return InfoModifyRequest
*/
public function setParentMerchantNo($parentMerchantNo)
{
$this->parentMerchantNo = $parentMerchantNo;
return $this;
}
/**
* Gets mode
*
* @return string
*/
public function getMode()
{
return $this->mode;
}
/**
* Sets mode
*
* @param string $mode
* @return InfoModifyRequest
*/
public function setMode($mode)
{
$this->mode = $mode;
return $this;
}
/**
* Gets invoiceType
*
* @return string
*/
public function getInvoiceType()
{
return $this->invoiceType;
}
/**
* Sets invoiceType
*
* @param string $invoiceType
* @return InfoModifyRequest
*/
public function setInvoiceType($invoiceType)
{
$this->invoiceType = $invoiceType;
return $this;
}
/**
* Gets invoiceForm
*
* @return string
*/
public function getInvoiceForm()
{
return $this->invoiceForm;
}
/**
* Sets invoiceForm
*
* @param string $invoiceForm
* @return InfoModifyRequest
*/
public function setInvoiceForm($invoiceForm)
{
$this->invoiceForm = $invoiceForm;
return $this;
}
/**
* Gets linkman
*
* @return string
*/
public function getLinkman()
{
return $this->linkman;
}
/**
* Sets linkman
*
* @param string $linkman
* @return InfoModifyRequest
*/
public function setLinkman($linkman)
{
$this->linkman = $linkman;
return $this;
}
/**
* Gets linkmanPhone
*
* @return string
*/
public function getLinkmanPhone()
{
return $this->linkmanPhone;
}
/**
* Sets linkmanPhone
*
* @param string $linkmanPhone
* @return InfoModifyRequest
*/
public function setLinkmanPhone($linkmanPhone)
{
$this->linkmanPhone = $linkmanPhone;
return $this;
}
/**
* Gets postalAddress
*
* @return string
*/
public function getPostalAddress()
{
return $this->postalAddress;
}
/**
* Sets postalAddress
*
* @param string $postalAddress
* @return InfoModifyRequest
*/
public function setPostalAddress($postalAddress)
{
$this->postalAddress = $postalAddress;
return $this;
}
/**
* Gets postalCode
*
* @return string
*/
public function getPostalCode()
{
return $this->postalCode;
}
/**
* Sets postalCode
*
* @param string $postalCode
* @return InfoModifyRequest
*/
public function setPostalCode($postalCode)
{
$this->postalCode = $postalCode;
return $this;
}
/**
* Gets taxpayerId
*
* @return string
*/
public function getTaxpayerId()
{
return $this->taxpayerId;
}
/**
* Sets taxpayerId
*
* @param string $taxpayerId
* @return InfoModifyRequest
*/
public function setTaxpayerId($taxpayerId)
{
$this->taxpayerId = $taxpayerId;
return $this;
}
/**
* Gets invoicePhone
*
* @return string
*/
public function getInvoicePhone()
{
return $this->invoicePhone;
}
/**
* Sets invoicePhone
*
* @param string $invoicePhone
* @return InfoModifyRequest
*/
public function setInvoicePhone($invoicePhone)
{
$this->invoicePhone = $invoicePhone;
return $this;
}
/**
* Gets invoiceAddress
*
* @return string
*/
public function getInvoiceAddress()
{
return $this->invoiceAddress;
}
/**
* Sets invoiceAddress
*
* @param string $invoiceAddress
* @return InfoModifyRequest
*/
public function setInvoiceAddress($invoiceAddress)
{
$this->invoiceAddress = $invoiceAddress;
return $this;
}
/**
* Gets bankName
*
* @return string
*/
public function getBankName()
{
return $this->bankName;
}
/**
* Sets bankName
*
* @param string $bankName
* @return InfoModifyRequest
*/
public function setBankName($bankName)
{
$this->bankName = $bankName;
return $this;
}
/**
* Gets accountNo
*
* @return string
*/
public function getAccountNo()
{
return $this->accountNo;
}
/**
* Sets accountNo
*
* @param string $accountNo
* @return InfoModifyRequest
*/
public function setAccountNo($accountNo)
{
$this->accountNo = $accountNo;
return $this;
}
/**
* Gets email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Sets email
*
* @param string $email
* @return InfoModifyRequest
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Gets remark
*
* @return string
*/
public function getRemark()
{
return $this->remark;
}
/**
* Sets remark
*
* @param string $remark
* @return InfoModifyRequest
*/
public function setRemark($remark)
{
$this->remark = $remark;
return $this;
}
/**
* Gets standardType
*
* @return string
*/
public function getStandardType()
{
return $this->standardType;
}
/**
* Sets standardType
*
* @param string $standardType
* @return InfoModifyRequest
*/
public function setStandardType($standardType)
{
$this->standardType = $standardType;
return $this;
}
/**
* Gets unit
*
* @return string
*/
public function getUnit()
{
return $this->unit;
}
/**
* Sets unit
*
* @param string $unit
* @return InfoModifyRequest
*/
public function setUnit($unit)
{
$this->unit = $unit;
return $this;
}
/**
* Gets quantity
*
* @return int
*/
public function getQuantity()
{
return $this->quantity;
}
/**
* Sets quantity
*
* @param int $quantity
* @return InfoModifyRequest
*/
public function setQuantity($quantity)
{
$this->quantity = $quantity;
return $this;
}
public static function getOperationId()
{
return 'infoModify';
}
}

View File

@@ -0,0 +1,137 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Invoice\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 InfoModifyRequestMarshaller implements RequestMarshaller
{
/**
* @var InfoModifyRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new InfoModifyRequestMarshaller();
}
/**
* @return InfoModifyRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Invoice';
/**
* @var string
*/
private $httpMethod = 'POST';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/invoice/info/modify';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param InfoModifyRequest $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->getCustomerRequestNo() != null){
$internalRequest->addParameter('customerRequestNo', ObjectSerializer::sanitizeForSerialization($request->getCustomerRequestNo(), 'string'));
}
if($request->getParentMerchantNo() != null){
$internalRequest->addParameter('parentMerchantNo', ObjectSerializer::sanitizeForSerialization($request->getParentMerchantNo(), 'string'));
}
if($request->getMode() != null){
$internalRequest->addParameter('mode', ObjectSerializer::sanitizeForSerialization($request->getMode(), 'string'));
}
if($request->getInvoiceType() != null){
$internalRequest->addParameter('invoiceType', ObjectSerializer::sanitizeForSerialization($request->getInvoiceType(), 'string'));
}
if($request->getInvoiceForm() != null){
$internalRequest->addParameter('invoiceForm', ObjectSerializer::sanitizeForSerialization($request->getInvoiceForm(), 'string'));
}
if($request->getLinkman() != null){
$internalRequest->addParameter('linkman', ObjectSerializer::sanitizeForSerialization($request->getLinkman(), 'string'));
}
if($request->getLinkmanPhone() != null){
$internalRequest->addParameter('linkmanPhone', ObjectSerializer::sanitizeForSerialization($request->getLinkmanPhone(), 'string'));
}
if($request->getPostalAddress() != null){
$internalRequest->addParameter('postalAddress', ObjectSerializer::sanitizeForSerialization($request->getPostalAddress(), 'string'));
}
if($request->getPostalCode() != null){
$internalRequest->addParameter('postalCode', ObjectSerializer::sanitizeForSerialization($request->getPostalCode(), 'string'));
}
if($request->getTaxpayerId() != null){
$internalRequest->addParameter('taxpayerId', ObjectSerializer::sanitizeForSerialization($request->getTaxpayerId(), 'string'));
}
if($request->getInvoicePhone() != null){
$internalRequest->addParameter('invoicePhone', ObjectSerializer::sanitizeForSerialization($request->getInvoicePhone(), 'string'));
}
if($request->getInvoiceAddress() != null){
$internalRequest->addParameter('invoiceAddress', ObjectSerializer::sanitizeForSerialization($request->getInvoiceAddress(), 'string'));
}
if($request->getBankName() != null){
$internalRequest->addParameter('bankName', ObjectSerializer::sanitizeForSerialization($request->getBankName(), 'string'));
}
if($request->getAccountNo() != null){
$internalRequest->addParameter('accountNo', ObjectSerializer::sanitizeForSerialization($request->getAccountNo(), 'string'));
}
if($request->getEmail() != null){
$internalRequest->addParameter('email', ObjectSerializer::sanitizeForSerialization($request->getEmail(), 'string'));
}
if($request->getRemark() != null){
$internalRequest->addParameter('remark', ObjectSerializer::sanitizeForSerialization($request->getRemark(), 'string'));
}
if($request->getStandardType() != null){
$internalRequest->addParameter('standardType', ObjectSerializer::sanitizeForSerialization($request->getStandardType(), 'string'));
}
if($request->getUnit() != null){
$internalRequest->addParameter('unit', ObjectSerializer::sanitizeForSerialization($request->getUnit(), 'string'));
}
if($request->getQuantity() != null){
$internalRequest->addParameter('quantity', ObjectSerializer::sanitizeForSerialization($request->getQuantity(), 'int', 'int32'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
InfoModifyRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,992 @@
<?php
/**
* InfoQueryQueryInvoiceInfoYOPResponseDtoResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 发票服务
*
* <p>基于中台商户实际开票场景,提供给商户维护开票规则、票面信息,查询票面信息,申请开具手续费发票,查询开票记录,查询实收手续费金额的服务</p>
*
* 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\Invoice\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* InfoQueryQueryInvoiceInfoYOPResponseDtoResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class InfoQueryQueryInvoiceInfoYOPResponseDtoResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'InfoQueryQueryInvoiceInfoYOPResponseDtoResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'merchantNo' => 'string',
'mode' => 'string',
'invoiceType' => 'string',
'invoiceForm' => 'string',
'linkman' => 'string',
'linkmanPhone' => 'string',
'postalAddress' => 'string',
'postalCode' => 'string',
'invoiceName' => 'string',
'taxpayerId' => 'string',
'invoicePhone' => 'string',
'invoiceAddress' => 'string',
'bankName' => 'string',
'accountNo' => 'string',
'email' => 'string',
'needInvoice' => 'string',
'createTime' => 'string',
'lastModifyTime' => 'string',
'remark' => 'string',
'standardType' => 'string',
'unit' => 'string',
'quantity' => 'int'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'merchantNo' => null,
'mode' => null,
'invoiceType' => null,
'invoiceForm' => null,
'linkman' => null,
'linkmanPhone' => null,
'postalAddress' => null,
'postalCode' => null,
'invoiceName' => null,
'taxpayerId' => null,
'invoicePhone' => null,
'invoiceAddress' => null,
'bankName' => null,
'accountNo' => null,
'email' => null,
'needInvoice' => null,
'createTime' => 'date-time',
'lastModifyTime' => 'date-time',
'remark' => null,
'standardType' => null,
'unit' => null,
'quantity' => 'int32'
];
/**
* 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',
'mode' => 'mode',
'invoiceType' => 'invoiceType',
'invoiceForm' => 'invoiceForm',
'linkman' => 'linkman',
'linkmanPhone' => 'linkmanPhone',
'postalAddress' => 'postalAddress',
'postalCode' => 'postalCode',
'invoiceName' => 'invoiceName',
'taxpayerId' => 'taxpayerId',
'invoicePhone' => 'invoicePhone',
'invoiceAddress' => 'invoiceAddress',
'bankName' => 'bankName',
'accountNo' => 'accountNo',
'email' => 'email',
'needInvoice' => 'needInvoice',
'createTime' => 'createTime',
'lastModifyTime' => 'lastModifyTime',
'remark' => 'remark',
'standardType' => 'standardType',
'unit' => 'unit',
'quantity' => 'quantity'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'merchantNo' => 'setMerchantNo',
'mode' => 'setMode',
'invoiceType' => 'setInvoiceType',
'invoiceForm' => 'setInvoiceForm',
'linkman' => 'setLinkman',
'linkmanPhone' => 'setLinkmanPhone',
'postalAddress' => 'setPostalAddress',
'postalCode' => 'setPostalCode',
'invoiceName' => 'setInvoiceName',
'taxpayerId' => 'setTaxpayerId',
'invoicePhone' => 'setInvoicePhone',
'invoiceAddress' => 'setInvoiceAddress',
'bankName' => 'setBankName',
'accountNo' => 'setAccountNo',
'email' => 'setEmail',
'needInvoice' => 'setNeedInvoice',
'createTime' => 'setCreateTime',
'lastModifyTime' => 'setLastModifyTime',
'remark' => 'setRemark',
'standardType' => 'setStandardType',
'unit' => 'setUnit',
'quantity' => 'setQuantity'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'merchantNo' => 'getMerchantNo',
'mode' => 'getMode',
'invoiceType' => 'getInvoiceType',
'invoiceForm' => 'getInvoiceForm',
'linkman' => 'getLinkman',
'linkmanPhone' => 'getLinkmanPhone',
'postalAddress' => 'getPostalAddress',
'postalCode' => 'getPostalCode',
'invoiceName' => 'getInvoiceName',
'taxpayerId' => 'getTaxpayerId',
'invoicePhone' => 'getInvoicePhone',
'invoiceAddress' => 'getInvoiceAddress',
'bankName' => 'getBankName',
'accountNo' => 'getAccountNo',
'email' => 'getEmail',
'needInvoice' => 'getNeedInvoice',
'createTime' => 'getCreateTime',
'lastModifyTime' => 'getLastModifyTime',
'remark' => 'getRemark',
'standardType' => 'getStandardType',
'unit' => 'getUnit',
'quantity' => 'getQuantity'
];
/**
* 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['mode'] = isset($data['mode']) ? $data['mode'] : null;
$this->container['invoiceType'] = isset($data['invoiceType']) ? $data['invoiceType'] : null;
$this->container['invoiceForm'] = isset($data['invoiceForm']) ? $data['invoiceForm'] : null;
$this->container['linkman'] = isset($data['linkman']) ? $data['linkman'] : null;
$this->container['linkmanPhone'] = isset($data['linkmanPhone']) ? $data['linkmanPhone'] : null;
$this->container['postalAddress'] = isset($data['postalAddress']) ? $data['postalAddress'] : null;
$this->container['postalCode'] = isset($data['postalCode']) ? $data['postalCode'] : null;
$this->container['invoiceName'] = isset($data['invoiceName']) ? $data['invoiceName'] : null;
$this->container['taxpayerId'] = isset($data['taxpayerId']) ? $data['taxpayerId'] : null;
$this->container['invoicePhone'] = isset($data['invoicePhone']) ? $data['invoicePhone'] : null;
$this->container['invoiceAddress'] = isset($data['invoiceAddress']) ? $data['invoiceAddress'] : null;
$this->container['bankName'] = isset($data['bankName']) ? $data['bankName'] : null;
$this->container['accountNo'] = isset($data['accountNo']) ? $data['accountNo'] : null;
$this->container['email'] = isset($data['email']) ? $data['email'] : null;
$this->container['needInvoice'] = isset($data['needInvoice']) ? $data['needInvoice'] : null;
$this->container['createTime'] = isset($data['createTime']) ? $data['createTime'] : null;
$this->container['lastModifyTime'] = isset($data['lastModifyTime']) ? $data['lastModifyTime'] : null;
$this->container['remark'] = isset($data['remark']) ? $data['remark'] : null;
$this->container['standardType'] = isset($data['standardType']) ? $data['standardType'] : null;
$this->container['unit'] = isset($data['unit']) ? $data['unit'] : null;
$this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : 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 mode
*
* @return string
*/
public function getMode()
{
return $this->container['mode'];
}
/**
* Sets mode
*
* @param string $mode 开票方式
*
* @return $this
*/
public function setMode($mode)
{
$this->container['mode'] = $mode;
return $this;
}
/**
* Gets invoiceType
*
* @return string
*/
public function getInvoiceType()
{
return $this->container['invoiceType'];
}
/**
* Sets invoiceType
*
* @param string $invoiceType 发票类型
*
* @return $this
*/
public function setInvoiceType($invoiceType)
{
$this->container['invoiceType'] = $invoiceType;
return $this;
}
/**
* Gets invoiceForm
*
* @return string
*/
public function getInvoiceForm()
{
return $this->container['invoiceForm'];
}
/**
* Sets invoiceForm
*
* @param string $invoiceForm 发票形式
*
* @return $this
*/
public function setInvoiceForm($invoiceForm)
{
$this->container['invoiceForm'] = $invoiceForm;
return $this;
}
/**
* Gets linkman
*
* @return string
*/
public function getLinkman()
{
return $this->container['linkman'];
}
/**
* Sets linkman
*
* @param string $linkman 联系人
*
* @return $this
*/
public function setLinkman($linkman)
{
$this->container['linkman'] = $linkman;
return $this;
}
/**
* Gets linkmanPhone
*
* @return string
*/
public function getLinkmanPhone()
{
return $this->container['linkmanPhone'];
}
/**
* Sets linkmanPhone
*
* @param string $linkmanPhone 联系人电话
*
* @return $this
*/
public function setLinkmanPhone($linkmanPhone)
{
$this->container['linkmanPhone'] = $linkmanPhone;
return $this;
}
/**
* Gets postalAddress
*
* @return string
*/
public function getPostalAddress()
{
return $this->container['postalAddress'];
}
/**
* Sets postalAddress
*
* @param string $postalAddress 发票邮寄地址
*
* @return $this
*/
public function setPostalAddress($postalAddress)
{
$this->container['postalAddress'] = $postalAddress;
return $this;
}
/**
* Gets postalCode
*
* @return string
*/
public function getPostalCode()
{
return $this->container['postalCode'];
}
/**
* Sets postalCode
*
* @param string $postalCode 邮编
*
* @return $this
*/
public function setPostalCode($postalCode)
{
$this->container['postalCode'] = $postalCode;
return $this;
}
/**
* Gets invoiceName
*
* @return string
*/
public function getInvoiceName()
{
return $this->container['invoiceName'];
}
/**
* Sets invoiceName
*
* @param string $invoiceName 发票抬头
*
* @return $this
*/
public function setInvoiceName($invoiceName)
{
$this->container['invoiceName'] = $invoiceName;
return $this;
}
/**
* Gets taxpayerId
*
* @return string
*/
public function getTaxpayerId()
{
return $this->container['taxpayerId'];
}
/**
* Sets taxpayerId
*
* @param string $taxpayerId 纳税人标识
*
* @return $this
*/
public function setTaxpayerId($taxpayerId)
{
$this->container['taxpayerId'] = $taxpayerId;
return $this;
}
/**
* Gets invoicePhone
*
* @return string
*/
public function getInvoicePhone()
{
return $this->container['invoicePhone'];
}
/**
* Sets invoicePhone
*
* @param string $invoicePhone 开票联系电话
*
* @return $this
*/
public function setInvoicePhone($invoicePhone)
{
$this->container['invoicePhone'] = $invoicePhone;
return $this;
}
/**
* Gets invoiceAddress
*
* @return string
*/
public function getInvoiceAddress()
{
return $this->container['invoiceAddress'];
}
/**
* Sets invoiceAddress
*
* @param string $invoiceAddress 开票地址
*
* @return $this
*/
public function setInvoiceAddress($invoiceAddress)
{
$this->container['invoiceAddress'] = $invoiceAddress;
return $this;
}
/**
* Gets bankName
*
* @return string
*/
public function getBankName()
{
return $this->container['bankName'];
}
/**
* Sets bankName
*
* @param string $bankName 开户银行名称
*
* @return $this
*/
public function setBankName($bankName)
{
$this->container['bankName'] = $bankName;
return $this;
}
/**
* Gets accountNo
*
* @return string
*/
public function getAccountNo()
{
return $this->container['accountNo'];
}
/**
* Sets accountNo
*
* @param string $accountNo 账号信息
*
* @return $this
*/
public function setAccountNo($accountNo)
{
$this->container['accountNo'] = $accountNo;
return $this;
}
/**
* Gets email
*
* @return string
*/
public function getEmail()
{
return $this->container['email'];
}
/**
* Sets email
*
* @param string $email 邮箱
*
* @return $this
*/
public function setEmail($email)
{
$this->container['email'] = $email;
return $this;
}
/**
* Gets needInvoice
*
* @return string
*/
public function getNeedInvoice()
{
return $this->container['needInvoice'];
}
/**
* Sets needInvoice
*
* @param string $needInvoice 是否需要发票
*
* @return $this
*/
public function setNeedInvoice($needInvoice)
{
$this->container['needInvoice'] = $needInvoice;
return $this;
}
/**
* Gets createTime
*
* @return string
*/
public function getCreateTime()
{
return $this->container['createTime'];
}
/**
* Sets createTime
*
* @param string $createTime 创建时间
*
* @return $this
*/
public function setCreateTime($createTime)
{
$this->container['createTime'] = $createTime;
return $this;
}
/**
* Gets lastModifyTime
*
* @return string
*/
public function getLastModifyTime()
{
return $this->container['lastModifyTime'];
}
/**
* Sets lastModifyTime
*
* @param string $lastModifyTime 更新时间
*
* @return $this
*/
public function setLastModifyTime($lastModifyTime)
{
$this->container['lastModifyTime'] = $lastModifyTime;
return $this;
}
/**
* Gets remark
*
* @return string
*/
public function getRemark()
{
return $this->container['remark'];
}
/**
* Sets remark
*
* @param string $remark 备注
*
* @return $this
*/
public function setRemark($remark)
{
$this->container['remark'] = $remark;
return $this;
}
/**
* Gets standardType
*
* @return string
*/
public function getStandardType()
{
return $this->container['standardType'];
}
/**
* Sets standardType
*
* @param string $standardType 规格型号
*
* @return $this
*/
public function setStandardType($standardType)
{
$this->container['standardType'] = $standardType;
return $this;
}
/**
* Gets unit
*
* @return string
*/
public function getUnit()
{
return $this->container['unit'];
}
/**
* Sets unit
*
* @param string $unit 单位
*
* @return $this
*/
public function setUnit($unit)
{
$this->container['unit'] = $unit;
return $this;
}
/**
* Gets quantity
*
* @return int
*/
public function getQuantity()
{
return $this->container['quantity'];
}
/**
* Sets quantity
*
* @param int $quantity 数量
*
* @return $this
*/
public function setQuantity($quantity)
{
$this->container['quantity'] = $quantity;
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\Invoice\Model;
class InfoQueryRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return InfoQueryRequest
*/
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 InfoQueryRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'infoQuery';
}
}

View File

@@ -0,0 +1,83 @@
<?php
namespace Yeepay\Yop\Sdk\Service\Invoice\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 InfoQueryRequestMarshaller implements RequestMarshaller
{
/**
* @var InfoQueryRequestMarshaller
*/
private static $instance;
public static function __init()
{
self::$instance = new InfoQueryRequestMarshaller();
}
/**
* @return InfoQueryRequestMarshaller
*/
public static function getInstance()
{
return self::$instance;
}
/**
* @var string
*/
private $serviceName = 'Invoice';
/**
* @var string
*/
private $httpMethod = 'GET';
/**
* @var string
*/
private $resourcePath = '/rest/v1.0/invoice/info/query';
/**
* @var string
*/
private $contentType = 'application/x-www-form-urlencoded';
/**
* @param InfoQueryRequest $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'));
}
$internalRequest->addHeader(Headers::CONTENT_TYPE, $this->contentType);
return $internalRequest;
}
}
InfoQueryRequestMarshaller::__init();

View File

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

View File

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

View File

@@ -0,0 +1,662 @@
<?php
/**
* RecordQueryApplyInvoiceYOPResponseDtoResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 发票服务
*
* <p>基于中台商户实际开票场景,提供给商户维护开票规则、票面信息,查询票面信息,申请开具手续费发票,查询开票记录,查询实收手续费金额的服务</p>
*
* 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\Invoice\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* RecordQueryApplyInvoiceYOPResponseDtoResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class RecordQueryApplyInvoiceYOPResponseDtoResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'RecordQueryApplyInvoiceYOPResponseDtoResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'merchantNo' => 'string',
'customerRequestNo' => 'string',
'code' => 'string',
'message' => 'string',
'status' => 'string',
'createDate' => 'string',
'chargingDateStart' => 'string',
'chargingDateEnd' => 'string',
'chargingMode' => 'string',
'invoiceForm' => 'string',
'amount' => 'float',
'notifyType' => 'string',
'issueInvoiceDtoList' => '\Yeepay\Yop\Sdk\Service\Invoice\Model\RecordQueryIssueInvoiceDtoResult[]'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'merchantNo' => null,
'customerRequestNo' => null,
'code' => null,
'message' => null,
'status' => null,
'createDate' => 'date-time',
'chargingDateStart' => 'date-time',
'chargingDateEnd' => 'date-time',
'chargingMode' => null,
'invoiceForm' => null,
'amount' => null,
'notifyType' => null,
'issueInvoiceDtoList' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'merchantNo' => 'merchantNo',
'customerRequestNo' => 'customerRequestNo',
'code' => 'code',
'message' => 'message',
'status' => 'status',
'createDate' => 'createDate',
'chargingDateStart' => 'chargingDateStart',
'chargingDateEnd' => 'chargingDateEnd',
'chargingMode' => 'chargingMode',
'invoiceForm' => 'invoiceForm',
'amount' => 'amount',
'notifyType' => 'notifyType',
'issueInvoiceDtoList' => 'issueInvoiceDtoList'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'merchantNo' => 'setMerchantNo',
'customerRequestNo' => 'setCustomerRequestNo',
'code' => 'setCode',
'message' => 'setMessage',
'status' => 'setStatus',
'createDate' => 'setCreateDate',
'chargingDateStart' => 'setChargingDateStart',
'chargingDateEnd' => 'setChargingDateEnd',
'chargingMode' => 'setChargingMode',
'invoiceForm' => 'setInvoiceForm',
'amount' => 'setAmount',
'notifyType' => 'setNotifyType',
'issueInvoiceDtoList' => 'setIssueInvoiceDtoList'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'merchantNo' => 'getMerchantNo',
'customerRequestNo' => 'getCustomerRequestNo',
'code' => 'getCode',
'message' => 'getMessage',
'status' => 'getStatus',
'createDate' => 'getCreateDate',
'chargingDateStart' => 'getChargingDateStart',
'chargingDateEnd' => 'getChargingDateEnd',
'chargingMode' => 'getChargingMode',
'invoiceForm' => 'getInvoiceForm',
'amount' => 'getAmount',
'notifyType' => 'getNotifyType',
'issueInvoiceDtoList' => 'getIssueInvoiceDtoList'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : null;
$this->container['customerRequestNo'] = isset($data['customerRequestNo']) ? $data['customerRequestNo'] : 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['createDate'] = isset($data['createDate']) ? $data['createDate'] : null;
$this->container['chargingDateStart'] = isset($data['chargingDateStart']) ? $data['chargingDateStart'] : null;
$this->container['chargingDateEnd'] = isset($data['chargingDateEnd']) ? $data['chargingDateEnd'] : null;
$this->container['chargingMode'] = isset($data['chargingMode']) ? $data['chargingMode'] : null;
$this->container['invoiceForm'] = isset($data['invoiceForm']) ? $data['invoiceForm'] : null;
$this->container['amount'] = isset($data['amount']) ? $data['amount'] : null;
$this->container['notifyType'] = isset($data['notifyType']) ? $data['notifyType'] : null;
$this->container['issueInvoiceDtoList'] = isset($data['issueInvoiceDtoList']) ? $data['issueInvoiceDtoList'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->container['merchantNo'];
}
/**
* Sets merchantNo
*
* @param string $merchantNo 商编
*
* @return $this
*/
public function setMerchantNo($merchantNo)
{
$this->container['merchantNo'] = $merchantNo;
return $this;
}
/**
* Gets customerRequestNo
*
* @return string
*/
public function getCustomerRequestNo()
{
return $this->container['customerRequestNo'];
}
/**
* Sets customerRequestNo
*
* @param string $customerRequestNo 请求号
*
* @return $this
*/
public function setCustomerRequestNo($customerRequestNo)
{
$this->container['customerRequestNo'] = $customerRequestNo;
return $this;
}
/**
* 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 createDate
*
* @return string
*/
public function getCreateDate()
{
return $this->container['createDate'];
}
/**
* Sets createDate
*
* @param string $createDate 申请时间
*
* @return $this
*/
public function setCreateDate($createDate)
{
$this->container['createDate'] = $createDate;
return $this;
}
/**
* Gets chargingDateStart
*
* @return string
*/
public function getChargingDateStart()
{
return $this->container['chargingDateStart'];
}
/**
* Sets chargingDateStart
*
* @param string $chargingDateStart 收费开始时间
*
* @return $this
*/
public function setChargingDateStart($chargingDateStart)
{
$this->container['chargingDateStart'] = $chargingDateStart;
return $this;
}
/**
* Gets chargingDateEnd
*
* @return string
*/
public function getChargingDateEnd()
{
return $this->container['chargingDateEnd'];
}
/**
* Sets chargingDateEnd
*
* @param string $chargingDateEnd 收费结束时间
*
* @return $this
*/
public function setChargingDateEnd($chargingDateEnd)
{
$this->container['chargingDateEnd'] = $chargingDateEnd;
return $this;
}
/**
* Gets chargingMode
*
* @return string
*/
public function getChargingMode()
{
return $this->container['chargingMode'];
}
/**
* Sets chargingMode
*
* @param string $chargingMode 计费模式
*
* @return $this
*/
public function setChargingMode($chargingMode)
{
$this->container['chargingMode'] = $chargingMode;
return $this;
}
/**
* Gets invoiceForm
*
* @return string
*/
public function getInvoiceForm()
{
return $this->container['invoiceForm'];
}
/**
* Sets invoiceForm
*
* @param string $invoiceForm 发票形式
*
* @return $this
*/
public function setInvoiceForm($invoiceForm)
{
$this->container['invoiceForm'] = $invoiceForm;
return $this;
}
/**
* Gets amount
*
* @return float
*/
public function getAmount()
{
return $this->container['amount'];
}
/**
* Sets amount
*
* @param float $amount 收费金额
*
* @return $this
*/
public function setAmount($amount)
{
$this->container['amount'] = $amount;
return $this;
}
/**
* Gets notifyType
*
* @return string
*/
public function getNotifyType()
{
return $this->container['notifyType'];
}
/**
* Sets notifyType
*
* @param string $notifyType 通知类型
*
* @return $this
*/
public function setNotifyType($notifyType)
{
$this->container['notifyType'] = $notifyType;
return $this;
}
/**
* Gets issueInvoiceDtoList
*
* @return \Yeepay\Yop\Sdk\Service\Invoice\Model\RecordQueryIssueInvoiceDtoResult[]
*/
public function getIssueInvoiceDtoList()
{
return $this->container['issueInvoiceDtoList'];
}
/**
* Sets issueInvoiceDtoList
*
* @param \Yeepay\Yop\Sdk\Service\Invoice\Model\RecordQueryIssueInvoiceDtoResult[] $issueInvoiceDtoList 开票记录列表
*
* @return $this
*/
public function setIssueInvoiceDtoList($issueInvoiceDtoList)
{
$this->container['issueInvoiceDtoList'] = $issueInvoiceDtoList;
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,512 @@
<?php
/**
* RecordQueryIssueInvoiceDtoResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 发票服务
*
* <p>基于中台商户实际开票场景,提供给商户维护开票规则、票面信息,查询票面信息,申请开具手续费发票,查询开票记录,查询实收手续费金额的服务</p>
*
* 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\Invoice\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* RecordQueryIssueInvoiceDtoResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class RecordQueryIssueInvoiceDtoResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'RecordQueryIssueInvoiceDtoResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'totalPriceTax' => 'float',
'invoiceStatus' => 'string',
'isExpress' => 'string',
'pdfUrl' => 'string',
'pdfUrlCh' => 'string',
'log' => 'string',
'expressCompany' => 'string',
'expressNumber' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'totalPriceTax' => null,
'invoiceStatus' => null,
'isExpress' => null,
'pdfUrl' => null,
'pdfUrlCh' => null,
'log' => null,
'expressCompany' => null,
'expressNumber' => 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 = [
'totalPriceTax' => 'totalPriceTax',
'invoiceStatus' => 'invoiceStatus',
'isExpress' => 'isExpress',
'pdfUrl' => 'pdfUrl',
'pdfUrlCh' => 'pdfUrlCh',
'log' => 'log',
'expressCompany' => 'expressCompany',
'expressNumber' => 'expressNumber'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'totalPriceTax' => 'setTotalPriceTax',
'invoiceStatus' => 'setInvoiceStatus',
'isExpress' => 'setIsExpress',
'pdfUrl' => 'setPdfUrl',
'pdfUrlCh' => 'setPdfUrlCh',
'log' => 'setLog',
'expressCompany' => 'setExpressCompany',
'expressNumber' => 'setExpressNumber'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'totalPriceTax' => 'getTotalPriceTax',
'invoiceStatus' => 'getInvoiceStatus',
'isExpress' => 'getIsExpress',
'pdfUrl' => 'getPdfUrl',
'pdfUrlCh' => 'getPdfUrlCh',
'log' => 'getLog',
'expressCompany' => 'getExpressCompany',
'expressNumber' => 'getExpressNumber'
];
/**
* 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['totalPriceTax'] = isset($data['totalPriceTax']) ? $data['totalPriceTax'] : null;
$this->container['invoiceStatus'] = isset($data['invoiceStatus']) ? $data['invoiceStatus'] : null;
$this->container['isExpress'] = isset($data['isExpress']) ? $data['isExpress'] : null;
$this->container['pdfUrl'] = isset($data['pdfUrl']) ? $data['pdfUrl'] : null;
$this->container['pdfUrlCh'] = isset($data['pdfUrlCh']) ? $data['pdfUrlCh'] : null;
$this->container['log'] = isset($data['log']) ? $data['log'] : null;
$this->container['expressCompany'] = isset($data['expressCompany']) ? $data['expressCompany'] : null;
$this->container['expressNumber'] = isset($data['expressNumber']) ? $data['expressNumber'] : 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 totalPriceTax
*
* @return float
*/
public function getTotalPriceTax()
{
return $this->container['totalPriceTax'];
}
/**
* Sets totalPriceTax
*
* @param float $totalPriceTax 手续费
*
* @return $this
*/
public function setTotalPriceTax($totalPriceTax)
{
$this->container['totalPriceTax'] = $totalPriceTax;
return $this;
}
/**
* Gets invoiceStatus
*
* @return string
*/
public function getInvoiceStatus()
{
return $this->container['invoiceStatus'];
}
/**
* Sets invoiceStatus
*
* @param string $invoiceStatus 开票状态
*
* @return $this
*/
public function setInvoiceStatus($invoiceStatus)
{
$this->container['invoiceStatus'] = $invoiceStatus;
return $this;
}
/**
* Gets isExpress
*
* @return string
*/
public function getIsExpress()
{
return $this->container['isExpress'];
}
/**
* Sets isExpress
*
* @param string $isExpress 是否邮寄
*
* @return $this
*/
public function setIsExpress($isExpress)
{
$this->container['isExpress'] = $isExpress;
return $this;
}
/**
* Gets pdfUrl
*
* @return string
*/
public function getPdfUrl()
{
return $this->container['pdfUrl'];
}
/**
* Sets pdfUrl
*
* @param string $pdfUrl 已开发票地址
*
* @return $this
*/
public function setPdfUrl($pdfUrl)
{
$this->container['pdfUrl'] = $pdfUrl;
return $this;
}
/**
* Gets pdfUrlCh
*
* @return string
*/
public function getPdfUrlCh()
{
return $this->container['pdfUrlCh'];
}
/**
* Sets pdfUrlCh
*
* @param string $pdfUrlCh 冲红发票地址
*
* @return $this
*/
public function setPdfUrlCh($pdfUrlCh)
{
$this->container['pdfUrlCh'] = $pdfUrlCh;
return $this;
}
/**
* Gets log
*
* @return string
*/
public function getLog()
{
return $this->container['log'];
}
/**
* Sets log
*
* @param string $log 失败原因
*
* @return $this
*/
public function setLog($log)
{
$this->container['log'] = $log;
return $this;
}
/**
* Gets expressCompany
*
* @return string
*/
public function getExpressCompany()
{
return $this->container['expressCompany'];
}
/**
* Sets expressCompany
*
* @param string $expressCompany 快递公司
*
* @return $this
*/
public function setExpressCompany($expressCompany)
{
$this->container['expressCompany'] = $expressCompany;
return $this;
}
/**
* Gets expressNumber
*
* @return string
*/
public function getExpressNumber()
{
return $this->container['expressNumber'];
}
/**
* Sets expressNumber
*
* @param string $expressNumber 快递单号
*
* @return $this
*/
public function setExpressNumber($expressNumber)
{
$this->container['expressNumber'] = $expressNumber;
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
/**
* RecordQueryQueryApplyInvoiceResponseDTOResult
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 发票服务
*
* <p>基于中台商户实际开票场景,提供给商户维护开票规则、票面信息,查询票面信息,申请开具手续费发票,查询开票记录,查询实收手续费金额的服务</p>
*
* 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\Invoice\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* RecordQueryQueryApplyInvoiceResponseDTOResult Class Doc Comment
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class RecordQueryQueryApplyInvoiceResponseDTOResult implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'RecordQueryQueryApplyInvoiceResponseDTOResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'code' => 'string',
'message' => 'string',
'applyInvoiceRecordList' => '\Yeepay\Yop\Sdk\Service\Invoice\Model\RecordQueryApplyInvoiceYOPResponseDtoResult[]'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'code' => null,
'message' => null,
'applyInvoiceRecordList' => 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',
'applyInvoiceRecordList' => 'applyInvoiceRecordList'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'message' => 'setMessage',
'applyInvoiceRecordList' => 'setApplyInvoiceRecordList'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'message' => 'getMessage',
'applyInvoiceRecordList' => 'getApplyInvoiceRecordList'
];
/**
* 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['applyInvoiceRecordList'] = isset($data['applyInvoiceRecordList']) ? $data['applyInvoiceRecordList'] : 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 applyInvoiceRecordList
*
* @return \Yeepay\Yop\Sdk\Service\Invoice\Model\RecordQueryApplyInvoiceYOPResponseDtoResult[]
*/
public function getApplyInvoiceRecordList()
{
return $this->container['applyInvoiceRecordList'];
}
/**
* Sets applyInvoiceRecordList
*
* @param \Yeepay\Yop\Sdk\Service\Invoice\Model\RecordQueryApplyInvoiceYOPResponseDtoResult[] $applyInvoiceRecordList 发票申请和开票记录List
*
* @return $this
*/
public function setApplyInvoiceRecordList($applyInvoiceRecordList)
{
$this->container['applyInvoiceRecordList'] = $applyInvoiceRecordList;
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\Invoice\Model;
class RecordQueryRequest extends \Yeepay\Yop\Sdk\Model\BaseRequest
{
/**
* @var string
*/
private $parentMerchantNo;
/**
* @var string
*/
private $customerRequestNo;
/**
* @var string
*/
private $merchantNo;
/**
* Gets parentMerchantNo
*
* @return string
*/
public function getParentMerchantNo()
{
return $this->parentMerchantNo;
}
/**
* Sets parentMerchantNo
*
* @param string $parentMerchantNo
* @return RecordQueryRequest
*/
public function setParentMerchantNo($parentMerchantNo)
{
$this->parentMerchantNo = $parentMerchantNo;
return $this;
}
/**
* Gets customerRequestNo
*
* @return string
*/
public function getCustomerRequestNo()
{
return $this->customerRequestNo;
}
/**
* Sets customerRequestNo
*
* @param string $customerRequestNo
* @return RecordQueryRequest
*/
public function setCustomerRequestNo($customerRequestNo)
{
$this->customerRequestNo = $customerRequestNo;
return $this;
}
/**
* Gets merchantNo
*
* @return string
*/
public function getMerchantNo()
{
return $this->merchantNo;
}
/**
* Sets merchantNo
*
* @param string $merchantNo
* @return RecordQueryRequest
*/
public function setMerchantNo($merchantNo)
{
$this->merchantNo = $merchantNo;
return $this;
}
public static function getOperationId()
{
return 'recordQuery';
}
}

View File

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

View File

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

View File

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