Skip to content

Commit

Permalink
Update JdUnionPromotionByunionidGetRequest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
flutterbest authored Dec 27, 2019
1 parent 9a1ab90 commit 3bdabfd
Showing 1 changed file with 33 additions and 10 deletions.
43 changes: 33 additions & 10 deletions src/jingdong/request/JdUnionPromotionByunionidGetRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ class JdUnionPromotionByunionidGetRequest implements RequestInterface

/**
* 子联盟ID(需要联系运营开通权限才能拿到数据)
* @var
* @var
*/
private $subUnionId;

/**
* 推广物料链接,建议链接使用微Q前缀,能较好适配微信手Q页面
* @var
Expand Down Expand Up @@ -54,6 +54,12 @@ class JdUnionPromotionByunionidGetRequest implements RequestInterface
*/
private $couponUrl;

/**
*转链类型,1:长链, 2 :短链 ,3: 长链+短链,默认短链
* @var
*/
private $chainType;

/**
* @return mixed
*/
Expand All @@ -69,8 +75,8 @@ public function setSubUnionId($subUnionId): void
{
$this->subUnionId = $subUnionId;
}


/**
* @return mixed
*/
Expand Down Expand Up @@ -151,6 +157,21 @@ public function setCouponUrl($couponUrl): void
$this->couponUrl = $couponUrl;
}

/**
* @return mixed
*/
public function getChainType()
{
return $this->chainType;
}

/**
* @param mixed $chainType
*/
public function setChainType($chainType): void
{
$this->chainType = $chainType;
}


/**
Expand All @@ -167,15 +188,17 @@ public function getMethod()
public function getParamJson()
{
$params = [
'materialId' =>$this->materialId,
'positionId' =>$this->positionId,
'unionId' =>$this->unionId,
'pid' =>$this->pid,
'couponUrl' =>$this->couponUrl,
'materialId' => $this->materialId,
'positionId' => $this->positionId,
'unionId' => $this->unionId,
'pid' => $this->pid,
'couponUrl' => $this->couponUrl,
'subUnionId' => $this->subUnionId,
'chainType' => $this->chainType,
];

return json_encode([
'promotionCodeReq' => array_filter ($params, function ($val) {
'promotionCodeReq' => array_filter($params, function ($val) {
return $val != null;
})
]);
Expand Down

0 comments on commit 3bdabfd

Please sign in to comment.