Class: RealEx::Recurring::Payer
Constant Summary
Constants inherited
from Transaction
Transaction::REQUEST_TYPES
Instance Attribute Summary
Attributes inherited from Transaction
#authcode, #comments, #pasref
Instance Method Summary
collapse
Methods inherited from Transaction
#authorize!
Methods inherited from Transaction
#authorize!, #autosettle?, #initialize
included, #initialize
Instance Method Details
#hash ⇒ Object
20030516175919.yourmerchantid.uniqueid…smithj01
#request_type ⇒ Object
14
15
16
|
# File 'lib/real_ex/recurring.rb', line 14
def request_type
@request_type = update == true ? 'payer-edit' : 'payer-new'
end
|
#save! ⇒ Object
59
60
61
|
# File 'lib/real_ex/recurring.rb', line 59
def save!
authorize!
end
|
#to_xml ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/real_ex/recurring.rb', line 18
def to_xml
super do |per|
per.payer(:type => type, :ref => reference) do |payer|
payer.title title
payer.firstname firstname
payer.surname lastname
payer.company company
payer.address do |add|
add.line1 address.line1
add.line1 address.line2
add.line3 address.line3
add.city address.city
add.county address.county
add.postcode address.post_code
add.country(address.country, :country_code => address.country_code)
end
if address.phone_numbers.kind_of?(Hash)
payer.phonenumbers do |numbers|
numbers.home address.phone_numbers[:home]
numbers.work address.phone_numbers[:work]
numbers.fax address.phone_numbers[:fax]
numbers.mobile address.phone_numbers[:mobile]
end
end
payer.email address.email
if !.empty?
payer. do |c|
.each_with_index do |i,|
c.(, :id => i + 1)
end
end
end
end
end
end
|
#update! ⇒ Object
63
64
65
66
|
# File 'lib/real_ex/recurring.rb', line 63
def update!
self.update = true
authorize!
end
|