Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Commit

Permalink
Cancel field 'method' deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
vragovR committed Mar 22, 2018
1 parent 0a98b34 commit 05297f4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 21 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ $order = $client->getOrderApi()->annul([
# Cancel order
$order = $client->getOrderApi()->cancel([
'reason' => 'reason...',
'method' => Order::METHOD_FULL, // or Order::METHOD_COMMISSION or Order::METHOD_PENALTY
]);

# Close order
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vragovr/safecrow-api",
"description": "SafeCrow API v3 Client",
"version": "1.0.1",
"version": "1.0.2",
"type": "library",
"keywords": [
"http",
Expand Down
5 changes: 1 addition & 4 deletions src/Api/OrderApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,8 @@ public function cancel(int $id, array $params): Order
$resolver
->setRequired([
'reason',
'method',
])
->setAllowedTypes('reason', 'string')
->setAllowedTypes('method', 'string')
->setAllowedValues('method', [Order::METHOD_FULL, Order::METHOD_COMMISSION, Order::METHOD_PENALTY]);
->setAllowedTypes('reason', 'string');

$params = $resolver->resolve($params);

Expand Down
15 changes: 0 additions & 15 deletions src/Model/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,6 @@ class Order
*/
const STATUS_ANNULLED = 'annulled';

/**
* @var string
*/
const METHOD_FULL = 'full';

/**
* @var string
*/
const METHOD_COMMISSION = 'with_commission';

/**
* @var string
*/
const METHOD_PENALTY = 'with_penalty';

/**
* @var int
*/
Expand Down

0 comments on commit 05297f4

Please sign in to comment.