Class: LitleOnline::AmexAggregatorData

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

Class Method Summary collapse

Class Method Details

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



609
610
611
612
613
614
615
616
617
618
619
620
621
# File 'lib/XMLFields.rb', line 609

def self.from_hash(hash, name='amexAggregatorData')
  base = hash[name]
  if(base)
    this = AmexAggregatorData.new
    this.sellerId = base['sellerId']
    this.sellerMerchantCategoryCode = base['sellerMerchantCategoryCode']
    SchemaValidation.validate_length(this.sellerId, false, 1, 16, name, 'sellerId')
    SchemaValidation.validate_length(this.sellerMerchantCategoryCode, false, 1, 4, name, 'sellerMerchantCategoryCode')
    this
  else
    nil
  end
end