class Pohoda::Parsers::Ofr::OfferType
Public Instance Methods
offer_detail()
click to toggle source
# File lib/pohoda/parsers/ofr/offer_type.rb, line 11 def offer_detail array_of_at(Ofr::OfferItemType, ['ofr:offerDetail', 'ofr:offerItem']) end
offer_header()
click to toggle source
# File lib/pohoda/parsers/ofr/offer_type.rb, line 7 def offer_header submodel_at(Ofr::OfferHeaderType, 'ofr:offerHeader') end
offer_summary()
click to toggle source
# File lib/pohoda/parsers/ofr/offer_type.rb, line 15 def offer_summary submodel_at(Ofr::OfferSummaryType, 'ofr:offerSummary') end
print()
click to toggle source
# File lib/pohoda/parsers/ofr/offer_type.rb, line 19 def print array_of_at(Prn::PrinterSettingsType, ['ofr:print', 'prn:printerSettings']) end
to_h()
click to toggle source
# File lib/pohoda/parsers/ofr/offer_type.rb, line 23 def to_h hash = {} hash[:attributes] = attributes hash[:offer_header] = offer_header.to_h if has? 'ofr:offerHeader' hash[:offer_detail] = offer_detail.map(&:to_h) if has? 'ofr:offerDetail' hash[:offer_summary] = offer_summary.to_h if has? 'ofr:offerSummary' hash[:print] = print.map(&:to_h) if has? 'ofr:print' hash end