lib/quickbooks/support/api.rb in quickbooks_api-0.0.3 vs lib/quickbooks/support/api.rb in quickbooks_api-0.0.4

- old
+ new

@@ -7,14 +7,20 @@ SCHEMA_MAP = { :qb => {:dtd_file => "qbxmlops70.xml", :namespace => QBXML, :container_class => lambda { Quickbooks::QBXML::QBXML }, + :required_xml_attributes => { + "onError" => "stopOnError" + } }.freeze, :qbpos => {:dtd_file => "qbposxmlops30.xml", :namespace => QBPOSXML, :container_class => lambda { Quickbooks::QBPOSXML::QBPOSXML }, + :required_xml_attributes => { + "onError" => "stopOnError" + } }.freeze, }.freeze DEFAULT_LOG_LEVEL = 1 @@ -44,9 +50,13 @@ "#{RUBY_SCHEMA_PATH}/#{schema_type.to_s}" end def get_template_cache_path "#{RUBY_SCHEMA_PATH}/#{schema_type.to_s}/templates" + end + + def get_required_xml_attributes + SCHEMA_MAP[schema_type][:required_xml_attributes] end # fetches all the dynamically generated schema classes def cached_classes cached_classes = SCHEMA_MAP.inject({}) do |h, (schema_type, opts)|