feat: API to request change order address

This commit is contained in:
weichien00
2021-08-19 01:31:27 +08:00
parent ab747b3403
commit 3c20386875
8 changed files with 198 additions and 1 deletions
@@ -3,6 +3,7 @@
namespace App\Classes\Modules\Addresses\DataTransferObjects;
use App\Classes\General\Interfaces\DataTransferObject;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
class AddressObject implements DataTransferObject
{
@@ -38,7 +39,7 @@ class AddressObject implements DataTransferObject
* @param int $postCode
* @param null|string $reference
*/
public function __construct(string $streetOne, ?string $streetTwo, int $countryId, int $stateId, int $districtId, int $postCode, ?string $reference = null)
public function __construct(string $streetOne, ?string $streetTwo, int $countryId, int $stateId, int $districtId, int $postCode, ?string $reference = null, ?int $status = ApprovalStatus::APPROVED)
{
$this->streetOne = $streetOne;
$this->streetTwo = $streetTwo;
@@ -47,6 +48,7 @@ class AddressObject implements DataTransferObject
$this->districtId = $districtId;
$this->postCode = $postCode;
$this->reference = $reference;
$this->status = $status;
}
/**
@@ -105,5 +107,13 @@ class AddressObject implements DataTransferObject
return $this->reference;
}
/**
* @return int
*/
public function getStatus(): int
{
return $this->status;
}
}