Class: Trebbianno::Order
Constant Summary collapse
- PATH =
"/Order"
Instance Method Summary collapse
Methods inherited from Request
#build_user, #construct_xml, #initialize
Constructor Details
This class inherits a constructor from Trebbianno::Request
Instance Method Details
#build_order_request(order) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/trebbianno/order.rb', line 6 def build_order_request(order) construct_xml "orders" do |xml| xml.order do build_user xml address = order[:shipping_address] xml.name "#{address[:first_name]} #{address[:last_name]}" build_address xml, address xml.customerref order[:number] xml.orderdate order[:date] xml.freightcharge freight_charge(order) xml.ordernumber order[:number] xml.shipping_method order[:shipping_method] xml.tax order[:tax] build_line_items xml, order end end end |