Skip to content

Commit

Permalink
fix: add query params in ReturnRefund (#34)
Browse files Browse the repository at this point in the history
* add query params on ReturnRefund

* append

---------

Co-authored-by: 方亮 <[email protected]>
  • Loading branch information
snake-fl and 方亮 authored Jun 5, 2024
1 parent 048f4ca commit 016180e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/Resources/ReturnRefund.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ class ReturnRefund extends Resource
{
protected $category = 'return_refund';

public function searchCancellations($params = [])
public function searchCancellations($query = [], $body = null)
{
if ($body === null) {
static::extractParams($query, $query, $body);
}
return $this->call('POST', 'cancellations/search', [
RequestOptions::JSON => $params,
RequestOptions::QUERY => $query,
RequestOptions::JSON => $body,

]);
}

Expand All @@ -43,11 +48,14 @@ public function rejectCancellation($cancel_id, $params)
]);
}

public function searchReturns($query = [], $params = [])
public function searchReturns($query = [], $body = null)
{
if ($body === null) {
static::extractParams($query, $query, $body);
}
return $this->call('POST', 'returns/search', [
RequestOptions::QUERY => $query,
RequestOptions::JSON => $params,
RequestOptions::JSON => $body,
]);
}

Expand Down

0 comments on commit 016180e

Please sign in to comment.