minulislam /
multicoin-api
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Multicoin\Api\Traits; |
||
| 4 | |||
| 5 | trait User |
||
| 6 | { |
||
| 7 | public function balance() |
||
| 8 | { |
||
| 9 | $url = '/user/'.$this->coin.'/balance'; |
||
| 10 | $response = $this->client->doGet($url); |
||
| 11 | |||
| 12 | return $response; |
||
| 13 | } |
||
| 14 | |||
| 15 | public function coreBalance() |
||
| 16 | { |
||
| 17 | $url = '/user/core-balance'; |
||
| 18 | $response = $this->client->doGet($url); |
||
| 19 | |||
| 20 | return $response; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function info() |
||
| 24 | { |
||
| 25 | $url = '/user'; |
||
| 26 | $response = $this->client->doGet($url); |
||
| 27 | |||
| 28 | return $response; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function setWebhookUrl($endPoint) |
||
| 32 | { |
||
| 33 | $url = '/user/webhook'; |
||
| 34 | $response = $this->client->doPost($url, ['url' => $endPoint]); |
||
| 35 | |||
| 36 | return $response; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function withdraw(array $param = []) |
||
| 40 | { |
||
| 41 | $url = $this->buildUrl('/withdraw'); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 42 | $url .= '?'.http_build_query($param); |
||
| 43 | $response = $this->client->doGet($url); |
||
| 44 | |||
| 45 | return $response; |
||
| 46 | } |
||
| 47 | } |
||
| 48 |