-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements get Order details end point
- Loading branch information
dve
committed
Feb 25, 2018
1 parent
99990be
commit 39e8b25
Showing
4 changed files
with
540 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace DVE\CEXApiClient\ConstantHelper; | ||
|
||
class OrderStatus | ||
{ | ||
const ACTIVE = 'a'; | ||
const CANCELED = 'c'; | ||
const CANCEL_DONE = 'cd'; | ||
const DONE = 'd'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
namespace DVE\CEXApiClient\Definition\Request; | ||
|
||
class OrderDetailsRequest extends PrivateRequestAbstract | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
private $id; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getUri(): string | ||
{ | ||
return '/get_order'; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getMethod(): string | ||
{ | ||
return 'POST'; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getBodyParams(): array | ||
{ | ||
return parent::getBodyParams() + [ | ||
'id' => $this->id | ||
]; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getId(): string | ||
{ | ||
return $this->id; | ||
} | ||
|
||
/** | ||
* @param string $id | ||
* @return OrderDetailsRequest | ||
*/ | ||
public function setId(string $id): OrderDetailsRequest | ||
{ | ||
$this->id = $id; | ||
return $this; | ||
} | ||
} |
Oops, something went wrong.