Class: JuspayCheckout::Wallet
- Inherits:
-
ExpressCheckout
- Object
- ExpressCheckout
- JuspayCheckout::Wallet
- Defined in:
- lib/juspay_checkout/wallet.rb
Class Method Summary collapse
-
.authenticate(wallet_id) ⇒ Object
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”.
-
.create(customer_id, wallet) ⇒ Object
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”.
-
.delink(wallet_id) ⇒ Object
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”.
-
.get_details(wallet_id) ⇒ Object
DOC - www.juspay.in/docs/api/ec/?shell#get curl -X GET api.juspay.in/wallets/$wallet_id -u your_api_key:.
-
.get_list(customer_id) ⇒ Object
DOC - www.juspay.in/docs/api/ec/?shell#list curl -X GET api.juspay.in/customers/guest_user/wallets -u your_api_key:.
-
.link(wallet_id, otp) ⇒ Object
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”.
-
.refresh(wallet_id) ⇒ Object
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”.
Methods inherited from ExpressCheckout
Class Method Details
.authenticate(wallet_id) ⇒ Object
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”
49 50 51 |
# 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) ⇒ Object
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”
24 25 26 |
# 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 |
.delink(wallet_id) ⇒ Object
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”
41 42 43 |
# File 'lib/juspay_checkout/wallet.rb', line 41 def delink(wallet_id) JuspayCheckout::ExpressCheckout.request("/wallets/#{wallet_id}", 'post', {command: 'delink'}) end |
.get_details(wallet_id) ⇒ Object
DOC - www.juspay.in/docs/api/ec/?shell#get curl -X GET api.juspay.in/wallets/$wallet_id -u your_api_key:
15 16 17 |
# 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) ⇒ Object
DOC - www.juspay.in/docs/api/ec/?shell#list curl -X GET api.juspay.in/customers/guest_user/wallets -u your_api_key:
8 9 10 |
# File 'lib/juspay_checkout/wallet.rb', line 8 def get_list(customer_id) JuspayCheckout::ExpressCheckout.request("/customers/#{customer_id}/wallets", 'get') end |
.link(wallet_id, otp) ⇒ Object
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”
33 34 35 |
# 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 |
.refresh(wallet_id) ⇒ Object
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”
57 58 59 |
# File 'lib/juspay_checkout/wallet.rb', line 57 def refresh(wallet_id) JuspayCheckout::ExpressCheckout.request("/wallets/#{wallet_id}", 'post', {command: 'refresh'}) end |