Compare commits
2 Commits
c33fb47508
...
a11d686b2a
| Author | SHA1 | Date | |
|---|---|---|---|
| a11d686b2a | |||
| acbf430ae7 |
@@ -40,6 +40,27 @@ class NaverApiClient
|
||||
return $this->request('PUT', $url, $updateData);
|
||||
}
|
||||
|
||||
/**
|
||||
* [POST] 매물 정보 가격수정
|
||||
* @param string $articleNumber 매물번호
|
||||
* @param array $priceData 가격 수정 데이터
|
||||
* API:PATCH /kiso/center/verification-article/price/{매물번호}?charger={변경자}
|
||||
* priceType int 가격유형 (DEAL:매매, WARRANTY:보증금, LEASE:월세, PRE_SALE:분양, PREMIUM:프리미엄, PRE_SALE_OPTION:분양옵션)
|
||||
* dealAmount Int 매매금액
|
||||
* warrantyAmount Int 보증금
|
||||
* leaseAmount Int 월세금액
|
||||
* preSaleAmount Int 분양금액
|
||||
* premiumAmount Int 프리미엄금액
|
||||
* preSaleOptionAmount Int 분양옵션금액
|
||||
*/
|
||||
public function postArticlePriceUpdate(string $articleNumber, array $priceData, string $charger = 'admin'): ?array
|
||||
{
|
||||
$this->charger = $charger;
|
||||
$url = "{$this->baseUrl}/kiso/center/verification-article/price/{$articleNumber}?charger={$this->charger}";
|
||||
|
||||
return $this->request('POST', $url, $priceData);
|
||||
}
|
||||
|
||||
public function submitSyncResult(string $reserveNoList): ?array
|
||||
{
|
||||
$url = "{$this->baseUrl}/site/submitSyncResult.nhn";
|
||||
@@ -294,6 +315,17 @@ class NaverApiClient
|
||||
'X-Naver-Client-Id: yqBbvQZ123_hjH3b3Df9'
|
||||
]);
|
||||
}
|
||||
} elseif ( $method === 'PATCH') {
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
|
||||
if ($data) {
|
||||
$payload = json_encode($data);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
||||
'Content-Type: application/json',
|
||||
'Content-Length: ' . strlen($payload),
|
||||
'X-Naver-Client-Id: yqBbvQZ123_hjH3b3Df9'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$response = curl_exec($ch);
|
||||
|
||||
Reference in New Issue
Block a user