Class: FidorApi::Customer

Inherits:
Resource show all
Extended by:
ModelAttribute
Defined in:
lib/fidor_api/customer.rb

Defined Under Namespace

Modules: ClientSupport

Instance Attribute Summary

Attributes inherited from Resource

#client

Class Method Summary collapse

Methods inherited from Resource

#initialize, request

Constructor Details

This class inherits a constructor from FidorApi::Resource

Class Method Details

.all(access_token, options = {}) ⇒ Object



35
36
37
# File 'lib/fidor_api/customer.rb', line 35

def self.all(access_token, options = {})
  Collection.build(self, request(:get, access_token, "/customers", options))
end

.first(access_token) ⇒ Object



39
40
41
# File 'lib/fidor_api/customer.rb', line 39

def self.first(access_token)
  all(access_token, page: 1, per_page: 1).first
end