gun_accessory_supply 0.0.2 → 0.0.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e975f68915ef480c52d02432b7c398e1e3138fea406e95046b19c20afc3c0363
|
4
|
+
data.tar.gz: b74e8ee0f1c264d8411cf82dc5db99cfe2f118dad8ad71ba4401e9c77d1024cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6de5bf2dbe16f76c55f1ba25723f25c89968932885149644fcf23260c32203059f44e9d52e1d72b44c67b7582a4f5ca6c71f2a2ab34d5c1f123edb8091a2b27f
|
7
|
+
data.tar.gz: 7154b5c648b7c9325fa6ffa33d3d1cbeb75c5378a8e024efe9db53d9018d4852c8c7048fdf4d5a5c5f39656730699be3e21bc2754b6f4018c884dac1f3a73f00
|
@@ -31,7 +31,7 @@ module GunAccessorySupply
|
|
31
31
|
item = {
|
32
32
|
item_identifier: row[@headers.index('Item ID')].try(:strip),
|
33
33
|
quantity: row[@headers.index('Available Qty')].to_i,
|
34
|
-
price: row[@headers.index('
|
34
|
+
price: row[@headers.index('Dealer Cost')].try(:strip),
|
35
35
|
}
|
36
36
|
|
37
37
|
items << item
|
@@ -32,7 +32,7 @@ module GunAccessorySupply
|
|
32
32
|
# * :special_instructions [String] optional
|
33
33
|
def add_recipient(hash = {})
|
34
34
|
requires!(hash, :dealer_name, :shipping)
|
35
|
-
requires!(hash[:shipping], :name, :address, :city, :state, :zip, :email
|
35
|
+
requires!(hash[:shipping], :name, :address, :city, :state, :zip, :email)
|
36
36
|
|
37
37
|
@recipient = hash
|
38
38
|
end
|
@@ -45,13 +45,16 @@ module GunAccessorySupply
|
|
45
45
|
# * :price [String]
|
46
46
|
def add_item(item = {})
|
47
47
|
requires!(item, :identifier, :upc, :qty)
|
48
|
+
|
48
49
|
@items << item
|
49
50
|
end
|
50
51
|
|
51
52
|
def filename
|
52
|
-
|
53
|
-
|
54
|
-
|
53
|
+
@filename ||= begin
|
54
|
+
timestamp = Time.now.strftime('%Y%m%d%T').gsub(':', '')
|
55
|
+
|
56
|
+
"GUN-ACCESSORY-SUPPLY-#{@po_number}-#{timestamp}.xml"
|
57
|
+
end
|
55
58
|
end
|
56
59
|
|
57
60
|
def submit!
|
@@ -60,7 +63,6 @@ module GunAccessorySupply
|
|
60
63
|
|
61
64
|
def to_xml
|
62
65
|
output = ""
|
63
|
-
|
64
66
|
xml = Builder::XmlMarkup.new(target: output, indent: 2)
|
65
67
|
|
66
68
|
xml.instruct!(:xml)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gun_accessory_supply
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Beninate
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|