class JuspayCheckout::Wallet

Public Class Methods

authenticate(wallet_id) click to toggle source

DOC - www.juspay.in/docs/api/ec/?shell#authenticate curl -X POST api.juspay.in/wallets/$wallet_id \ -u your_api_key: \ -d “command=authenticate”

# File lib/juspay_checkout/wallet.rb, line 49
def authenticate(wallet_id)
        JuspayCheckout::ExpressCheckout.request("/wallets/#{wallet_id}", 'post', {command: "authenticate"})
end
create(customer_id, wallet) click to toggle source

DOC - www.juspay.in/docs/api/ec/?shell#create curl -X POST api.juspay.in/customers/$customer_id/wallets -u your_api_key: -d “gateway=MOBIKWIK” -d “command=authenticate”

# File lib/juspay_checkout/wallet.rb, line 24
def create(customer_id, wallet)
        JuspayCheckout::ExpressCheckout.request("/customers/#{customer_id}/wallets", 'post', {command: "authenticate", gateway: wallet})
end
get_details(wallet_id) click to toggle source

DOC - www.juspay.in/docs/api/ec/?shell#get curl -X GET api.juspay.in/wallets/$wallet_id -u your_api_key:

# File lib/juspay_checkout/wallet.rb, line 15
def get_details(wallet_id)
        JuspayCheckout::ExpressCheckout.request("/wallets/#{wallet_id}", 'get')
end
get_list(customer_id) click to toggle source

DOC - www.juspay.in/docs/api/ec/?shell#list curl -X GET api.juspay.in/customers/guest_user/wallets -u your_api_key:

# File lib/juspay_checkout/wallet.rb, line 8
def get_list(customer_id)
        JuspayCheckout::ExpressCheckout.request("/customers/#{customer_id}/wallets", 'get')
end
refresh(wallet_id) click to toggle source

DOC - www.juspay.in/docs/api/ec/?shell#refresh curl -X POST api.juspay.in/wallets/$wallet_id -u your_api_key: -d “command=refresh”

# File lib/juspay_checkout/wallet.rb, line 57
def refresh(wallet_id)
        JuspayCheckout::ExpressCheckout.request("/wallets/#{wallet_id}", 'post', {command: 'refresh'})
end