class JuspayCheckout::Wallet
Public Class Methods
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
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
DOC - www.juspay.in/docs/api/ec/?shell#delink curl -X POST api.juspay.in/wallets/$wallet_id -u your_api_key: -d “command=delink”
# File lib/juspay_checkout/wallet.rb, line 41 def delink(wallet_id) JuspayCheckout::ExpressCheckout.request("/wallets/#{wallet_id}", 'post', {command: 'delink'}) end
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
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
DOC - www.juspay.in/docs/api/ec/?shell#link curl -X POST api.juspay.in/wallets/$wallet_id -u your_api_key: -d “command=link” -d “otp=345678”
# File lib/juspay_checkout/wallet.rb, line 33 def link(wallet_id, otp) JuspayCheckout::ExpressCheckout.request("/wallets/#{wallet_id}", 'post', {command: 'link', otp: otp}) end
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