Class: Trycourier::Resources::Auth
- Inherits:
-
Object
- Object
- Trycourier::Resources::Auth
- Defined in:
- lib/trycourier/resources/auth.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Auth
constructor
private
A new instance of Auth.
-
#issue_token(expires_in: , scope: , request_options: {}) ⇒ Trycourier::Models::AuthIssueTokenResponse
Some parameter documentations has been truncated, see Models::AuthIssueTokenParams for more details.
Constructor Details
#initialize(client:) ⇒ Auth
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 Auth.
36 37 38 |
# File 'lib/trycourier/resources/auth.rb', line 36 def initialize(client:) @client = client end |
Instance Method Details
#issue_token(expires_in: , scope: , request_options: {}) ⇒ Trycourier::Models::AuthIssueTokenResponse
Some parameter documentations has been truncated, see Models::AuthIssueTokenParams for more details.
Returns a new access token.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/trycourier/resources/auth.rb', line 22 def issue_token(params) parsed, = Trycourier::AuthIssueTokenParams.dump_request(params) @client.request( method: :post, path: "auth/issue-token", body: parsed, model: Trycourier::Models::AuthIssueTokenResponse, options: ) end |