mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-09-01 19:04:08 +00:00
Added new columns to handle multiple different kind of notification from WePost
This commit is contained in:
@@ -23,7 +23,7 @@ class WePostNotificationObject implements DataTransferObject
|
||||
private array $packageInfo;
|
||||
|
||||
/** @var string */
|
||||
private string $client_id;
|
||||
private string $clientId;
|
||||
|
||||
/** @var string */
|
||||
private string $type;
|
||||
@@ -34,6 +34,24 @@ class WePostNotificationObject implements DataTransferObject
|
||||
/** @var string */
|
||||
private string $sign;
|
||||
|
||||
/** @var string */
|
||||
private string $orderCode;
|
||||
|
||||
/** @var string */
|
||||
private string $bizAction;
|
||||
|
||||
/** @var string */
|
||||
private string $bizActionDesc;
|
||||
|
||||
/** @var string */
|
||||
private string $segmentCode;
|
||||
|
||||
/** @var string */
|
||||
private string $isSplitOut;
|
||||
|
||||
/** @var array */
|
||||
private array $packageInfos;
|
||||
|
||||
/**
|
||||
* WePostNotificationObject constructor.
|
||||
* @param string $logisticsOrderCode
|
||||
@@ -41,10 +59,16 @@ class WePostNotificationObject implements DataTransferObject
|
||||
* @param string $timeZone,
|
||||
* @param string $status,
|
||||
* @param array $packageInfo,
|
||||
* @param string $client_id,
|
||||
* @param string $clientId,
|
||||
* @param string $type,
|
||||
* @param int $timestamp,
|
||||
* @param string $sign
|
||||
* @param string $orderCode
|
||||
* @param string $bizAction
|
||||
* @param string $bizActionDesc
|
||||
* @param string $segmentCode
|
||||
* @param string $isSplitOut
|
||||
* @param array $packageInfos
|
||||
*/
|
||||
public function __construct(
|
||||
string $logisticsOrderCode,
|
||||
@@ -52,20 +76,32 @@ class WePostNotificationObject implements DataTransferObject
|
||||
string $timeZone,
|
||||
string $status,
|
||||
array $packageInfo,
|
||||
string $client_id,
|
||||
string $clientId,
|
||||
string $type,
|
||||
int $timestamp,
|
||||
string $sign
|
||||
string $sign,
|
||||
string $orderCode = "",
|
||||
string $bizAction = "",
|
||||
string $bizActionDesc = "",
|
||||
string $segmentCode = "",
|
||||
string $isSplitOut = "",
|
||||
array $packageInfos = []
|
||||
) {
|
||||
$this->logisticsOrderCode = $logisticsOrderCode;
|
||||
$this->executeTime = $executeTime;
|
||||
$this->timeZone = $timeZone;
|
||||
$this->status = $status;
|
||||
$this->packageInfo = $packageInfo;
|
||||
$this->client_id = $client_id;
|
||||
$this->clientId = $clientId;
|
||||
$this->type = $type;
|
||||
$this->timestamp = $timestamp;
|
||||
$this->sign = $sign;
|
||||
$this->orderCode = $orderCode;
|
||||
$this->bizAction = $bizAction;
|
||||
$this->bizActionDesc = $bizActionDesc;
|
||||
$this->segmentCode = $segmentCode;
|
||||
$this->isSplitOut = $isSplitOut;
|
||||
$this->packageInfos = $packageInfos;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,7 +149,7 @@ class WePostNotificationObject implements DataTransferObject
|
||||
*/
|
||||
public function getClientId(): string
|
||||
{
|
||||
return $this->client_id;
|
||||
return $this->clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,4 +175,52 @@ class WePostNotificationObject implements DataTransferObject
|
||||
{
|
||||
return $this->sign;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderCode(): string
|
||||
{
|
||||
return $this->orderCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBizAction(): string
|
||||
{
|
||||
return $this->bizAction;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBizActionDesc(): string
|
||||
{
|
||||
return $this->bizActionDesc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSegmentCode(): string
|
||||
{
|
||||
return $this->segmentCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getIsSplitOut(): string
|
||||
{
|
||||
return $this->isSplitOut;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPackageInfos(): string
|
||||
{
|
||||
return json_encode($this->packageInfos);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user