SignatoryIdentityRequest.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * 获取签约方身份信息请求
  4. */
  5. class SignatoryIdentityRequest extends SdkRequest {
  6. const REQUEST_URL = "/v2/signatory/identity";
  7. private $contractId;
  8. private $bizId;
  9. private $user;
  10. function getUrl() {
  11. return self::REQUEST_URL;
  12. }
  13. function getHttpParamers() {
  14. $paramSwitcher = ParamSwitcher::instanceParam();
  15. $paramSwitcher->addParam('contractId', $this->contractId);
  16. $paramSwitcher->addParam('bizId', $this->bizId);
  17. if($this->user){
  18. $paramSwitcher->addParam('contact', $this->getUser()->getContact());
  19. $paramSwitcher->addParam('contactType', $this->getUser()->getContactType());
  20. }
  21. $httpParameters = HttpParameter::httpPostParamer();
  22. $httpParameters->setJsonParams(json_encode($paramSwitcher->getParams()));
  23. return $httpParameters;
  24. }
  25. /**
  26. * @return mixed
  27. */
  28. public function getContractId()
  29. {
  30. return $this->contractId;
  31. }
  32. /**
  33. * @param mixed $contractId
  34. */
  35. public function setContractId($contractId)
  36. {
  37. $this->contractId = $contractId;
  38. }
  39. /**
  40. * @return mixed
  41. */
  42. public function getBizId()
  43. {
  44. return $this->bizId;
  45. }
  46. /**
  47. * @param mixed $bizId
  48. */
  49. public function setBizId($bizId)
  50. {
  51. $this->bizId = $bizId;
  52. }
  53. /**
  54. * @return mixed
  55. */
  56. public function getUser()
  57. {
  58. return $this->user;
  59. }
  60. /**
  61. * @param mixed $user
  62. */
  63. public function setUser($user)
  64. {
  65. $this->user = $user;
  66. }
  67. }