Class: WellsFargo::PaymentManager
- Inherits:
-
Object
- Object
- WellsFargo::PaymentManager
- Defined in:
- lib/wells_fargo/payment_manager.rb
Instance Method Summary collapse
- #file ⇒ Object
-
#initialize(business_name, options = {}) ⇒ PaymentManager
constructor
A new instance of PaymentManager.
- #to_xml ⇒ Object
Constructor Details
#initialize(business_name, options = {}) ⇒ PaymentManager
Returns a new instance of PaymentManager.
3 4 5 6 7 |
# File 'lib/wells_fargo/payment_manager.rb', line 3 def initialize(business_name, = {}) @elements = [] @business_name = business_name @options = end |
Instance Method Details
#file ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/wells_fargo/payment_manager.rb', line 9 def file @xml = Builder::XmlMarkup.new(:indent => 2) attributes = {} attributes['CompanyID'] = @business_name attributes['xmlns:xsi'] = "http://www.w3.org/2001/XMLSchema-instance" attributes['PmtRecCount'] = @options[:pmg_rec_count] if @options[:pmg_rec_count] attributes['PmtRecTotal'] = @options[:pmg_rec_total] if @options[:pmg_rec_total] root = WellsFargo::Element::File.new(@xml, attributes) @xml.instruct! @xml.tag! root.element_name, root.attributes do yield root end end |
#to_xml ⇒ Object
23 24 25 |
# File 'lib/wells_fargo/payment_manager.rb', line 23 def to_xml @xml.target! end |