|
|
|
@@ -6,6 +6,7 @@ use App\Exceptions\AppCommonException; |
|
|
|
use App\Models\ReceiptIssuingHTParkingCustomOrder; |
|
|
|
use App\Models\ReceiptIssuingOrder; |
|
|
|
use Exception; |
|
|
|
use Illuminate\Support\Arr; |
|
|
|
use Illuminate\Support\Carbon; |
|
|
|
use Illuminate\Support\Facades\Http; |
|
|
|
use Illuminate\Support\Facades\Log; |
|
|
|
@@ -13,6 +14,10 @@ use Illuminate\Support\Facades\Log; |
|
|
|
class API |
|
|
|
{ |
|
|
|
|
|
|
|
const CONDITION_CUSTOMER_CODDE = 'customer_code'; |
|
|
|
const CONDITION_PARKING_MANAGEMENT_CODDE = 'parking_management_code'; |
|
|
|
const CONDITION_PARKING_NAME = 'parking_name'; |
|
|
|
|
|
|
|
private const RESULT_CODE = 'result_code'; |
|
|
|
private const RESULT_CODE_SUCCESS = 'SUCCESS'; |
|
|
|
private const FIELD_DATA = 'data'; |
|
|
|
@@ -35,16 +40,14 @@ class API |
|
|
|
return static::get(static::getCustomersUrl(), $query); |
|
|
|
} |
|
|
|
|
|
|
|
public static function getParkings(?string $customerCode, ?string $parkingManagementCode = null) |
|
|
|
public static function getParkings(array $condition) |
|
|
|
{ |
|
|
|
|
|
|
|
if ($customerCode) { |
|
|
|
$query['customer_code'] = $customerCode; |
|
|
|
} |
|
|
|
if ($parkingManagementCode) { |
|
|
|
$query['parking_management_code'] = $parkingManagementCode; |
|
|
|
} |
|
|
|
return static::get(static::getParkingsUrl(), $query); |
|
|
|
$condition = Arr::only($condition, [ |
|
|
|
self::CONDITION_CUSTOMER_CODDE, |
|
|
|
self::CONDITION_PARKING_MANAGEMENT_CODDE, |
|
|
|
self::CONDITION_PARKING_NAME, |
|
|
|
]); |
|
|
|
return static::get(static::getParkingsUrl(), $condition); |
|
|
|
} |
|
|
|
|
|
|
|
public static function getAdjustData(string $customerCode, string $parkingManagementCode, int $adjustSeqNo) |
|
|
|
|