Class: Payments::Client::Operation

Inherits:
Object
  • Object
show all
Defined in:
lib/payments/client/operations/http.rb

Instance Method Summary collapse

Constructor Details

#initialize(gateway) ⇒ Operation

Returns a new instance of Operation.



4
5
6
# File 'lib/payments/client/operations/http.rb', line 4

def initialize(gateway)
  @gateway = gateway
end

Instance Method Details

#call(other_options = {}) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/payments/client/operations/http.rb', line 8

def call(other_options = {})
  my_options = options.merge(other_options)
  @gateway.public_send(
    method,
    actual_path(my_options),
    my_options,
  )
end