sports_south 2.0.23 → 2.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sports_south.rb +20 -0
- data/lib/sports_south/invoice.rb +3 -1
- data/lib/sports_south/order.rb +2 -2
- data/lib/sports_south/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: 72ec6b07da863b3ea7b0fb2b32255614c188c395
|
4
|
+
data.tar.gz: 90ac1bc7ef616a3053bf481b2a28b2c0cc162d25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b79c21f629d0c22ffdd1b89e84d92b5fce394d4a16833f271a74445fdc67fd5e232ee7ac6ab5e9a57ea1acad8b609a4daed00a5a7361b1b8fc3f4822d16ed23
|
7
|
+
data.tar.gz: d7b303478976b530231940c1ea40ef9cb01c7c9f6c3720bafc2c40ea139494209650f19e7045bb8451d06330d96e58094dbc8aa3a38e08cbbf552e705026e7c3
|
data/lib/sports_south.rb
CHANGED
@@ -19,4 +19,24 @@ require 'sports_south/user'
|
|
19
19
|
|
20
20
|
module SportsSouth
|
21
21
|
class NotAuthenticated < StandardError; end
|
22
|
+
|
23
|
+
class << self
|
24
|
+
attr_accessor :config
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.config
|
28
|
+
@config ||= Configuration.new
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.configure
|
32
|
+
yield(config)
|
33
|
+
end
|
34
|
+
|
35
|
+
class Configuration
|
36
|
+
attr_accessor :source
|
37
|
+
|
38
|
+
def initialize
|
39
|
+
@source ||= "ammor"
|
40
|
+
end
|
41
|
+
end
|
22
42
|
end
|
data/lib/sports_south/invoice.rb
CHANGED
@@ -12,7 +12,7 @@ module SportsSouth
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def initialize(options = {})
|
15
|
-
requires!(options, :username, :password
|
15
|
+
requires!(options, :username, :password)
|
16
16
|
@options = options
|
17
17
|
@po_number = options[:po_number]
|
18
18
|
end
|
@@ -24,6 +24,8 @@ module SportsSouth
|
|
24
24
|
|
25
25
|
request.set_form_data(form_params(@options).merge({
|
26
26
|
PONumber: @po_number,
|
27
|
+
customer_number: @options[:username],
|
28
|
+
source: SportsSouth.config.source
|
27
29
|
}))
|
28
30
|
|
29
31
|
response = http.request(request)
|
data/lib/sports_south/order.rb
CHANGED
@@ -24,12 +24,12 @@ module SportsSouth
|
|
24
24
|
|
25
25
|
def self.find(order_number, options = {})
|
26
26
|
requires!(options, :username, :password)
|
27
|
-
new(options.merge(
|
27
|
+
new(options.merge(order_number: order_number))
|
28
28
|
end
|
29
29
|
|
30
30
|
def initialize(options = {})
|
31
31
|
requires!(options, :username, :password)
|
32
|
-
@options = options
|
32
|
+
@options = options.merge(source: SportsSouth.config.source)
|
33
33
|
@order_number = options[:order_number]
|
34
34
|
end
|
35
35
|
|
data/lib/sports_south/version.rb
CHANGED
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: 2.0.
|
4
|
+
version: 2.0.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dale Campbell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|