ContractDraftRequest.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * 创建草稿合同请求类
  4. */
  5. class ContractDraftRequest extends SdkRequest {
  6. const CONTRACT_FRAFT = "/v2/contract/draft"; // 创建草稿合同路径
  7. private $contract; // 合同信息
  8. public function __construct() {
  9. $count = func_num_args();
  10. $args=func_get_args();
  11. if (method_exists($this,$f='__construct'.$count)) {
  12. call_user_func_array(array($this,$f),$args);
  13. }
  14. }
  15. public function __construct0() {
  16. }
  17. /**
  18. * ContractDraftRequest constructor.
  19. */
  20. public function __construct1($contract) {
  21. $this->contract = $contract;
  22. }
  23. public function getUrl() {
  24. return self::CONTRACT_FRAFT;
  25. }
  26. public function getHttpParamers() {
  27. $httpParameters = HttpParameter::httpPostParamer();
  28. $httpParameters->setJsonParams(json_encode($this->contract));
  29. return $httpParameters;
  30. }
  31. /**
  32. * @return mixed
  33. */
  34. public function getContract()
  35. {
  36. return $this->contract;
  37. }
  38. /**
  39. * @param mixed $contract
  40. */
  41. public function setContract($contract)
  42. {
  43. $this->contract = $contract;
  44. }
  45. }