-
Notifications
You must be signed in to change notification settings - Fork 4
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 #52 from ostdotcom/develop
Support for new API route - /base-tokens
- Loading branch information
Showing
11 changed files
with
93 additions
and
13 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,35 @@ | ||
module OSTSdk | ||
|
||
module Saas | ||
|
||
|
||
class BaseTokens < OSTSdk::Saas::Base | ||
|
||
# Initialize | ||
# | ||
# Arguments: | ||
# api_base_url: (String) | ||
# api_key: (String) | ||
# api_secret: (String) | ||
# api_spec: (Boolean) | ||
# config: (Hash) | ||
# | ||
def initialize(params) | ||
super | ||
@url_prefix = '/base-tokens' | ||
end | ||
|
||
# Get token details | ||
# | ||
# Returns: | ||
# response: (Hash) | ||
# | ||
def get(params = {}) | ||
http_helper.send_get_request("#{@url_prefix}", params) | ||
end | ||
|
||
end | ||
|
||
end | ||
|
||
end |
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,18 @@ | ||
require_relative "../../../lib/ost-sdk-ruby/util" | ||
require_relative "../../../lib/ost-sdk-ruby/saas" | ||
require "test/unit" | ||
require_relative "../../../lib/config" | ||
|
||
class BaseTokensTest < Test::Unit::TestCase | ||
|
||
def base_tokens_service | ||
@base_tokens_service ||= Config::OST_SDK.services.base_tokens | ||
end | ||
|
||
def test_base_tokens_get | ||
result = base_tokens_service.get() | ||
puts "result=>#{result}" unless result["success"] | ||
assert_equal(result["success"], true ) | ||
end | ||
|
||
end |
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,5 +1,5 @@ | ||
module OSTSdk | ||
|
||
VERSION = "2.0.0" | ||
VERSION = "2.0.1.beta1" | ||
|
||
end |
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