Class: Finicity::V1::Request::GetCustomers
- Inherits:
-
Object
- Object
- Finicity::V1::Request::GetCustomers
- Extended by:
- HTTPClient::IncludeClient
- Includes:
- Logger
- Defined in:
- lib/finicity/v1/request/get_customers.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
Attributes.
Instance Method Summary collapse
- #get_customers(start, limit) ⇒ Object
- #headers ⇒ Object
-
#initialize(token) ⇒ GetCustomers
constructor
Instance Methods.
- #url ⇒ Object
Methods included from Logger
Constructor Details
#initialize(token) ⇒ GetCustomers
Instance Methods
18 19 20 |
# File 'lib/finicity/v1/request/get_customers.rb', line 18 def initialize(token) @token = token end |
Instance Attribute Details
#token ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/get_customers.rb', line 13 def token @token end |
Instance Method Details
#get_customers(start, limit) ⇒ Object
22 23 24 25 |
# File 'lib/finicity/v1/request/get_customers.rb', line 22 def get_customers(start, limit) query = { :start => start, :limit => limit } http_client.get(url, query, headers) end |
#headers ⇒ Object
27 28 29 30 31 32 |
# File 'lib/finicity/v1/request/get_customers.rb', line 27 def headers { 'Finicity-App-Key' => ::Finicity.config.app_key, 'Finicity-App-Token' => token } end |
#url ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/finicity/v1/request/get_customers.rb', line 34 def url ::URI.join( ::Finicity.config.base_url, 'v1/', 'customers' ) end |