Class: Experian::Request
- Inherits:
-
Object
- Object
- Experian::Request
- Defined in:
- lib/experian/request.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
- #build_request ⇒ Object
-
#initialize(options = {}) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(options = {}) ⇒ Request
Returns a new instance of Request.
6 7 8 9 |
# File 'lib/experian/request.rb', line 6 def initialize( = {}) @options = @xml = build_request end |
Instance Attribute Details
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
4 5 6 |
# File 'lib/experian/request.rb', line 4 def xml @xml end |
Instance Method Details
#build_request ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/experian/request.rb', line 11 def build_request xml = Builder::XmlMarkup.new(:indent => 2) xml.instruct!(:xml, :version => '1.0', :encoding => 'utf-8') xml.tag!("NetConnectRequest", :xmlns => Experian::XML_NAMESPACE, 'xmlns:xsi' => Experian::XML_SCHEMA_INSTANCE, 'xsi:schemaLocation' => Experian::XML_SCHEMA_LOCATION) do yield xml if block_given? end end |