Class: Recharge::Transaction

Inherits:
Object
  • Object
show all
Includes:
HappyMapper
Defined in:
lib/recharge/transaction.rb

Class Method Summary collapse

Class Method Details

.purchase(attributes = {}, apiKey = nil) ⇒ Object



18
19
20
21
# File 'lib/recharge/transaction.rb', line 18

def self.purchase (attributes = {}, apiKey=nil)
  responseXML = Recharge::Base.post('purchase', attributes, apiKey)
  parse(responseXML.to_s)
end

.refund(attributes = {}, apiKey = nil) ⇒ Object



22
23
24
25
# File 'lib/recharge/transaction.rb', line 22

def self.refund (attributes = {}, apiKey=nil)
  responseXML = Recharge::Base.post('return', attributes, apiKey)
  parse(responseXML.to_s)
end

.void(attributes = {}, apiKey = nil) ⇒ Object



26
27
28
29
# File 'lib/recharge/transaction.rb', line 26

def self.void (attributes = {}, apiKey=nil)
  responseXML = Recharge::Base.post('void', attributes, apiKey)
  parse(responseXML.to_s)
end