-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from ostdotcom/develop
Support for new API endpoint - /base-tokens
- Loading branch information
Showing
8 changed files
with
99 additions
and
14 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (c) 2018 OST.com Ltd. | ||
Copyright (c) 2019 OST.com Inc. | ||
|
||
MIT License | ||
|
||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
2.0.0 | ||
2.1.0 |
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,29 @@ | ||
<?php | ||
/** | ||
* Base tokens class | ||
*/ | ||
|
||
namespace OST; | ||
|
||
use OST\Base; | ||
|
||
/** | ||
* Class encapsulating methods to interact with API's for Base Tokens module | ||
*/ | ||
class BaseTokens extends Base | ||
{ | ||
const PREFIX = '/base-tokens'; | ||
|
||
/** | ||
* Get base tokens details | ||
* | ||
* @param array $params params for fetching details of a base tokens | ||
* | ||
* @return object | ||
* | ||
*/ | ||
public function get(array $params = array()) | ||
{ | ||
return $this->requestObj->get($this->getPrefix() . '', $params); | ||
} | ||
} |
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,29 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: Dhananjay8 | ||
* Date: 2019-05-20 | ||
* Time: 16:44 | ||
*/ | ||
$filepath = realpath (dirname(__FILE__)); | ||
require_once($filepath."/ServiceTestBase.php"); | ||
|
||
final class BaseTokensTest extends ServiceTestBase | ||
{ | ||
/** | ||
* | ||
* Get Base Tokens | ||
* | ||
* @test | ||
* | ||
* @throws Exception | ||
*/ | ||
public function get() | ||
{ | ||
$baseTokensService = $this->ostObj->services->baseTokens; | ||
$params = array(); | ||
$response = $baseTokensService->get($params)->wait(); | ||
$this->isSuccessResponse($response); | ||
} | ||
|
||
} |