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: a2fe7a5553b787d43d52c0cadb9a6425e68926dc40894227df1fe411e91cc6be
4
- data.tar.gz: 60a38f322d1c5f652b7af6b2c86032664f26efac060fc82171c8f8bb996db43d
3
+ metadata.gz: e975f68915ef480c52d02432b7c398e1e3138fea406e95046b19c20afc3c0363
4
+ data.tar.gz: b74e8ee0f1c264d8411cf82dc5db99cfe2f118dad8ad71ba4401e9c77d1024cd
5
5
  SHA512:
6
- metadata.gz: ba7715b9801c91b4caa21025161fa95a8e5af5e15bfce83937ca77fe848ff4376aed8f56cfc26765049224cc7e1d4e99de1c98ae2075ed922256fbaff64cae4c
7
- data.tar.gz: 432ee3fe3f9b3cb713a542e32d37b17346aee29a5368cc96920b63e6add91d97086fe9f73905d55acc8ba024d10f076306622c78dc8cfa1d5f14c1ec13fc2cf1
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('MSRP')].try(:strip),
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, :phone)
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
- return @filename if defined?(@filename)
53
- timestamp = Time.now.strftime('%Y%m%d%T').gsub(':', '')
54
- @filename = "GUN-ACCESSORY-SUPPLY-#{@po_number}-#{timestamp}.xml"
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)
@@ -1,3 +1,3 @@
1
1
  module GunAccessorySupply
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.3'.freeze
3
3
  end
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.2
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-23 00:00:00.000000000 Z
11
+ date: 2022-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport