Skip to content

Commit

Permalink
Merge pull request #66 from alchemy-fr/feature/orders-2
Browse files Browse the repository at this point in the history
Add missing route
aztech-dev committed Apr 22, 2016
2 parents f177e6b + e0ad9cf commit 6416fde
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/PhraseanetSDK/Orders/OrderRepository.php
Original file line number Diff line number Diff line change
@@ -45,4 +45,17 @@ public function listOrders($pageIndex = 0, $pageSize = 20)

return new OrderList($response->getProperty('data'), $meta->pagination);
}

public function createOrder($usage, array $recordsIds)
{
$parameters = [
'usage' => $usage,
'deadline' => '',
'records' => $recordsIds
];

$response = $this->query('POST', 'v2/orders/', [], [ 'data' => $parameters ], ['Accept' => 'application/json']);

return new Order($response->getProperty('data'));
}
}

0 comments on commit 6416fde

Please sign in to comment.