class Pohoda::Parsers::Enq::EnquiryItemType

Public Instance Methods

activity() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 107
def activity
  submodel_at(Typ::RefType, 'enq:activity')
end
centre() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 103
def centre
  submodel_at(Typ::RefType, 'enq:centre')
end
code() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 123
def code
  at 'enq:code'
end
code_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 127
def code_attributes
  attributes_at 'enq:code'
end
code_pdp() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 95
def code_pdp
  at 'enq:CodePDP'
end
code_pdp_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 99
def code_pdp_attributes
  attributes_at 'enq:CodePDP'
end
coefficient() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 39
def coefficient
  at 'enq:coefficient'
end
coefficient_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 43
def coefficient_attributes
  attributes_at 'enq:coefficient'
end
contract() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 111
def contract
  submodel_at(Typ::RefType, 'enq:contract')
end
discount_percentage() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 71
def discount_percentage
  at 'enq:discountPercentage'
end
discount_percentage_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 75
def discount_percentage_attributes
  attributes_at 'enq:discountPercentage'
end
eet_item() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 135
def eet_item
  at 'enq:EETItem'
end
eet_item_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 139
def eet_item_attributes
  attributes_at 'enq:EETItem'
end
foreign_currency() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 83
def foreign_currency
  submodel_at(Typ::TypeCurrencyForeignItem, 'enq:foreignCurrency')
end
home_currency() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 79
def home_currency
  submodel_at(Typ::TypeCurrencyHomeItem, 'enq:homeCurrency')
end
id() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 7
def id
  at 'enq:id'
end
id_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 11
def id_attributes
  attributes_at 'enq:id'
end
note() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 115
def note
  at 'enq:note'
end
note_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 119
def note_attributes
  attributes_at 'enq:note'
end
parameters() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 143
def parameters
  array_of_at(Typ::ParameterDocType, ['enq:parameters', 'typ:parameter'])
end
pay_vat() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 47
def pay_vat
  at 'enq:payVAT'
end
pay_vat_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 51
def pay_vat_attributes
  attributes_at 'enq:payVAT'
end
pdp() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 87
def pdp
  at 'enq:PDP'
end
pdp_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 91
def pdp_attributes
  attributes_at 'enq:PDP'
end
percent_vat() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 63
def percent_vat
  at 'enq:percentVAT'
end
percent_vat_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 67
def percent_vat_attributes
  attributes_at 'enq:percentVAT'
end
quantity() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 23
def quantity
  at 'enq:quantity'
end
quantity_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 27
def quantity_attributes
  attributes_at 'enq:quantity'
end
rate_vat() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 55
def rate_vat
  at 'enq:rateVAT'
end
rate_vat_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 59
def rate_vat_attributes
  attributes_at 'enq:rateVAT'
end
stock_item() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 131
def stock_item
  submodel_at(Typ::StockItemType, 'enq:stockItem')
end
text() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 15
def text
  at 'enq:text'
end
text_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 19
def text_attributes
  attributes_at 'enq:text'
end
to_h() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 147
def to_h
  hash = {}
  hash[:attributes] = attributes

  hash[:id] = id if has? 'enq:id'
  hash[:id_attributes] = id_attributes if has? 'enq:id'
  hash[:text] = text if has? 'enq:text'
  hash[:text_attributes] = text_attributes if has? 'enq:text'
  hash[:quantity] = quantity if has? 'enq:quantity'
  hash[:quantity_attributes] = quantity_attributes if has? 'enq:quantity'
  hash[:unit] = unit if has? 'enq:unit'
  hash[:unit_attributes] = unit_attributes if has? 'enq:unit'
  hash[:coefficient] = coefficient if has? 'enq:coefficient'
  hash[:coefficient_attributes] = coefficient_attributes if has? 'enq:coefficient'
  hash[:pay_vat] = pay_vat if has? 'enq:payVAT'
  hash[:pay_vat_attributes] = pay_vat_attributes if has? 'enq:payVAT'
  hash[:rate_vat] = rate_vat if has? 'enq:rateVAT'
  hash[:rate_vat_attributes] = rate_vat_attributes if has? 'enq:rateVAT'
  hash[:percent_vat] = percent_vat if has? 'enq:percentVAT'
  hash[:percent_vat_attributes] = percent_vat_attributes if has? 'enq:percentVAT'
  hash[:discount_percentage] = discount_percentage if has? 'enq:discountPercentage'
  hash[:discount_percentage_attributes] = discount_percentage_attributes if has? 'enq:discountPercentage'
  hash[:home_currency] = home_currency.to_h if has? 'enq:homeCurrency'
  hash[:foreign_currency] = foreign_currency.to_h if has? 'enq:foreignCurrency'
  hash[:pdp] = pdp if has? 'enq:PDP'
  hash[:pdp_attributes] = pdp_attributes if has? 'enq:PDP'
  hash[:code_pdp] = code_pdp if has? 'enq:CodePDP'
  hash[:code_pdp_attributes] = code_pdp_attributes if has? 'enq:CodePDP'
  hash[:centre] = centre.to_h if has? 'enq:centre'
  hash[:activity] = activity.to_h if has? 'enq:activity'
  hash[:contract] = contract.to_h if has? 'enq:contract'
  hash[:note] = note if has? 'enq:note'
  hash[:note_attributes] = note_attributes if has? 'enq:note'
  hash[:code] = code if has? 'enq:code'
  hash[:code_attributes] = code_attributes if has? 'enq:code'
  hash[:stock_item] = stock_item.to_h if has? 'enq:stockItem'
  hash[:eet_item] = eet_item if has? 'enq:EETItem'
  hash[:eet_item_attributes] = eet_item_attributes if has? 'enq:EETItem'
  hash[:parameters] = parameters.map(&:to_h) if has? 'enq:parameters'

  hash
end
unit() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 31
def unit
  at 'enq:unit'
end
unit_attributes() click to toggle source
# File lib/pohoda/parsers/enq/enquiry_item_type.rb, line 35
def unit_attributes
  attributes_at 'enq:unit'
end