Class: LitleOnline::CreditPayPal

Inherits:
Object
  • Object
show all
Includes:
XML::Mapping
Defined in:
lib/XMLFields.rb

Class Method Summary collapse

Class Method Details

.from_hash(hash, name = 'creditPaypal') ⇒ Object



804
805
806
807
808
809
810
811
812
813
814
815
816
# File 'lib/XMLFields.rb', line 804

def self.from_hash(hash, name='creditPaypal')
  base = hash[name]
  if(base)
    this = CreditPayPal.new
    this.payerId = base['payerId']
    this.payerEmail = base['payerEmail']
    SchemaValidation.validate_length(this.payerId, false, 1, 17, name, 'payerId')
    SchemaValidation.validate_length(this.payerEmail, false, 1, 127, name, 'payerEmail')
    this
  else
    nil
  end
end