Class: Xendit::EWallet

Inherits:
Object
  • Object
show all
Defined in:
lib/xendit/resources/e_wallet.rb

Constant Summary collapse

PATH =
"ewallets/charges".freeze

Class Method Summary collapse

Class Method Details

.charge(**opts) ⇒ Object



12
13
14
# File 'lib/xendit/resources/e_wallet.rb', line 12

def charge(**opts)
  ApiClient.post PATH, opts
end

.get_charge_status(charge_id, **opts) ⇒ Object



8
9
10
# File 'lib/xendit/resources/e_wallet.rb', line 8

def get_charge_status(charge_id, **opts)
  ApiClient.get "#{PATH}/#{charge_id}", opts
end

.get_refund(charge_id, refund_id, **opts) ⇒ Object



24
25
26
# File 'lib/xendit/resources/e_wallet.rb', line 24

def get_refund(charge_id, refund_id, **opts)
  ApiClient.get "#{PATH}/#{charge_id}/refunds/#{refund_id}", opts
end

.list_refunds(**opts) ⇒ Object



28
29
30
# File 'lib/xendit/resources/e_wallet.rb', line 28

def list_refunds(**opts)
  ApiClient.get "#{PATH}/#{charge_id}/refunds", opts
end

.refund(charge_id, **opts) ⇒ Object



20
21
22
# File 'lib/xendit/resources/e_wallet.rb', line 20

def refund(charge_id, **opts)
  ApiClient.post "#{PATH}/#{charge_id}/refunds", opts
end

.void_charge(charge_id, **opts) ⇒ Object



16
17
18
# File 'lib/xendit/resources/e_wallet.rb', line 16

def void_charge(charge_id, **opts)
  ApiClient.post "#{PATH}/#{charge_id}/void", opts
end