class FioAPI::Payments::Xml::Root

Constants

XSI_OPTIONS

Attributes

payments[R]

Public Class Methods

new(payments) click to toggle source
# File lib/base/payments/xml/root.rb, line 12
def initialize(payments)
  @payments = payments
end

Public Instance Methods

build() click to toggle source
# File lib/base/payments/xml/root.rb, line 16
def build
  @build ||= Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
    xml.Import(XSI_OPTIONS) do
      xml.Orders do
        payments.each do |payment|
          ::FioAPI::Payments::Xml::Item.new(xml, payment).build
        end
      end
    end
  end.to_xml
end