module Customer

Public Class Methods

create_customer(body) click to toggle source
# 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) click to toggle source
# 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() click to toggle source
# 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