Module: Customer
- Defined in:
- lib/paystackapi/core/customer.rb
Class Method Summary collapse
Class Method Details
.create_customer(body) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/paystackapi/core/customer.rb', line 2 def self.create_customer(body) api = HTTParty.post("#{API::BASE_URL}" + "#{API::CUSTOMER_PATH}", :body => body.to_json, :headers => { "Authorization"=> ENV["PAYSTACK_SECRET_KEY"], "content-type" => "application/json"}) return api end |
.fetch_a_customer(body) ⇒ Object
13 14 15 16 17 |
# File 'lib/paystackapi/core/customer.rb', line 13 def self.fetch_a_customer(body) api = HTTParty.get("#{API::BASE_URL}" + "#{API::CUSTOMER_PATH}/" + "#{body}", :headers => { "Authorization"=> ENV["PAYSTACK_SECRET_KEY"], "content-type" => "application/json"}) return api end |
.list_customer ⇒ Object
8 9 10 11 12 |
# File 'lib/paystackapi/core/customer.rb', line 8 def self.list_customer api = HTTParty.get("#{API::BASE_URL}" + "#{API::CUSTOMER_PATH}", :headers => { "Authorization"=> ENV["PAYSTACK_SECRET_KEY"], "content-type" => "application/json"}) return api end |