Skip to content

Commit

Permalink
Added public from json method. #67
Browse files Browse the repository at this point in the history
  • Loading branch information
OGKevin committed Nov 9, 2017
1 parent 2a3a462 commit e22ccb0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Model/Core/BunqModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ protected static function fromJsonList(
return new BunqResponse($value, $responseRaw->getHeaders(), $pagination);
}

/**
* @param string $json
*
* @return BunqModel
*/
public static function fromJsonToModel(string $json): BunqModel
{
$responseArray = ModelUtil::deserializeResponseArray($json);

return static::createFromResponseArray($responseArray);
}

/**
* @param mixed[] $responseArray
* @param string $wrapper
Expand Down

0 comments on commit e22ccb0

Please sign in to comment.