Class: LitleOnline::Applepay

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

Class Method Summary collapse

Class Method Details

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



683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
# File 'lib/XMLFields.rb', line 683

def self.from_hash(hash, name='applepay')
  base = hash[name]
  if(base)
    this = Applepay.new
    this.data = base['data']
    this.header = ApplepayHeader.from_hash(base)
    this.signature = base['signature']
    this.version = base['version']
    SchemaValidation.validate_required(this.data,true,name,'data')
    SchemaValidation.validate_required(this.header,true,name,'header')
    SchemaValidation.validate_required(this.signature,true,name,'signature')
    SchemaValidation.validate_required(this.version,true,name,'version')
    this
  else
    nil
  end
end