Skip to content

Commit

Permalink
add: some new feature in orders api
Browse files Browse the repository at this point in the history
  • Loading branch information
nVuln committed Aug 28, 2024
1 parent 0b39d43 commit b9564e2
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/Resources/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,37 @@ public function getOrderList($query = [], $body = null)
is_array($body) ? RequestOptions::JSON : RequestOptions::FORM_PARAMS => $body,
]);
}

public function addExternalOrderReferences($orders)
{
return $this->call('POST', 'orders/external_orders', [
RequestOptions::JSON => [
'orders' => $orders,
]
], 202406);
}

public function searchOrderByExternalOrderReferences($platform, $external_order_id)
{
return $this->call('POST', 'orders/external_order_search', [
RequestOptions::QUERY => [
'platform' => $platform,
'external_order_id' => $external_order_id,
]
], 202406);
}

public function getExternalOrderReferences($order_id, $platform)
{
return $this->call('GET', 'orders/' . $order_id . '/external_orders', [
RequestOptions::QUERY => [
'platform' => $platform,
]
], 202406);
}

public function getPriceDetail($order_id)
{
return $this->call('GET', 'orders/' . $order_id . '/price_detail', [], 202407);
}
}

0 comments on commit b9564e2

Please sign in to comment.