Class: Increase::Resources::OAuthTokens
- Inherits:
-
Object
- Object
- Increase::Resources::OAuthTokens
- Defined in:
- lib/increase/resources/oauth_tokens.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Increase::Models::OAuthToken
Create an OAuth Token.
-
#initialize(client:) ⇒ OAuthTokens
constructor
A new instance of OAuthTokens.
Constructor Details
#initialize(client:) ⇒ OAuthTokens
Returns a new instance of OAuthTokens.
6 7 8 |
# File 'lib/increase/resources/oauth_tokens.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#create(params = {}, opts = {}) ⇒ Increase::Models::OAuthToken
Create an OAuth Token
28 29 30 31 32 33 34 35 |
# File 'lib/increase/resources/oauth_tokens.rb', line 28 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/oauth/tokens" req[:body] = params req[:model] = Increase::Models::OAuthToken @client.request(req, opts) end |