Skip to main content

stripe_shared/
issuing_cardholder_spending_limit.rs

1#[derive(Clone, Eq, PartialEq)]
2#[cfg_attr(not(feature = "redact-generated-debug"), derive(Debug))]
3#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
4#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
5pub struct IssuingCardholderSpendingLimit {
6    /// Maximum amount allowed to spend per interval.
7    /// This amount is in the card's currency and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
8    pub amount: i64,
9    /// Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) this limit applies to.
10    /// Omitting this field will apply the limit to all categories.
11    pub categories: Option<Vec<IssuingCardholderSpendingLimitCategories>>,
12    /// Interval (or event) to which the amount applies.
13    pub interval: IssuingCardholderSpendingLimitInterval,
14}
15#[cfg(feature = "redact-generated-debug")]
16impl std::fmt::Debug for IssuingCardholderSpendingLimit {
17    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
18        f.debug_struct("IssuingCardholderSpendingLimit").finish_non_exhaustive()
19    }
20}
21#[doc(hidden)]
22pub struct IssuingCardholderSpendingLimitBuilder {
23    amount: Option<i64>,
24    categories: Option<Option<Vec<IssuingCardholderSpendingLimitCategories>>>,
25    interval: Option<IssuingCardholderSpendingLimitInterval>,
26}
27
28#[allow(
29    unused_variables,
30    irrefutable_let_patterns,
31    clippy::let_unit_value,
32    clippy::match_single_binding,
33    clippy::single_match
34)]
35const _: () = {
36    use miniserde::de::{Map, Visitor};
37    use miniserde::json::Value;
38    use miniserde::{Deserialize, Result, make_place};
39    use stripe_types::miniserde_helpers::FromValueOpt;
40    use stripe_types::{MapBuilder, ObjectDeser};
41
42    make_place!(Place);
43
44    impl Deserialize for IssuingCardholderSpendingLimit {
45        fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
46            Place::new(out)
47        }
48    }
49
50    struct Builder<'a> {
51        out: &'a mut Option<IssuingCardholderSpendingLimit>,
52        builder: IssuingCardholderSpendingLimitBuilder,
53    }
54
55    impl Visitor for Place<IssuingCardholderSpendingLimit> {
56        fn map(&mut self) -> Result<Box<dyn Map + '_>> {
57            Ok(Box::new(Builder {
58                out: &mut self.out,
59                builder: IssuingCardholderSpendingLimitBuilder::deser_default(),
60            }))
61        }
62    }
63
64    impl MapBuilder for IssuingCardholderSpendingLimitBuilder {
65        type Out = IssuingCardholderSpendingLimit;
66        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
67            Ok(match k {
68                "amount" => Deserialize::begin(&mut self.amount),
69                "categories" => Deserialize::begin(&mut self.categories),
70                "interval" => Deserialize::begin(&mut self.interval),
71                _ => <dyn Visitor>::ignore(),
72            })
73        }
74
75        fn deser_default() -> Self {
76            Self { amount: None, categories: Some(None), interval: None }
77        }
78
79        fn take_out(&mut self) -> Option<Self::Out> {
80            let (Some(amount), Some(categories), Some(interval)) =
81                (self.amount, self.categories.take(), self.interval.take())
82            else {
83                return None;
84            };
85            Some(Self::Out { amount, categories, interval })
86        }
87    }
88
89    impl Map for Builder<'_> {
90        fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
91            self.builder.key(k)
92        }
93
94        fn finish(&mut self) -> Result<()> {
95            *self.out = self.builder.take_out();
96            Ok(())
97        }
98    }
99
100    impl ObjectDeser for IssuingCardholderSpendingLimit {
101        type Builder = IssuingCardholderSpendingLimitBuilder;
102    }
103
104    impl FromValueOpt for IssuingCardholderSpendingLimit {
105        fn from_value(v: Value) -> Option<Self> {
106            let Value::Object(obj) = v else {
107                return None;
108            };
109            let mut b = IssuingCardholderSpendingLimitBuilder::deser_default();
110            for (k, v) in obj {
111                match k.as_str() {
112                    "amount" => b.amount = FromValueOpt::from_value(v),
113                    "categories" => b.categories = FromValueOpt::from_value(v),
114                    "interval" => b.interval = FromValueOpt::from_value(v),
115                    _ => {}
116                }
117            }
118            b.take_out()
119        }
120    }
121};
122/// Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) this limit applies to.
123/// Omitting this field will apply the limit to all categories.
124#[derive(Clone, Eq, PartialEq)]
125#[non_exhaustive]
126pub enum IssuingCardholderSpendingLimitCategories {
127    AcRefrigerationRepair,
128    AccountingBookkeepingServices,
129    AdvertisingServices,
130    AgriculturalCooperative,
131    AirlinesAirCarriers,
132    AirportsFlyingFields,
133    AmbulanceServices,
134    AmusementParksCarnivals,
135    AntiqueReproductions,
136    AntiqueShops,
137    Aquariums,
138    ArchitecturalSurveyingServices,
139    ArtDealersAndGalleries,
140    ArtistsSupplyAndCraftShops,
141    AutoAndHomeSupplyStores,
142    AutoBodyRepairShops,
143    AutoPaintShops,
144    AutoServiceShops,
145    AutomatedCashDisburse,
146    AutomatedFuelDispensers,
147    AutomobileAssociations,
148    AutomotivePartsAndAccessoriesStores,
149    AutomotiveTireStores,
150    BailAndBondPayments,
151    Bakeries,
152    BandsOrchestras,
153    BarberAndBeautyShops,
154    BettingCasinoGambling,
155    BicycleShops,
156    BilliardPoolEstablishments,
157    BoatDealers,
158    BoatRentalsAndLeases,
159    BookStores,
160    BooksPeriodicalsAndNewspapers,
161    BowlingAlleys,
162    BusLines,
163    BusinessSecretarialSchools,
164    BuyingShoppingServices,
165    CableSatelliteAndOtherPayTelevisionAndRadio,
166    CameraAndPhotographicSupplyStores,
167    CandyNutAndConfectioneryStores,
168    CarAndTruckDealersNewUsed,
169    CarAndTruckDealersUsedOnly,
170    CarRentalAgencies,
171    CarWashes,
172    CarpentryServices,
173    CarpetUpholsteryCleaning,
174    Caterers,
175    CharitableAndSocialServiceOrganizationsFundraising,
176    ChemicalsAndAlliedProducts,
177    ChildCareServices,
178    ChildrensAndInfantsWearStores,
179    ChiropodistsPodiatrists,
180    Chiropractors,
181    CigarStoresAndStands,
182    CivicSocialFraternalAssociations,
183    CleaningAndMaintenance,
184    ClothingRental,
185    CollegesUniversities,
186    CommercialEquipment,
187    CommercialFootwear,
188    CommercialPhotographyArtAndGraphics,
189    CommuterTransportAndFerries,
190    ComputerNetworkServices,
191    ComputerProgramming,
192    ComputerRepair,
193    ComputerSoftwareStores,
194    ComputersPeripheralsAndSoftware,
195    ConcreteWorkServices,
196    ConstructionMaterials,
197    ConsultingPublicRelations,
198    CorrespondenceSchools,
199    CosmeticStores,
200    CounselingServices,
201    CountryClubs,
202    CourierServices,
203    CourtCosts,
204    CreditReportingAgencies,
205    CruiseLines,
206    DairyProductsStores,
207    DanceHallStudiosSchools,
208    DatingEscortServices,
209    DentistsOrthodontists,
210    DepartmentStores,
211    DetectiveAgencies,
212    DigitalGoodsApplications,
213    DigitalGoodsGames,
214    DigitalGoodsLargeVolume,
215    DigitalGoodsMedia,
216    DirectMarketingCatalogMerchant,
217    DirectMarketingCombinationCatalogAndRetailMerchant,
218    DirectMarketingInboundTelemarketing,
219    DirectMarketingInsuranceServices,
220    DirectMarketingOther,
221    DirectMarketingOutboundTelemarketing,
222    DirectMarketingSubscription,
223    DirectMarketingTravel,
224    DiscountStores,
225    Doctors,
226    DoorToDoorSales,
227    DraperyWindowCoveringAndUpholsteryStores,
228    DrinkingPlaces,
229    DrugStoresAndPharmacies,
230    DrugsDrugProprietariesAndDruggistSundries,
231    DryCleaners,
232    DurableGoods,
233    DutyFreeStores,
234    EatingPlacesRestaurants,
235    EducationalServices,
236    ElectricRazorStores,
237    ElectricVehicleCharging,
238    ElectricalPartsAndEquipment,
239    ElectricalServices,
240    ElectronicsRepairShops,
241    ElectronicsStores,
242    ElementarySecondarySchools,
243    EmergencyServicesGcasVisaUseOnly,
244    EmploymentTempAgencies,
245    EquipmentRental,
246    ExterminatingServices,
247    FamilyClothingStores,
248    FastFoodRestaurants,
249    FinancialInstitutions,
250    FinesGovernmentAdministrativeEntities,
251    FireplaceFireplaceScreensAndAccessoriesStores,
252    FloorCoveringStores,
253    Florists,
254    FloristsSuppliesNurseryStockAndFlowers,
255    FreezerAndLockerMeatProvisioners,
256    FuelDealersNonAutomotive,
257    FuneralServicesCrematories,
258    FurnitureHomeFurnishingsAndEquipmentStoresExceptAppliances,
259    FurnitureRepairRefinishing,
260    FurriersAndFurShops,
261    GeneralServices,
262    GiftCardNoveltyAndSouvenirShops,
263    GlassPaintAndWallpaperStores,
264    GlasswareCrystalStores,
265    GolfCoursesPublic,
266    GovernmentLicensedHorseDogRacingUsRegionOnly,
267    GovernmentLicensedOnlineCasionsOnlineGamblingUsRegionOnly,
268    GovernmentOwnedLotteriesNonUsRegion,
269    GovernmentOwnedLotteriesUsRegionOnly,
270    GovernmentServices,
271    GroceryStoresSupermarkets,
272    HardwareEquipmentAndSupplies,
273    HardwareStores,
274    HealthAndBeautySpas,
275    HearingAidsSalesAndSupplies,
276    HeatingPlumbingAC,
277    HobbyToyAndGameShops,
278    HomeSupplyWarehouseStores,
279    Hospitals,
280    HotelsMotelsAndResorts,
281    HouseholdApplianceStores,
282    IndustrialSupplies,
283    InformationRetrievalServices,
284    InsuranceDefault,
285    InsuranceUnderwritingPremiums,
286    IntraCompanyPurchases,
287    JewelryStoresWatchesClocksAndSilverwareStores,
288    LandscapingServices,
289    Laundries,
290    LaundryCleaningServices,
291    LegalServicesAttorneys,
292    LuggageAndLeatherGoodsStores,
293    LumberBuildingMaterialsStores,
294    ManualCashDisburse,
295    MarinasServiceAndSupplies,
296    Marketplaces,
297    MasonryStoneworkAndPlaster,
298    MassageParlors,
299    MedicalAndDentalLabs,
300    MedicalDentalOphthalmicAndHospitalEquipmentAndSupplies,
301    MedicalServices,
302    MembershipOrganizations,
303    MensAndBoysClothingAndAccessoriesStores,
304    MensWomensClothingStores,
305    MetalServiceCenters,
306    Miscellaneous,
307    MiscellaneousApparelAndAccessoryShops,
308    MiscellaneousAutoDealers,
309    MiscellaneousBusinessServices,
310    MiscellaneousFoodStores,
311    MiscellaneousGeneralMerchandise,
312    MiscellaneousGeneralServices,
313    MiscellaneousHomeFurnishingSpecialtyStores,
314    MiscellaneousPublishingAndPrinting,
315    MiscellaneousRecreationServices,
316    MiscellaneousRepairShops,
317    MiscellaneousSpecialtyRetail,
318    MobileHomeDealers,
319    MotionPictureTheaters,
320    MotorFreightCarriersAndTrucking,
321    MotorHomesDealers,
322    MotorVehicleSuppliesAndNewParts,
323    MotorcycleShopsAndDealers,
324    MotorcycleShopsDealers,
325    MusicStoresMusicalInstrumentsPianosAndSheetMusic,
326    NewsDealersAndNewsstands,
327    NonFiMoneyOrders,
328    NonFiStoredValueCardPurchaseLoad,
329    NondurableGoods,
330    NurseriesLawnAndGardenSupplyStores,
331    NursingPersonalCare,
332    OfficeAndCommercialFurniture,
333    OpticiansEyeglasses,
334    OptometristsOphthalmologist,
335    OrthopedicGoodsProstheticDevices,
336    Osteopaths,
337    PackageStoresBeerWineAndLiquor,
338    PaintsVarnishesAndSupplies,
339    ParkingLotsGarages,
340    PassengerRailways,
341    PawnShops,
342    PetShopsPetFoodAndSupplies,
343    PetroleumAndPetroleumProducts,
344    PhotoDeveloping,
345    PhotographicPhotocopyMicrofilmEquipmentAndSupplies,
346    PhotographicStudios,
347    PictureVideoProduction,
348    PieceGoodsNotionsAndOtherDryGoods,
349    PlumbingHeatingEquipmentAndSupplies,
350    PoliticalOrganizations,
351    PostalServicesGovernmentOnly,
352    PreciousStonesAndMetalsWatchesAndJewelry,
353    ProfessionalServices,
354    PublicWarehousingAndStorage,
355    QuickCopyReproAndBlueprint,
356    Railroads,
357    RealEstateAgentsAndManagersRentals,
358    RecordStores,
359    RecreationalVehicleRentals,
360    ReligiousGoodsStores,
361    ReligiousOrganizations,
362    RoofingSidingSheetMetal,
363    SecretarialSupportServices,
364    SecurityBrokersDealers,
365    ServiceStations,
366    SewingNeedleworkFabricAndPieceGoodsStores,
367    ShoeRepairHatCleaning,
368    ShoeStores,
369    SmallApplianceRepair,
370    SnowmobileDealers,
371    SpecialTradeServices,
372    SpecialtyCleaning,
373    SportingGoodsStores,
374    SportingRecreationCamps,
375    SportsAndRidingApparelStores,
376    SportsClubsFields,
377    StampAndCoinStores,
378    StationaryOfficeSuppliesPrintingAndWritingPaper,
379    StationeryStoresOfficeAndSchoolSupplyStores,
380    SwimmingPoolsSales,
381    TUiTravelGermany,
382    TailorsAlterations,
383    TaxPaymentsGovernmentAgencies,
384    TaxPreparationServices,
385    TaxicabsLimousines,
386    TelecommunicationEquipmentAndTelephoneSales,
387    TelecommunicationServices,
388    TelegraphServices,
389    TentAndAwningShops,
390    TestingLaboratories,
391    TheatricalTicketAgencies,
392    Timeshares,
393    TireRetreadingAndRepair,
394    TollsBridgeFees,
395    TouristAttractionsAndExhibits,
396    TowingServices,
397    TrailerParksCampgrounds,
398    TransportationServices,
399    TravelAgenciesTourOperators,
400    TruckStopIteration,
401    TruckUtilityTrailerRentals,
402    TypesettingPlateMakingAndRelatedServices,
403    TypewriterStores,
404    USFederalGovernmentAgenciesOrDepartments,
405    UniformsCommercialClothing,
406    UsedMerchandiseAndSecondhandStores,
407    Utilities,
408    VarietyStores,
409    VeterinaryServices,
410    VideoAmusementGameSupplies,
411    VideoGameArcades,
412    VideoTapeRentalStores,
413    VocationalTradeSchools,
414    WatchJewelryRepair,
415    WeldingRepair,
416    WholesaleClubs,
417    WigAndToupeeStores,
418    WiresMoneyOrders,
419    WomensAccessoryAndSpecialtyShops,
420    WomensReadyToWearStores,
421    WreckingAndSalvageYards,
422    /// An unrecognized value from Stripe. Should not be used as a request parameter.
423    Unknown(String),
424}
425impl IssuingCardholderSpendingLimitCategories {
426    pub fn as_str(&self) -> &str {
427        use IssuingCardholderSpendingLimitCategories::*;
428        match self {
429            AcRefrigerationRepair => "ac_refrigeration_repair",
430            AccountingBookkeepingServices => "accounting_bookkeeping_services",
431            AdvertisingServices => "advertising_services",
432            AgriculturalCooperative => "agricultural_cooperative",
433            AirlinesAirCarriers => "airlines_air_carriers",
434            AirportsFlyingFields => "airports_flying_fields",
435            AmbulanceServices => "ambulance_services",
436            AmusementParksCarnivals => "amusement_parks_carnivals",
437            AntiqueReproductions => "antique_reproductions",
438            AntiqueShops => "antique_shops",
439            Aquariums => "aquariums",
440            ArchitecturalSurveyingServices => "architectural_surveying_services",
441            ArtDealersAndGalleries => "art_dealers_and_galleries",
442            ArtistsSupplyAndCraftShops => "artists_supply_and_craft_shops",
443            AutoAndHomeSupplyStores => "auto_and_home_supply_stores",
444            AutoBodyRepairShops => "auto_body_repair_shops",
445            AutoPaintShops => "auto_paint_shops",
446            AutoServiceShops => "auto_service_shops",
447            AutomatedCashDisburse => "automated_cash_disburse",
448            AutomatedFuelDispensers => "automated_fuel_dispensers",
449            AutomobileAssociations => "automobile_associations",
450            AutomotivePartsAndAccessoriesStores => "automotive_parts_and_accessories_stores",
451            AutomotiveTireStores => "automotive_tire_stores",
452            BailAndBondPayments => "bail_and_bond_payments",
453            Bakeries => "bakeries",
454            BandsOrchestras => "bands_orchestras",
455            BarberAndBeautyShops => "barber_and_beauty_shops",
456            BettingCasinoGambling => "betting_casino_gambling",
457            BicycleShops => "bicycle_shops",
458            BilliardPoolEstablishments => "billiard_pool_establishments",
459            BoatDealers => "boat_dealers",
460            BoatRentalsAndLeases => "boat_rentals_and_leases",
461            BookStores => "book_stores",
462            BooksPeriodicalsAndNewspapers => "books_periodicals_and_newspapers",
463            BowlingAlleys => "bowling_alleys",
464            BusLines => "bus_lines",
465            BusinessSecretarialSchools => "business_secretarial_schools",
466            BuyingShoppingServices => "buying_shopping_services",
467            CableSatelliteAndOtherPayTelevisionAndRadio => {
468                "cable_satellite_and_other_pay_television_and_radio"
469            }
470            CameraAndPhotographicSupplyStores => "camera_and_photographic_supply_stores",
471            CandyNutAndConfectioneryStores => "candy_nut_and_confectionery_stores",
472            CarAndTruckDealersNewUsed => "car_and_truck_dealers_new_used",
473            CarAndTruckDealersUsedOnly => "car_and_truck_dealers_used_only",
474            CarRentalAgencies => "car_rental_agencies",
475            CarWashes => "car_washes",
476            CarpentryServices => "carpentry_services",
477            CarpetUpholsteryCleaning => "carpet_upholstery_cleaning",
478            Caterers => "caterers",
479            CharitableAndSocialServiceOrganizationsFundraising => {
480                "charitable_and_social_service_organizations_fundraising"
481            }
482            ChemicalsAndAlliedProducts => "chemicals_and_allied_products",
483            ChildCareServices => "child_care_services",
484            ChildrensAndInfantsWearStores => "childrens_and_infants_wear_stores",
485            ChiropodistsPodiatrists => "chiropodists_podiatrists",
486            Chiropractors => "chiropractors",
487            CigarStoresAndStands => "cigar_stores_and_stands",
488            CivicSocialFraternalAssociations => "civic_social_fraternal_associations",
489            CleaningAndMaintenance => "cleaning_and_maintenance",
490            ClothingRental => "clothing_rental",
491            CollegesUniversities => "colleges_universities",
492            CommercialEquipment => "commercial_equipment",
493            CommercialFootwear => "commercial_footwear",
494            CommercialPhotographyArtAndGraphics => "commercial_photography_art_and_graphics",
495            CommuterTransportAndFerries => "commuter_transport_and_ferries",
496            ComputerNetworkServices => "computer_network_services",
497            ComputerProgramming => "computer_programming",
498            ComputerRepair => "computer_repair",
499            ComputerSoftwareStores => "computer_software_stores",
500            ComputersPeripheralsAndSoftware => "computers_peripherals_and_software",
501            ConcreteWorkServices => "concrete_work_services",
502            ConstructionMaterials => "construction_materials",
503            ConsultingPublicRelations => "consulting_public_relations",
504            CorrespondenceSchools => "correspondence_schools",
505            CosmeticStores => "cosmetic_stores",
506            CounselingServices => "counseling_services",
507            CountryClubs => "country_clubs",
508            CourierServices => "courier_services",
509            CourtCosts => "court_costs",
510            CreditReportingAgencies => "credit_reporting_agencies",
511            CruiseLines => "cruise_lines",
512            DairyProductsStores => "dairy_products_stores",
513            DanceHallStudiosSchools => "dance_hall_studios_schools",
514            DatingEscortServices => "dating_escort_services",
515            DentistsOrthodontists => "dentists_orthodontists",
516            DepartmentStores => "department_stores",
517            DetectiveAgencies => "detective_agencies",
518            DigitalGoodsApplications => "digital_goods_applications",
519            DigitalGoodsGames => "digital_goods_games",
520            DigitalGoodsLargeVolume => "digital_goods_large_volume",
521            DigitalGoodsMedia => "digital_goods_media",
522            DirectMarketingCatalogMerchant => "direct_marketing_catalog_merchant",
523            DirectMarketingCombinationCatalogAndRetailMerchant => {
524                "direct_marketing_combination_catalog_and_retail_merchant"
525            }
526            DirectMarketingInboundTelemarketing => "direct_marketing_inbound_telemarketing",
527            DirectMarketingInsuranceServices => "direct_marketing_insurance_services",
528            DirectMarketingOther => "direct_marketing_other",
529            DirectMarketingOutboundTelemarketing => "direct_marketing_outbound_telemarketing",
530            DirectMarketingSubscription => "direct_marketing_subscription",
531            DirectMarketingTravel => "direct_marketing_travel",
532            DiscountStores => "discount_stores",
533            Doctors => "doctors",
534            DoorToDoorSales => "door_to_door_sales",
535            DraperyWindowCoveringAndUpholsteryStores => {
536                "drapery_window_covering_and_upholstery_stores"
537            }
538            DrinkingPlaces => "drinking_places",
539            DrugStoresAndPharmacies => "drug_stores_and_pharmacies",
540            DrugsDrugProprietariesAndDruggistSundries => {
541                "drugs_drug_proprietaries_and_druggist_sundries"
542            }
543            DryCleaners => "dry_cleaners",
544            DurableGoods => "durable_goods",
545            DutyFreeStores => "duty_free_stores",
546            EatingPlacesRestaurants => "eating_places_restaurants",
547            EducationalServices => "educational_services",
548            ElectricRazorStores => "electric_razor_stores",
549            ElectricVehicleCharging => "electric_vehicle_charging",
550            ElectricalPartsAndEquipment => "electrical_parts_and_equipment",
551            ElectricalServices => "electrical_services",
552            ElectronicsRepairShops => "electronics_repair_shops",
553            ElectronicsStores => "electronics_stores",
554            ElementarySecondarySchools => "elementary_secondary_schools",
555            EmergencyServicesGcasVisaUseOnly => "emergency_services_gcas_visa_use_only",
556            EmploymentTempAgencies => "employment_temp_agencies",
557            EquipmentRental => "equipment_rental",
558            ExterminatingServices => "exterminating_services",
559            FamilyClothingStores => "family_clothing_stores",
560            FastFoodRestaurants => "fast_food_restaurants",
561            FinancialInstitutions => "financial_institutions",
562            FinesGovernmentAdministrativeEntities => "fines_government_administrative_entities",
563            FireplaceFireplaceScreensAndAccessoriesStores => {
564                "fireplace_fireplace_screens_and_accessories_stores"
565            }
566            FloorCoveringStores => "floor_covering_stores",
567            Florists => "florists",
568            FloristsSuppliesNurseryStockAndFlowers => "florists_supplies_nursery_stock_and_flowers",
569            FreezerAndLockerMeatProvisioners => "freezer_and_locker_meat_provisioners",
570            FuelDealersNonAutomotive => "fuel_dealers_non_automotive",
571            FuneralServicesCrematories => "funeral_services_crematories",
572            FurnitureHomeFurnishingsAndEquipmentStoresExceptAppliances => {
573                "furniture_home_furnishings_and_equipment_stores_except_appliances"
574            }
575            FurnitureRepairRefinishing => "furniture_repair_refinishing",
576            FurriersAndFurShops => "furriers_and_fur_shops",
577            GeneralServices => "general_services",
578            GiftCardNoveltyAndSouvenirShops => "gift_card_novelty_and_souvenir_shops",
579            GlassPaintAndWallpaperStores => "glass_paint_and_wallpaper_stores",
580            GlasswareCrystalStores => "glassware_crystal_stores",
581            GolfCoursesPublic => "golf_courses_public",
582            GovernmentLicensedHorseDogRacingUsRegionOnly => {
583                "government_licensed_horse_dog_racing_us_region_only"
584            }
585            GovernmentLicensedOnlineCasionsOnlineGamblingUsRegionOnly => {
586                "government_licensed_online_casions_online_gambling_us_region_only"
587            }
588            GovernmentOwnedLotteriesNonUsRegion => "government_owned_lotteries_non_us_region",
589            GovernmentOwnedLotteriesUsRegionOnly => "government_owned_lotteries_us_region_only",
590            GovernmentServices => "government_services",
591            GroceryStoresSupermarkets => "grocery_stores_supermarkets",
592            HardwareEquipmentAndSupplies => "hardware_equipment_and_supplies",
593            HardwareStores => "hardware_stores",
594            HealthAndBeautySpas => "health_and_beauty_spas",
595            HearingAidsSalesAndSupplies => "hearing_aids_sales_and_supplies",
596            HeatingPlumbingAC => "heating_plumbing_a_c",
597            HobbyToyAndGameShops => "hobby_toy_and_game_shops",
598            HomeSupplyWarehouseStores => "home_supply_warehouse_stores",
599            Hospitals => "hospitals",
600            HotelsMotelsAndResorts => "hotels_motels_and_resorts",
601            HouseholdApplianceStores => "household_appliance_stores",
602            IndustrialSupplies => "industrial_supplies",
603            InformationRetrievalServices => "information_retrieval_services",
604            InsuranceDefault => "insurance_default",
605            InsuranceUnderwritingPremiums => "insurance_underwriting_premiums",
606            IntraCompanyPurchases => "intra_company_purchases",
607            JewelryStoresWatchesClocksAndSilverwareStores => {
608                "jewelry_stores_watches_clocks_and_silverware_stores"
609            }
610            LandscapingServices => "landscaping_services",
611            Laundries => "laundries",
612            LaundryCleaningServices => "laundry_cleaning_services",
613            LegalServicesAttorneys => "legal_services_attorneys",
614            LuggageAndLeatherGoodsStores => "luggage_and_leather_goods_stores",
615            LumberBuildingMaterialsStores => "lumber_building_materials_stores",
616            ManualCashDisburse => "manual_cash_disburse",
617            MarinasServiceAndSupplies => "marinas_service_and_supplies",
618            Marketplaces => "marketplaces",
619            MasonryStoneworkAndPlaster => "masonry_stonework_and_plaster",
620            MassageParlors => "massage_parlors",
621            MedicalAndDentalLabs => "medical_and_dental_labs",
622            MedicalDentalOphthalmicAndHospitalEquipmentAndSupplies => {
623                "medical_dental_ophthalmic_and_hospital_equipment_and_supplies"
624            }
625            MedicalServices => "medical_services",
626            MembershipOrganizations => "membership_organizations",
627            MensAndBoysClothingAndAccessoriesStores => {
628                "mens_and_boys_clothing_and_accessories_stores"
629            }
630            MensWomensClothingStores => "mens_womens_clothing_stores",
631            MetalServiceCenters => "metal_service_centers",
632            Miscellaneous => "miscellaneous",
633            MiscellaneousApparelAndAccessoryShops => "miscellaneous_apparel_and_accessory_shops",
634            MiscellaneousAutoDealers => "miscellaneous_auto_dealers",
635            MiscellaneousBusinessServices => "miscellaneous_business_services",
636            MiscellaneousFoodStores => "miscellaneous_food_stores",
637            MiscellaneousGeneralMerchandise => "miscellaneous_general_merchandise",
638            MiscellaneousGeneralServices => "miscellaneous_general_services",
639            MiscellaneousHomeFurnishingSpecialtyStores => {
640                "miscellaneous_home_furnishing_specialty_stores"
641            }
642            MiscellaneousPublishingAndPrinting => "miscellaneous_publishing_and_printing",
643            MiscellaneousRecreationServices => "miscellaneous_recreation_services",
644            MiscellaneousRepairShops => "miscellaneous_repair_shops",
645            MiscellaneousSpecialtyRetail => "miscellaneous_specialty_retail",
646            MobileHomeDealers => "mobile_home_dealers",
647            MotionPictureTheaters => "motion_picture_theaters",
648            MotorFreightCarriersAndTrucking => "motor_freight_carriers_and_trucking",
649            MotorHomesDealers => "motor_homes_dealers",
650            MotorVehicleSuppliesAndNewParts => "motor_vehicle_supplies_and_new_parts",
651            MotorcycleShopsAndDealers => "motorcycle_shops_and_dealers",
652            MotorcycleShopsDealers => "motorcycle_shops_dealers",
653            MusicStoresMusicalInstrumentsPianosAndSheetMusic => {
654                "music_stores_musical_instruments_pianos_and_sheet_music"
655            }
656            NewsDealersAndNewsstands => "news_dealers_and_newsstands",
657            NonFiMoneyOrders => "non_fi_money_orders",
658            NonFiStoredValueCardPurchaseLoad => "non_fi_stored_value_card_purchase_load",
659            NondurableGoods => "nondurable_goods",
660            NurseriesLawnAndGardenSupplyStores => "nurseries_lawn_and_garden_supply_stores",
661            NursingPersonalCare => "nursing_personal_care",
662            OfficeAndCommercialFurniture => "office_and_commercial_furniture",
663            OpticiansEyeglasses => "opticians_eyeglasses",
664            OptometristsOphthalmologist => "optometrists_ophthalmologist",
665            OrthopedicGoodsProstheticDevices => "orthopedic_goods_prosthetic_devices",
666            Osteopaths => "osteopaths",
667            PackageStoresBeerWineAndLiquor => "package_stores_beer_wine_and_liquor",
668            PaintsVarnishesAndSupplies => "paints_varnishes_and_supplies",
669            ParkingLotsGarages => "parking_lots_garages",
670            PassengerRailways => "passenger_railways",
671            PawnShops => "pawn_shops",
672            PetShopsPetFoodAndSupplies => "pet_shops_pet_food_and_supplies",
673            PetroleumAndPetroleumProducts => "petroleum_and_petroleum_products",
674            PhotoDeveloping => "photo_developing",
675            PhotographicPhotocopyMicrofilmEquipmentAndSupplies => {
676                "photographic_photocopy_microfilm_equipment_and_supplies"
677            }
678            PhotographicStudios => "photographic_studios",
679            PictureVideoProduction => "picture_video_production",
680            PieceGoodsNotionsAndOtherDryGoods => "piece_goods_notions_and_other_dry_goods",
681            PlumbingHeatingEquipmentAndSupplies => "plumbing_heating_equipment_and_supplies",
682            PoliticalOrganizations => "political_organizations",
683            PostalServicesGovernmentOnly => "postal_services_government_only",
684            PreciousStonesAndMetalsWatchesAndJewelry => {
685                "precious_stones_and_metals_watches_and_jewelry"
686            }
687            ProfessionalServices => "professional_services",
688            PublicWarehousingAndStorage => "public_warehousing_and_storage",
689            QuickCopyReproAndBlueprint => "quick_copy_repro_and_blueprint",
690            Railroads => "railroads",
691            RealEstateAgentsAndManagersRentals => "real_estate_agents_and_managers_rentals",
692            RecordStores => "record_stores",
693            RecreationalVehicleRentals => "recreational_vehicle_rentals",
694            ReligiousGoodsStores => "religious_goods_stores",
695            ReligiousOrganizations => "religious_organizations",
696            RoofingSidingSheetMetal => "roofing_siding_sheet_metal",
697            SecretarialSupportServices => "secretarial_support_services",
698            SecurityBrokersDealers => "security_brokers_dealers",
699            ServiceStations => "service_stations",
700            SewingNeedleworkFabricAndPieceGoodsStores => {
701                "sewing_needlework_fabric_and_piece_goods_stores"
702            }
703            ShoeRepairHatCleaning => "shoe_repair_hat_cleaning",
704            ShoeStores => "shoe_stores",
705            SmallApplianceRepair => "small_appliance_repair",
706            SnowmobileDealers => "snowmobile_dealers",
707            SpecialTradeServices => "special_trade_services",
708            SpecialtyCleaning => "specialty_cleaning",
709            SportingGoodsStores => "sporting_goods_stores",
710            SportingRecreationCamps => "sporting_recreation_camps",
711            SportsAndRidingApparelStores => "sports_and_riding_apparel_stores",
712            SportsClubsFields => "sports_clubs_fields",
713            StampAndCoinStores => "stamp_and_coin_stores",
714            StationaryOfficeSuppliesPrintingAndWritingPaper => {
715                "stationary_office_supplies_printing_and_writing_paper"
716            }
717            StationeryStoresOfficeAndSchoolSupplyStores => {
718                "stationery_stores_office_and_school_supply_stores"
719            }
720            SwimmingPoolsSales => "swimming_pools_sales",
721            TUiTravelGermany => "t_ui_travel_germany",
722            TailorsAlterations => "tailors_alterations",
723            TaxPaymentsGovernmentAgencies => "tax_payments_government_agencies",
724            TaxPreparationServices => "tax_preparation_services",
725            TaxicabsLimousines => "taxicabs_limousines",
726            TelecommunicationEquipmentAndTelephoneSales => {
727                "telecommunication_equipment_and_telephone_sales"
728            }
729            TelecommunicationServices => "telecommunication_services",
730            TelegraphServices => "telegraph_services",
731            TentAndAwningShops => "tent_and_awning_shops",
732            TestingLaboratories => "testing_laboratories",
733            TheatricalTicketAgencies => "theatrical_ticket_agencies",
734            Timeshares => "timeshares",
735            TireRetreadingAndRepair => "tire_retreading_and_repair",
736            TollsBridgeFees => "tolls_bridge_fees",
737            TouristAttractionsAndExhibits => "tourist_attractions_and_exhibits",
738            TowingServices => "towing_services",
739            TrailerParksCampgrounds => "trailer_parks_campgrounds",
740            TransportationServices => "transportation_services",
741            TravelAgenciesTourOperators => "travel_agencies_tour_operators",
742            TruckStopIteration => "truck_stop_iteration",
743            TruckUtilityTrailerRentals => "truck_utility_trailer_rentals",
744            TypesettingPlateMakingAndRelatedServices => {
745                "typesetting_plate_making_and_related_services"
746            }
747            TypewriterStores => "typewriter_stores",
748            USFederalGovernmentAgenciesOrDepartments => {
749                "u_s_federal_government_agencies_or_departments"
750            }
751            UniformsCommercialClothing => "uniforms_commercial_clothing",
752            UsedMerchandiseAndSecondhandStores => "used_merchandise_and_secondhand_stores",
753            Utilities => "utilities",
754            VarietyStores => "variety_stores",
755            VeterinaryServices => "veterinary_services",
756            VideoAmusementGameSupplies => "video_amusement_game_supplies",
757            VideoGameArcades => "video_game_arcades",
758            VideoTapeRentalStores => "video_tape_rental_stores",
759            VocationalTradeSchools => "vocational_trade_schools",
760            WatchJewelryRepair => "watch_jewelry_repair",
761            WeldingRepair => "welding_repair",
762            WholesaleClubs => "wholesale_clubs",
763            WigAndToupeeStores => "wig_and_toupee_stores",
764            WiresMoneyOrders => "wires_money_orders",
765            WomensAccessoryAndSpecialtyShops => "womens_accessory_and_specialty_shops",
766            WomensReadyToWearStores => "womens_ready_to_wear_stores",
767            WreckingAndSalvageYards => "wrecking_and_salvage_yards",
768            Unknown(v) => v,
769        }
770    }
771}
772
773impl std::str::FromStr for IssuingCardholderSpendingLimitCategories {
774    type Err = std::convert::Infallible;
775    fn from_str(s: &str) -> Result<Self, Self::Err> {
776        use IssuingCardholderSpendingLimitCategories::*;
777        match s {
778            "ac_refrigeration_repair" => Ok(AcRefrigerationRepair),
779            "accounting_bookkeeping_services" => Ok(AccountingBookkeepingServices),
780            "advertising_services" => Ok(AdvertisingServices),
781            "agricultural_cooperative" => Ok(AgriculturalCooperative),
782            "airlines_air_carriers" => Ok(AirlinesAirCarriers),
783            "airports_flying_fields" => Ok(AirportsFlyingFields),
784            "ambulance_services" => Ok(AmbulanceServices),
785            "amusement_parks_carnivals" => Ok(AmusementParksCarnivals),
786            "antique_reproductions" => Ok(AntiqueReproductions),
787            "antique_shops" => Ok(AntiqueShops),
788            "aquariums" => Ok(Aquariums),
789            "architectural_surveying_services" => Ok(ArchitecturalSurveyingServices),
790            "art_dealers_and_galleries" => Ok(ArtDealersAndGalleries),
791            "artists_supply_and_craft_shops" => Ok(ArtistsSupplyAndCraftShops),
792            "auto_and_home_supply_stores" => Ok(AutoAndHomeSupplyStores),
793            "auto_body_repair_shops" => Ok(AutoBodyRepairShops),
794            "auto_paint_shops" => Ok(AutoPaintShops),
795            "auto_service_shops" => Ok(AutoServiceShops),
796            "automated_cash_disburse" => Ok(AutomatedCashDisburse),
797            "automated_fuel_dispensers" => Ok(AutomatedFuelDispensers),
798            "automobile_associations" => Ok(AutomobileAssociations),
799            "automotive_parts_and_accessories_stores" => Ok(AutomotivePartsAndAccessoriesStores),
800            "automotive_tire_stores" => Ok(AutomotiveTireStores),
801            "bail_and_bond_payments" => Ok(BailAndBondPayments),
802            "bakeries" => Ok(Bakeries),
803            "bands_orchestras" => Ok(BandsOrchestras),
804            "barber_and_beauty_shops" => Ok(BarberAndBeautyShops),
805            "betting_casino_gambling" => Ok(BettingCasinoGambling),
806            "bicycle_shops" => Ok(BicycleShops),
807            "billiard_pool_establishments" => Ok(BilliardPoolEstablishments),
808            "boat_dealers" => Ok(BoatDealers),
809            "boat_rentals_and_leases" => Ok(BoatRentalsAndLeases),
810            "book_stores" => Ok(BookStores),
811            "books_periodicals_and_newspapers" => Ok(BooksPeriodicalsAndNewspapers),
812            "bowling_alleys" => Ok(BowlingAlleys),
813            "bus_lines" => Ok(BusLines),
814            "business_secretarial_schools" => Ok(BusinessSecretarialSchools),
815            "buying_shopping_services" => Ok(BuyingShoppingServices),
816            "cable_satellite_and_other_pay_television_and_radio" => {
817                Ok(CableSatelliteAndOtherPayTelevisionAndRadio)
818            }
819            "camera_and_photographic_supply_stores" => Ok(CameraAndPhotographicSupplyStores),
820            "candy_nut_and_confectionery_stores" => Ok(CandyNutAndConfectioneryStores),
821            "car_and_truck_dealers_new_used" => Ok(CarAndTruckDealersNewUsed),
822            "car_and_truck_dealers_used_only" => Ok(CarAndTruckDealersUsedOnly),
823            "car_rental_agencies" => Ok(CarRentalAgencies),
824            "car_washes" => Ok(CarWashes),
825            "carpentry_services" => Ok(CarpentryServices),
826            "carpet_upholstery_cleaning" => Ok(CarpetUpholsteryCleaning),
827            "caterers" => Ok(Caterers),
828            "charitable_and_social_service_organizations_fundraising" => {
829                Ok(CharitableAndSocialServiceOrganizationsFundraising)
830            }
831            "chemicals_and_allied_products" => Ok(ChemicalsAndAlliedProducts),
832            "child_care_services" => Ok(ChildCareServices),
833            "childrens_and_infants_wear_stores" => Ok(ChildrensAndInfantsWearStores),
834            "chiropodists_podiatrists" => Ok(ChiropodistsPodiatrists),
835            "chiropractors" => Ok(Chiropractors),
836            "cigar_stores_and_stands" => Ok(CigarStoresAndStands),
837            "civic_social_fraternal_associations" => Ok(CivicSocialFraternalAssociations),
838            "cleaning_and_maintenance" => Ok(CleaningAndMaintenance),
839            "clothing_rental" => Ok(ClothingRental),
840            "colleges_universities" => Ok(CollegesUniversities),
841            "commercial_equipment" => Ok(CommercialEquipment),
842            "commercial_footwear" => Ok(CommercialFootwear),
843            "commercial_photography_art_and_graphics" => Ok(CommercialPhotographyArtAndGraphics),
844            "commuter_transport_and_ferries" => Ok(CommuterTransportAndFerries),
845            "computer_network_services" => Ok(ComputerNetworkServices),
846            "computer_programming" => Ok(ComputerProgramming),
847            "computer_repair" => Ok(ComputerRepair),
848            "computer_software_stores" => Ok(ComputerSoftwareStores),
849            "computers_peripherals_and_software" => Ok(ComputersPeripheralsAndSoftware),
850            "concrete_work_services" => Ok(ConcreteWorkServices),
851            "construction_materials" => Ok(ConstructionMaterials),
852            "consulting_public_relations" => Ok(ConsultingPublicRelations),
853            "correspondence_schools" => Ok(CorrespondenceSchools),
854            "cosmetic_stores" => Ok(CosmeticStores),
855            "counseling_services" => Ok(CounselingServices),
856            "country_clubs" => Ok(CountryClubs),
857            "courier_services" => Ok(CourierServices),
858            "court_costs" => Ok(CourtCosts),
859            "credit_reporting_agencies" => Ok(CreditReportingAgencies),
860            "cruise_lines" => Ok(CruiseLines),
861            "dairy_products_stores" => Ok(DairyProductsStores),
862            "dance_hall_studios_schools" => Ok(DanceHallStudiosSchools),
863            "dating_escort_services" => Ok(DatingEscortServices),
864            "dentists_orthodontists" => Ok(DentistsOrthodontists),
865            "department_stores" => Ok(DepartmentStores),
866            "detective_agencies" => Ok(DetectiveAgencies),
867            "digital_goods_applications" => Ok(DigitalGoodsApplications),
868            "digital_goods_games" => Ok(DigitalGoodsGames),
869            "digital_goods_large_volume" => Ok(DigitalGoodsLargeVolume),
870            "digital_goods_media" => Ok(DigitalGoodsMedia),
871            "direct_marketing_catalog_merchant" => Ok(DirectMarketingCatalogMerchant),
872            "direct_marketing_combination_catalog_and_retail_merchant" => {
873                Ok(DirectMarketingCombinationCatalogAndRetailMerchant)
874            }
875            "direct_marketing_inbound_telemarketing" => Ok(DirectMarketingInboundTelemarketing),
876            "direct_marketing_insurance_services" => Ok(DirectMarketingInsuranceServices),
877            "direct_marketing_other" => Ok(DirectMarketingOther),
878            "direct_marketing_outbound_telemarketing" => Ok(DirectMarketingOutboundTelemarketing),
879            "direct_marketing_subscription" => Ok(DirectMarketingSubscription),
880            "direct_marketing_travel" => Ok(DirectMarketingTravel),
881            "discount_stores" => Ok(DiscountStores),
882            "doctors" => Ok(Doctors),
883            "door_to_door_sales" => Ok(DoorToDoorSales),
884            "drapery_window_covering_and_upholstery_stores" => {
885                Ok(DraperyWindowCoveringAndUpholsteryStores)
886            }
887            "drinking_places" => Ok(DrinkingPlaces),
888            "drug_stores_and_pharmacies" => Ok(DrugStoresAndPharmacies),
889            "drugs_drug_proprietaries_and_druggist_sundries" => {
890                Ok(DrugsDrugProprietariesAndDruggistSundries)
891            }
892            "dry_cleaners" => Ok(DryCleaners),
893            "durable_goods" => Ok(DurableGoods),
894            "duty_free_stores" => Ok(DutyFreeStores),
895            "eating_places_restaurants" => Ok(EatingPlacesRestaurants),
896            "educational_services" => Ok(EducationalServices),
897            "electric_razor_stores" => Ok(ElectricRazorStores),
898            "electric_vehicle_charging" => Ok(ElectricVehicleCharging),
899            "electrical_parts_and_equipment" => Ok(ElectricalPartsAndEquipment),
900            "electrical_services" => Ok(ElectricalServices),
901            "electronics_repair_shops" => Ok(ElectronicsRepairShops),
902            "electronics_stores" => Ok(ElectronicsStores),
903            "elementary_secondary_schools" => Ok(ElementarySecondarySchools),
904            "emergency_services_gcas_visa_use_only" => Ok(EmergencyServicesGcasVisaUseOnly),
905            "employment_temp_agencies" => Ok(EmploymentTempAgencies),
906            "equipment_rental" => Ok(EquipmentRental),
907            "exterminating_services" => Ok(ExterminatingServices),
908            "family_clothing_stores" => Ok(FamilyClothingStores),
909            "fast_food_restaurants" => Ok(FastFoodRestaurants),
910            "financial_institutions" => Ok(FinancialInstitutions),
911            "fines_government_administrative_entities" => Ok(FinesGovernmentAdministrativeEntities),
912            "fireplace_fireplace_screens_and_accessories_stores" => {
913                Ok(FireplaceFireplaceScreensAndAccessoriesStores)
914            }
915            "floor_covering_stores" => Ok(FloorCoveringStores),
916            "florists" => Ok(Florists),
917            "florists_supplies_nursery_stock_and_flowers" => {
918                Ok(FloristsSuppliesNurseryStockAndFlowers)
919            }
920            "freezer_and_locker_meat_provisioners" => Ok(FreezerAndLockerMeatProvisioners),
921            "fuel_dealers_non_automotive" => Ok(FuelDealersNonAutomotive),
922            "funeral_services_crematories" => Ok(FuneralServicesCrematories),
923            "furniture_home_furnishings_and_equipment_stores_except_appliances" => {
924                Ok(FurnitureHomeFurnishingsAndEquipmentStoresExceptAppliances)
925            }
926            "furniture_repair_refinishing" => Ok(FurnitureRepairRefinishing),
927            "furriers_and_fur_shops" => Ok(FurriersAndFurShops),
928            "general_services" => Ok(GeneralServices),
929            "gift_card_novelty_and_souvenir_shops" => Ok(GiftCardNoveltyAndSouvenirShops),
930            "glass_paint_and_wallpaper_stores" => Ok(GlassPaintAndWallpaperStores),
931            "glassware_crystal_stores" => Ok(GlasswareCrystalStores),
932            "golf_courses_public" => Ok(GolfCoursesPublic),
933            "government_licensed_horse_dog_racing_us_region_only" => {
934                Ok(GovernmentLicensedHorseDogRacingUsRegionOnly)
935            }
936            "government_licensed_online_casions_online_gambling_us_region_only" => {
937                Ok(GovernmentLicensedOnlineCasionsOnlineGamblingUsRegionOnly)
938            }
939            "government_owned_lotteries_non_us_region" => Ok(GovernmentOwnedLotteriesNonUsRegion),
940            "government_owned_lotteries_us_region_only" => Ok(GovernmentOwnedLotteriesUsRegionOnly),
941            "government_services" => Ok(GovernmentServices),
942            "grocery_stores_supermarkets" => Ok(GroceryStoresSupermarkets),
943            "hardware_equipment_and_supplies" => Ok(HardwareEquipmentAndSupplies),
944            "hardware_stores" => Ok(HardwareStores),
945            "health_and_beauty_spas" => Ok(HealthAndBeautySpas),
946            "hearing_aids_sales_and_supplies" => Ok(HearingAidsSalesAndSupplies),
947            "heating_plumbing_a_c" => Ok(HeatingPlumbingAC),
948            "hobby_toy_and_game_shops" => Ok(HobbyToyAndGameShops),
949            "home_supply_warehouse_stores" => Ok(HomeSupplyWarehouseStores),
950            "hospitals" => Ok(Hospitals),
951            "hotels_motels_and_resorts" => Ok(HotelsMotelsAndResorts),
952            "household_appliance_stores" => Ok(HouseholdApplianceStores),
953            "industrial_supplies" => Ok(IndustrialSupplies),
954            "information_retrieval_services" => Ok(InformationRetrievalServices),
955            "insurance_default" => Ok(InsuranceDefault),
956            "insurance_underwriting_premiums" => Ok(InsuranceUnderwritingPremiums),
957            "intra_company_purchases" => Ok(IntraCompanyPurchases),
958            "jewelry_stores_watches_clocks_and_silverware_stores" => {
959                Ok(JewelryStoresWatchesClocksAndSilverwareStores)
960            }
961            "landscaping_services" => Ok(LandscapingServices),
962            "laundries" => Ok(Laundries),
963            "laundry_cleaning_services" => Ok(LaundryCleaningServices),
964            "legal_services_attorneys" => Ok(LegalServicesAttorneys),
965            "luggage_and_leather_goods_stores" => Ok(LuggageAndLeatherGoodsStores),
966            "lumber_building_materials_stores" => Ok(LumberBuildingMaterialsStores),
967            "manual_cash_disburse" => Ok(ManualCashDisburse),
968            "marinas_service_and_supplies" => Ok(MarinasServiceAndSupplies),
969            "marketplaces" => Ok(Marketplaces),
970            "masonry_stonework_and_plaster" => Ok(MasonryStoneworkAndPlaster),
971            "massage_parlors" => Ok(MassageParlors),
972            "medical_and_dental_labs" => Ok(MedicalAndDentalLabs),
973            "medical_dental_ophthalmic_and_hospital_equipment_and_supplies" => {
974                Ok(MedicalDentalOphthalmicAndHospitalEquipmentAndSupplies)
975            }
976            "medical_services" => Ok(MedicalServices),
977            "membership_organizations" => Ok(MembershipOrganizations),
978            "mens_and_boys_clothing_and_accessories_stores" => {
979                Ok(MensAndBoysClothingAndAccessoriesStores)
980            }
981            "mens_womens_clothing_stores" => Ok(MensWomensClothingStores),
982            "metal_service_centers" => Ok(MetalServiceCenters),
983            "miscellaneous" => Ok(Miscellaneous),
984            "miscellaneous_apparel_and_accessory_shops" => {
985                Ok(MiscellaneousApparelAndAccessoryShops)
986            }
987            "miscellaneous_auto_dealers" => Ok(MiscellaneousAutoDealers),
988            "miscellaneous_business_services" => Ok(MiscellaneousBusinessServices),
989            "miscellaneous_food_stores" => Ok(MiscellaneousFoodStores),
990            "miscellaneous_general_merchandise" => Ok(MiscellaneousGeneralMerchandise),
991            "miscellaneous_general_services" => Ok(MiscellaneousGeneralServices),
992            "miscellaneous_home_furnishing_specialty_stores" => {
993                Ok(MiscellaneousHomeFurnishingSpecialtyStores)
994            }
995            "miscellaneous_publishing_and_printing" => Ok(MiscellaneousPublishingAndPrinting),
996            "miscellaneous_recreation_services" => Ok(MiscellaneousRecreationServices),
997            "miscellaneous_repair_shops" => Ok(MiscellaneousRepairShops),
998            "miscellaneous_specialty_retail" => Ok(MiscellaneousSpecialtyRetail),
999            "mobile_home_dealers" => Ok(MobileHomeDealers),
1000            "motion_picture_theaters" => Ok(MotionPictureTheaters),
1001            "motor_freight_carriers_and_trucking" => Ok(MotorFreightCarriersAndTrucking),
1002            "motor_homes_dealers" => Ok(MotorHomesDealers),
1003            "motor_vehicle_supplies_and_new_parts" => Ok(MotorVehicleSuppliesAndNewParts),
1004            "motorcycle_shops_and_dealers" => Ok(MotorcycleShopsAndDealers),
1005            "motorcycle_shops_dealers" => Ok(MotorcycleShopsDealers),
1006            "music_stores_musical_instruments_pianos_and_sheet_music" => {
1007                Ok(MusicStoresMusicalInstrumentsPianosAndSheetMusic)
1008            }
1009            "news_dealers_and_newsstands" => Ok(NewsDealersAndNewsstands),
1010            "non_fi_money_orders" => Ok(NonFiMoneyOrders),
1011            "non_fi_stored_value_card_purchase_load" => Ok(NonFiStoredValueCardPurchaseLoad),
1012            "nondurable_goods" => Ok(NondurableGoods),
1013            "nurseries_lawn_and_garden_supply_stores" => Ok(NurseriesLawnAndGardenSupplyStores),
1014            "nursing_personal_care" => Ok(NursingPersonalCare),
1015            "office_and_commercial_furniture" => Ok(OfficeAndCommercialFurniture),
1016            "opticians_eyeglasses" => Ok(OpticiansEyeglasses),
1017            "optometrists_ophthalmologist" => Ok(OptometristsOphthalmologist),
1018            "orthopedic_goods_prosthetic_devices" => Ok(OrthopedicGoodsProstheticDevices),
1019            "osteopaths" => Ok(Osteopaths),
1020            "package_stores_beer_wine_and_liquor" => Ok(PackageStoresBeerWineAndLiquor),
1021            "paints_varnishes_and_supplies" => Ok(PaintsVarnishesAndSupplies),
1022            "parking_lots_garages" => Ok(ParkingLotsGarages),
1023            "passenger_railways" => Ok(PassengerRailways),
1024            "pawn_shops" => Ok(PawnShops),
1025            "pet_shops_pet_food_and_supplies" => Ok(PetShopsPetFoodAndSupplies),
1026            "petroleum_and_petroleum_products" => Ok(PetroleumAndPetroleumProducts),
1027            "photo_developing" => Ok(PhotoDeveloping),
1028            "photographic_photocopy_microfilm_equipment_and_supplies" => {
1029                Ok(PhotographicPhotocopyMicrofilmEquipmentAndSupplies)
1030            }
1031            "photographic_studios" => Ok(PhotographicStudios),
1032            "picture_video_production" => Ok(PictureVideoProduction),
1033            "piece_goods_notions_and_other_dry_goods" => Ok(PieceGoodsNotionsAndOtherDryGoods),
1034            "plumbing_heating_equipment_and_supplies" => Ok(PlumbingHeatingEquipmentAndSupplies),
1035            "political_organizations" => Ok(PoliticalOrganizations),
1036            "postal_services_government_only" => Ok(PostalServicesGovernmentOnly),
1037            "precious_stones_and_metals_watches_and_jewelry" => {
1038                Ok(PreciousStonesAndMetalsWatchesAndJewelry)
1039            }
1040            "professional_services" => Ok(ProfessionalServices),
1041            "public_warehousing_and_storage" => Ok(PublicWarehousingAndStorage),
1042            "quick_copy_repro_and_blueprint" => Ok(QuickCopyReproAndBlueprint),
1043            "railroads" => Ok(Railroads),
1044            "real_estate_agents_and_managers_rentals" => Ok(RealEstateAgentsAndManagersRentals),
1045            "record_stores" => Ok(RecordStores),
1046            "recreational_vehicle_rentals" => Ok(RecreationalVehicleRentals),
1047            "religious_goods_stores" => Ok(ReligiousGoodsStores),
1048            "religious_organizations" => Ok(ReligiousOrganizations),
1049            "roofing_siding_sheet_metal" => Ok(RoofingSidingSheetMetal),
1050            "secretarial_support_services" => Ok(SecretarialSupportServices),
1051            "security_brokers_dealers" => Ok(SecurityBrokersDealers),
1052            "service_stations" => Ok(ServiceStations),
1053            "sewing_needlework_fabric_and_piece_goods_stores" => {
1054                Ok(SewingNeedleworkFabricAndPieceGoodsStores)
1055            }
1056            "shoe_repair_hat_cleaning" => Ok(ShoeRepairHatCleaning),
1057            "shoe_stores" => Ok(ShoeStores),
1058            "small_appliance_repair" => Ok(SmallApplianceRepair),
1059            "snowmobile_dealers" => Ok(SnowmobileDealers),
1060            "special_trade_services" => Ok(SpecialTradeServices),
1061            "specialty_cleaning" => Ok(SpecialtyCleaning),
1062            "sporting_goods_stores" => Ok(SportingGoodsStores),
1063            "sporting_recreation_camps" => Ok(SportingRecreationCamps),
1064            "sports_and_riding_apparel_stores" => Ok(SportsAndRidingApparelStores),
1065            "sports_clubs_fields" => Ok(SportsClubsFields),
1066            "stamp_and_coin_stores" => Ok(StampAndCoinStores),
1067            "stationary_office_supplies_printing_and_writing_paper" => {
1068                Ok(StationaryOfficeSuppliesPrintingAndWritingPaper)
1069            }
1070            "stationery_stores_office_and_school_supply_stores" => {
1071                Ok(StationeryStoresOfficeAndSchoolSupplyStores)
1072            }
1073            "swimming_pools_sales" => Ok(SwimmingPoolsSales),
1074            "t_ui_travel_germany" => Ok(TUiTravelGermany),
1075            "tailors_alterations" => Ok(TailorsAlterations),
1076            "tax_payments_government_agencies" => Ok(TaxPaymentsGovernmentAgencies),
1077            "tax_preparation_services" => Ok(TaxPreparationServices),
1078            "taxicabs_limousines" => Ok(TaxicabsLimousines),
1079            "telecommunication_equipment_and_telephone_sales" => {
1080                Ok(TelecommunicationEquipmentAndTelephoneSales)
1081            }
1082            "telecommunication_services" => Ok(TelecommunicationServices),
1083            "telegraph_services" => Ok(TelegraphServices),
1084            "tent_and_awning_shops" => Ok(TentAndAwningShops),
1085            "testing_laboratories" => Ok(TestingLaboratories),
1086            "theatrical_ticket_agencies" => Ok(TheatricalTicketAgencies),
1087            "timeshares" => Ok(Timeshares),
1088            "tire_retreading_and_repair" => Ok(TireRetreadingAndRepair),
1089            "tolls_bridge_fees" => Ok(TollsBridgeFees),
1090            "tourist_attractions_and_exhibits" => Ok(TouristAttractionsAndExhibits),
1091            "towing_services" => Ok(TowingServices),
1092            "trailer_parks_campgrounds" => Ok(TrailerParksCampgrounds),
1093            "transportation_services" => Ok(TransportationServices),
1094            "travel_agencies_tour_operators" => Ok(TravelAgenciesTourOperators),
1095            "truck_stop_iteration" => Ok(TruckStopIteration),
1096            "truck_utility_trailer_rentals" => Ok(TruckUtilityTrailerRentals),
1097            "typesetting_plate_making_and_related_services" => {
1098                Ok(TypesettingPlateMakingAndRelatedServices)
1099            }
1100            "typewriter_stores" => Ok(TypewriterStores),
1101            "u_s_federal_government_agencies_or_departments" => {
1102                Ok(USFederalGovernmentAgenciesOrDepartments)
1103            }
1104            "uniforms_commercial_clothing" => Ok(UniformsCommercialClothing),
1105            "used_merchandise_and_secondhand_stores" => Ok(UsedMerchandiseAndSecondhandStores),
1106            "utilities" => Ok(Utilities),
1107            "variety_stores" => Ok(VarietyStores),
1108            "veterinary_services" => Ok(VeterinaryServices),
1109            "video_amusement_game_supplies" => Ok(VideoAmusementGameSupplies),
1110            "video_game_arcades" => Ok(VideoGameArcades),
1111            "video_tape_rental_stores" => Ok(VideoTapeRentalStores),
1112            "vocational_trade_schools" => Ok(VocationalTradeSchools),
1113            "watch_jewelry_repair" => Ok(WatchJewelryRepair),
1114            "welding_repair" => Ok(WeldingRepair),
1115            "wholesale_clubs" => Ok(WholesaleClubs),
1116            "wig_and_toupee_stores" => Ok(WigAndToupeeStores),
1117            "wires_money_orders" => Ok(WiresMoneyOrders),
1118            "womens_accessory_and_specialty_shops" => Ok(WomensAccessoryAndSpecialtyShops),
1119            "womens_ready_to_wear_stores" => Ok(WomensReadyToWearStores),
1120            "wrecking_and_salvage_yards" => Ok(WreckingAndSalvageYards),
1121            v => {
1122                tracing::warn!(
1123                    "Unknown value '{}' for enum '{}'",
1124                    v,
1125                    "IssuingCardholderSpendingLimitCategories"
1126                );
1127                Ok(Unknown(v.to_owned()))
1128            }
1129        }
1130    }
1131}
1132impl std::fmt::Display for IssuingCardholderSpendingLimitCategories {
1133    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1134        f.write_str(self.as_str())
1135    }
1136}
1137
1138#[cfg(not(feature = "redact-generated-debug"))]
1139impl std::fmt::Debug for IssuingCardholderSpendingLimitCategories {
1140    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1141        f.write_str(self.as_str())
1142    }
1143}
1144#[cfg(feature = "redact-generated-debug")]
1145impl std::fmt::Debug for IssuingCardholderSpendingLimitCategories {
1146    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1147        f.debug_struct(stringify!(IssuingCardholderSpendingLimitCategories)).finish_non_exhaustive()
1148    }
1149}
1150#[cfg(feature = "serialize")]
1151impl serde::Serialize for IssuingCardholderSpendingLimitCategories {
1152    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1153    where
1154        S: serde::Serializer,
1155    {
1156        serializer.serialize_str(self.as_str())
1157    }
1158}
1159impl miniserde::Deserialize for IssuingCardholderSpendingLimitCategories {
1160    fn begin(out: &mut Option<Self>) -> &mut dyn miniserde::de::Visitor {
1161        crate::Place::new(out)
1162    }
1163}
1164
1165impl miniserde::de::Visitor for crate::Place<IssuingCardholderSpendingLimitCategories> {
1166    fn string(&mut self, s: &str) -> miniserde::Result<()> {
1167        use std::str::FromStr;
1168        self.out = Some(IssuingCardholderSpendingLimitCategories::from_str(s).expect("infallible"));
1169        Ok(())
1170    }
1171}
1172
1173stripe_types::impl_from_val_with_from_str!(IssuingCardholderSpendingLimitCategories);
1174#[cfg(feature = "deserialize")]
1175impl<'de> serde::Deserialize<'de> for IssuingCardholderSpendingLimitCategories {
1176    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1177        use std::str::FromStr;
1178        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1179        Ok(Self::from_str(&s).expect("infallible"))
1180    }
1181}
1182/// Interval (or event) to which the amount applies.
1183#[derive(Clone, Eq, PartialEq)]
1184#[non_exhaustive]
1185pub enum IssuingCardholderSpendingLimitInterval {
1186    AllTime,
1187    Daily,
1188    Monthly,
1189    PerAuthorization,
1190    Weekly,
1191    Yearly,
1192    /// An unrecognized value from Stripe. Should not be used as a request parameter.
1193    Unknown(String),
1194}
1195impl IssuingCardholderSpendingLimitInterval {
1196    pub fn as_str(&self) -> &str {
1197        use IssuingCardholderSpendingLimitInterval::*;
1198        match self {
1199            AllTime => "all_time",
1200            Daily => "daily",
1201            Monthly => "monthly",
1202            PerAuthorization => "per_authorization",
1203            Weekly => "weekly",
1204            Yearly => "yearly",
1205            Unknown(v) => v,
1206        }
1207    }
1208}
1209
1210impl std::str::FromStr for IssuingCardholderSpendingLimitInterval {
1211    type Err = std::convert::Infallible;
1212    fn from_str(s: &str) -> Result<Self, Self::Err> {
1213        use IssuingCardholderSpendingLimitInterval::*;
1214        match s {
1215            "all_time" => Ok(AllTime),
1216            "daily" => Ok(Daily),
1217            "monthly" => Ok(Monthly),
1218            "per_authorization" => Ok(PerAuthorization),
1219            "weekly" => Ok(Weekly),
1220            "yearly" => Ok(Yearly),
1221            v => {
1222                tracing::warn!(
1223                    "Unknown value '{}' for enum '{}'",
1224                    v,
1225                    "IssuingCardholderSpendingLimitInterval"
1226                );
1227                Ok(Unknown(v.to_owned()))
1228            }
1229        }
1230    }
1231}
1232impl std::fmt::Display for IssuingCardholderSpendingLimitInterval {
1233    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1234        f.write_str(self.as_str())
1235    }
1236}
1237
1238#[cfg(not(feature = "redact-generated-debug"))]
1239impl std::fmt::Debug for IssuingCardholderSpendingLimitInterval {
1240    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1241        f.write_str(self.as_str())
1242    }
1243}
1244#[cfg(feature = "redact-generated-debug")]
1245impl std::fmt::Debug for IssuingCardholderSpendingLimitInterval {
1246    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1247        f.debug_struct(stringify!(IssuingCardholderSpendingLimitInterval)).finish_non_exhaustive()
1248    }
1249}
1250#[cfg(feature = "serialize")]
1251impl serde::Serialize for IssuingCardholderSpendingLimitInterval {
1252    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1253    where
1254        S: serde::Serializer,
1255    {
1256        serializer.serialize_str(self.as_str())
1257    }
1258}
1259impl miniserde::Deserialize for IssuingCardholderSpendingLimitInterval {
1260    fn begin(out: &mut Option<Self>) -> &mut dyn miniserde::de::Visitor {
1261        crate::Place::new(out)
1262    }
1263}
1264
1265impl miniserde::de::Visitor for crate::Place<IssuingCardholderSpendingLimitInterval> {
1266    fn string(&mut self, s: &str) -> miniserde::Result<()> {
1267        use std::str::FromStr;
1268        self.out = Some(IssuingCardholderSpendingLimitInterval::from_str(s).expect("infallible"));
1269        Ok(())
1270    }
1271}
1272
1273stripe_types::impl_from_val_with_from_str!(IssuingCardholderSpendingLimitInterval);
1274#[cfg(feature = "deserialize")]
1275impl<'de> serde::Deserialize<'de> for IssuingCardholderSpendingLimitInterval {
1276    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1277        use std::str::FromStr;
1278        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1279        Ok(Self::from_str(&s).expect("infallible"))
1280    }
1281}