Class: PagseguroV2::Shipping

Inherits:
Hashie::Dash
  • Object
show all
Defined in:
lib/pagseguro_v2/shipping.rb

Instance Method Summary collapse

Instance Method Details

#to_xml(options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/pagseguro_v2/shipping.rb', line 7

def to_xml(options = {})
builder = options[:builder] || Builder::XmlMarkup.new()
  builder.shipping do |shipping|
    shipping.type type
    if self.address
      shipping.address self.address.to_xml(:builder => shipping)
    end
  end
end