Class: Paytunia::ConnectionWrappers::OAuthWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/paytunia/connection_wrappers/oauth_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token, site) ⇒ OAuthWrapper

Returns a new instance of OAuthWrapper.



6
7
8
9
# File 'lib/paytunia/connection_wrappers/oauth_wrapper.rb', line 6

def initialize(token, site)
  @token = token
  @site = site
end

Instance Attribute Details

#siteObject (readonly)

Returns the value of attribute site.



4
5
6
# File 'lib/paytunia/connection_wrappers/oauth_wrapper.rb', line 4

def site
  @site
end

#tokenObject (readonly)

Returns the value of attribute token.



4
5
6
# File 'lib/paytunia/connection_wrappers/oauth_wrapper.rb', line 4

def token
  @token
end

Instance Method Details

#get(path) ⇒ Object



11
12
13
# File 'lib/paytunia/connection_wrappers/oauth_wrapper.rb', line 11

def get(path)
  JSON.parse(token.get(@site + path).body)
end