Class: Mercadoshops::Api
- Inherits:
-
Object
- Object
- Mercadoshops::Api
- Includes:
- Core::Orders
- Defined in:
- lib/mercadoshops/api.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
Instance Method Summary collapse
- #get_last_response ⇒ Object
- #get_last_result ⇒ Object
-
#initialize(args = {}) ⇒ Api
constructor
A new instance of Api.
Methods included from Core::Orders
Constructor Details
#initialize(args = {}) ⇒ Api
Returns a new instance of Api.
5 6 7 8 9 10 11 12 13 |
# File 'lib/mercadoshops/api.rb', line 5 def initialize(args={}) @access_token = args[:access_token] if args[:endpoint_url].present? @endpoint_url = args[:endpoint_url] else @endpoint_url = 'https://api.mercadoshops.com/v1' end end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
3 4 5 |
# File 'lib/mercadoshops/api.rb', line 3 def access_token @access_token end |
Instance Method Details
#get_last_response ⇒ Object
17 18 19 |
# File 'lib/mercadoshops/api.rb', line 17 def get_last_response @last_response end |
#get_last_result ⇒ Object
21 22 23 |
# File 'lib/mercadoshops/api.rb', line 21 def get_last_result @last_result end |