Class: Esendex::Requests::Batch
- Inherits:
-
Object
- Object
- Esendex::Requests::Batch
- Defined in:
- lib/xednese/requests/batch.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Batch
constructor
A new instance of Batch.
- #serialise ⇒ Object
Constructor Details
#initialize(args) ⇒ Batch
Returns a new instance of Batch.
4 5 6 |
# File 'lib/xednese/requests/batch.rb', line 4 def initialize(args) @args = args end |
Instance Method Details
#serialise ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/xednese/requests/batch.rb', line 8 def serialise Nokogiri::XML::Builder.new(encoding: 'utf-8') do |xml| xml.(xmlns: 'http://api.esendex.com/ns/') { xml.name @args[:name] } end.to_xml end |