Class: Ibanity::IsabelConnect::AccessToken
- Inherits:
-
OAuthResource
- Object
- OpenStruct
- OAuthResource
- Ibanity::IsabelConnect::AccessToken
- Defined in:
- lib/ibanity/api/isabel_connect/access_token.rb
Class Method Summary collapse
Methods inherited from OAuthResource
create_by_uri, find_by_uri, #initialize
Constructor Details
This class inherits a constructor from Ibanity::OAuthResource
Class Method Details
.create(refresh_token:, idempotency_key: nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/ibanity/api/isabel_connect/access_token.rb', line 4 def self.create(refresh_token:, idempotency_key: nil) warn "WARNING: Ibanity::IsabelConnect::AccessToken.create is deprecated, please use Ibanity::IsabelConnect::Token.create instead" uri = Ibanity.isabel_connect_api_schema["oAuth2"]["accessTokens"] arguments = [ ["grant_type", "refresh_token"], ["refresh_token", refresh_token], ["client_id", Ibanity.client.isabel_connect_client_id], ["client_secret", Ibanity.client.isabel_connect_client_secret] ] payload = URI.encode_www_form(arguments) create_by_uri(uri: uri, payload: payload, idempotency_key: idempotency_key) end |