Class: EuPago::OAuthClient

Inherits:
Object
  • Object
show all
Includes:
Mixins::Client
Defined in:
lib/ruby-eupago/oauth_client.rb

Instance Method Summary collapse

Methods included from Mixins::Client

#build_base_url, #initialize

Instance Method Details

#get(api_url, query: {}, headers: {}) ⇒ Object



7
8
9
10
# File 'lib/ruby-eupago/oauth_client.rb', line 7

def get(api_url, query: {}, headers: {})
  EuPago::Api::Auth.ensure_valid_token
  super(api_url, query: query, headers: headers)
end

#post(api_url, body: {}, headers: {}) ⇒ Object



12
13
14
15
# File 'lib/ruby-eupago/oauth_client.rb', line 12

def post(api_url, body: {}, headers: {})
  EuPago::Api::Auth.ensure_valid_token
  super(api_url, body: body, headers: headers)
end