class Upay::People::Buyer

Public Instance Methods

dniNumber() click to toggle source
# File lib/upay/people/buyer.rb, line 11
def dniNumber; @dniNumber end
dniNumber=(dniNumber = nil) click to toggle source
# File lib/upay/people/buyer.rb, line 12
def dniNumber=(dniNumber = nil) @dniNumber = dniNumber; end
id() click to toggle source
# File lib/upay/people/buyer.rb, line 5
def id; @id end
id=(id = nil) click to toggle source
# File lib/upay/people/buyer.rb, line 6
def id=(id = nil) @id = id; end
merchantBuyerId() click to toggle source
# File lib/upay/people/buyer.rb, line 8
def merchantBuyerId; @merchantBuyerId || @id end
merchantBuyerId=(merchantBuyerId = nil) click to toggle source
# File lib/upay/people/buyer.rb, line 9
def merchantBuyerId=(merchantBuyerId = nil) @merchantBuyerId = merchantBuyerId; end
shippingAddress() click to toggle source
# File lib/upay/people/buyer.rb, line 14
def shippingAddress; @shippingAddress end
shippingAddress=(shippingAddress = nil) click to toggle source
# File lib/upay/people/buyer.rb, line 15
def shippingAddress=(shippingAddress = nil) @shippingAddress = shippingAddress; end
to_hash() click to toggle source
# File lib/upay/people/buyer.rb, line 22
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[:shippingAddress] = self.shippingAddress.to_hash if self.shippingAddress
  person_hash
end
valid?() click to toggle source
# File lib/upay/people/buyer.rb, line 17
def valid?
  validator = BuyerValidator.new
  validator.valid?(self)
end