Class: RubyOmx::PurchaseOrderUpdateRequest
- Defined in:
- lib/ruby_omx/request/purchase_order_update_request.rb
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ PurchaseOrderUpdateRequest
constructor
A new instance of PurchaseOrderUpdateRequest.
Methods inherited from Response
Methods inherited from Node
Constructor Details
#initialize(attrs = {}) ⇒ PurchaseOrderUpdateRequest
Returns a new instance of PurchaseOrderUpdateRequest.
5 6 7 8 9 10 11 12 13 |
# File 'lib/ruby_omx/request/purchase_order_update_request.rb', line 5 def initialize(attrs={}) return super unless attrs.any? raise MissingRequestOptions if (attrs[:po_number].nil? && attrs[:supplier_id].nil?) super self.version = attrs[:version] ||= '1.00' # Instantiate LineItem variables for each self.line_items = attrs[:line_items].collect { |h| LineItem.new(h) } end |