OapiAppstoreInternalOrderConsumeRequest.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.appstore.internal.order.consume request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.07.01
  7. */
  8. class OapiAppstoreInternalOrderConsumeRequest
  9. {
  10. /**
  11. * 内购商品订单号
  12. **/
  13. private $bizOrderId;
  14. /**
  15. * 订购商品核销数量
  16. **/
  17. private $quantity;
  18. /**
  19. * 核销请求Id,由ISV生成,用于请求幂等
  20. **/
  21. private $requestId;
  22. /**
  23. * 员工在当前企业内的唯一标识,也称staffId
  24. **/
  25. private $userid;
  26. private $apiParas = array();
  27. public function setBizOrderId($bizOrderId)
  28. {
  29. $this->bizOrderId = $bizOrderId;
  30. $this->apiParas["biz_order_id"] = $bizOrderId;
  31. }
  32. public function getBizOrderId()
  33. {
  34. return $this->bizOrderId;
  35. }
  36. public function setQuantity($quantity)
  37. {
  38. $this->quantity = $quantity;
  39. $this->apiParas["quantity"] = $quantity;
  40. }
  41. public function getQuantity()
  42. {
  43. return $this->quantity;
  44. }
  45. public function setRequestId($requestId)
  46. {
  47. $this->requestId = $requestId;
  48. $this->apiParas["request_id"] = $requestId;
  49. }
  50. public function getRequestId()
  51. {
  52. return $this->requestId;
  53. }
  54. public function setUserid($userid)
  55. {
  56. $this->userid = $userid;
  57. $this->apiParas["userid"] = $userid;
  58. }
  59. public function getUserid()
  60. {
  61. return $this->userid;
  62. }
  63. public function getApiMethodName()
  64. {
  65. return "dingtalk.oapi.appstore.internal.order.consume";
  66. }
  67. public function getApiParas()
  68. {
  69. return $this->apiParas;
  70. }
  71. public function check()
  72. {
  73. RequestCheckUtil::checkNotNull($this->bizOrderId,"bizOrderId");
  74. RequestCheckUtil::checkNotNull($this->quantity,"quantity");
  75. RequestCheckUtil::checkNotNull($this->requestId,"requestId");
  76. RequestCheckUtil::checkNotNull($this->userid,"userid");
  77. }
  78. public function putOtherTextParam($key, $value) {
  79. $this->apiParas[$key] = $value;
  80. $this->$key = $value;
  81. }
  82. }