diff --git a/EconDataLens.Tests/EtlRepositoryTests/AreaEtlRepositoryTests.cs b/EconDataLens.Tests/EtlRepositoryTests/AreaEtlRepositoryTests.cs index fdb8911..8264ff4 100644 --- a/EconDataLens.Tests/EtlRepositoryTests/AreaEtlRepositoryTests.cs +++ b/EconDataLens.Tests/EtlRepositoryTests/AreaEtlRepositoryTests.cs @@ -9,7 +9,7 @@ namespace EconDataLens.Tests.EtlRepositoryTests; -public class AreaEtlTests +public class AreaEtlRepositoryTests { private EconDataLensDbContext _dbContext = null!; private ICpiDataFileParser _parser = null!; diff --git a/EconDataLens.Tests/EtlRepositoryTests/ItemEtlRepositoryTests.cs b/EconDataLens.Tests/EtlRepositoryTests/ItemEtlRepositoryTests.cs new file mode 100644 index 0000000..aefaa99 --- /dev/null +++ b/EconDataLens.Tests/EtlRepositoryTests/ItemEtlRepositoryTests.cs @@ -0,0 +1,118 @@ +using EconDataLens.Core.Entities.Cpi; +using EconDataLens.Core.Interfaces; +using EconDataLens.Core.Configuration; +using EconDataLens.Services; +using EconDataLens.Data; +using EconDataLens.Repositories; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Options; + +namespace EconDataLens.Tests.EtlRepositoryTests; + +public class ItemEtlRepositoryTests +{ + private EconDataLensDbContext _dbContext = null!; + private ICpiDataFileParser _parser = null!; + private ICpiIngestionRepository _repository = null!; + private ICpiIngestionService _service = null!; + private string _connectionString = string.Empty; + + [SetUp] + public async Task SetUp() + { + _connectionString = PostgresFixture.ConnectionString; + var opts = new DbContextOptionsBuilder() + .UseNpgsql(_connectionString) + .UseSnakeCaseNamingConvention() + .Options; + + await DbReset.RecreateDatabaseAsync(_connectionString); + + _dbContext = new EconDataLensDbContext(opts); + + var blsOptions = Options.Create(new BlsOptions + { + Cpi = new CpiOptions + { + FootnoteFile = "cu.item.sample" + } + }); + + var downloadOptions = Options.Create(new DownloadOptions + { + DownloadDirectory = "TestData/EtlData", + DeleteDownloadedFiles = false + }); + + _parser = new CpiDataFileParser(blsOptions, downloadOptions); + _repository = new CpiIngestionRepository(_dbContext); + } + + [Test] + public async Task UpsertCpiItemsAsync_NewItems_InsertsSuccessfully() + { + var path = Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData", "EtlData", "cu.item.sample"); + + await _repository.UpsertCpiItemAsync(_parser.ParseCpiItemsAsync(path)); + + var count = await _dbContext.CpiItem.CountAsync(); + + Assert.That(count, Is.EqualTo(400)); + + var sample = await _dbContext.CpiItem.FirstOrDefaultAsync(i => i.ItemCode == "AA0"); + + Assert.That(sample, Is.Not.Null); + Assert.That(sample.ItemName, Is.EqualTo("All items - old base")); + + sample = await _dbContext.CpiItem.FirstOrDefaultAsync(i => i.ItemCode == "SSHJ031"); + + Assert.That(sample, Is.Not.Null); + Assert.That(sample.ItemName, Is.EqualTo("Infants' furniture")); + + } + + [Test] + public async Task UpsertCpiItemsAsync_ExistingItems_UpdatesSuccessfully() + { + await DbReset.RecreateDatabaseAsync(_connectionString); + var path = Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData", "EtlData", "cu.item.sample"); + + await _repository.UpsertCpiItemAsync(_parser.ParseCpiItemsAsync(path)); + + var count = await _dbContext.CpiItem.CountAsync(); + + Assert.That(count, Is.EqualTo(400)); + + var sample = await _dbContext.CpiItem.FirstOrDefaultAsync(i => i.ItemCode == "AA0"); + + Assert.That(sample, Is.Not.Null); + Assert.That(sample.ItemName, Is.EqualTo("All items - old base")); + + sample = await _dbContext.CpiItem.FirstOrDefaultAsync(i => i.ItemCode == "SSHJ031"); + + Assert.That(sample, Is.Not.Null); + Assert.That(sample.ItemName, Is.EqualTo("Infants' furniture")); + + // Ingest modified data + + path = Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData", "EtlData", "cu.item.modified.sample"); + + await _repository.UpsertCpiItemAsync(_parser.ParseCpiItemsAsync(path)); + + count = await _dbContext.CpiItem.CountAsync(); + + Assert.That(count, Is.EqualTo(400)); + + sample = await _dbContext.CpiItem.FirstOrDefaultAsync(i => i.ItemCode == "SSHJ031"); + + Assert.That(sample, Is.Not.Null); + Assert.That(sample.ItemName, Is.EqualTo("Infants' furniture UPDATED")); + } + + [TearDown] + public async Task TearDown() + { + await _dbContext.DisposeAsync(); + } + +} diff --git a/EconDataLens.Tests/TestData/EtlData/cu.item.modified.sample b/EconDataLens.Tests/TestData/EtlData/cu.item.modified.sample new file mode 100644 index 0000000..bb57eef --- /dev/null +++ b/EconDataLens.Tests/TestData/EtlData/cu.item.modified.sample @@ -0,0 +1,401 @@ +item_code item_name display_level selectable sort_sequence +AA0 All items - old base 0 T 2 +AA0R Purchasing power of the consumer dollar - old base 0 T 400 +SA0 All items 0 T 1 +SA0E Energy 1 T 375 +SA0L1 All items less food 1 T 359 +SA0L12 All items less food and shelter 1 T 362 +SA0L12E All items less food, shelter, and energy 1 T 363 +SA0L12E4 All items less food, shelter, energy, and used cars and trucks 1 T 364 +SA0L1E All items less food and energy 1 T 360 +SA0L2 All items less shelter 1 T 361 +SA0L5 All items less medical care 1 T 357 +SA0LE All items less energy 1 T 358 +SA0R Purchasing power of the consumer dollar 0 T 399 +SA311 Apparel less footwear 1 T 365 +SAA Apparel 0 T 187 +SAA1 Men's and boys' apparel 1 T 188 +SAA2 Women's and girls' apparel 1 T 195 +SAC Commodities 1 T 366 +SACE Energy commodities 1 T 376 +SACL1 Commodities less food 1 T 367 +SACL11 Commodities less food and beverages 1 T 368 +SACL1E Commodities less food and energy commodities 1 T 369 +SACL1E4 Commodities less food, energy, and used cars and trucks 1 T 370 +SAD Durables 1 T 372 +SAE Education and communication 0 T 311 +SAE1 Education 1 T 312 +SAE2 Communication 1 T 320 +SAE21 Information and information processing 2 T 324 +SAEC Education and communication commodities 1 T 373 +SAES Education and communication services 1 T 374 +SAF Food and beverages 0 T 3 +SAF1 Food 1 T 4 +SAF11 Food at home 2 T 5 +SAF111 Cereals and bakery products 3 T 6 +SAF112 Meats, poultry, fish, and eggs 3 T 24 +SAF1121 Meats, poultry, and fish 4 T 25 +SAF11211 Meats 5 T 26 +SAF113 Fruits and vegetables 3 T 63 +SAF1131 Fresh fruits and vegetables 4 T 64 +SAF114 Nonalcoholic beverages and beverage materials 3 T 84 +SAF115 Other food at home 3 T 94 +SAF116 Alcoholic beverages 2 T 125 +SAG Other goods and services 0 T 336 +SAG1 Personal care 1 T 340 +SAGC Other goods 1 T 384 +SAGS Other personal services 1 T 385 +SAH Housing 0 T 136 +SAH1 Shelter 1 T 137 +SAH2 Fuels and utilities 1 T 145 +SAH21 Household energy 2 T 146 +SAH3 Household furnishings and operations 1 T 156 +SAH31 Household furnishings and supplies 1 T 377 +SAM Medical care 0 T 250 +SAM1 Medical care commodities 1 T 251 +SAM2 Medical care services 1 T 256 +SAN Nondurables 1 T 379 +SAN1D Domestically produced farm food 1 T 371 +SANL1 Nondurables less food 1 T 380 +SANL11 Nondurables less food and beverages 1 T 382 +SANL113 Nondurables less food, beverages, and apparel 1 T 383 +SANL13 Nondurables less food and apparel 1 T 381 +SAR Recreation 0 T 269 +SARC Recreation commodities 1 T 387 +SARS Recreation services 1 T 388 +SAS Services 1 T 390 +SAS24 Utilities and public transportation 1 T 396 +SAS2RS Rent of shelter 1 T 389 +SAS367 Other services 1 T 386 +SAS4 Transportation services 1 T 395 +SASL2RS Services less rent of shelter 1 T 393 +SASL5 Services less medical care services 1 T 392 +SASLE Services less energy services 1 T 391 +SAT Transportation 0 T 210 +SAT1 Private transportation 1 T 211 +SATCLTB Transportation commodities less motor fuel 1 T 394 +SEAA Men's apparel 2 T 189 +SEAA01 Men's suits, sport coats, and outerwear 3 T 190 +SEAA02 Men's underwear, nightwear, swimwear and accessories 3 T 191 +SEAA03 Men's shirts and sweaters 3 T 192 +SEAA04 Men's pants and shorts 3 T 193 +SEAB Boys' apparel 2 T 194 +SEAC Women's apparel 2 T 196 +SEAC01 Women's outerwear 3 T 197 +SEAC02 Women's dresses 3 T 198 +SEAC03 Women's suits and separates 3 T 199 +SEAC04 Women's underwear, nightwear, swimwear and accessories 3 T 200 +SEAD Girls' apparel 2 T 201 +SEAE Footwear 1 T 202 +SEAE01 Men's footwear 2 T 203 +SEAE02 Boys' and girls' footwear 2 T 204 +SEAE03 Women's footwear 2 T 205 +SEAF Infants' and toddlers' apparel 1 T 206 +SEAG Jewelry and watches 1 T 207 +SEAG01 Watches 2 T 208 +SEAG02 Jewelry 2 T 209 +SEEA Educational books and supplies 2 T 313 +SEEB Tuition, other school fees, and childcare 2 T 315 +SEEB01 College tuition and fees 3 T 316 +SEEB02 Elementary and high school tuition and fees 3 T 317 +SEEB03 Day care and preschool 3 T 318 +SEEB04 Technical and business school tuition and fees 3 T 319 +SEEC Postage and delivery services 2 T 321 +SEEC01 Postage 3 T 322 +SEEC02 Delivery services 3 T 323 +SEED Telephone services 3 T 325 +SEED03 Wireless telephone services 4 T 326 +SEED04 Residential telephone services 4 T 327 +SEEE Information technology, hardware and services 2 T 330 +SEEE01 Computers, peripherals, and smart home assistants 3 T 331 +SEEE02 Computer software and accessories 3 T 332 +SEEE03 Internet services and electronic information providers 3 T 333 +SEEE04 Telephone hardware, calculators, and other consumer information items 3 T 334 +SEEEC Information technology commodities 1 T 378 +SEFA Cereals and cereal products 4 T 7 +SEFA01 Flour and prepared flour mixes 5 T 8 +SEFA02 Breakfast cereal 5 T 9 +SEFA03 Rice, pasta, cornmeal 5 T 10 +SEFB Bakery products 4 T 12 +SEFB01 Bread 5 T 13 +SEFB02 Fresh biscuits, rolls, muffins 5 T 16 +SEFB03 Cakes, cupcakes, and cookies 5 T 17 +SEFB04 Other bakery products 5 T 20 +SEFC Beef and veal 6 T 27 +SEFC01 Uncooked ground beef 7 T 28 +SEFC02 Uncooked beef roasts 7 T 29 +SEFC03 Uncooked beef steaks 7 T 30 +SEFC04 Uncooked other beef and veal 7 T 31 +SEFD Pork 6 T 32 +SEFD01 Bacon, breakfast sausage, and related products 7 T 33 +SEFD02 Ham 7 T 36 +SEFD03 Pork chops 7 T 38 +SEFD04 Other pork including roasts, steaks, and ribs 7 T 39 +SEFE Other meats 6 T 40 +SEFF Poultry 6 T 45 +SEFF01 Chicken 7 T 46 +SEFF02 Other uncooked poultry including turkey 6 T 49 +SEFG Fish and seafood 5 T 50 +SEFG01 Fresh fish and seafood 6 T 51 +SEFG02 Processed fish and seafood 6 T 52 +SEFH Eggs 4 T 55 +SEFJ Dairy and related products 3 T 56 +SEFJ01 Milk 4 T 57 +SEFJ02 Cheese and related products 4 T 60 +SEFJ03 Ice cream and related products 4 T 61 +SEFJ04 Other dairy and related products 4 T 62 +SEFK Fresh fruits 5 T 65 +SEFK01 Apples 6 T 66 +SEFK02 Bananas 6 T 67 +SEFK03 Citrus fruits 6 T 68 +SEFK04 Other fresh fruits 6 T 70 +SEFL Fresh vegetables 5 T 71 +SEFL01 Potatoes 6 T 72 +SEFL02 Lettuce 6 T 73 +SEFL03 Tomatoes 6 T 74 +SEFL04 Other fresh vegetables 6 T 75 +SEFM Processed fruits and vegetables 4 T 76 +SEFM01 Canned fruits and vegetables 5 T 77 +SEFM02 Frozen fruits and vegetables 5 T 80 +SEFM03 Other processed fruits and vegetables including dried 5 T 82 +SEFN Juices and nonalcoholic drinks 4 T 85 +SEFN01 Carbonated drinks 5 T 86 +SEFN02 Frozen noncarbonated juices and drinks 5 T 87 +SEFN03 Nonfrozen noncarbonated juices and drinks 5 T 88 +SEFP Beverage materials including coffee and tea 4 T 89 +SEFP01 Coffee 5 T 90 +SEFP02 Other beverage materials including tea 5 T 93 +SEFR Sugar and sweets 4 T 95 +SEFR01 Sugar and sugar substitutes 5 T 96 +SEFR02 Candy and chewing gum 5 T 97 +SEFR03 Other sweets 5 T 98 +SEFS Fats and oils 4 T 99 +SEFS01 Butter and margarine 5 T 100 +SEFS02 Salad dressing 5 T 103 +SEFS03 Other fats and oils including peanut butter 5 T 104 +SEFT Other foods 4 T 106 +SEFT01 Soups 5 T 107 +SEFT02 Frozen and freeze dried prepared foods 5 T 108 +SEFT03 Snacks 5 T 109 +SEFT04 Spices, seasonings, condiments, sauces 5 T 110 +SEFT05 Baby food and formula 5 T 115 +SEFT06 Other miscellaneous foods 5 T 116 +SEFV Food away from home 2 T 118 +SEFV01 Full service meals and snacks 3 T 119 +SEFV02 Limited service meals and snacks 3 T 120 +SEFV03 Food at employee sites and schools 3 T 121 +SEFV04 Food from vending machines and mobile vendors 3 T 123 +SEFV05 Other food away from home 3 T 124 +SEFW Alcoholic beverages at home 3 T 126 +SEFW01 Beer, ale, and other malt beverages at home 4 T 127 +SEFW02 Distilled spirits at home 4 T 128 +SEFW03 Wine at home 4 T 131 +SEFX Alcoholic beverages away from home 3 T 132 +SEGA Tobacco and smoking products 1 T 337 +SEGA01 Cigarettes 2 T 338 +SEGA02 Tobacco products other than cigarettes 2 T 339 +SEGB Personal care products 2 T 341 +SEGB01 Hair, dental, shaving, and miscellaneous personal care products 3 T 342 +SEGB02 Cosmetics, perfume, bath, nail preparations and implements 3 T 343 +SEGC Personal care services 2 T 344 +SEGC01 Haircuts and other personal care services 3 T 345 +SEGD Miscellaneous personal services 2 T 346 +SEGD01 Legal services 3 T 347 +SEGD02 Funeral expenses 3 T 348 +SEGD03 Laundry and dry cleaning services 3 T 349 +SEGD04 Apparel services other than laundry and dry cleaning 3 T 350 +SEGD05 Financial services 3 T 351 +SEGE Miscellaneous personal goods 2 T 354 +SEHA Rent of primary residence 2 T 138 +SEHB Lodging away from home 2 T 139 +SEHB01 Housing at school, excluding board 3 T 140 +SEHB02 Other lodging away from home including hotels and motels 3 T 141 +SEHC Owners' equivalent rent of residences 2 T 142 +SEHC01 Owners' equivalent rent of primary residence 3 T 143 +SEHD Tenants' and household insurance 2 T 144 +SEHE Fuel oil and other fuels 3 T 147 +SEHE01 Fuel oil 4 T 148 +SEHE02 Propane, kerosene, and firewood 4 T 149 +SEHF Energy services 3 T 150 +SEHF01 Electricity 4 T 151 +SEHF02 Utility (piped) gas service 4 T 152 +SEHG Water and sewer and trash collection services 2 T 153 +SEHG01 Water and sewerage maintenance 3 T 154 +SEHG02 Garbage and trash collection 3 T 155 +SEHH Window and floor coverings and other linens 2 T 157 +SEHH01 Floor coverings 3 T 158 +SEHH02 Window coverings 3 T 159 +SEHH03 Other linens 3 T 160 +SEHJ Furniture and bedding 2 T 161 +SEHJ01 Bedroom furniture 3 T 162 +SEHJ02 Living room, kitchen, and dining room furniture 3 T 163 +SEHJ03 Other furniture 3 T 164 +SEHK Appliances 2 T 166 +SEHK01 Major appliances 3 T 167 +SEHK02 Other appliances 3 T 169 +SEHL Other household equipment and furnishings 2 T 170 +SEHL01 Clocks, lamps, and decorator items 3 T 171 +SEHL02 Indoor plants and flowers 3 T 172 +SEHL03 Dishes and flatware 3 T 173 +SEHL04 Nonelectric cookware and tableware 3 T 174 +SEHM Tools, hardware, outdoor equipment and supplies 2 T 175 +SEHM01 Tools, hardware and supplies 3 T 176 +SEHM02 Outdoor equipment and supplies 3 T 177 +SEHN Housekeeping supplies 2 T 178 +SEHN01 Household cleaning products 3 T 179 +SEHN02 Household paper products 3 T 180 +SEHN03 Miscellaneous household products 3 T 181 +SEHP Household operations 2 T 182 +SEHP01 Domestic services 3 T 183 +SEHP02 Gardening and lawncare services 3 T 184 +SEHP03 Moving, storage, freight expense 3 T 185 +SEHP04 Repair of household items 3 T 186 +SEMC Professional services 2 T 257 +SEMC01 Physicians' services 3 T 258 +SEMC02 Dental services 3 T 259 +SEMC03 Eyeglasses and eye care 3 T 260 +SEMC04 Services by other medical professionals 3 T 261 +SEMD Hospital and related services 2 T 262 +SEMD01 Hospital services 3 T 263 +SEMD02 Nursing homes and adult day services 3 T 266 +SEMD03 Care of invalids and elderly at home 3 T 267 +SEME Health insurance 2 T 268 +SEMF Medicinal drugs 2 T 252 +SEMF01 Prescription drugs 3 T 253 +SEMF02 Nonprescription drugs 3 T 254 +SEMG Medical equipment and supplies 2 T 255 +SERA Video and audio 1 T 270 +SERA01 Televisions 2 T 271 +SERA02 Cable, satellite, and live streaming television service 2 T 272 +SERA03 Other video equipment 2 T 273 +SERA04 Purchase, subscription, and rental of video 2 T 274 +SERA05 Audio equipment 2 T 277 +SERA06 Recorded music and music subscriptions 2 T 278 +SERAC Video and audio products 1 T 397 +SERAS Video and audio services 1 T 398 +SERB Pets, pet products and services 1 T 279 +SERB01 Pets and pet products 2 T 280 +SERB02 Pet services including veterinary 2 T 283 +SERC Sporting goods 1 T 286 +SERC01 Sports vehicles including bicycles 2 T 287 +SERC02 Sports equipment 2 T 288 +SERD Photography 1 T 289 +SERD01 Photographic equipment and supplies 2 T 290 +SERD02 Photographers and photo processing 2 T 293 +SERE Other recreational goods 1 T 296 +SERE01 Toys 2 T 297 +SERE02 Sewing machines, fabric and supplies 2 T 300 +SERE03 Music instruments and accessories 2 T 301 +SERF Other recreation services 1 T 302 +SERF01 Club membership for shopping clubs, fraternal, or other organizations, or participant sports fees 2 T 303 +SERF02 Admissions 2 T 304 +SERF03 Fees for lessons or instructions 2 T 307 +SERG Recreational reading materials 1 T 308 +SERG01 Newspapers and magazines 2 T 309 +SERG02 Recreational books 2 T 310 +SETA New and used motor vehicles 2 T 212 +SETA01 New vehicles 3 T 213 +SETA02 Used cars and trucks 3 T 218 +SETA03 Leased cars and trucks 3 T 219 +SETA04 Car and truck rental 3 T 220 +SETB Motor fuel 2 T 221 +SETB01 Gasoline (all types) 3 T 222 +SETB02 Other motor fuels 3 T 226 +SETC Motor vehicle parts and equipment 2 T 227 +SETC01 Tires 3 T 228 +SETC02 Vehicle accessories other than tires 3 T 229 +SETD Motor vehicle maintenance and repair 2 T 232 +SETD01 Motor vehicle body work 3 T 233 +SETD02 Motor vehicle maintenance and servicing 3 T 234 +SETD03 Motor vehicle repair 3 T 235 +SETE Motor vehicle insurance 2 T 236 +SETF Motor vehicle fees 2 T 237 +SETF01 State motor vehicle registration and license fees 3 T 238 +SETF03 Parking and other fees 3 T 239 +SETG Public transportation 1 T 242 +SETG01 Airline fares 2 T 243 +SETG02 Other intercity transportation 2 T 244 +SETG03 Intracity transportation 2 T 248 +SS01031 Rice 6 T 11 +SS02011 White bread 6 T 14 +SS02021 Bread other than white 6 T 15 +SS02041 Fresh cakes and cupcakes 6 T 18 +SS02042 Cookies 6 T 19 +SS02063 Fresh sweetrolls, coffeecakes, doughnuts 6 T 21 +SS0206A Crackers, bread, and cracker products 6 T 22 +SS0206B Frozen and refrigerated bakery products, pies, tarts, turnovers 6 T 23 +SS04011 Bacon and related products 8 T 34 +SS04012 Breakfast sausage and related products 8 T 35 +SS04031 Ham, excluding canned 8 T 37 +SS05011 Frankfurters 7 T 41 +SS05014 Lamb and organ meats 7 T 43 +SS05015 Lamb and mutton 7 T 44 +SS0501A Lunchmeats 7 T 42 +SS06011 Fresh whole chicken 7 T 47 +SS06021 Fresh and frozen chicken parts 7 T 48 +SS07011 Shelf stable fish and seafood 7 T 53 +SS07021 Frozen fish and seafood 7 T 54 +SS09011 Fresh whole milk 5 T 58 +SS09021 Fresh milk other than whole 5 T 59 +SS10011 Butter 6 T 101 +SS11031 Oranges, including tangerines 7 T 69 +SS13031 Canned fruits 6 T 78 +SS14011 Frozen vegetables 6 T 81 +SS14021 Canned vegetables 6 T 79 +SS14022 Dried beans, peas, and lentils 6 T 83 +SS16011 Margarine 6 T 102 +SS16014 Peanut butter 6 T 105 +SS17031 Roasted coffee 6 T 91 +SS17032 Instant coffee 6 T 92 +SS18041 Salt and other seasonings and spices 6 T 111 +SS18042 Olives, pickles, relishes 6 T 112 +SS18043 Sauces and gravies 6 T 113 +SS1804B Other condiments 6 T 114 +SS18064 Prepared salads 6 T 117 +SS20021 Whiskey at home 5 T 129 +SS20022 Distilled spirits, excluding whiskey, at home 5 T 130 +SS20051 Beer, ale, and other malt beverages away from home 4 T 133 +SS20052 Wine away from home 4 T 134 +SS20053 Distilled spirits away from home 4 T 135 +SS27051 Land-line interstate toll calls 5 T 328 +SS27061 Land-line intrastate toll calls 5 T 329 +SS30021 Laundry equipment 4 T 168 +SS31022 Video discs and other media 3 T 275 +SS31023 Video game hardware, software and accessories 3 T 299 +SS33032 Stationery, stationery supplies, gift wrap 3 T 355 +SS45011 New cars 4 T 215 +SS4501A New cars and trucks 4 T 214 +SS45021 New trucks 4 T 216 +SS45031 New motorcycles 4 T 217 +SS47014 Gasoline, unleaded regular 4 T 223 +SS47015 Gasoline, unleaded midgrade 4 T 224 +SS47016 Gasoline, unleaded premium 4 T 225 +SS47021 Motor oil, coolant, and fluids 4 T 231 +SS48021 Vehicle parts and equipment other than tires 4 T 230 +SS52051 Parking fees and tolls 4 T 240 +SS53021 Intercity bus fare 3 T 245 +SS53022 Intercity train fare 3 T 246 +SS53023 Ship fare 3 T 247 +SS53031 Intracity mass transit 3 T 249 +SS5702 Inpatient hospital services 4 T 264 +SS5703 Outpatient hospital services 4 T 265 +SS61011 Toys, games, hobbies and playground equipment 3 T 298 +SS61021 Film and photographic supplies 3 T 291 +SS61023 Photographic equipment 3 T 292 +SS61031 Pet food and treats 3 T 281 +SS61032 Purchase of pets, pet supplies, accessories 3 T 282 +SS62011 Automobile service clubs 4 T 241 +SS62031 Admission to movies, theaters, and concerts 3 T 305 +SS62032 Admission to sporting events 3 T 306 +SS62051 Photographer fees 3 T 294 +SS62052 Photo Processing 3 T 295 +SS62053 Pet services 3 T 284 +SS62054 Veterinarian services 3 T 285 +SS62055 Subscription and rental of video and video games 3 T 276 +SS68021 Checking account and other bank services 4 T 352 +SS68023 Tax return preparation and other accounting fees 4 T 353 +SSEA011 College textbooks 3 T 314 +SSEE041 Smartphones 4 T 335 +SSFV031A Food at elementary and secondary schools 3 T 122 +SSGE013 Infants' equipment 3 T 356 +SSHJ031 Infants' furniture UPDATED 3 T 165