Class: Ibanity::OAuthResource
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Ibanity::OAuthResource
- Defined in:
- lib/ibanity/api/o_auth_resource.rb
Direct Known Subclasses
IsabelConnect::AccessToken, IsabelConnect::RefreshToken, IsabelConnect::Token, PontoConnect::Token, PontoConnect::UserInfo
Class Method Summary collapse
- .create_by_uri(uri:, payload:, idempotency_key: nil, headers: nil) ⇒ Object
- .find_by_uri(uri:, customer_access_token: nil, headers: nil) ⇒ Object
Instance Method Summary collapse
-
#initialize(raw) ⇒ OAuthResource
constructor
A new instance of OAuthResource.
Constructor Details
#initialize(raw) ⇒ OAuthResource
Returns a new instance of OAuthResource.
15 16 17 |
# File 'lib/ibanity/api/o_auth_resource.rb', line 15 def initialize(raw) super(raw) end |
Class Method Details
.create_by_uri(uri:, payload:, idempotency_key: nil, headers: nil) ⇒ Object
3 4 5 6 7 |
# File 'lib/ibanity/api/o_auth_resource.rb', line 3 def self.create_by_uri(uri:, payload:, idempotency_key: nil, headers: nil) raw_item = Ibanity.client.post(uri: uri, payload: payload, json: false, idempotency_key: idempotency_key, headers: headers) raw_item = {} if raw_item == "" new(raw_item) end |
.find_by_uri(uri:, customer_access_token: nil, headers: nil) ⇒ Object
9 10 11 12 13 |
# File 'lib/ibanity/api/o_auth_resource.rb', line 9 def self.find_by_uri(uri:, customer_access_token: nil, headers: nil) raw_item = Ibanity.client.get(uri: uri, customer_access_token: customer_access_token, headers: headers) raw_item = {} if raw_item == "" new(raw_item) end |