zanders 1.4.2 → 1.4.3

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: 209a7b270146859b76490ea52877c30f76572506
4
- data.tar.gz: 6ed210a682c72199d56276c196370b705cacec95
3
+ metadata.gz: b9c8e7a25111b03203fe371816eb9c739ab81c98
4
+ data.tar.gz: c81795ff60e9b27be5242041caeef55a5fafeb65
5
5
  SHA512:
6
- metadata.gz: eade27290cfac28a095960f6a9deda39700b978762804933d0eb84b4ef8a77bccd1652349ea564495fb2ecf258869c6dcdc614368287b1b7260dfea56bf0b9cd
7
- data.tar.gz: ff432821ad5a08abc794e7e91688b1c9b1e1c7780828250864560f00f50cd8f1362731ffd9048144844a570f864e92b514916864a22ae4b41daaed9f0d287181
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[2]", "xsi:type" => "SOAP-ENV:Array"} }}
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)
@@ -1,3 +1,3 @@
1
1
  module Zanders
2
- VERSION = "1.4.2"
2
+ VERSION = "1.4.3"
3
3
  end
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.2
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-16 00:00:00.000000000 Z
11
+ date: 2017-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri