ZhimaMerchantCloseloopDataUploadRequest.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <?php
  2. /**
  3. * ALIPAY API: zhima.merchant.closeloop.data.upload request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2017-05-27 22:38:32
  7. */
  8. class ZhimaMerchantCloseloopDataUploadRequest
  9. {
  10. /**
  11. * 公用回传参数(非必填),该参数会透传给商户,商户可以用于业务逻辑处理,请使用json格式。
  12. **/
  13. private $bizExtParams;
  14. /**
  15. * 单条数据的数据列,多个列以逗号隔开。
  16. **/
  17. private $columns;
  18. /**
  19. * 传入的json格式的文件,其中{"records": 是每个文件的固定开头。json中的字段可以通过如下步骤获取:首先调用zhima.merchant.data.upload.initialize接口获取数据模板,该接口会返回一个数据模板文件的url地址,如:http://zmxymerchant-prod.oss-cn-shenzhen.zmxy.com.cn/openApi/openDoc/信用护航-负面记录和信用足迹商户数据模板V1.0.xlsx,该数据模板文件详细列出了需要传入的字段,及各字段的要求,data中的各字段就是该文件中列出的字段编码。
  20. **/
  21. private $file;
  22. /**
  23. * 文件的编码,如果文件格式是UTF-8,则填写UTF-8,如果文件格式是GBK,则填写GBK。
  24. **/
  25. private $fileCharset;
  26. /**
  27. * 主键列使用传入字段进行组合,也可以使用传入的某个单字段(确保主键稳定,而且可以很好的区分不同的数据)。例如order_no,pay_month或者order_no,bill_month组合,对于一个order_no只会有一条数据的情况,直接使用order_no作为主键列。
  28. **/
  29. private $primaryKeyColumns;
  30. /**
  31. * 文件数据记录条数,如file字段中的record数组有10条数据,那么就填10。
  32. **/
  33. private $records;
  34. /**
  35. * 数据应用的场景编码 ,场景码和场景名称(数字为场景码)如下:
  36. 1:负面披露
  37. 2:信用足迹
  38. 3:负面+足迹
  39. 4:信用守护
  40. 5:负面+守护
  41. 6:足迹+守护
  42. 7:负面+足迹+守护
  43. 8:数据反馈
  44. 32:骑行
  45. 每个场景码对应的数据模板不一样,请使用zhima.merchant.data.upload.initialize接口获取场景码对应的数据模板。
  46. **/
  47. private $sceneCode;
  48. private $apiParas = array();
  49. private $terminalType;
  50. private $terminalInfo;
  51. private $prodCode;
  52. private $apiVersion="1.0";
  53. private $notifyUrl;
  54. private $returnUrl;
  55. private $needEncrypt=false;
  56. public function setBizExtParams($bizExtParams)
  57. {
  58. $this->bizExtParams = $bizExtParams;
  59. $this->apiParas["biz_ext_params"] = $bizExtParams;
  60. }
  61. public function getBizExtParams()
  62. {
  63. return $this->bizExtParams;
  64. }
  65. public function setColumns($columns)
  66. {
  67. $this->columns = $columns;
  68. $this->apiParas["columns"] = $columns;
  69. }
  70. public function getColumns()
  71. {
  72. return $this->columns;
  73. }
  74. public function setFile($file)
  75. {
  76. $this->file = $file;
  77. $this->apiParas["file"] = $file;
  78. }
  79. public function getFile()
  80. {
  81. return $this->file;
  82. }
  83. public function setFileCharset($fileCharset)
  84. {
  85. $this->fileCharset = $fileCharset;
  86. $this->apiParas["file_charset"] = $fileCharset;
  87. }
  88. public function getFileCharset()
  89. {
  90. return $this->fileCharset;
  91. }
  92. public function setPrimaryKeyColumns($primaryKeyColumns)
  93. {
  94. $this->primaryKeyColumns = $primaryKeyColumns;
  95. $this->apiParas["primary_key_columns"] = $primaryKeyColumns;
  96. }
  97. public function getPrimaryKeyColumns()
  98. {
  99. return $this->primaryKeyColumns;
  100. }
  101. public function setRecords($records)
  102. {
  103. $this->records = $records;
  104. $this->apiParas["records"] = $records;
  105. }
  106. public function getRecords()
  107. {
  108. return $this->records;
  109. }
  110. public function setSceneCode($sceneCode)
  111. {
  112. $this->sceneCode = $sceneCode;
  113. $this->apiParas["scene_code"] = $sceneCode;
  114. }
  115. public function getSceneCode()
  116. {
  117. return $this->sceneCode;
  118. }
  119. public function getApiMethodName()
  120. {
  121. return "zhima.merchant.closeloop.data.upload";
  122. }
  123. public function setNotifyUrl($notifyUrl)
  124. {
  125. $this->notifyUrl=$notifyUrl;
  126. }
  127. public function getNotifyUrl()
  128. {
  129. return $this->notifyUrl;
  130. }
  131. public function setReturnUrl($returnUrl)
  132. {
  133. $this->returnUrl=$returnUrl;
  134. }
  135. public function getReturnUrl()
  136. {
  137. return $this->returnUrl;
  138. }
  139. public function getApiParas()
  140. {
  141. return $this->apiParas;
  142. }
  143. public function getTerminalType()
  144. {
  145. return $this->terminalType;
  146. }
  147. public function setTerminalType($terminalType)
  148. {
  149. $this->terminalType = $terminalType;
  150. }
  151. public function getTerminalInfo()
  152. {
  153. return $this->terminalInfo;
  154. }
  155. public function setTerminalInfo($terminalInfo)
  156. {
  157. $this->terminalInfo = $terminalInfo;
  158. }
  159. public function getProdCode()
  160. {
  161. return $this->prodCode;
  162. }
  163. public function setProdCode($prodCode)
  164. {
  165. $this->prodCode = $prodCode;
  166. }
  167. public function setApiVersion($apiVersion)
  168. {
  169. $this->apiVersion=$apiVersion;
  170. }
  171. public function getApiVersion()
  172. {
  173. return $this->apiVersion;
  174. }
  175. public function setNeedEncrypt($needEncrypt)
  176. {
  177. $this->needEncrypt=$needEncrypt;
  178. }
  179. public function getNeedEncrypt()
  180. {
  181. return $this->needEncrypt;
  182. }
  183. }