ContractDownloadRequest.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. class ContractDownloadRequest extends SdkRequest {
  3. const CONTRACT_DOWNLOAD = "/v2/contract/download"; // 合同下载接口地址
  4. private $contractId; // 合同ID
  5. private $bizId; // 业务ID
  6. private $tenantName; // 子公司名称
  7. private $downloadItems;
  8. public function getUrl() {
  9. return self::CONTRACT_DOWNLOAD;
  10. }
  11. public function getHttpParamers() {
  12. $paramSwitcher = ParamSwitcher::instanceParam();
  13. $paramSwitcher->addParam('contractId', $this->contractId);
  14. $paramSwitcher->addParam('bizId', $this->bizId);
  15. $paramSwitcher->addParam('tenantName', $this->tenantName);
  16. $paramSwitcher->addParam('downloadItems', $this->GetDownloadItemString());
  17. $httpParameters = HttpParameter::httpGetParamer();
  18. $httpParameters->setParams($paramSwitcher->getParams());
  19. return $httpParameters;
  20. }
  21. public function GetDownloadItemString()
  22. {
  23. if ($this->downloadItems == null || count($this->downloadItems) == 0)
  24. {
  25. return null;
  26. }
  27. return implode(",", $this->downloadItems);
  28. }
  29. /**
  30. * @return mixed
  31. */
  32. public function getContractId()
  33. {
  34. return $this->contractId;
  35. }
  36. /**
  37. * @param mixed $contractId
  38. */
  39. public function setContractId($contractId)
  40. {
  41. $this->contractId = $contractId;
  42. }
  43. /**
  44. * @return mixed
  45. */
  46. public function getBizId()
  47. {
  48. return $this->bizId;
  49. }
  50. /**
  51. * @param mixed $bizId
  52. */
  53. public function setBizId($bizId)
  54. {
  55. $this->bizId = $bizId;
  56. }
  57. /**
  58. * @return mixed
  59. */
  60. public function getTenantName()
  61. {
  62. return $this->tenantName;
  63. }
  64. /**
  65. * @param mixed $tenantName
  66. */
  67. public function setTenantName($tenantName)
  68. {
  69. $this->tenantName = $tenantName;
  70. }
  71. /**
  72. * @return mixed
  73. */
  74. public function getDownloadItems()
  75. {
  76. return $this->downloadItems;
  77. }
  78. /**
  79. * @param mixed $downloadItems
  80. */
  81. public function setDownloadItems($downloadItems)
  82. {
  83. $this->downloadItems = $downloadItems;
  84. }
  85. }