Module: Nibo::ApiResource::Retrieve

Included in:
Nibo::Account
Defined in:
lib/nibo/api_resource/retrieve.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



13
14
15
# File 'lib/nibo/api_resource/retrieve.rb', line 13

def self.included(base)
  base.extend(Retrieve)
end

Instance Method Details

#retrieve(obj_id) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/nibo/api_resource/retrieve.rb', line 4

def retrieve(obj_id)
  method = :get
  url_with_method = "#{url}#{url_method(method)}"
  params = object_param(obj_id, method)

  response = api_request(url_with_method,method,params)
  create_from(response)
end