sports_south 0.14.2 → 0.15.0

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: 570fe9d3d58e17ac7aab2635a3c2339ab1006c34
4
- data.tar.gz: 9724b500480933666fa72e864e47a3021f167b57
3
+ metadata.gz: a79344ff1ad7199740dfb64fdf7b4bcf926b6221
4
+ data.tar.gz: 82f7781c63d7ce9e7a7deb4f1a4b225a0928eb4c
5
5
  SHA512:
6
- metadata.gz: aa013fcfb5b747e48f19990e8e416488f4465081d47f8bc54d4cb40b40498859f912c4f018d681f47bcfeb47235aafe8cbc4559d2ffa2e090440a47de0a7208d
7
- data.tar.gz: df1a215798e8db791754dfa604a82e339f8f47c16c11742589bd3d4a32b82dbbb06f4801a691e3e682841f83fe2b5f4445b294e2715865d89ef064527edf7794
6
+ metadata.gz: f87efe260a07df9fd5febede463f29b5b3f5f2874afc83512f7aa193ad888c02562c01ae5fc2bc69bc243ce88169053b13b9f18df4e7515be89847596765fb6d
7
+ data.tar.gz: 39ea202d9c745616f2a0b94dc0d615c11f4d2dd4da6e7e15d390cb055ba69118c98362cf4d1c826e70924c6ec047b7491eb6dcffff5ff5c35333df340b531d0c
@@ -198,5 +198,32 @@ module SportsSouth
198
198
  items
199
199
  end
200
200
 
201
+ def self.onhand_update(options = {})
202
+ requires!(options, :username, :password, :source, :customer_number)
203
+
204
+ http, request = get_http_and_request(API_URL, '/OnhandUpdate')
205
+
206
+ request.set_form_data(form_params(options))
207
+
208
+ response = http.request(request)
209
+ body = sanitize_response(response)
210
+ xml_doc = Nokogiri::XML(body)
211
+
212
+ raise SportsSouth::NotAuthenticated if not_authenticated?(xml_doc)
213
+
214
+ items = []
215
+
216
+ xml_doc.css('Table').each do |item|
217
+ items << {
218
+ item_number: content_for(item, 'I'),
219
+ quantity: content_for(item, 'Q'),
220
+ catalog_price: content_for(item, 'P'),
221
+ customer_price: content_for(item, 'C'),
222
+ }
223
+ end
224
+
225
+ items
226
+ end
227
+
201
228
  end
202
229
  end
@@ -1,3 +1,3 @@
1
1
  module SportsSouth
2
- VERSION = "0.14.2"
2
+ VERSION = "0.15.0"
3
3
  end
data/sports_south.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_dependency "nokogiri", "~> 1.6"
24
24
 
25
- spec.add_development_dependency "bundler", "~> 1.10"
25
+ spec.add_development_dependency "bundler", "~> 1.12"
26
26
  spec.add_development_dependency "net-http-spy", "~> 0.2"
27
27
  spec.add_development_dependency "rake", "~> 10.0"
28
28
  spec.add_development_dependency "rspec", "~> 3.3"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sports_south
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.2
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Campbell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-12 00:00:00.000000000 Z
11
+ date: 2017-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.10'
33
+ version: '1.12'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.10'
40
+ version: '1.12'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: net-http-spy
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.4.6
148
+ rubygems_version: 2.4.5
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Sports South API Ruby library.