Module: QbwcRequests::XmlActions

Included in:
Base
Defined in:
lib/qbwc_requests/xml_actions.rb

Class Method Summary collapse

Class Method Details

.headerObject



23
24
25
26
27
28
29
# File 'lib/qbwc_requests/xml_actions.rb', line 23

def self.header
  {"qbxml"=>
    {"xml_attributes"=>{}, "qbxml_msgs_rq"=>
      {"xml_attributes"=>{"onError"=>"stopOnError"}}
    }
  }
end

.header_attributes(attributes = {}) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/qbwc_requests/xml_actions.rb', line 15

def self.header_attributes attributes = {}
  hash = {}
  if attributes
    hash["requestID"] = attributes["requestID"] if attributes["requestID"]
  end
  hash
end

.query(req, options, header) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/qbwc_requests/xml_actions.rb', line 3

def self.query req, options, header
  hash = {"qbxml"=>
          {"xml_attributes"=> {},
           "qbxml_msgs_rq"=>
            {"xml_attributes" => {"onError"=>"stopOnError"},
             "#{req}"=>
              {"xml_attributes"=> self.header_attributes(header)}.merge(options)
            }
          }
        }
end