Class: Mercadoshops::Api

Inherits:
Object
  • Object
show all
Includes:
Core::Orders
Defined in:
lib/mercadoshops/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::Orders

#get_order, #search_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_tokenObject

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_responseObject



17
18
19
# File 'lib/mercadoshops/api.rb', line 17

def get_last_response
  @last_response
end

#get_last_resultObject



21
22
23
# File 'lib/mercadoshops/api.rb', line 21

def get_last_result
  @last_result
end