sports_south 1.1.0 → 1.2.0
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/inventory.rb +66 -57
- data/lib/sports_south/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5797e25692df38391546cc0a0d24b9c5bb13c3c8
|
4
|
+
data.tar.gz: 029adc2191ab06e50b37247e905344d8e75d0f80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d554b1219b33ad51c95b6f685e6a59b718cc5f81948caf3dd5c5a4ae7a6e3f31b216feb3df9c67ad0408063c5d854bab0a62f3f9fb3e2a21d185459b2ac0126c
|
7
|
+
data.tar.gz: f7c2036876d27b7ad93a44f34ab5b5c1ddaa1f976522f4dd4cb158abf54d592f07972dc56331e321c52fea3f875009bc267f3b22842d814dc11500d17455da86
|
@@ -38,7 +38,7 @@ module SportsSouth
|
|
38
38
|
|
39
39
|
raise SportsSouth::NotAuthenticated if not_authenticated?(xml_doc)
|
40
40
|
|
41
|
-
xml_doc.css('Table').map { |item| map_hash(item) }
|
41
|
+
xml_doc.css('Table').map { |item| map_hash(item, mode: options[:mode]) }
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.get_text(item_number, options = {})
|
@@ -150,62 +150,71 @@ module SportsSouth
|
|
150
150
|
|
151
151
|
protected
|
152
152
|
|
153
|
-
def self.map_hash(node)
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
153
|
+
def self.map_hash(node, mode: nil)
|
154
|
+
if mode == :minimal
|
155
|
+
{
|
156
|
+
item_number: content_for(node, 'ITEMNO'),
|
157
|
+
catalog_price: content_for(node, 'PRC1'),
|
158
|
+
customer_price: content_for(node, 'CPRC'),
|
159
|
+
quantity_on_hand: content_for(node, 'QTYOH'),
|
160
|
+
}
|
161
|
+
else
|
162
|
+
{
|
163
|
+
item_number: content_for(node, 'ITEMNO'),
|
164
|
+
description: content_for(node, 'IDESC'),
|
165
|
+
manufacturer_sequence: content_for(node, 'IMFSEQ'),
|
166
|
+
manufacturer_number: content_for(node, 'IMFGNO'),
|
167
|
+
catalog_sequence: content_for(node, 'CSEQ'),
|
168
|
+
item_type: ITEM_TYPES[content_for(node, 'ITYPE')],
|
169
|
+
short_description: content_for(node, 'SHDESC'),
|
170
|
+
unit_of_measure: content_for(node, 'UOM'),
|
171
|
+
catalog_price: content_for(node, 'PRC1'),
|
172
|
+
customer_price: content_for(node, 'CPRC'),
|
173
|
+
quantity_on_hand: content_for(node, 'QTYOH'),
|
174
|
+
weight_per_box: content_for(node, 'WTPBX'),
|
175
|
+
upc: content_for(node, 'ITUPC'),
|
176
|
+
manufacturer_item_number: content_for(node, 'MFGINO'),
|
177
|
+
scan_name_1: content_for(node, 'SCNAM1'),
|
178
|
+
scan_name_2: content_for(node, 'SCNAM2'),
|
179
|
+
catalog_code: CATALOG_CODES[content_for(node, 'CATCD')],
|
180
|
+
mapp_price_code: content_for(node, 'MFPRTYP'),
|
181
|
+
mapp_price: content_for(node, 'MFPRC'),
|
182
|
+
category_id: content_for(node, 'CATID'),
|
183
|
+
text_reference_number: content_for(node, 'TXTREF'),
|
184
|
+
picture_reference_number: content_for(node, 'PICREF'),
|
185
|
+
brand_id: content_for(node, 'ITBRDNO'),
|
186
|
+
item_model_number: content_for(node, 'IMODEL'),
|
187
|
+
item_purpose: content_for(node, 'IPURPOSE'),
|
188
|
+
series_description: content_for(node, 'SERIES'),
|
189
|
+
item_length: content_for(node, 'LENGTH'),
|
190
|
+
item_height: content_for(node, 'HEIGHT'),
|
191
|
+
item_width: content_for(node, 'WIDTH'),
|
192
|
+
item_ships_hazmat_air: content_for(node, 'HAZAIR'),
|
193
|
+
item_ships_hazmat_ground: content_for(node, 'HAZGRND'),
|
194
|
+
date_of_last_change: content_for(node, 'CHGDTE'),
|
195
|
+
date_added: content_for(node, 'CHGDTE'),
|
196
|
+
attribute_1: content_for(node, 'ITATR1'),
|
197
|
+
attribute_2: content_for(node, 'ITATR2'),
|
198
|
+
attribute_3: content_for(node, 'ITATR3'),
|
199
|
+
attribute_4: content_for(node, 'ITATR4'),
|
200
|
+
attribute_5: content_for(node, 'ITATR5'),
|
201
|
+
attribute_6: content_for(node, 'ITATR6'),
|
202
|
+
attribute_7: content_for(node, 'ITATR7'),
|
203
|
+
attribute_8: content_for(node, 'ITATR8'),
|
204
|
+
attribute_9: content_for(node, 'ITATR9'),
|
205
|
+
attribute_10: content_for(node, 'ITATR0'),
|
206
|
+
attribute_11: content_for(node, 'ITATR11'),
|
207
|
+
attribute_12: content_for(node, 'ITATR12'),
|
208
|
+
attribute_13: content_for(node, 'ITATR13'),
|
209
|
+
attribute_14: content_for(node, 'ITATR14'),
|
210
|
+
attribute_15: content_for(node, 'ITATR15'),
|
211
|
+
attribute_16: content_for(node, 'ITATR16'),
|
212
|
+
attribute_17: content_for(node, 'ITATR17'),
|
213
|
+
attribute_18: content_for(node, 'ITATR18'),
|
214
|
+
attribute_19: content_for(node, 'ITATR19'),
|
215
|
+
attribute_20: content_for(node, 'ITATR20')
|
216
|
+
}
|
217
|
+
end
|
209
218
|
end
|
210
219
|
|
211
220
|
end
|
data/lib/sports_south/version.rb
CHANGED