class JuspayCheckout::Customer

Public Class Methods

create(params = {}) click to toggle source

DOC - www.juspay.in/docs/api/ec/?shell#create-customer Example request curl -X POST api.juspay.in/customers -u your_api_key: -d “object_reference_id=customer@gmail.com” -d “mobile_number=9000000001” -d “email_address=customer@gmail.com” -d “first_name=Sandip” -d “last_name=Patil” -d “mobile_country_code=91”

# File lib/juspay_checkout/customer.rb, line 22
def create(params = {})
        JuspayCheckout::ExpressCheckout.request('/customers', 'post', params)
end
get_details(customer_id) click to toggle source

DOC - www.juspay.in/docs/api/ec/?shell#get-customer curl -X GET api.juspay.in/customers/customer@gmail.com -u your_api_key:

# File lib/juspay_checkout/customer.rb, line 8
def get_details(customer_id)
        JuspayCheckout::ExpressCheckout.request("/customers/#{customer_id}", 'get')
end
update(params = {}) click to toggle source

DOC - www.juspay.in/docs/api/ec/?shell#update-customer Example request curl -X POST api.juspay.in/customers/cst_om2l6ctlptxwxuzj -u your_api_key: -d “mobile_number=9000000002”

-d “email_address=customer@gmail.com” -d “first_name=Sandip” -d “last_name=Patil” -d “mobile_country_code=91”

# File lib/juspay_checkout/customer.rb, line 35
def update(params = {})
        JuspayCheckout::ExpressCheckout.request("/customers/#{params['customer_id']}", 'post', params.except(:customer_id))
end