Class: CnpOnline::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



883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'lib/XMLFields.rb', line 883

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