zanders 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/zanders/order.rb +8 -4
- data/lib/zanders/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9c8e7a25111b03203fe371816eb9c739ab81c98
|
4
|
+
data.tar.gz: c81795ff60e9b27be5242041caeef55a5fafeb65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8d018a2e19e5b078fd0c9cc928849f81811297f654cee946e0eea4821ed462e8bbd371ea402341e9036edd78381997d550532e5ab96d5c6b5a0b4e1cc8bdf3d
|
7
|
+
data.tar.gz: 8a70092404761eda6e4ca48de881c14e427d945ef6133307e4c7e3b2d4a6ac2ad5abbefc6a8bb97bfd750384ba00f2c1a5cc85483a75cef35209e32deea3ca94
|
data/lib/zanders/order.rb
CHANGED
@@ -47,8 +47,8 @@ module Zanders
|
|
47
47
|
|
48
48
|
items.each do |item|
|
49
49
|
order_items.push(item: [
|
50
|
-
{ key: 'itemNumber', value: item[:item_number] },
|
51
|
-
{ key: 'quantity', value: item[:quantity] },
|
50
|
+
{ key: 'itemNumber', value: item[:item_number], attributes!: { key: {'xsi:type' => 'xsd:string'}, value: {'xsi:type' => 'xsd:int'} }},
|
51
|
+
{ key: 'quantity', value: item[:quantity] , attributes!: { key: {'xsi:type' => 'xsd:string'}, value: {'xsi:type' => 'xsd:int'} }},
|
52
52
|
{ key: 'allowBackOrder', value: false, attributes!: { value: {'xsi:type' => 'xsd:boolean'} }}
|
53
53
|
])
|
54
54
|
end
|
@@ -97,11 +97,15 @@ module Zanders
|
|
97
97
|
# item
|
98
98
|
# "
|
99
99
|
#
|
100
|
-
order_items = {item: order_items, attributes!: { item: { "xsi:type" => "ns2:Map"}, value: {"SOAP-ENC:arrayType" => "ns2:Map[
|
100
|
+
order_items = {item: order_items, attributes!: { item: { "xsi:type" => "ns2:Map"}, value: {"SOAP-ENC:arrayType" => "ns2:Map[#{order_items.count}]", "xsi:type" => "SOAP-ENC:Array"} }}
|
101
101
|
|
102
102
|
order[:order][:item].push({
|
103
103
|
key: 'items',
|
104
|
-
value: order_items
|
104
|
+
value: order_items,
|
105
|
+
attributes!: {
|
106
|
+
key: {"xsi:type" => "xsd:string"},
|
107
|
+
value: {"SOAP-ENC:arrayType" => "ns2:Map[#{order_items.count}]", "xsi:type" => "SOAP-ENC:Array"}
|
108
|
+
}
|
105
109
|
})
|
106
110
|
|
107
111
|
response = soap_client(ORDER_API_URL).call(:create_order, message: order)
|
data/lib/zanders/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zanders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Knight
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|