Class: Eligible::Customer
Instance Attribute Summary
#api_key, #eligible_id
Class Method Summary
collapse
Methods inherited from APIResource
api_url, class_name, require_param, send_request, url
#[], #[]=, construct_from, #each, #error, #initialize, #keys, #refresh_from, #to_hash, #to_json, #values
Class Method Details
.all(params, api_key = nil) ⇒ Object
15
16
17
|
# File 'lib/eligible/customer.rb', line 15
def self.all(params, api_key = nil)
send_request(:get, api_url('customers'), api_key, **params)
end
|
.get(params, api_key = nil) ⇒ Object
3
4
5
|
# File 'lib/eligible/customer.rb', line 3
def self.get(params, api_key = nil)
send_request(:get, api_url('customers', params, :customer_id), api_key, params, :customer_id)
end
|
.post(params, api_key = nil) ⇒ Object
7
8
9
|
# File 'lib/eligible/customer.rb', line 7
def self.post(params, api_key = nil)
send_request(:post, api_url('customers'), api_key, **params)
end
|
.update(params, api_key = nil) ⇒ Object
11
12
13
|
# File 'lib/eligible/customer.rb', line 11
def self.update(params, api_key = nil)
send_request(:put, api_url('customers', params, :customer_id), api_key, params, :customer_id)
end
|