Module: Paggi::Rest::Capture::ClassMethods

Defined in:
lib/paggi/rest/capture.rb

Instance Method Summary collapse

Instance Method Details

#capture(params = { id: 0 }, header = {}) ⇒ Object



32
33
34
35
36
# File 'lib/paggi/rest/capture.rb', line 32

def capture(params = { id: 0 }, header = {})
  result = request("#{params[:id]}/capture", params, :PUT, header)
  raise result if result.is_a? StandardError
  result
end

#capture!(params = { id: 0 }, header = {}) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/paggi/rest/capture.rb', line 24

def capture!(params = { id: 0 }, header = {})
  capture(params, header)
rescue PaggiError => e
  build(params, e)
rescue StandardError => e
  raise e
end