Skip to content

Commit

Permalink
OrderDetailsResponse::time is now defined as a DateTime object
Browse files Browse the repository at this point in the history
  • Loading branch information
dve committed Feb 25, 2018
1 parent 39e8b25 commit d786caa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public function getOrderDetails(string $orderId): OrderDetailsResponse
->setStatus($data->get('status'))
->setLastTx($data->get('lastTx'))
->setType($data->get('type'))
->setTime($data->get('time'))
->setTime($this->getDateTimeFromMicroTime($data->get('time') / 10000))
->setAmount((float)$data->get('amount'))
->setPrice((float)$data->get('price'))
->setRemains((float)$data->get('price'))
Expand Down
24 changes: 12 additions & 12 deletions src/Definition/Response/OrderDetailsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class OrderDetailsResponse implements ResponseInterface
private $type;

/**
* @var string
* @var \DateTime
*/
private $time;

Expand Down Expand Up @@ -121,30 +121,30 @@ public function getType(): string
}

/**
* @param string $type
* @return OrderDetailsResponse
* @return \DateTime
*/
public function setType(string $type): OrderDetailsResponse
public function getTime(): \DateTime
{
$this->type = $type;
return $this;
return $this->time;
}

/**
* @return string
* @param \DateTime $time
* @return OrderDetailsResponse
*/
public function getTime(): string
public function setTime(\DateTime $time): OrderDetailsResponse
{
return $this->time;
$this->time = $time;
return $this;
}

/**
* @param string $time
* @param string $type
* @return OrderDetailsResponse
*/
public function setTime(string $time): OrderDetailsResponse
public function setType(string $type): OrderDetailsResponse
{
$this->time = $time;
$this->type = $type;
return $this;
}

Expand Down

0 comments on commit d786caa

Please sign in to comment.