Class: Payfort::Charge

Inherits:
Object
  • Object
show all
Defined in:
lib/payfort/charge.rb

Class Method Summary collapse

Class Method Details

.allObject



12
13
14
# File 'lib/payfort/charge.rb', line 12

def self.all
  Payfort.get(Payfort.api_url('charges/'))
end

.create(params = {}) ⇒ Object



4
5
6
# File 'lib/payfort/charge.rb', line 4

def self.create(params={})
  Payfort.post(Payfort.api_url('charges/'), params)
end

.get(id) ⇒ Object



8
9
10
# File 'lib/payfort/charge.rb', line 8

def self.get(id)
  Payfort.get(Payfort.api_url('charges/' + id.to_s))
end