OapiAppstoreInternalSkupageGetRequest.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.appstore.internal.skupage.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.07.01
  7. */
  8. class OapiAppstoreInternalSkupageGetRequest
  9. {
  10. /**
  11. * 回调页面(进行URLEncode处理),微应用为页面URL,E应用为页面路径地址
  12. **/
  13. private $callbackPage;
  14. /**
  15. * 与callbackPage配合使用。当用户从SKU页面下单并支付成功后,会跳转回ISV页面,此时将此参数原样回传。主要用于用户页面引导等操作,不能作为权益开通凭证。
  16. **/
  17. private $extendParam;
  18. /**
  19. * 内购商品码
  20. **/
  21. private $goodsCode;
  22. /**
  23. * 内购商品规格码,如果设置了规格码,页面会默认选中该规格码
  24. **/
  25. private $itemCode;
  26. private $apiParas = array();
  27. public function setCallbackPage($callbackPage)
  28. {
  29. $this->callbackPage = $callbackPage;
  30. $this->apiParas["callback_page"] = $callbackPage;
  31. }
  32. public function getCallbackPage()
  33. {
  34. return $this->callbackPage;
  35. }
  36. public function setExtendParam($extendParam)
  37. {
  38. $this->extendParam = $extendParam;
  39. $this->apiParas["extend_param"] = $extendParam;
  40. }
  41. public function getExtendParam()
  42. {
  43. return $this->extendParam;
  44. }
  45. public function setGoodsCode($goodsCode)
  46. {
  47. $this->goodsCode = $goodsCode;
  48. $this->apiParas["goods_code"] = $goodsCode;
  49. }
  50. public function getGoodsCode()
  51. {
  52. return $this->goodsCode;
  53. }
  54. public function setItemCode($itemCode)
  55. {
  56. $this->itemCode = $itemCode;
  57. $this->apiParas["item_code"] = $itemCode;
  58. }
  59. public function getItemCode()
  60. {
  61. return $this->itemCode;
  62. }
  63. public function getApiMethodName()
  64. {
  65. return "dingtalk.oapi.appstore.internal.skupage.get";
  66. }
  67. public function getApiParas()
  68. {
  69. return $this->apiParas;
  70. }
  71. public function check()
  72. {
  73. RequestCheckUtil::checkNotNull($this->goodsCode,"goodsCode");
  74. }
  75. public function putOtherTextParam($key, $value) {
  76. $this->apiParas[$key] = $value;
  77. $this->$key = $value;
  78. }
  79. }