Class: Bakong::OpenApi::Resources::Tokens

Inherits:
Base
  • Object
show all
Defined in:
lib/bakong/open_api/resources/tokens.rb

Overview

‘POST /v1/renew_token` — exchange a registered email address for a short-lived JWT access token. The token is also delivered to the registered inbox; the API returns it inline on success.

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Bakong::OpenApi::Resources::Base

Instance Method Details

#renew(email:) ⇒ Hash

Returns { token: “…” }.

Parameters:

  • email (String)

    registered Bakong developer email (max 30 chars)

Returns:

  • (Hash)

    { token: “…” }

Raises:



15
16
17
# File 'lib/bakong/open_api/resources/tokens.rb', line 15

def renew(email:)
  submit("/v1/renew_token", { email: email })
end