Class: Upay::People::Payer
Instance Method Summary
collapse
Methods inherited from Person
#contactPhone, #contactPhone=, #emailAddress, #emailAddress=, #fullName, #fullName=, #initialize
Instance Method Details
#billingAddress ⇒ Object
11
|
# File 'lib/upay/people/payer.rb', line 11
def billingAddress; @billingAddress end
|
#billingAddress=(billingAddress = nil) ⇒ Object
12
|
# File 'lib/upay/people/payer.rb', line 12
def billingAddress=(billingAddress = nil) @billingAddress = billingAddress; end
|
#id ⇒ Object
5
|
# File 'lib/upay/people/payer.rb', line 5
def id; @id end
|
#id=(id = nil) ⇒ Object
6
|
# File 'lib/upay/people/payer.rb', line 6
def id=(id = nil) @id = id; end
|
#merchantPayerId ⇒ Object
8
|
# File 'lib/upay/people/payer.rb', line 8
def merchantPayerId; @merchantPayerId || @id end
|
#merchantPayerId=(merchantPayerId = nil) ⇒ Object
9
|
# File 'lib/upay/people/payer.rb', line 9
def merchantPayerId=(merchantPayerId = nil) @merchantPayerId = merchantPayerId; end
|
#to_hash ⇒ Object
19
20
21
22
23
|
# File 'lib/upay/people/payer.rb', line 19
def to_hash
person_hash = self.instance_variables.each_with_object({}) { |var,hash| hash[var.to_s.delete("@").to_sym] = self.instance_variable_get(var)}
person_hash[:billingAddress] = self.billingAddress.to_hash if self.billingAddress
person_hash
end
|
#valid? ⇒ Boolean
14
15
16
17
|
# File 'lib/upay/people/payer.rb', line 14
def valid?
validator = PayerValidator.new
validator.valid?(self)
end
|