Class: AurePay::Chargebacks

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

Overview

Infrações / MED.

Instance Method Summary collapse

Constructor Details

#initialize(http) ⇒ Chargebacks

Returns a new instance of Chargebacks.



148
149
150
# File 'lib/aurepay/client.rb', line 148

def initialize(http)
  @http = http
end

Instance Method Details

#get(id) ⇒ Object



160
161
162
# File 'lib/aurepay/client.rb', line 160

def get(id)
  @http.request('Get', "/chargebacks/#{URI.encode_www_form_component(id)}")
end

#list(query = {}) ⇒ Object



152
153
154
155
156
157
158
# File 'lib/aurepay/client.rb', line 152

def list(query = {})
  path = '/chargebacks'
  unless query.nil? || query.empty?
    path = "#{path}?#{URI.encode_www_form(query)}"
  end
  @http.request('Get', path)
end