Class: Blastramp::OrderBatch
- Inherits:
-
Object
- Object
- Blastramp::OrderBatch
- Defined in:
- lib/blastramp/order_batch.rb
Instance Attribute Summary collapse
-
#orders ⇒ Object
Associations.
Instance Method Summary collapse
-
#initialize(orders) ⇒ OrderBatch
constructor
A new instance of OrderBatch.
-
#soap_data ⇒ Object
Returns OrderedHash with the properties in the correct order, camelcased and ready to be sent via SOAP.
Constructor Details
#initialize(orders) ⇒ OrderBatch
Returns a new instance of OrderBatch.
6 7 8 |
# File 'lib/blastramp/order_batch.rb', line 6 def initialize(orders) @orders = orders end |
Instance Attribute Details
#orders ⇒ Object
Associations
4 5 6 |
# File 'lib/blastramp/order_batch.rb', line 4 def orders @orders end |
Instance Method Details
#soap_data ⇒ Object
Returns OrderedHash with the properties in the correct order, camelcased and ready to be sent via SOAP
12 13 14 15 16 17 18 19 |
# File 'lib/blastramp/order_batch.rb', line 12 def soap_data data = ActiveSupport::OrderedHash.new data[:order] = [] orders.each do |o| data[:order] << o.soap_data end data end |