brightpearl_api 1.1.6 → 1.1.7

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: 134eaa396628559c4966d959bd0024916b269000
4
- data.tar.gz: 7b3aa610904a029b4b50ff0ea27f0734a3cf58b0
3
+ metadata.gz: 6b2fe15d31e50c7d2177e11bf22c8b2ab69bc2d7
4
+ data.tar.gz: 03e2a18ef1eabad414ab5149262e9c4ac87b1dd0
5
5
  SHA512:
6
- metadata.gz: fb2e1e9f3f9c8ae2bf1562fd6d126d692b4c19432d740bb28c8d54eba0d1fe996d23a7b286b3a527f387aa722d532bd5983e61dde29de7e4a53e112944175d45
7
- data.tar.gz: eda6f978b6a6ccc1474564b5d2e7194152768fdaeeabdcd757046914fca34df879211cc4d7d53a391e52298023530f01f505dfd233b77cb8be6d448107415568
6
+ metadata.gz: d2bfde84b5e059a10dc136a85e01769a16d5f0da3bacdd2ca11c7ccff22cb5647c3061030f7e65cd88d9e91efbc42d048235ece4b6a2667b7a0628f29950c3b3
7
+ data.tar.gz: 4629fc03c164e7a43dbdecb3b397b4d343ca85b56dd5c3798a884c51d1fd7e90d91bb3bd0d28f178a09456b30555303daec215b0b1e1f83087952df19e0db238
@@ -111,6 +111,31 @@ module BrightpearlApi
111
111
  yield(body)
112
112
  call(:post, "/warehouse-service/warehouse/#{warehouse_id.to_i}/quarantine/release", body)
113
113
  end
114
+
115
+ def search_goods_out_notes
116
+ body = {}
117
+ yield(body)
118
+ body[:pageSize] = 500
119
+ body[:firstResult] = 1
120
+ result_hash = []
121
+ results_returned = 0
122
+ results_available = 1
123
+ while results_returned < results_available
124
+ response = call(:get, "/warehouse-service/goods-note/goods-out-search?#{body.to_query}")
125
+ results_returned += response['metaData']['resultsReturned']
126
+ results_available = response['metaData']['resultsAvailable']
127
+ body[:firstResult] = results_returned + 1
128
+ properties = response['metaData']['columns'].map { |x| x['name'] }
129
+ response['results'].each do |result|
130
+ hash = {}
131
+ properties.each_with_index do |item, index|
132
+ hash[item] = result[index]
133
+ end
134
+ result_hash << hash
135
+ end
136
+ end
137
+ result_hash
138
+ end
114
139
  end
115
140
  end
116
141
  end
@@ -1,3 +1,3 @@
1
1
  module BrightpearlApi
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brightpearl_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kunwar Aditya Raghuwanshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-27 00:00:00.000000000 Z
11
+ date: 2014-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler