Class: LitleOnline::ApplepayHeader

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

Class Method Summary collapse

Class Method Details

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



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
# File 'lib/XMLFields.rb', line 658

def self.from_hash(hash, name='header')
  base = hash[name]
  if(base)
    this = ApplepayHeader.new
    this.applicationData = base['applicationData']
    this.ephemeralPublicKey = base['ephemeralPublicKey']
    this.publicKeyHash = base['publicKeyHash']
    this.transactionId = base['transactionId']
    SchemaValidation.validate_required(this.applicationData,true,name,'applicationData')
    SchemaValidation.validate_required(this.ephemeralPublicKey,true,name,'ephemeralPublicKey')
    SchemaValidation.validate_required(this.publicKeyHash,true,name,'publicKeyHash')
    SchemaValidation.validate_required(this.transactionId,true,name,'transactionId')
    this
  else
    nil
  end
end