Module: RubyOmx::PurchaseOrders

Defined in:
lib/ruby_omx/purchase_orders.rb

Instance Method Summary collapse

Instance Method Details

#build_purchase_order_update_request(attrs = {}) ⇒ Object



4
5
6
# File 'lib/ruby_omx/purchase_orders.rb', line 4

def build_purchase_order_update_request(attrs={})
  PurchaseOrderUpdateRequest.new(attrs.merge({:udi_auth_token=>@udi_auth_token, :http_biz_id=>@http_biz_id}))
end

#send_purchase_order_update_request(attrs = {}) ⇒ Object Also known as: append_po



8
9
10
11
12
13
14
# File 'lib/ruby_omx/purchase_orders.rb', line 8

def send_purchase_order_update_request(attrs={})
  @connection = RubyOmx::Connection.connect({ "http_biz_id" => @http_biz_id, "udi_auth_token" => @udi_auth_token, "server"=>ALT_HOST })
  request = build_purchase_order_update_request(attrs)
    response = post(request.to_xml.to_s)
    return response if request.raw_xml==true || request.raw_xml==1
    PurchaseOrderUpdateResponse.format(response)		  
end