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 +4 -4
- data/lib/sheepla/version.rb +1 -1
- data/lib/sheepla.rb +8 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4597dff36b1d30196bf8e169c0d110482107a858
|
4
|
+
data.tar.gz: 01b692c7be5dbd5f83aa75b087fcac68239262d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a587d4ac59f6fada969bb69f5cd8a965a3d5efb68057c04c34233c3a6c6cb32805f274fb4b0a60c09fca7ae11d1cf31660a95eb958b0766005415f81bcb7da83
|
7
|
+
data.tar.gz: 6ed0ac59730350a9cd9604be369517a4534aae10a41624af83bb16001a79dafe2e577ad089a751d7d1e6d5c65a5bf904a29a7e4e99ae243278e55f2c5bda747c
|
data/lib/sheepla/version.rb
CHANGED
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']
|