Class: Finicity::V1::Request::GetCustomersByUsername
- Inherits:
-
Object
- Object
- Finicity::V1::Request::GetCustomersByUsername
- Extended by:
- HTTPClient::IncludeClient
- Includes:
- Logger
- Defined in:
- lib/finicity/v1/request/get_customers_by_username.rb
Instance Attribute Summary collapse
-
#limit ⇒ Object
Attributes.
-
#start ⇒ Object
Attributes.
-
#token ⇒ Object
Attributes.
-
#username ⇒ Object
Attributes.
Instance Method Summary collapse
- #get_customers_by_username ⇒ Object
- #headers ⇒ Object
-
#initialize(token, username, start, limit) ⇒ GetCustomersByUsername
constructor
Instance Methods.
- #query ⇒ Object
- #url ⇒ Object
Methods included from Logger
Constructor Details
#initialize(token, username, start, limit) ⇒ GetCustomersByUsername
Instance Methods
21 22 23 24 25 26 |
# File 'lib/finicity/v1/request/get_customers_by_username.rb', line 21 def initialize(token, username, start, limit) @limit = limit @start = start @token = token @username = username end |
Instance Attribute Details
#limit ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/get_customers_by_username.rb', line 13 def limit @limit end |
#start ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/get_customers_by_username.rb', line 13 def start @start end |
#token ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/get_customers_by_username.rb', line 13 def token @token end |
#username ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/get_customers_by_username.rb', line 13 def username @username end |
Instance Method Details
#get_customers_by_username ⇒ Object
28 29 30 |
# File 'lib/finicity/v1/request/get_customers_by_username.rb', line 28 def get_customers_by_username http_client.get(url, query, headers) end |
#headers ⇒ Object
32 33 34 35 36 37 |
# File 'lib/finicity/v1/request/get_customers_by_username.rb', line 32 def headers { 'Finicity-App-Key' => ::Finicity.config.app_key, 'Finicity-App-Token' => token } end |
#query ⇒ Object
39 40 41 |
# File 'lib/finicity/v1/request/get_customers_by_username.rb', line 39 def query { :search => username, :start => start, :limit => limit } end |
#url ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/finicity/v1/request/get_customers_by_username.rb', line 43 def url ::URI.join( ::Finicity.config.base_url, 'v1/', 'customers' ) end |