Class: Payture::Ewallet::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/payture/ewallet/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ Client

Returns a new instance of Client.



7
8
9
# File 'lib/payture/ewallet/client.rb', line 7

def initialize(**options)
  @config = Config.new(**options)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



5
6
7
# File 'lib/payture/ewallet/client.rb', line 5

def config
  @config
end

Instance Method Details

#charge(**args) ⇒ Object



19
20
21
# File 'lib/payture/ewallet/client.rb', line 19

def charge(**args)
  Methods::Charge.new(config).call(**args)
end

#init(**args) ⇒ Object



11
12
13
# File 'lib/payture/ewallet/client.rb', line 11

def init(**args)
  Methods::Init.new(config).call(**args)
end

#pay_status(**args) ⇒ Object



31
32
33
# File 'lib/payture/ewallet/client.rb', line 31

def pay_status(**args)
  Methods::PayStatus.new(config).call(**args)
end

#pay_url(session_id:) ⇒ Object



15
16
17
# File 'lib/payture/ewallet/client.rb', line 15

def pay_url(session_id:)
  MakePayUrl.new(config).call(session_id)
end

#refund(**args) ⇒ Object



27
28
29
# File 'lib/payture/ewallet/client.rb', line 27

def refund(**args)
  Methods::Refund.new(config).call(**args)
end

#unblock(**args) ⇒ Object



23
24
25
# File 'lib/payture/ewallet/client.rb', line 23

def unblock(**args)
  Methods::Unblock.new(config).call(**args)
end