Class: TransactionFaker::Categories

Inherits:
Object
  • Object
show all
Defined in:
lib/transaction_faker/categories.rb

Constant Summary collapse

SUBCATEGORIES =

Categories that are more oriented towards describing a spending pattern than Plaid’s

{
#How much money did you spend going out?
"NIGHTLIFE" => [13001000, 13004002, 19025004],

#How many times did you eat out this past month? How expensive was it?
"EAT_OUT" => [13005007, 13005015, 13005020, 13005017, 13005043],

#How much spent in entertainment (movies, sports, concerts) ?
"ENTERTAINMENT" => [17001009, 17001003, 17001011],

#How much spent in recreation (gym, outdoors)?
"RECREATION" => [17018000, 17022000, 17005000],

#Water, gas, electricity, ventilation, internet, cable expenditures?
"UTILITIES" => [18009000, 18063000, 18031000, 18068001, 18068003],

#reparations per month?
"HOUSE_SERVICES" => [18024007, 18011000, 18050009],

"RENT" => [16002000],

#How much gone in taxes? How much taken out of ATMS?
"DEFAULT_EXPENSES" => [18020001, 18020013, 10002000],

#Barbershop, dentist, doctor, etc.
"PERSONAL_CARE" => [18045009, 14001012, 19043000],

#Weekly expenditures in groceries
"GROCERIES" => [19025002, 19025003],

#How many clothing apparels does this person buy per month? How expensive?
"SHOPPING" => [19012001],

#Uber, Lyft, weekend trips etc.
"RIDE_SHARING" => [22006001],

#Weekday commute as if it was all paid once at the start of the month
"DAILY_COMMUTE" => [22014000],

#income received every month. Not necessarily salary, but it could be?
"INCOME" => [20001000, 21007000],

#Exclusively payroll. Might be empty if salary is delivered through direct deposit.
"PAYROLL" =>  [21009000]
}
FIRST_DIV =
{
  10000000 => 'Bank Fees',
  11000000 => 'Cash Advance',
  12000000 => 'Community',
  13000000 => 'Food and Drink',
  14000000 => 'Healthcare',
  15000000 => 'Interest',
  16000000 => 'Payment',
  17000000 => 'Recreation',
  18000000 => 'Service',
  19000000 => 'Shops',
  20000000 => 'Tax',
  21000000 => 'Transfer',
  22000000 => 'Travel',
}
SECOND_DIV =
{
  10001000 => 'Overdraft',
  10002000 => 'ATM',
  10003000 => 'Late Payment',
  10004000 => 'Fraud Dispute',
  10005000 => 'Foreign Transaction',
  10006000 => 'Wire Transfer',
  10007000 => 'Insufficient Funds',
  10008000 => 'Cash Advance',
  10009000 => 'Excess Activity',
  12001000 => 'Animal Shelter',
  12002000 => 'Assisted Living Services',
  12003000 => 'Cemetery',
  12004000 => 'Courts',
  12005000 => 'Day Care and Preschools',
  12006000 => 'Disabled Persons Services',
  12007000 => 'Drug and Alcohol Services',
  12008000 => 'Education',
  12009000 => 'Government Departments and Agencies',
  12010000 => 'Government Lobbyists',
  12011000 => 'Housing Assistance and Shelters',
  12012000 => 'Law Enforcement',
  12013000 => 'Libraries',
  12014000 => 'Military',
  12015000 => 'Organizations and Associations',
  12016000 => 'Post Offices',
  12017000 => 'Public and Social Services',
  12018000 => 'Religious',
  12019000 => 'Senior Citizen Services',
  13001000 => 'Bar',
  13002000 => 'Breweries',
  13003000 => 'Internet Cafes',
  13004000 => 'Nightlife',
  13005000 => 'Restaurants',
  14001000 => 'Healthcare Services',
  14002000 => 'Physicians',
  15001000 => 'Interest Earned',
  15002000 => 'Interest Charged',
  16001000 => 'Credit Card',
  16002000 => 'Rent',
  16003000 => 'Loan',
  17001000 => 'Arts and Entertainment',
  17002000 => 'Athletic Fields',
  17003000 => 'Baseball',
  17004000 => 'Basketball',
  17005000 => 'Batting Cages',
  17006000 => 'Boating',
  17007000 => 'Campgrounds and RV Parks',
  17008000 => 'Canoes and Kayaks',
  17009000 => 'Combat Sports',
  17010000 => 'Cycling',
  17011000 => 'Dance',
  17012000 => 'Equestrian',
  17013000 => 'Football',
  17014000 => 'Go Carts',
  17015000 => 'Golf',
  17016000 => 'Gun Ranges',
  17017000 => 'Gymnastics',
  17018000 => 'Gyms and Fitness Centers',
  17019000 => 'Hiking',
  17020000 => 'Hockey',
  17021000 => 'Hot Air Balloons',
  17022000 => 'Hunting and Fishing',
  17023000 => 'Landmarks',
  17024000 => 'Miniature Golf',
  17025000 => 'Outdoors',
  17026000 => 'Paintball',
  17027000 => 'Parks',
  17028000 => 'Personal Trainers',
  17029000 => 'Race Tracks',
  17030000 => 'Racquet Sports',
  17031000 => 'Racquetball',
  17032000 => 'Rafting',
  17033000 => 'Recreation Centers',
  17034000 => 'Rock Climbing',
  17035000 => 'Running',
  17036000 => 'Scuba Diving',
  17037000 => 'Skating',
  17038000 => 'Skydiving',
  17039000 => 'Snow Sports',
  17040000 => 'Soccer',
  17041000 => 'Sports and Recreation Camps',
  17042000 => 'Sports Clubs',
  17043000 => 'Stadiums and Arenas',
  17044000 => 'Swimming',
  17045000 => 'Tennis',
  17046000 => 'Water Sports',
  17047000 => 'Yoga and Pilates',
  17048000 => 'Zoo',
  18001000 => 'Advertising and Marketing',
  18003000 => 'Art Restoration',
  18004000 => 'Audiovisual',
  18005000 => 'Automation and Control Systems',
  18006000 => 'Automotive',
  18007000 => 'Business and Strategy Consulting',
  18008000 => 'Business Services',
  18009000 => 'Cable',
  18010000 => 'Chemicals and Gasses',
  18011000 => 'Cleaning',
  18012000 => 'Computers',
  18013000 => 'Construction',
  18014000 => 'Credit Counseling and Bankruptcy Services',
  18015000 => 'Dating and Escort',
  18016000 => 'Employment Agencies',
  18017000 => 'Engineering',
  18018000 => 'Entertainment',
  18019000 => 'Events and Event Planning',
  18020000 => 'Financial',
  18021000 => 'Food and Beverage',
  18022000 => 'Funeral Services',
  18023000 => 'Geological',
  18024000 => 'Home Improvement',
  18025000 => 'Household',
  18026000 => 'Human Resources',
  18027000 => 'Immigration',
  18028000 => 'Import and Export',
  18029000 => 'Industrial Machinery and Vehicles',
  18030000 => 'Insurance',
  18031000 => 'Internet Services',
  18032000 => 'Leather',
  18033000 => 'Legal',
  18034000 => 'Logging and Sawmills',
  18035000 => 'Machine Shops',
  18036000 => 'Management',
  18037000 => 'Manufacturing',
  18038000 => 'Media Production',
  18039000 => 'Metals',
  18040000 => 'Mining',
  18041000 => 'News Reporting',
  18042000 => 'Oil and Gas',
  18043000 => 'Packaging',
  18044000 => 'Paper',
  18045000 => 'Personal Care',
  18046000 => 'Petroleum',
  18047000 => 'Photography',
  18048000 => 'Plastics',
  18049000 => 'Rail',
  18050000 => 'Real Estate',
  18051000 => 'Refrigeration and Ice',
  18052000 => 'Renewable Energy',
  18053000 => 'Repair Services',
  18054000 => 'Research',
  18055000 => 'Rubber',
  18056000 => 'Scientific',
  18057000 => 'Security and Safety',
  18058000 => 'Shipping and Freight',
  18059000 => 'Software Development',
  18060000 => 'Storage',
  18061000 => 'Subscription',
  18062000 => 'Tailors',
  18063000 => 'Telecommunication Services',
  18064000 => 'Textiles',
  18065000 => 'Tourist Information and Services',
  18066000 => 'Transportation',
  18067000 => 'Travel Agents and Tour Operators',
  18068000 => 'Utilities',
  18069000 => 'Veterinarians',
  18070000 => 'Water and Waste Management',
  18071000 => 'Web Design and Development',
  18072000 => 'Welding',
  18073000 => 'Agriculture and Forestry',
  18074000 => 'Art and Graphic Design',
  19001000 => 'Adult',
  19002000 => 'Antiques',
  19003000 => 'Arts and Crafts',
  19004000 => 'Auctions',
  19005000 => 'Automotive',
  19006000 => 'Beauty Products',
  19007000 => 'Bicycles',
  19008000 => 'Boat Dealers',
  19009000 => 'Bookstores',
  19010000 => 'Cards and Stationery',
  19011000 => 'Children',
  19012000 => 'Clothing and Accessories',
  19013000 => 'Computers and Electronics',
  19014000 => 'Construction Supplies',
  19015000 => 'Convenience Stores',
  19016000 => 'Costumes',
  19017000 => 'Dance and Music',
  19018000 => 'Department Stores',
  19019000 => 'Digital Purchase',
  19020000 => 'Discount Stores',
  19021000 => 'Electrical Equipment',
  19022000 => 'Equipment Rental',
  19023000 => 'Flea Markets',
  19024000 => 'Florists',
  19025000 => 'Food and Beverage Store',
  19026000 => 'Fuel Dealer',
  19027000 => 'Furniture and Home Decor',
  19028000 => 'Gift and Novelty',
  19029000 => 'Glasses and Optometrist',
  19030000 => 'Hardware Store',
  19031000 => 'Hobby and Collectibles',
  19032000 => 'Industrial Supplies',
  19033000 => 'Jewelry and Watches',
  19034000 => 'Luggage',
  19035000 => 'Marine Supplies',
  19036000 => 'Music, Video and DVD',
  19037000 => 'Musical Instruments',
  19038000 => 'Newsstands',
  19039000 => 'Office Supplies',
  19040000 => 'Outlet',
  19041000 => 'Pawn Shops',
  19042000 => 'Pets',
  19043000 => 'Pharmacies',
  19044000 => 'Photos and Frames',
  19045000 => 'Shopping Centers and Malls',
  19046000 => 'Sporting Goods',
  19047000 => 'Supermarkets and Groceries',
  19048000 => 'Tobacco',
  19049000 => 'Toys',
  19050000 => 'Vintage and Thrift',
  19051000 => 'Warehouses and Wholesale Stores',
  19052000 => 'Wedding and Bridal',
  19053000 => 'Wholesale',
  19054000 => 'Lawn and Garden',
  20001000 => 'Refund',
  20002000 => 'Payment',
  21001000 => 'Internal Account Transfer',
  21002000 => 'ACH',
  21003000 => 'Billpay',
  21004000 => 'Check',
  21005000 => 'Credit',
  21006000 => 'Debit',
  21007000 => 'Deposit',
  21008000 => 'Keep the Change Savings Program',
  21009000 => 'Payroll',
  21010000 => 'Third Party',
  21011000 => 'Wire',
  21012000 => 'Withdrawal',
  21013000 => 'Save As You Go',
  22001000 => 'Airlines and Aviation Services',
  22002000 => 'Airports',
  22003000 => 'Boat',
  22004000 => 'Bus Stations',
  22005000 => 'Car and Truck Rentals',
  22006000 => 'Car Service',
  22007000 => 'Charter Buses',
  22008000 => 'Cruises',
  22009000 => 'Gas Stations',
  22010000 => 'Heliports',
  22011000 => 'Limos and Chauffeurs',
  22012000 => 'Lodging',
  22013000 => 'Parking',
  22014000 => 'Public Transportation Services',
  22015000 => 'Rail',
  22016000 => 'Taxi',
  22017000 => 'Tolls and Fees',
  22018000 => 'Transportation Centers'
}
THIRD_DIV =
{
  12002001 => 'Facilities and Nursing Homes',
  12002002 => 'Caretakers',
  12008001 => 'Vocational Schools',
  12008002 => 'Tutoring and Educational Services',
  12008003 => 'Primary and Secondary Schools',
  12008004 => 'Fraternities and Sororities',
  12008005 => 'Driving Schools',
  12008006 => 'Dance Schools',
  12008007 => 'Culinary Lessons and Schools',
  12008008 => 'Computer Training',
  12008009 => 'Colleges and Universities',
  12008010 => 'Art School',
  12008011 => 'Adult Education',
  12012001 => 'Police Stations',
  12012002 => 'Fire Stations',
  12012003 => 'Correctional Institutions',
  12015001 => 'Youth Organizations',
  12015002 => 'Environmental',
  12015003 => 'Charities and Non-Profits',
  12018001 => 'Temple',
  12018002 => 'Synagogues',
  12018003 => 'Mosques',
  12018004 => 'Churches',
  12019001 => 'Retirement',
  13001001 => 'Wine Bar',
  13001002 => 'Sports Bar',
  13001003 => 'Hotel Lounge',
  13004001 => 'Strip Club',
  13004002 => 'Night Clubs',
  13004003 => 'Karaoke',
  13004004 => 'Jazz and Blues Cafe',
  13004005 => 'Hookah Lounges',
  13004006 => 'Adult Entertainment',
  13005001 => 'Winery',
  13005002 => 'Vegan and Vegetarian',
  13005003 => 'Turkish',
  13005004 => 'Thai',
  13005005 => 'Swiss',
  13005006 => 'Sushi',
  13005007 => 'Steakhouses',
  13005008 => 'Spanish',
  13005009 => 'Seafood',
  13005010 => 'Scandinavian',
  13005011 => 'Portuguese',
  13005012 => 'Pizza',
  13005013 => 'Moroccan',
  13005014 => 'Middle Eastern',
  13005015 => 'Mexican',
  13005016 => 'Mediterranean',
  13005017 => 'Latin American',
  13005018 => 'Korean',
  13005019 => 'Juice Bar',
  13005020 => 'Japanese',
  13005021 => 'Italian',
  13005022 => 'Indonesian',
  13005023 => 'Indian',
  13005024 => 'Ice Cream',
  13005025 => 'Greek',
  13005026 => 'German',
  13005027 => 'Gastropub',
  13005028 => 'French',
  13005029 => 'Food Truck',
  13005030 => 'Fish and Chips',
  13005031 => 'Filipino',
  13005032 => 'Fast Food',
  13005033 => 'Falafel',
  13005034 => 'Ethiopian',
  13005035 => 'Eastern European',
  13005036 => 'Donuts',
  13005037 => 'Distillery',
  13005038 => 'Diners',
  13005039 => 'Dessert',
  13005040 => 'Delis',
  13005041 => 'Cupcake Shop',
  13005042 => 'Cuban',
  13005043 => 'Coffee Shop',
  13005044 => 'Chinese',
  13005045 => 'Caribbean',
  13005046 => 'Cajun',
  13005047 => 'Cafe',
  13005048 => 'Burrito',
  13005049 => 'Burgers',
  13005050 => 'Breakfast Spot',
  13005051 => 'Brazilian',
  13005052 => 'Barbecue',
  13005053 => 'Bakery',
  13005054 => 'Bagel Shop',
  13005055 => 'Australian',
  13005056 => 'Asian',
  13005057 => 'American',
  13005058 => 'African',
  13005059 => 'Afghan',
  14001001 => 'Psychologists',
  14001002 => 'Pregnancy and Sexual Health',
  14001003 => 'Podiatrists',
  14001004 => 'Physical Therapy',
  14001005 => 'Optometrists',
  14001006 => 'Nutritionists',
  14001007 => 'Nurses',
  14001008 => 'Mental Health',
  14001009 => 'Medical Supplies and Labs',
  14001010 => 'Hospitals, Clinics and Medical Centers',
  14001011 => 'Emergency Services',
  14001012 => 'Dentists',
  14001013 => 'Counseling and Therapy',
  14001014 => 'Chiropractors',
  14001015 => 'Blood Banks and Centers',
  14001016 => 'Alternative Medicine',
  14001017 => 'Acupuncture',
  14002001 => 'Urologists',
  14002002 => 'Respiratory',
  14002003 => 'Radiologists',
  14002004 => 'Psychiatrists',
  14002005 => 'Plastic Surgeons',
  14002006 => 'Pediatricians',
  14002007 => 'Pathologists',
  14002008 => 'Orthopedic Surgeons',
  14002009 => 'Ophthalmologists',
  14002010 => 'Oncologists',
  14002011 => 'Obstetricians and Gynecologists',
  14002012 => 'Neurologists',
  14002013 => 'Internal Medicine',
  14002014 => 'General Surgery',
  14002015 => 'Gastroenterologists',
  14002016 => 'Family Medicine',
  14002017 => 'Ear, Nose and Throat',
  14002018 => 'Dermatologists',
  14002019 => 'Cardiologists',
  14002020 => 'Anesthesiologists',
  17001001 => 'Theatrical Productions',
  17001002 => 'Symphony and Opera',
  17001003 => 'Sports Venues',
  17001004 => 'Social Clubs',
  17001005 => 'Psychics and Astrologers',
  17001006 => 'Party Centers',
  17001007 => 'Music and Show Venues',
  17001008 => 'Museums',
  17001009 => 'Movie Theatres',
  17001010 => 'Fairgrounds and Rodeos',
  17001011 => 'Entertainment',
  17001012 => 'Dance Halls and Saloons',
  17001013 => 'Circuses and Carnivals',
  17001014 => 'Casinos and Gaming',
  17001015 => 'Bowling',
  17001016 => 'Billiards and Pool',
  17001017 => 'Art Dealers and Galleries',
  17001018 => 'Arcades and Amusement Parks',
  17001019 => 'Aquarium',
  17023001 => 'Monuments and Memorials',
  17023002 => 'Historic Sites',
  17023003 => 'Gardens',
  17023004 => 'Buildings and Structures',
  17025001 => 'Rivers',
  17025002 => 'Mountains',
  17025003 => 'Lakes',
  17025004 => 'Forests',
  17025005 => 'Beaches',
  17027001 => 'Playgrounds',
  17027002 => 'Picnic Areas',
  17027003 => 'Natural Parks',
  18001001 => 'Writing, Copywriting and Technical Writing',
  18001002 => 'Search Engine Marketing and Optimization',
  18001003 => 'Public Relations',
  18001004 => 'Promotional Items',
  18001005 => 'Print, TV, Radio and Outdoor Advertising',
  18001006 => 'Online Advertising',
  18001007 => 'Market Research and Consulting',
  18001008 => 'Direct Mail and Email Marketing Services',
  18001009 => 'Creative Services',
  18001010 => 'Advertising Agencies and Media Buyers',
  18006001 => 'Towing',
  18006002 => 'Motorcycle, Moped and Scooter Repair',
  18006003 => 'Maintenance and Repair',
  18006004 => 'Car Wash and Detail',
  18006005 => 'Car Appraisers',
  18006006 => 'Auto Transmission',
  18006007 => 'Auto Tires',
  18006008 => 'Auto Smog Check',
  18006009 => 'Auto Oil and Lube',
  18008001 => 'Printing and Publishing',
  18012001 => 'Maintenance and Repair',
  18012002 => 'Software Development',
  18013001 => 'Specialty',
  18013002 => 'Roofers',
  18013003 => 'Painting',
  18013004 => 'Masonry',
  18013005 => 'Infrastructure',
  18013006 => 'Heating, Ventilating and Air Conditioning',
  18013007 => 'Electricians',
  18013008 => 'Contractors',
  18013009 => 'Carpet and Flooring',
  18013010 => 'Carpenters',
  18018001 => 'Media',
  18020001 => 'Taxes',
  18020002 => 'Student Aid and Grants',
  18020003 => 'Stock Brokers',
  18020004 => 'Loans and Mortgages',
  18020005 => 'Holding and Investment Offices',
  18020006 => 'Fund Raising',
  18020007 => 'Financial Planning and Investments',
  18020008 => 'Credit Reporting',
  18020009 => 'Collections',
  18020010 => 'Check Cashing',
  18020011 => 'Business Brokers and Franchises',
  18020012 => 'Banking and Finance',
  18020013 => 'ATMs',
  18020014 => 'Accounting and Bookkeeping',
  18021001 => 'Distribution',
  18021002 => 'Catering',
  18024001 => 'Upholstery',
  18024002 => 'Tree Service',
  18024003 => 'Swimming Pool Maintenance and Services',
  18024004 => 'Storage',
  18024005 => 'Roofers',
  18024006 => 'Pools and Spas',
  18024007 => 'Plumbing',
  18024008 => 'Pest Control',
  18024009 => 'Painting',
  18024010 => 'Movers',
  18024011 => 'Mobile Homes',
  18024012 => 'Lighting Fixtures',
  18024013 => 'Landscaping and Gardeners',
  18024014 => 'Kitchens',
  18024015 => 'Interior Design',
  18024016 => 'Housewares',
  18024017 => 'Home Inspection Services',
  18024018 => 'Home Appliances',
  18024019 => 'Heating, Ventilation and Air Conditioning',
  18024020 => 'Hardware and Services',
  18024021 => 'Fences, Fireplaces and Garage Doors',
  18024022 => 'Electricians',
  18024023 => 'Doors and Windows',
  18024024 => 'Contractors',
  18024025 => 'Carpet and Flooring',
  18024026 => 'Carpenters',
  18024027 => 'Architects',
  18037001 => 'Apparel and Fabric Products',
  18037002 => 'Chemicals and Gasses',
  18037003 => 'Computers and Office Machines',
  18037004 => 'Electrical Equipment and Components',
  18037005 => 'Food and Beverage',
  18037006 => 'Furniture and Fixtures',
  18037007 => 'Glass Products',
  18037008 => 'Industrial Machinery and Equipment',
  18037009 => 'Leather Goods',
  18037010 => 'Metal Products',
  18037011 => 'Nonmetallic Mineral Products',
  18037012 => 'Paper Products',
  18037013 => 'Petroleum',
  18037014 => 'Plastic Products',
  18037015 => 'Rubber Products',
  18037016 => 'Service Instruments',
  18037017 => 'Textiles',
  18037018 => 'Tobacco',
  18037019 => 'Transportation Equipment',
  18037020 => 'Wood Products',
  18040001 => 'Coal',
  18040002 => 'Metal',
  18040003 => 'Non-Metallic Minerals',
  18045001 => 'Tattooing',
  18045002 => 'Tanning Salons',
  18045003 => 'Spas',
  18045004 => 'Skin Care',
  18045005 => 'Piercing',
  18045006 => 'Massage Clinics and Therapists',
  18045007 => 'Manicures and Pedicures',
  18045008 => 'Laundry and Garment Services',
  18045009 => 'Hair Salons and Barbers',
  18045010 => 'Hair Removal',
  18050001 => 'Real Estate Development and Title Companies',
  18050002 => 'Real Estate Appraiser',
  18050003 => 'Real Estate Agents',
  18050004 => 'Property Management',
  18050005 => 'Corporate Housing',
  18050006 => 'Commercial Real Estate',
  18050007 => 'Building and Land Surveyors',
  18050008 => 'Boarding Houses',
  18050009 => 'Apartments, Condos and Houses',
  18050010 => 'Rent',
  18068001 => 'Water',
  18068002 => 'Sanitary and Waste Management',
  18068003 => 'Heating, Ventilating, and Air Conditioning',
  18068004 => 'Gas',
  18068005 => 'Electric',
  18073001 => 'Crop Production',
  18073002 => 'Forestry',
  18073003 => 'Livestock and Animals',
  18073004 => 'Services',
  19005001 => 'Used Car Dealers',
  19005002 => 'Salvage Yards',
  19005003 => 'RVs and Motor Homes',
  19005004 => 'Motorcycles, Mopeds and Scooters',
  19005005 => 'Classic and Antique Car',
  19005006 => 'Car Parts and Accessories',
  19005007 => 'Car Dealers and Leasing',
  19012001 => 'Women\'s Store',
  19012002 => 'Swimwear',
  19012003 => 'Shoe Store',
  19012004 => 'Men\'s Store',
  19012005 => 'Lingerie Store',
  19012006 => 'Kids\' Store',
  19012007 => 'Boutique',
  19012008 => 'Accessories Store',
  19013001 => 'Video Games',
  19013002 => 'Mobile Phones',
  19013003 => 'Cameras',
  19025001 => 'Specialty',
  19025002 => 'Health Food',
  19025003 => 'Farmers Markets',
  19025004 => 'Beer, Wine and Spirits',
  19040001 => 'Women\'s Store',
  19040002 => 'Swimwear',
  19040003 => 'Shoe Store',
  19040004 => 'Men\'s Store',
  19040005 => 'Lingerie Store',
  19040006 => 'Kids\' Store',
  19040007 => 'Boutique',
  19040008 => 'Accessories Store',
  21007001 => 'Check',
  21007002 => 'ATM',
  21009001 => 'Benefits',
  21010001 => 'Venmo',
  21010002 => 'Square Cash',
  21010003 => 'Square',
  21010004 => 'PayPal',
  21010005 => 'Dwolla',
  21010006 => 'Coinbase',
  21010007 => 'Chase QuickPay',
  21010008 => 'Acorns',
  21010009 => 'Digit',
  21010010 => 'Betterment',
  21012001 => 'Check',
  21012002 => 'ATM',
  22006001 => 'Ride Share',
  22012001 => 'Resorts',
  22012002 => 'Lodges and Vacation Rentals',
  22012003 => 'Hotels and Motels',
  22012004 => 'Hostels',
  22012005 => 'Cottages and Cabins',
  22012006 => 'Bed and Breakfasts'
}

Class Method Summary collapse

Class Method Details

.get_transaction_type(transaction_id, type = "digital") ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/transaction_faker/categories.rb', line 52

def self.get_transaction_type(transaction_id, type = "digital")
  types = {
    "digital" => [19019000],
    "special" => [10, 11, 15, 16, 18009, 18050010, 18068000, 18068001,
                   18068002, 18068003, 18068004, 18068005, 20, 21, 22001,
                   22006001, 22008000, 22016000, 22017000]
  }

  types[type].each do |id|
    length = id.to_s.length
    if id.to_s[0...length] == transaction_id.to_s[0...length]
      return type
    elsif type == "special"
      return "place"
    else
      return get_transaction_type(transaction_id, "special")
    end
  end
end