Class: Increase::Resources::OAuthTokens
- Inherits:
-
Object
- Object
- Increase::Resources::OAuthTokens
- Defined in:
- lib/increase/resources/oauth_tokens.rb
Instance Method Summary collapse
-
#create(grant_type: , client_id: nil, client_secret: nil, code: nil, production_token: nil, request_options: {}) ⇒ Increase::Models::OAuthToken
Some parameter documentations has been truncated, see Models::OAuthTokenCreateParams for more details.
-
#initialize(client:) ⇒ OAuthTokens
constructor
private
A new instance of OAuthTokens.
Constructor Details
#initialize(client:) ⇒ OAuthTokens
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of OAuthTokens.
42 43 44 |
# File 'lib/increase/resources/oauth_tokens.rb', line 42 def initialize(client:) @client = client end |
Instance Method Details
#create(grant_type: , client_id: nil, client_secret: nil, code: nil, production_token: nil, request_options: {}) ⇒ Increase::Models::OAuthToken
Some parameter documentations has been truncated, see Models::OAuthTokenCreateParams for more details.
Create an OAuth Token
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/increase/resources/oauth_tokens.rb', line 28 def create(params) parsed, = Increase::OAuthTokenCreateParams.dump_request(params) @client.request( method: :post, path: "oauth/tokens", body: parsed, model: Increase::OAuthToken, options: ) end |