Class: Securetrading::Refund

Inherits:
Connection show all
Defined in:
lib/securetrading/refund.rb

Instance Method Summary collapse

Methods inherited from Connection

#to_xml

Constructor Details

#initialize(amount, parent_transaction, options = {}) ⇒ Refund

Returns a new instance of Refund.



3
4
5
6
7
8
# File 'lib/securetrading/refund.rb', line 3

def initialize(amount, parent_transaction, options = {})
  @amount = amount
  @parent_transaction = parent_transaction
  @account_type = options[:account_type].presence || 'ECOM'
  @options = options
end

Instance Method Details

#perform(options = {}) ⇒ Object



10
11
12
# File 'lib/securetrading/refund.rb', line 10

def perform(options = {})
  perform_with(:post, to_xml, options)
end