sheepla 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: adc004c7b1bde315485666b92ef79577b8b313d0
4
- data.tar.gz: 809d05708268e75f0ca503062f470ac21c6ff41a
3
+ metadata.gz: 4597dff36b1d30196bf8e169c0d110482107a858
4
+ data.tar.gz: 01b692c7be5dbd5f83aa75b087fcac68239262d6
5
5
  SHA512:
6
- metadata.gz: 6a70dc9ccd8893f45dd96bc9c69ae30643dd7adec85d6063e3b0582780545496af65ad74021d9256562bd2fb1973c5fd711c8f05f4b3c406fbf1b9f45916e1ab
7
- data.tar.gz: bc27edac3e7666fa2a9f05d1960db506c22b047de2f84d6383f8e62402ba5780f2e308978ada676bc8b0732cecb1f398243ef2a1820e95158801d5e990c529cf
6
+ metadata.gz: a587d4ac59f6fada969bb69f5cd8a965a3d5efb68057c04c34233c3a6c6cb32805f274fb4b0a60c09fca7ae11d1cf31660a95eb958b0766005415f81bcb7da83
7
+ data.tar.gz: 6ed0ac59730350a9cd9604be369517a4534aae10a41624af83bb16001a79dafe2e577ad089a751d7d1e6d5c65a5bf904a29a7e4e99ae243278e55f2c5bda747c
@@ -1,3 +1,3 @@
1
1
  module Sheepla
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/sheepla.rb CHANGED
@@ -82,13 +82,18 @@ module Sheepla
82
82
  end
83
83
 
84
84
  def build_order(order)
85
+ address = order.delete('deliveryAddress')
86
+ items = order.delete('orderItems')
87
+ options = order.delete('deliveryOptions')
88
+
85
89
  body_wrapper('createOrderRequest') do |xml|
86
90
  xml.orders do
87
91
  xml.order do
88
- add_delivery_address(xml, order.delete('deliveryAddress'))
89
- add_order_items(xml, order.delete('orderItems')) if order['orderItems']
90
- add_delivery_options(xml, order.delete('deliveryOptions')) if order['deliveryOptions']
91
92
  add_other_order_data(xml, order)
93
+
94
+ add_delivery_address(xml, address)
95
+ add_order_items(xml, items) if items
96
+ add_delivery_options(xml, options) if options
92
97
  # xml.orderValue order['order_value']
93
98
  # xml.orderValueCurrency order['order_currency']
94
99
  # xml.externalDeliveryTypeId order['external_delivery_type_id']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sheepla
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Jan Adamczyk