Debian Codegraph @

stripe/issuing/_card.py

raw
1 # -*- coding: utf-8 -*-
2 # File generated from our OpenAPI spec
3 from stripe._createable_api_resource import CreateableAPIResource
4 from stripe._expandable_field import ExpandableField
5 from stripe._list_object import ListObject
6 from stripe._listable_api_resource import ListableAPIResource
7 from stripe._stripe_object import StripeObject
8 from stripe._test_helpers import APIResourceTestHelpers
9 from stripe._updateable_api_resource import UpdateableAPIResource
10 from stripe._util import class_method_variant, sanitize_id
11 from typing import ClassVar, Dict, List, Optional, cast, overload
12 from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING
13
14 if TYPE_CHECKING:
15 from stripe.issuing._cardholder import Cardholder
16 from stripe.issuing._personalization_design import PersonalizationDesign
17 from stripe.params.issuing._card_create_params import CardCreateParams
18 from stripe.params.issuing._card_deliver_card_params import (
19 CardDeliverCardParams,
20 )
21 from stripe.params.issuing._card_fail_card_params import CardFailCardParams
22 from stripe.params.issuing._card_list_params import CardListParams
23 from stripe.params.issuing._card_modify_params import CardModifyParams
24 from stripe.params.issuing._card_retrieve_params import CardRetrieveParams
25 from stripe.params.issuing._card_return_card_params import (
26 CardReturnCardParams,
27 )
28 from stripe.params.issuing._card_ship_card_params import CardShipCardParams
29 from stripe.params.issuing._card_submit_card_params import (
30 CardSubmitCardParams,
31 )
32
33
34 class Card(
35 CreateableAPIResource["Card"],
36 ListableAPIResource["Card"],
37 UpdateableAPIResource["Card"],
38 ):
39 """
40 You can [create physical or virtual cards](https://docs.stripe.com/issuing) that are issued to cardholders.
41 """
42
43 OBJECT_NAME: ClassVar[Literal["issuing.card"]] = "issuing.card"
44
45 class LatestFraudWarning(StripeObject):
46 started_at: Optional[int]
47 """
48 Timestamp of the most recent fraud warning.
49 """
50 type: Optional[
51 Literal[
52 "card_testing_exposure",
53 "fraud_dispute_filed",
54 "third_party_reported",
55 "user_indicated_fraud",
56 ]
57 ]
58 """
59 The type of fraud warning that most recently took place on this card. This field updates with every new fraud warning, so the value changes over time. If populated, cancel and reissue the card.
60 """
61
62 class Shipping(StripeObject):
63 class Address(StripeObject):
64 city: Optional[str]
65 """
66 City, district, suburb, town, or village.
67 """
68 country: Optional[str]
69 """
70 Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
71 """
72 line1: Optional[str]
73 """
74 Address line 1, such as the street, PO Box, or company name.
75 """
76 line2: Optional[str]
77 """
78 Address line 2, such as the apartment, suite, unit, or building.
79 """
80 postal_code: Optional[str]
81 """
82 ZIP or postal code.
83 """
84 state: Optional[str]
85 """
86 State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
87 """
88
89 class AddressValidation(StripeObject):
90 class NormalizedAddress(StripeObject):
91 city: Optional[str]
92 """
93 City, district, suburb, town, or village.
94 """
95 country: Optional[str]
96 """
97 Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
98 """
99 line1: Optional[str]
100 """
101 Address line 1, such as the street, PO Box, or company name.
102 """
103 line2: Optional[str]
104 """
105 Address line 2, such as the apartment, suite, unit, or building.
106 """
107 postal_code: Optional[str]
108 """
109 ZIP or postal code.
110 """
111 state: Optional[str]
112 """
113 State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
114 """
115
116 mode: Literal[
117 "disabled",
118 "normalization_only",
119 "validation_and_normalization",
120 ]
121 """
122 The address validation capabilities to use.
123 """
124 normalized_address: Optional[NormalizedAddress]
125 """
126 The normalized shipping address.
127 """
128 result: Optional[
129 Literal[
130 "indeterminate",
131 "likely_deliverable",
132 "likely_undeliverable",
133 ]
134 ]
135 """
136 The validation result for the shipping address.
137 """
138 _inner_class_types = {"normalized_address": NormalizedAddress}
139
140 class Customs(StripeObject):
141 eori_number: Optional[str]
142 """
143 A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU.
144 """
145
146 address: Address
147 address_validation: Optional[AddressValidation]
148 """
149 Address validation details for the shipment.
150 """
151 carrier: Optional[Literal["dhl", "fedex", "royal_mail", "usps"]]
152 """
153 The delivery company that shipped a card.
154 """
155 customs: Optional[Customs]
156 """
157 Additional information that may be required for clearing customs.
158 """
159 eta: Optional[int]
160 """
161 A unix timestamp representing a best estimate of when the card will be delivered.
162 """
163 name: str
164 """
165 Recipient name.
166 """
167 phone_number: Optional[str]
168 """
169 The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created.
170 """
171 require_signature: Optional[bool]
172 """
173 Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true.
174 """
175 service: Literal["express", "priority", "standard"]
176 """
177 Shipment service, such as `standard` or `express`.
178 """
179 status: Optional[
180 Literal[
181 "canceled",
182 "delivered",
183 "failure",
184 "pending",
185 "returned",
186 "shipped",
187 "submitted",
188 ]
189 ]
190 """
191 The delivery status of the card.
192 """
193 tracking_number: Optional[str]
194 """
195 A tracking number for a card shipment.
196 """
197 tracking_url: Optional[str]
198 """
199 A link to the shipping carrier's site where you can view detailed information about a card shipment.
200 """
201 type: Literal["bulk", "individual"]
202 """
203 Packaging options.
204 """
205 _inner_class_types = {
206 "address": Address,
207 "address_validation": AddressValidation,
208 "customs": Customs,
209 }
210
211 class SpendingControls(StripeObject):
212 class SpendingLimit(StripeObject):
213 amount: int
214 """
215 Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).
216 """
217 categories: Optional[
218 List[
219 Literal[
220 "ac_refrigeration_repair",
221 "accounting_bookkeeping_services",
222 "advertising_services",
223 "agricultural_cooperative",
224 "airlines_air_carriers",
225 "airports_flying_fields",
226 "ambulance_services",
227 "amusement_parks_carnivals",
228 "antique_reproductions",
229 "antique_shops",
230 "aquariums",
231 "architectural_surveying_services",
232 "art_dealers_and_galleries",
233 "artists_supply_and_craft_shops",
234 "auto_and_home_supply_stores",
235 "auto_body_repair_shops",
236 "auto_paint_shops",
237 "auto_service_shops",
238 "automated_cash_disburse",
239 "automated_fuel_dispensers",
240 "automobile_associations",
241 "automotive_parts_and_accessories_stores",
242 "automotive_tire_stores",
243 "bail_and_bond_payments",
244 "bakeries",
245 "bands_orchestras",
246 "barber_and_beauty_shops",
247 "betting_casino_gambling",
248 "bicycle_shops",
249 "billiard_pool_establishments",
250 "boat_dealers",
251 "boat_rentals_and_leases",
252 "book_stores",
253 "books_periodicals_and_newspapers",
254 "bowling_alleys",
255 "bus_lines",
256 "business_secretarial_schools",
257 "buying_shopping_services",
258 "cable_satellite_and_other_pay_television_and_radio",
259 "camera_and_photographic_supply_stores",
260 "candy_nut_and_confectionery_stores",
261 "car_and_truck_dealers_new_used",
262 "car_and_truck_dealers_used_only",
263 "car_rental_agencies",
264 "car_washes",
265 "carpentry_services",
266 "carpet_upholstery_cleaning",
267 "caterers",
268 "charitable_and_social_service_organizations_fundraising",
269 "chemicals_and_allied_products",
270 "child_care_services",
271 "childrens_and_infants_wear_stores",
272 "chiropodists_podiatrists",
273 "chiropractors",
274 "cigar_stores_and_stands",
275 "civic_social_fraternal_associations",
276 "cleaning_and_maintenance",
277 "clothing_rental",
278 "colleges_universities",
279 "commercial_equipment",
280 "commercial_footwear",
281 "commercial_photography_art_and_graphics",
282 "commuter_transport_and_ferries",
283 "computer_network_services",
284 "computer_programming",
285 "computer_repair",
286 "computer_software_stores",
287 "computers_peripherals_and_software",
288 "concrete_work_services",
289 "construction_materials",
290 "consulting_public_relations",
291 "correspondence_schools",
292 "cosmetic_stores",
293 "counseling_services",
294 "country_clubs",
295 "courier_services",
296 "court_costs",
297 "credit_reporting_agencies",
298 "cruise_lines",
299 "dairy_products_stores",
300 "dance_hall_studios_schools",
301 "dating_escort_services",
302 "dentists_orthodontists",
303 "department_stores",
304 "detective_agencies",
305 "digital_goods_applications",
306 "digital_goods_games",
307 "digital_goods_large_volume",
308 "digital_goods_media",
309 "direct_marketing_catalog_merchant",
310 "direct_marketing_combination_catalog_and_retail_merchant",
311 "direct_marketing_inbound_telemarketing",
312 "direct_marketing_insurance_services",
313 "direct_marketing_other",
314 "direct_marketing_outbound_telemarketing",
315 "direct_marketing_subscription",
316 "direct_marketing_travel",
317 "discount_stores",
318 "doctors",
319 "door_to_door_sales",
320 "drapery_window_covering_and_upholstery_stores",
321 "drinking_places",
322 "drug_stores_and_pharmacies",
323 "drugs_drug_proprietaries_and_druggist_sundries",
324 "dry_cleaners",
325 "durable_goods",
326 "duty_free_stores",
327 "eating_places_restaurants",
328 "educational_services",
329 "electric_razor_stores",
330 "electric_vehicle_charging",
331 "electrical_parts_and_equipment",
332 "electrical_services",
333 "electronics_repair_shops",
334 "electronics_stores",
335 "elementary_secondary_schools",
336 "emergency_services_gcas_visa_use_only",
337 "employment_temp_agencies",
338 "equipment_rental",
339 "exterminating_services",
340 "family_clothing_stores",
341 "fast_food_restaurants",
342 "financial_institutions",
343 "fines_government_administrative_entities",
344 "fireplace_fireplace_screens_and_accessories_stores",
345 "floor_covering_stores",
346 "florists",
347 "florists_supplies_nursery_stock_and_flowers",
348 "freezer_and_locker_meat_provisioners",
349 "fuel_dealers_non_automotive",
350 "funeral_services_crematories",
351 "furniture_home_furnishings_and_equipment_stores_except_appliances",
352 "furniture_repair_refinishing",
353 "furriers_and_fur_shops",
354 "general_services",
355 "gift_card_novelty_and_souvenir_shops",
356 "glass_paint_and_wallpaper_stores",
357 "glassware_crystal_stores",
358 "golf_courses_public",
359 "government_licensed_horse_dog_racing_us_region_only",
360 "government_licensed_online_casions_online_gambling_us_region_only",
361 "government_owned_lotteries_non_us_region",
362 "government_owned_lotteries_us_region_only",
363 "government_services",
364 "grocery_stores_supermarkets",
365 "hardware_equipment_and_supplies",
366 "hardware_stores",
367 "health_and_beauty_spas",
368 "hearing_aids_sales_and_supplies",
369 "heating_plumbing_a_c",
370 "hobby_toy_and_game_shops",
371 "home_supply_warehouse_stores",
372 "hospitals",
373 "hotels_motels_and_resorts",
374 "household_appliance_stores",
375 "industrial_supplies",
376 "information_retrieval_services",
377 "insurance_default",
378 "insurance_underwriting_premiums",
379 "intra_company_purchases",
380 "jewelry_stores_watches_clocks_and_silverware_stores",
381 "landscaping_services",
382 "laundries",
383 "laundry_cleaning_services",
384 "legal_services_attorneys",
385 "luggage_and_leather_goods_stores",
386 "lumber_building_materials_stores",
387 "manual_cash_disburse",
388 "marinas_service_and_supplies",
389 "marketplaces",
390 "masonry_stonework_and_plaster",
391 "massage_parlors",
392 "medical_and_dental_labs",
393 "medical_dental_ophthalmic_and_hospital_equipment_and_supplies",
394 "medical_services",
395 "membership_organizations",
396 "mens_and_boys_clothing_and_accessories_stores",
397 "mens_womens_clothing_stores",
398 "metal_service_centers",
399 "miscellaneous",
400 "miscellaneous_apparel_and_accessory_shops",
401 "miscellaneous_auto_dealers",
402 "miscellaneous_business_services",
403 "miscellaneous_food_stores",
404 "miscellaneous_general_merchandise",
405 "miscellaneous_general_services",
406 "miscellaneous_home_furnishing_specialty_stores",
407 "miscellaneous_publishing_and_printing",
408 "miscellaneous_recreation_services",
409 "miscellaneous_repair_shops",
410 "miscellaneous_specialty_retail",
411 "mobile_home_dealers",
412 "motion_picture_theaters",
413 "motor_freight_carriers_and_trucking",
414 "motor_homes_dealers",
415 "motor_vehicle_supplies_and_new_parts",
416 "motorcycle_shops_and_dealers",
417 "motorcycle_shops_dealers",
418 "music_stores_musical_instruments_pianos_and_sheet_music",
419 "news_dealers_and_newsstands",
420 "non_fi_money_orders",
421 "non_fi_stored_value_card_purchase_load",
422 "nondurable_goods",
423 "nurseries_lawn_and_garden_supply_stores",
424 "nursing_personal_care",
425 "office_and_commercial_furniture",
426 "opticians_eyeglasses",
427 "optometrists_ophthalmologist",
428 "orthopedic_goods_prosthetic_devices",
429 "osteopaths",
430 "package_stores_beer_wine_and_liquor",
431 "paints_varnishes_and_supplies",
432 "parking_lots_garages",
433 "passenger_railways",
434 "pawn_shops",
435 "pet_shops_pet_food_and_supplies",
436 "petroleum_and_petroleum_products",
437 "photo_developing",
438 "photographic_photocopy_microfilm_equipment_and_supplies",
439 "photographic_studios",
440 "picture_video_production",
441 "piece_goods_notions_and_other_dry_goods",
442 "plumbing_heating_equipment_and_supplies",
443 "political_organizations",
444 "postal_services_government_only",
445 "precious_stones_and_metals_watches_and_jewelry",
446 "professional_services",
447 "public_warehousing_and_storage",
448 "quick_copy_repro_and_blueprint",
449 "railroads",
450 "real_estate_agents_and_managers_rentals",
451 "record_stores",
452 "recreational_vehicle_rentals",
453 "religious_goods_stores",
454 "religious_organizations",
455 "roofing_siding_sheet_metal",
456 "secretarial_support_services",
457 "security_brokers_dealers",
458 "service_stations",
459 "sewing_needlework_fabric_and_piece_goods_stores",
460 "shoe_repair_hat_cleaning",
461 "shoe_stores",
462 "small_appliance_repair",
463 "snowmobile_dealers",
464 "special_trade_services",
465 "specialty_cleaning",
466 "sporting_goods_stores",
467 "sporting_recreation_camps",
468 "sports_and_riding_apparel_stores",
469 "sports_clubs_fields",
470 "stamp_and_coin_stores",
471 "stationary_office_supplies_printing_and_writing_paper",
472 "stationery_stores_office_and_school_supply_stores",
473 "swimming_pools_sales",
474 "t_ui_travel_germany",
475 "tailors_alterations",
476 "tax_payments_government_agencies",
477 "tax_preparation_services",
478 "taxicabs_limousines",
479 "telecommunication_equipment_and_telephone_sales",
480 "telecommunication_services",
481 "telegraph_services",
482 "tent_and_awning_shops",
483 "testing_laboratories",
484 "theatrical_ticket_agencies",
485 "timeshares",
486 "tire_retreading_and_repair",
487 "tolls_bridge_fees",
488 "tourist_attractions_and_exhibits",
489 "towing_services",
490 "trailer_parks_campgrounds",
491 "transportation_services",
492 "travel_agencies_tour_operators",
493 "truck_stop_iteration",
494 "truck_utility_trailer_rentals",
495 "typesetting_plate_making_and_related_services",
496 "typewriter_stores",
497 "u_s_federal_government_agencies_or_departments",
498 "uniforms_commercial_clothing",
499 "used_merchandise_and_secondhand_stores",
500 "utilities",
501 "variety_stores",
502 "veterinary_services",
503 "video_amusement_game_supplies",
504 "video_game_arcades",
505 "video_tape_rental_stores",
506 "vocational_trade_schools",
507 "watch_jewelry_repair",
508 "welding_repair",
509 "wholesale_clubs",
510 "wig_and_toupee_stores",
511 "wires_money_orders",
512 "womens_accessory_and_specialty_shops",
513 "womens_ready_to_wear_stores",
514 "wrecking_and_salvage_yards",
515 ]
516 ]
517 ]
518 """
519 Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
520 """
521 interval: Literal[
522 "all_time",
523 "daily",
524 "monthly",
525 "per_authorization",
526 "weekly",
527 "yearly",
528 ]
529 """
530 Interval (or event) to which the amount applies.
531 """
532
533 allowed_categories: Optional[
534 List[
535 Literal[
536 "ac_refrigeration_repair",
537 "accounting_bookkeeping_services",
538 "advertising_services",
539 "agricultural_cooperative",
540 "airlines_air_carriers",
541 "airports_flying_fields",
542 "ambulance_services",
543 "amusement_parks_carnivals",
544 "antique_reproductions",
545 "antique_shops",
546 "aquariums",
547 "architectural_surveying_services",
548 "art_dealers_and_galleries",
549 "artists_supply_and_craft_shops",
550 "auto_and_home_supply_stores",
551 "auto_body_repair_shops",
552 "auto_paint_shops",
553 "auto_service_shops",
554 "automated_cash_disburse",
555 "automated_fuel_dispensers",
556 "automobile_associations",
557 "automotive_parts_and_accessories_stores",
558 "automotive_tire_stores",
559 "bail_and_bond_payments",
560 "bakeries",
561 "bands_orchestras",
562 "barber_and_beauty_shops",
563 "betting_casino_gambling",
564 "bicycle_shops",
565 "billiard_pool_establishments",
566 "boat_dealers",
567 "boat_rentals_and_leases",
568 "book_stores",
569 "books_periodicals_and_newspapers",
570 "bowling_alleys",
571 "bus_lines",
572 "business_secretarial_schools",
573 "buying_shopping_services",
574 "cable_satellite_and_other_pay_television_and_radio",
575 "camera_and_photographic_supply_stores",
576 "candy_nut_and_confectionery_stores",
577 "car_and_truck_dealers_new_used",
578 "car_and_truck_dealers_used_only",
579 "car_rental_agencies",
580 "car_washes",
581 "carpentry_services",
582 "carpet_upholstery_cleaning",
583 "caterers",
584 "charitable_and_social_service_organizations_fundraising",
585 "chemicals_and_allied_products",
586 "child_care_services",
587 "childrens_and_infants_wear_stores",
588 "chiropodists_podiatrists",
589 "chiropractors",
590 "cigar_stores_and_stands",
591 "civic_social_fraternal_associations",
592 "cleaning_and_maintenance",
593 "clothing_rental",
594 "colleges_universities",
595 "commercial_equipment",
596 "commercial_footwear",
597 "commercial_photography_art_and_graphics",
598 "commuter_transport_and_ferries",
599 "computer_network_services",
600 "computer_programming",
601 "computer_repair",
602 "computer_software_stores",
603 "computers_peripherals_and_software",
604 "concrete_work_services",
605 "construction_materials",
606 "consulting_public_relations",
607 "correspondence_schools",
608 "cosmetic_stores",
609 "counseling_services",
610 "country_clubs",
611 "courier_services",
612 "court_costs",
613 "credit_reporting_agencies",
614 "cruise_lines",
615 "dairy_products_stores",
616 "dance_hall_studios_schools",
617 "dating_escort_services",
618 "dentists_orthodontists",
619 "department_stores",
620 "detective_agencies",
621 "digital_goods_applications",
622 "digital_goods_games",
623 "digital_goods_large_volume",
624 "digital_goods_media",
625 "direct_marketing_catalog_merchant",
626 "direct_marketing_combination_catalog_and_retail_merchant",
627 "direct_marketing_inbound_telemarketing",
628 "direct_marketing_insurance_services",
629 "direct_marketing_other",
630 "direct_marketing_outbound_telemarketing",
631 "direct_marketing_subscription",
632 "direct_marketing_travel",
633 "discount_stores",
634 "doctors",
635 "door_to_door_sales",
636 "drapery_window_covering_and_upholstery_stores",
637 "drinking_places",
638 "drug_stores_and_pharmacies",
639 "drugs_drug_proprietaries_and_druggist_sundries",
640 "dry_cleaners",
641 "durable_goods",
642 "duty_free_stores",
643 "eating_places_restaurants",
644 "educational_services",
645 "electric_razor_stores",
646 "electric_vehicle_charging",
647 "electrical_parts_and_equipment",
648 "electrical_services",
649 "electronics_repair_shops",
650 "electronics_stores",
651 "elementary_secondary_schools",
652 "emergency_services_gcas_visa_use_only",
653 "employment_temp_agencies",
654 "equipment_rental",
655 "exterminating_services",
656 "family_clothing_stores",
657 "fast_food_restaurants",
658 "financial_institutions",
659 "fines_government_administrative_entities",
660 "fireplace_fireplace_screens_and_accessories_stores",
661 "floor_covering_stores",
662 "florists",
663 "florists_supplies_nursery_stock_and_flowers",
664 "freezer_and_locker_meat_provisioners",
665 "fuel_dealers_non_automotive",
666 "funeral_services_crematories",
667 "furniture_home_furnishings_and_equipment_stores_except_appliances",
668 "furniture_repair_refinishing",
669 "furriers_and_fur_shops",
670 "general_services",
671 "gift_card_novelty_and_souvenir_shops",
672 "glass_paint_and_wallpaper_stores",
673 "glassware_crystal_stores",
674 "golf_courses_public",
675 "government_licensed_horse_dog_racing_us_region_only",
676 "government_licensed_online_casions_online_gambling_us_region_only",
677 "government_owned_lotteries_non_us_region",
678 "government_owned_lotteries_us_region_only",
679 "government_services",
680 "grocery_stores_supermarkets",
681 "hardware_equipment_and_supplies",
682 "hardware_stores",
683 "health_and_beauty_spas",
684 "hearing_aids_sales_and_supplies",
685 "heating_plumbing_a_c",
686 "hobby_toy_and_game_shops",
687 "home_supply_warehouse_stores",
688 "hospitals",
689 "hotels_motels_and_resorts",
690 "household_appliance_stores",
691 "industrial_supplies",
692 "information_retrieval_services",
693 "insurance_default",
694 "insurance_underwriting_premiums",
695 "intra_company_purchases",
696 "jewelry_stores_watches_clocks_and_silverware_stores",
697 "landscaping_services",
698 "laundries",
699 "laundry_cleaning_services",
700 "legal_services_attorneys",
701 "luggage_and_leather_goods_stores",
702 "lumber_building_materials_stores",
703 "manual_cash_disburse",
704 "marinas_service_and_supplies",
705 "marketplaces",
706 "masonry_stonework_and_plaster",
707 "massage_parlors",
708 "medical_and_dental_labs",
709 "medical_dental_ophthalmic_and_hospital_equipment_and_supplies",
710 "medical_services",
711 "membership_organizations",
712 "mens_and_boys_clothing_and_accessories_stores",
713 "mens_womens_clothing_stores",
714 "metal_service_centers",
715 "miscellaneous",
716 "miscellaneous_apparel_and_accessory_shops",
717 "miscellaneous_auto_dealers",
718 "miscellaneous_business_services",
719 "miscellaneous_food_stores",
720 "miscellaneous_general_merchandise",
721 "miscellaneous_general_services",
722 "miscellaneous_home_furnishing_specialty_stores",
723 "miscellaneous_publishing_and_printing",
724 "miscellaneous_recreation_services",
725 "miscellaneous_repair_shops",
726 "miscellaneous_specialty_retail",
727 "mobile_home_dealers",
728 "motion_picture_theaters",
729 "motor_freight_carriers_and_trucking",
730 "motor_homes_dealers",
731 "motor_vehicle_supplies_and_new_parts",
732 "motorcycle_shops_and_dealers",
733 "motorcycle_shops_dealers",
734 "music_stores_musical_instruments_pianos_and_sheet_music",
735 "news_dealers_and_newsstands",
736 "non_fi_money_orders",
737 "non_fi_stored_value_card_purchase_load",
738 "nondurable_goods",
739 "nurseries_lawn_and_garden_supply_stores",
740 "nursing_personal_care",
741 "office_and_commercial_furniture",
742 "opticians_eyeglasses",
743 "optometrists_ophthalmologist",
744 "orthopedic_goods_prosthetic_devices",
745 "osteopaths",
746 "package_stores_beer_wine_and_liquor",
747 "paints_varnishes_and_supplies",
748 "parking_lots_garages",
749 "passenger_railways",
750 "pawn_shops",
751 "pet_shops_pet_food_and_supplies",
752 "petroleum_and_petroleum_products",
753 "photo_developing",
754 "photographic_photocopy_microfilm_equipment_and_supplies",
755 "photographic_studios",
756 "picture_video_production",
757 "piece_goods_notions_and_other_dry_goods",
758 "plumbing_heating_equipment_and_supplies",
759 "political_organizations",
760 "postal_services_government_only",
761 "precious_stones_and_metals_watches_and_jewelry",
762 "professional_services",
763 "public_warehousing_and_storage",
764 "quick_copy_repro_and_blueprint",
765 "railroads",
766 "real_estate_agents_and_managers_rentals",
767 "record_stores",
768 "recreational_vehicle_rentals",
769 "religious_goods_stores",
770 "religious_organizations",
771 "roofing_siding_sheet_metal",
772 "secretarial_support_services",
773 "security_brokers_dealers",
774 "service_stations",
775 "sewing_needlework_fabric_and_piece_goods_stores",
776 "shoe_repair_hat_cleaning",
777 "shoe_stores",
778 "small_appliance_repair",
779 "snowmobile_dealers",
780 "special_trade_services",
781 "specialty_cleaning",
782 "sporting_goods_stores",
783 "sporting_recreation_camps",
784 "sports_and_riding_apparel_stores",
785 "sports_clubs_fields",
786 "stamp_and_coin_stores",
787 "stationary_office_supplies_printing_and_writing_paper",
788 "stationery_stores_office_and_school_supply_stores",
789 "swimming_pools_sales",
790 "t_ui_travel_germany",
791 "tailors_alterations",
792 "tax_payments_government_agencies",
793 "tax_preparation_services",
794 "taxicabs_limousines",
795 "telecommunication_equipment_and_telephone_sales",
796 "telecommunication_services",
797 "telegraph_services",
798 "tent_and_awning_shops",
799 "testing_laboratories",
800 "theatrical_ticket_agencies",
801 "timeshares",
802 "tire_retreading_and_repair",
803 "tolls_bridge_fees",
804 "tourist_attractions_and_exhibits",
805 "towing_services",
806 "trailer_parks_campgrounds",
807 "transportation_services",
808 "travel_agencies_tour_operators",
809 "truck_stop_iteration",
810 "truck_utility_trailer_rentals",
811 "typesetting_plate_making_and_related_services",
812 "typewriter_stores",
813 "u_s_federal_government_agencies_or_departments",
814 "uniforms_commercial_clothing",
815 "used_merchandise_and_secondhand_stores",
816 "utilities",
817 "variety_stores",
818 "veterinary_services",
819 "video_amusement_game_supplies",
820 "video_game_arcades",
821 "video_tape_rental_stores",
822 "vocational_trade_schools",
823 "watch_jewelry_repair",
824 "welding_repair",
825 "wholesale_clubs",
826 "wig_and_toupee_stores",
827 "wires_money_orders",
828 "womens_accessory_and_specialty_shops",
829 "womens_ready_to_wear_stores",
830 "wrecking_and_salvage_yards",
831 ]
832 ]
833 ]
834 """
835 Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
836 """
837 allowed_merchant_countries: Optional[List[str]]
838 """
839 Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
840 """
841 blocked_categories: Optional[
842 List[
843 Literal[
844 "ac_refrigeration_repair",
845 "accounting_bookkeeping_services",
846 "advertising_services",
847 "agricultural_cooperative",
848 "airlines_air_carriers",
849 "airports_flying_fields",
850 "ambulance_services",
851 "amusement_parks_carnivals",
852 "antique_reproductions",
853 "antique_shops",
854 "aquariums",
855 "architectural_surveying_services",
856 "art_dealers_and_galleries",
857 "artists_supply_and_craft_shops",
858 "auto_and_home_supply_stores",
859 "auto_body_repair_shops",
860 "auto_paint_shops",
861 "auto_service_shops",
862 "automated_cash_disburse",
863 "automated_fuel_dispensers",
864 "automobile_associations",
865 "automotive_parts_and_accessories_stores",
866 "automotive_tire_stores",
867 "bail_and_bond_payments",
868 "bakeries",
869 "bands_orchestras",
870 "barber_and_beauty_shops",
871 "betting_casino_gambling",
872 "bicycle_shops",
873 "billiard_pool_establishments",
874 "boat_dealers",
875 "boat_rentals_and_leases",
876 "book_stores",
877 "books_periodicals_and_newspapers",
878 "bowling_alleys",
879 "bus_lines",
880 "business_secretarial_schools",
881 "buying_shopping_services",
882 "cable_satellite_and_other_pay_television_and_radio",
883 "camera_and_photographic_supply_stores",
884 "candy_nut_and_confectionery_stores",
885 "car_and_truck_dealers_new_used",
886 "car_and_truck_dealers_used_only",
887 "car_rental_agencies",
888 "car_washes",
889 "carpentry_services",
890 "carpet_upholstery_cleaning",
891 "caterers",
892 "charitable_and_social_service_organizations_fundraising",
893 "chemicals_and_allied_products",
894 "child_care_services",
895 "childrens_and_infants_wear_stores",
896 "chiropodists_podiatrists",
897 "chiropractors",
898 "cigar_stores_and_stands",
899 "civic_social_fraternal_associations",
900 "cleaning_and_maintenance",
901 "clothing_rental",
902 "colleges_universities",
903 "commercial_equipment",
904 "commercial_footwear",
905 "commercial_photography_art_and_graphics",
906 "commuter_transport_and_ferries",
907 "computer_network_services",
908 "computer_programming",
909 "computer_repair",
910 "computer_software_stores",
911 "computers_peripherals_and_software",
912 "concrete_work_services",
913 "construction_materials",
914 "consulting_public_relations",
915 "correspondence_schools",
916 "cosmetic_stores",
917 "counseling_services",
918 "country_clubs",
919 "courier_services",
920 "court_costs",
921 "credit_reporting_agencies",
922 "cruise_lines",
923 "dairy_products_stores",
924 "dance_hall_studios_schools",
925 "dating_escort_services",
926 "dentists_orthodontists",
927 "department_stores",
928 "detective_agencies",
929 "digital_goods_applications",
930 "digital_goods_games",
931 "digital_goods_large_volume",
932 "digital_goods_media",
933 "direct_marketing_catalog_merchant",
934 "direct_marketing_combination_catalog_and_retail_merchant",
935 "direct_marketing_inbound_telemarketing",
936 "direct_marketing_insurance_services",
937 "direct_marketing_other",
938 "direct_marketing_outbound_telemarketing",
939 "direct_marketing_subscription",
940 "direct_marketing_travel",
941 "discount_stores",
942 "doctors",
943 "door_to_door_sales",
944 "drapery_window_covering_and_upholstery_stores",
945 "drinking_places",
946 "drug_stores_and_pharmacies",
947 "drugs_drug_proprietaries_and_druggist_sundries",
948 "dry_cleaners",
949 "durable_goods",
950 "duty_free_stores",
951 "eating_places_restaurants",
952 "educational_services",
953 "electric_razor_stores",
954 "electric_vehicle_charging",
955 "electrical_parts_and_equipment",
956 "electrical_services",
957 "electronics_repair_shops",
958 "electronics_stores",
959 "elementary_secondary_schools",
960 "emergency_services_gcas_visa_use_only",
961 "employment_temp_agencies",
962 "equipment_rental",
963 "exterminating_services",
964 "family_clothing_stores",
965 "fast_food_restaurants",
966 "financial_institutions",
967 "fines_government_administrative_entities",
968 "fireplace_fireplace_screens_and_accessories_stores",
969 "floor_covering_stores",
970 "florists",
971 "florists_supplies_nursery_stock_and_flowers",
972 "freezer_and_locker_meat_provisioners",
973 "fuel_dealers_non_automotive",
974 "funeral_services_crematories",
975 "furniture_home_furnishings_and_equipment_stores_except_appliances",
976 "furniture_repair_refinishing",
977 "furriers_and_fur_shops",
978 "general_services",
979 "gift_card_novelty_and_souvenir_shops",
980 "glass_paint_and_wallpaper_stores",
981 "glassware_crystal_stores",
982 "golf_courses_public",
983 "government_licensed_horse_dog_racing_us_region_only",
984 "government_licensed_online_casions_online_gambling_us_region_only",
985 "government_owned_lotteries_non_us_region",
986 "government_owned_lotteries_us_region_only",
987 "government_services",
988 "grocery_stores_supermarkets",
989 "hardware_equipment_and_supplies",
990 "hardware_stores",
991 "health_and_beauty_spas",
992 "hearing_aids_sales_and_supplies",
993 "heating_plumbing_a_c",
994 "hobby_toy_and_game_shops",
995 "home_supply_warehouse_stores",
996 "hospitals",
997 "hotels_motels_and_resorts",
998 "household_appliance_stores",
999 "industrial_supplies",
1000 "information_retrieval_services",
1001 "insurance_default",
1002 "insurance_underwriting_premiums",
1003 "intra_company_purchases",
1004 "jewelry_stores_watches_clocks_and_silverware_stores",
1005 "landscaping_services",
1006 "laundries",
1007 "laundry_cleaning_services",
1008 "legal_services_attorneys",
1009 "luggage_and_leather_goods_stores",
1010 "lumber_building_materials_stores",
1011 "manual_cash_disburse",
1012 "marinas_service_and_supplies",
1013 "marketplaces",
1014 "masonry_stonework_and_plaster",
1015 "massage_parlors",
1016 "medical_and_dental_labs",
1017 "medical_dental_ophthalmic_and_hospital_equipment_and_supplies",
1018 "medical_services",
1019 "membership_organizations",
1020 "mens_and_boys_clothing_and_accessories_stores",
1021 "mens_womens_clothing_stores",
1022 "metal_service_centers",
1023 "miscellaneous",
1024 "miscellaneous_apparel_and_accessory_shops",
1025 "miscellaneous_auto_dealers",
1026 "miscellaneous_business_services",
1027 "miscellaneous_food_stores",
1028 "miscellaneous_general_merchandise",
1029 "miscellaneous_general_services",
1030 "miscellaneous_home_furnishing_specialty_stores",
1031 "miscellaneous_publishing_and_printing",
1032 "miscellaneous_recreation_services",
1033 "miscellaneous_repair_shops",
1034 "miscellaneous_specialty_retail",
1035 "mobile_home_dealers",
1036 "motion_picture_theaters",
1037 "motor_freight_carriers_and_trucking",
1038 "motor_homes_dealers",
1039 "motor_vehicle_supplies_and_new_parts",
1040 "motorcycle_shops_and_dealers",
1041 "motorcycle_shops_dealers",
1042 "music_stores_musical_instruments_pianos_and_sheet_music",
1043 "news_dealers_and_newsstands",
1044 "non_fi_money_orders",
1045 "non_fi_stored_value_card_purchase_load",
1046 "nondurable_goods",
1047 "nurseries_lawn_and_garden_supply_stores",
1048 "nursing_personal_care",
1049 "office_and_commercial_furniture",
1050 "opticians_eyeglasses",
1051 "optometrists_ophthalmologist",
1052 "orthopedic_goods_prosthetic_devices",
1053 "osteopaths",
1054 "package_stores_beer_wine_and_liquor",
1055 "paints_varnishes_and_supplies",
1056 "parking_lots_garages",
1057 "passenger_railways",
1058 "pawn_shops",
1059 "pet_shops_pet_food_and_supplies",
1060 "petroleum_and_petroleum_products",
1061 "photo_developing",
1062 "photographic_photocopy_microfilm_equipment_and_supplies",
1063 "photographic_studios",
1064 "picture_video_production",
1065 "piece_goods_notions_and_other_dry_goods",
1066 "plumbing_heating_equipment_and_supplies",
1067 "political_organizations",
1068 "postal_services_government_only",
1069 "precious_stones_and_metals_watches_and_jewelry",
1070 "professional_services",
1071 "public_warehousing_and_storage",
1072 "quick_copy_repro_and_blueprint",
1073 "railroads",
1074 "real_estate_agents_and_managers_rentals",
1075 "record_stores",
1076 "recreational_vehicle_rentals",
1077 "religious_goods_stores",
1078 "religious_organizations",
1079 "roofing_siding_sheet_metal",
1080 "secretarial_support_services",
1081 "security_brokers_dealers",
1082 "service_stations",
1083 "sewing_needlework_fabric_and_piece_goods_stores",
1084 "shoe_repair_hat_cleaning",
1085 "shoe_stores",
1086 "small_appliance_repair",
1087 "snowmobile_dealers",
1088 "special_trade_services",
1089 "specialty_cleaning",
1090 "sporting_goods_stores",
1091 "sporting_recreation_camps",
1092 "sports_and_riding_apparel_stores",
1093 "sports_clubs_fields",
1094 "stamp_and_coin_stores",
1095 "stationary_office_supplies_printing_and_writing_paper",
1096 "stationery_stores_office_and_school_supply_stores",
1097 "swimming_pools_sales",
1098 "t_ui_travel_germany",
1099 "tailors_alterations",
1100 "tax_payments_government_agencies",
1101 "tax_preparation_services",
1102 "taxicabs_limousines",
1103 "telecommunication_equipment_and_telephone_sales",
1104 "telecommunication_services",
1105 "telegraph_services",
1106 "tent_and_awning_shops",
1107 "testing_laboratories",
1108 "theatrical_ticket_agencies",
1109 "timeshares",
1110 "tire_retreading_and_repair",
1111 "tolls_bridge_fees",
1112 "tourist_attractions_and_exhibits",
1113 "towing_services",
1114 "trailer_parks_campgrounds",
1115 "transportation_services",
1116 "travel_agencies_tour_operators",
1117 "truck_stop_iteration",
1118 "truck_utility_trailer_rentals",
1119 "typesetting_plate_making_and_related_services",
1120 "typewriter_stores",
1121 "u_s_federal_government_agencies_or_departments",
1122 "uniforms_commercial_clothing",
1123 "used_merchandise_and_secondhand_stores",
1124 "utilities",
1125 "variety_stores",
1126 "veterinary_services",
1127 "video_amusement_game_supplies",
1128 "video_game_arcades",
1129 "video_tape_rental_stores",
1130 "vocational_trade_schools",
1131 "watch_jewelry_repair",
1132 "welding_repair",
1133 "wholesale_clubs",
1134 "wig_and_toupee_stores",
1135 "wires_money_orders",
1136 "womens_accessory_and_specialty_shops",
1137 "womens_ready_to_wear_stores",
1138 "wrecking_and_salvage_yards",
1139 ]
1140 ]
1141 ]
1142 """
1143 Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
1144 """
1145 blocked_merchant_countries: Optional[List[str]]
1146 """
1147 Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
1148 """
1149 spending_limits: Optional[List[SpendingLimit]]
1150 """
1151 Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
1152 """
1153 spending_limits_currency: Optional[str]
1154 """
1155 Currency of the amounts within `spending_limits`. Always the same as the currency of the card.
1156 """
1157 _inner_class_types = {"spending_limits": SpendingLimit}
1158
1159 class Wallets(StripeObject):
1160 class ApplePay(StripeObject):
1161 eligible: bool
1162 """
1163 Apple Pay Eligibility
1164 """
1165 ineligible_reason: Optional[
1166 Literal[
1167 "missing_agreement",
1168 "missing_cardholder_contact",
1169 "unsupported_region",
1170 ]
1171 ]
1172 """
1173 Reason the card is ineligible for Apple Pay
1174 """
1175
1176 class GooglePay(StripeObject):
1177 eligible: bool
1178 """
1179 Google Pay Eligibility
1180 """
1181 ineligible_reason: Optional[
1182 Literal[
1183 "missing_agreement",
1184 "missing_cardholder_contact",
1185 "unsupported_region",
1186 ]
1187 ]
1188 """
1189 Reason the card is ineligible for Google Pay
1190 """
1191
1192 apple_pay: ApplePay
1193 google_pay: GooglePay
1194 primary_account_identifier: Optional[str]
1195 """
1196 Unique identifier for a card used with digital wallets
1197 """
1198 _inner_class_types = {"apple_pay": ApplePay, "google_pay": GooglePay}
1199
1200 brand: str
1201 """
1202 The brand of the card.
1203 """
1204 cancellation_reason: Optional[Literal["design_rejected", "lost", "stolen"]]
1205 """
1206 The reason why the card was canceled.
1207 """
1208 cardholder: "Cardholder"
1209 """
1210 An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://docs.stripe.com/issuing) cards.
1211
1212 Related guide: [How to create a cardholder](https://docs.stripe.com/issuing/cards/virtual/issue-cards#create-cardholder)
1213 """
1214 created: int
1215 """
1216 Time at which the object was created. Measured in seconds since the Unix epoch.
1217 """
1218 currency: str
1219 """
1220 Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK.
1221 """
1222 cvc: Optional[str]
1223 """
1224 The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://docs.stripe.com/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://docs.stripe.com/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
1225 """
1226 exp_month: int
1227 """
1228 The expiration month of the card.
1229 """
1230 exp_year: int
1231 """
1232 The expiration year of the card.
1233 """
1234 financial_account: Optional[str]
1235 """
1236 The financial account this card is attached to.
1237 """
1238 id: str
1239 """
1240 Unique identifier for the object.
1241 """
1242 last4: str
1243 """
1244 The last 4 digits of the card number.
1245 """
1246 latest_fraud_warning: Optional[LatestFraudWarning]
1247 """
1248 Stripe's assessment of whether this card's details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk.
1249 """
1250 livemode: bool
1251 """
1252 Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
1253 """
1254 metadata: Dict[str, str]
1255 """
1256 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
1257 """
1258 number: Optional[str]
1259 """
1260 The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://docs.stripe.com/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://docs.stripe.com/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
1261 """
1262 object: Literal["issuing.card"]
1263 """
1264 String representing the object's type. Objects of the same type share the same value.
1265 """
1266 personalization_design: Optional[ExpandableField["PersonalizationDesign"]]
1267 """
1268 The personalization design object belonging to this card.
1269 """
1270 replaced_by: Optional[ExpandableField["Card"]]
1271 """
1272 The latest card that replaces this card, if any.
1273 """
1274 replacement_for: Optional[ExpandableField["Card"]]
1275 """
1276 The card this card replaces, if any.
1277 """
1278 replacement_reason: Optional[
1279 Literal["damaged", "expired", "lost", "stolen"]
1280 ]
1281 """
1282 The reason why the previous card needed to be replaced.
1283 """
1284 second_line: Optional[str]
1285 """
1286 Text separate from cardholder name, printed on the card.
1287 """
1288 shipping: Optional[Shipping]
1289 """
1290 Where and how the card will be shipped.
1291 """
1292 spending_controls: SpendingControls
1293 status: Literal["active", "canceled", "inactive"]
1294 """
1295 Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
1296 """
1297 type: Literal["physical", "virtual"]
1298 """
1299 The type of the card.
1300 """
1301 wallets: Optional[Wallets]
1302 """
1303 Information relating to digital wallets (like Apple Pay and Google Pay).
1304 """
1305
1306 @classmethod
1307 def create(cls, **params: Unpack["CardCreateParams"]) -> "Card":
1308 """
1309 Creates an Issuing Card object.
1310 """
1311 return cast(
1312 "Card",
1313 cls._static_request(
1314 "post",
1315 cls.class_url(),
1316 params=params,
1317 ),
1318 )
1319
1320 @classmethod
1321 async def create_async(
1322 cls, **params: Unpack["CardCreateParams"]
1323 ) -> "Card":
1324 """
1325 Creates an Issuing Card object.
1326 """
1327 return cast(
1328 "Card",
1329 await cls._static_request_async(
1330 "post",
1331 cls.class_url(),
1332 params=params,
1333 ),
1334 )
1335
1336 @classmethod
1337 def list(cls, **params: Unpack["CardListParams"]) -> ListObject["Card"]:
1338 """
1339 Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
1340 """
1341 result = cls._static_request(
1342 "get",
1343 cls.class_url(),
1344 params=params,
1345 )
1346 if not isinstance(result, ListObject):
1347 raise TypeError(
1348 "Expected list object from API, got %s"
1349 % (type(result).__name__)
1350 )
1351
1352 return result
1353
1354 @classmethod
1355 async def list_async(
1356 cls, **params: Unpack["CardListParams"]
1357 ) -> ListObject["Card"]:
1358 """
1359 Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
1360 """
1361 result = await cls._static_request_async(
1362 "get",
1363 cls.class_url(),
1364 params=params,
1365 )
1366 if not isinstance(result, ListObject):
1367 raise TypeError(
1368 "Expected list object from API, got %s"
1369 % (type(result).__name__)
1370 )
1371
1372 return result
1373
1374 @classmethod
1375 def modify(cls, id: str, **params: Unpack["CardModifyParams"]) -> "Card":
1376 """
1377 Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1378 """
1379 url = "%s/%s" % (cls.class_url(), sanitize_id(id))
1380 return cast(
1381 "Card",
1382 cls._static_request(
1383 "post",
1384 url,
1385 params=params,
1386 ),
1387 )
1388
1389 @classmethod
1390 async def modify_async(
1391 cls, id: str, **params: Unpack["CardModifyParams"]
1392 ) -> "Card":
1393 """
1394 Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1395 """
1396 url = "%s/%s" % (cls.class_url(), sanitize_id(id))
1397 return cast(
1398 "Card",
1399 await cls._static_request_async(
1400 "post",
1401 url,
1402 params=params,
1403 ),
1404 )
1405
1406 @classmethod
1407 def retrieve(
1408 cls, id: str, **params: Unpack["CardRetrieveParams"]
1409 ) -> "Card":
1410 """
1411 Retrieves an Issuing Card object.
1412 """
1413 instance = cls(id, **params)
1414 instance.refresh()
1415 return instance
1416
1417 @classmethod
1418 async def retrieve_async(
1419 cls, id: str, **params: Unpack["CardRetrieveParams"]
1420 ) -> "Card":
1421 """
1422 Retrieves an Issuing Card object.
1423 """
1424 instance = cls(id, **params)
1425 await instance.refresh_async()
1426 return instance
1427
1428 class TestHelpers(APIResourceTestHelpers["Card"]):
1429 _resource_cls: Type["Card"]
1430
1431 @classmethod
1432 def _cls_deliver_card(
1433 cls, card: str, **params: Unpack["CardDeliverCardParams"]
1434 ) -> "Card":
1435 """
1436 Updates the shipping status of the specified Issuing Card object to delivered.
1437 """
1438 return cast(
1439 "Card",
1440 cls._static_request(
1441 "post",
1442 "/v1/test_helpers/issuing/cards/{card}/shipping/deliver".format(
1443 card=sanitize_id(card)
1444 ),
1445 params=params,
1446 ),
1447 )
1448
1449 @overload
1450 @staticmethod
1451 def deliver_card(
1452 card: str, **params: Unpack["CardDeliverCardParams"]
1453 ) -> "Card":
1454 """
1455 Updates the shipping status of the specified Issuing Card object to delivered.
1456 """
1457 ...
1458
1459 @overload
1460 def deliver_card(
1461 self, **params: Unpack["CardDeliverCardParams"]
1462 ) -> "Card":
1463 """
1464 Updates the shipping status of the specified Issuing Card object to delivered.
1465 """
1466 ...
1467
1468 @class_method_variant("_cls_deliver_card")
1469 def deliver_card( # pyright: ignore[reportGeneralTypeIssues]
1470 self, **params: Unpack["CardDeliverCardParams"]
1471 ) -> "Card":
1472 """
1473 Updates the shipping status of the specified Issuing Card object to delivered.
1474 """
1475 return cast(
1476 "Card",
1477 self.resource._request(
1478 "post",
1479 "/v1/test_helpers/issuing/cards/{card}/shipping/deliver".format(
1480 card=sanitize_id(self.resource.get("id"))
1481 ),
1482 params=params,
1483 ),
1484 )
1485
1486 @classmethod
1487 async def _cls_deliver_card_async(
1488 cls, card: str, **params: Unpack["CardDeliverCardParams"]
1489 ) -> "Card":
1490 """
1491 Updates the shipping status of the specified Issuing Card object to delivered.
1492 """
1493 return cast(
1494 "Card",
1495 await cls._static_request_async(
1496 "post",
1497 "/v1/test_helpers/issuing/cards/{card}/shipping/deliver".format(
1498 card=sanitize_id(card)
1499 ),
1500 params=params,
1501 ),
1502 )
1503
1504 @overload
1505 @staticmethod
1506 async def deliver_card_async(
1507 card: str, **params: Unpack["CardDeliverCardParams"]
1508 ) -> "Card":
1509 """
1510 Updates the shipping status of the specified Issuing Card object to delivered.
1511 """
1512 ...
1513
1514 @overload
1515 async def deliver_card_async(
1516 self, **params: Unpack["CardDeliverCardParams"]
1517 ) -> "Card":
1518 """
1519 Updates the shipping status of the specified Issuing Card object to delivered.
1520 """
1521 ...
1522
1523 @class_method_variant("_cls_deliver_card_async")
1524 async def deliver_card_async( # pyright: ignore[reportGeneralTypeIssues]
1525 self, **params: Unpack["CardDeliverCardParams"]
1526 ) -> "Card":
1527 """
1528 Updates the shipping status of the specified Issuing Card object to delivered.
1529 """
1530 return cast(
1531 "Card",
1532 await self.resource._request_async(
1533 "post",
1534 "/v1/test_helpers/issuing/cards/{card}/shipping/deliver".format(
1535 card=sanitize_id(self.resource.get("id"))
1536 ),
1537 params=params,
1538 ),
1539 )
1540
1541 @classmethod
1542 def _cls_fail_card(
1543 cls, card: str, **params: Unpack["CardFailCardParams"]
1544 ) -> "Card":
1545 """
1546 Updates the shipping status of the specified Issuing Card object to failure.
1547 """
1548 return cast(
1549 "Card",
1550 cls._static_request(
1551 "post",
1552 "/v1/test_helpers/issuing/cards/{card}/shipping/fail".format(
1553 card=sanitize_id(card)
1554 ),
1555 params=params,
1556 ),
1557 )
1558
1559 @overload
1560 @staticmethod
1561 def fail_card(
1562 card: str, **params: Unpack["CardFailCardParams"]
1563 ) -> "Card":
1564 """
1565 Updates the shipping status of the specified Issuing Card object to failure.
1566 """
1567 ...
1568
1569 @overload
1570 def fail_card(self, **params: Unpack["CardFailCardParams"]) -> "Card":
1571 """
1572 Updates the shipping status of the specified Issuing Card object to failure.
1573 """
1574 ...
1575
1576 @class_method_variant("_cls_fail_card")
1577 def fail_card( # pyright: ignore[reportGeneralTypeIssues]
1578 self, **params: Unpack["CardFailCardParams"]
1579 ) -> "Card":
1580 """
1581 Updates the shipping status of the specified Issuing Card object to failure.
1582 """
1583 return cast(
1584 "Card",
1585 self.resource._request(
1586 "post",
1587 "/v1/test_helpers/issuing/cards/{card}/shipping/fail".format(
1588 card=sanitize_id(self.resource.get("id"))
1589 ),
1590 params=params,
1591 ),
1592 )
1593
1594 @classmethod
1595 async def _cls_fail_card_async(
1596 cls, card: str, **params: Unpack["CardFailCardParams"]
1597 ) -> "Card":
1598 """
1599 Updates the shipping status of the specified Issuing Card object to failure.
1600 """
1601 return cast(
1602 "Card",
1603 await cls._static_request_async(
1604 "post",
1605 "/v1/test_helpers/issuing/cards/{card}/shipping/fail".format(
1606 card=sanitize_id(card)
1607 ),
1608 params=params,
1609 ),
1610 )
1611
1612 @overload
1613 @staticmethod
1614 async def fail_card_async(
1615 card: str, **params: Unpack["CardFailCardParams"]
1616 ) -> "Card":
1617 """
1618 Updates the shipping status of the specified Issuing Card object to failure.
1619 """
1620 ...
1621
1622 @overload
1623 async def fail_card_async(
1624 self, **params: Unpack["CardFailCardParams"]
1625 ) -> "Card":
1626 """
1627 Updates the shipping status of the specified Issuing Card object to failure.
1628 """
1629 ...
1630
1631 @class_method_variant("_cls_fail_card_async")
1632 async def fail_card_async( # pyright: ignore[reportGeneralTypeIssues]
1633 self, **params: Unpack["CardFailCardParams"]
1634 ) -> "Card":
1635 """
1636 Updates the shipping status of the specified Issuing Card object to failure.
1637 """
1638 return cast(
1639 "Card",
1640 await self.resource._request_async(
1641 "post",
1642 "/v1/test_helpers/issuing/cards/{card}/shipping/fail".format(
1643 card=sanitize_id(self.resource.get("id"))
1644 ),
1645 params=params,
1646 ),
1647 )
1648
1649 @classmethod
1650 def _cls_return_card(
1651 cls, card: str, **params: Unpack["CardReturnCardParams"]
1652 ) -> "Card":
1653 """
1654 Updates the shipping status of the specified Issuing Card object to returned.
1655 """
1656 return cast(
1657 "Card",
1658 cls._static_request(
1659 "post",
1660 "/v1/test_helpers/issuing/cards/{card}/shipping/return".format(
1661 card=sanitize_id(card)
1662 ),
1663 params=params,
1664 ),
1665 )
1666
1667 @overload
1668 @staticmethod
1669 def return_card(
1670 card: str, **params: Unpack["CardReturnCardParams"]
1671 ) -> "Card":
1672 """
1673 Updates the shipping status of the specified Issuing Card object to returned.
1674 """
1675 ...
1676
1677 @overload
1678 def return_card(
1679 self, **params: Unpack["CardReturnCardParams"]
1680 ) -> "Card":
1681 """
1682 Updates the shipping status of the specified Issuing Card object to returned.
1683 """
1684 ...
1685
1686 @class_method_variant("_cls_return_card")
1687 def return_card( # pyright: ignore[reportGeneralTypeIssues]
1688 self, **params: Unpack["CardReturnCardParams"]
1689 ) -> "Card":
1690 """
1691 Updates the shipping status of the specified Issuing Card object to returned.
1692 """
1693 return cast(
1694 "Card",
1695 self.resource._request(
1696 "post",
1697 "/v1/test_helpers/issuing/cards/{card}/shipping/return".format(
1698 card=sanitize_id(self.resource.get("id"))
1699 ),
1700 params=params,
1701 ),
1702 )
1703
1704 @classmethod
1705 async def _cls_return_card_async(
1706 cls, card: str, **params: Unpack["CardReturnCardParams"]
1707 ) -> "Card":
1708 """
1709 Updates the shipping status of the specified Issuing Card object to returned.
1710 """
1711 return cast(
1712 "Card",
1713 await cls._static_request_async(
1714 "post",
1715 "/v1/test_helpers/issuing/cards/{card}/shipping/return".format(
1716 card=sanitize_id(card)
1717 ),
1718 params=params,
1719 ),
1720 )
1721
1722 @overload
1723 @staticmethod
1724 async def return_card_async(
1725 card: str, **params: Unpack["CardReturnCardParams"]
1726 ) -> "Card":
1727 """
1728 Updates the shipping status of the specified Issuing Card object to returned.
1729 """
1730 ...
1731
1732 @overload
1733 async def return_card_async(
1734 self, **params: Unpack["CardReturnCardParams"]
1735 ) -> "Card":
1736 """
1737 Updates the shipping status of the specified Issuing Card object to returned.
1738 """
1739 ...
1740
1741 @class_method_variant("_cls_return_card_async")
1742 async def return_card_async( # pyright: ignore[reportGeneralTypeIssues]
1743 self, **params: Unpack["CardReturnCardParams"]
1744 ) -> "Card":
1745 """
1746 Updates the shipping status of the specified Issuing Card object to returned.
1747 """
1748 return cast(
1749 "Card",
1750 await self.resource._request_async(
1751 "post",
1752 "/v1/test_helpers/issuing/cards/{card}/shipping/return".format(
1753 card=sanitize_id(self.resource.get("id"))
1754 ),
1755 params=params,
1756 ),
1757 )
1758
1759 @classmethod
1760 def _cls_ship_card(
1761 cls, card: str, **params: Unpack["CardShipCardParams"]
1762 ) -> "Card":
1763 """
1764 Updates the shipping status of the specified Issuing Card object to shipped.
1765 """
1766 return cast(
1767 "Card",
1768 cls._static_request(
1769 "post",
1770 "/v1/test_helpers/issuing/cards/{card}/shipping/ship".format(
1771 card=sanitize_id(card)
1772 ),
1773 params=params,
1774 ),
1775 )
1776
1777 @overload
1778 @staticmethod
1779 def ship_card(
1780 card: str, **params: Unpack["CardShipCardParams"]
1781 ) -> "Card":
1782 """
1783 Updates the shipping status of the specified Issuing Card object to shipped.
1784 """
1785 ...
1786
1787 @overload
1788 def ship_card(self, **params: Unpack["CardShipCardParams"]) -> "Card":
1789 """
1790 Updates the shipping status of the specified Issuing Card object to shipped.
1791 """
1792 ...
1793
1794 @class_method_variant("_cls_ship_card")
1795 def ship_card( # pyright: ignore[reportGeneralTypeIssues]
1796 self, **params: Unpack["CardShipCardParams"]
1797 ) -> "Card":
1798 """
1799 Updates the shipping status of the specified Issuing Card object to shipped.
1800 """
1801 return cast(
1802 "Card",
1803 self.resource._request(
1804 "post",
1805 "/v1/test_helpers/issuing/cards/{card}/shipping/ship".format(
1806 card=sanitize_id(self.resource.get("id"))
1807 ),
1808 params=params,
1809 ),
1810 )
1811
1812 @classmethod
1813 async def _cls_ship_card_async(
1814 cls, card: str, **params: Unpack["CardShipCardParams"]
1815 ) -> "Card":
1816 """
1817 Updates the shipping status of the specified Issuing Card object to shipped.
1818 """
1819 return cast(
1820 "Card",
1821 await cls._static_request_async(
1822 "post",
1823 "/v1/test_helpers/issuing/cards/{card}/shipping/ship".format(
1824 card=sanitize_id(card)
1825 ),
1826 params=params,
1827 ),
1828 )
1829
1830 @overload
1831 @staticmethod
1832 async def ship_card_async(
1833 card: str, **params: Unpack["CardShipCardParams"]
1834 ) -> "Card":
1835 """
1836 Updates the shipping status of the specified Issuing Card object to shipped.
1837 """
1838 ...
1839
1840 @overload
1841 async def ship_card_async(
1842 self, **params: Unpack["CardShipCardParams"]
1843 ) -> "Card":
1844 """
1845 Updates the shipping status of the specified Issuing Card object to shipped.
1846 """
1847 ...
1848
1849 @class_method_variant("_cls_ship_card_async")
1850 async def ship_card_async( # pyright: ignore[reportGeneralTypeIssues]
1851 self, **params: Unpack["CardShipCardParams"]
1852 ) -> "Card":
1853 """
1854 Updates the shipping status of the specified Issuing Card object to shipped.
1855 """
1856 return cast(
1857 "Card",
1858 await self.resource._request_async(
1859 "post",
1860 "/v1/test_helpers/issuing/cards/{card}/shipping/ship".format(
1861 card=sanitize_id(self.resource.get("id"))
1862 ),
1863 params=params,
1864 ),
1865 )
1866
1867 @classmethod
1868 def _cls_submit_card(
1869 cls, card: str, **params: Unpack["CardSubmitCardParams"]
1870 ) -> "Card":
1871 """
1872 Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
1873 """
1874 return cast(
1875 "Card",
1876 cls._static_request(
1877 "post",
1878 "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format(
1879 card=sanitize_id(card)
1880 ),
1881 params=params,
1882 ),
1883 )
1884
1885 @overload
1886 @staticmethod
1887 def submit_card(
1888 card: str, **params: Unpack["CardSubmitCardParams"]
1889 ) -> "Card":
1890 """
1891 Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
1892 """
1893 ...
1894
1895 @overload
1896 def submit_card(
1897 self, **params: Unpack["CardSubmitCardParams"]
1898 ) -> "Card":
1899 """
1900 Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
1901 """
1902 ...
1903
1904 @class_method_variant("_cls_submit_card")
1905 def submit_card( # pyright: ignore[reportGeneralTypeIssues]
1906 self, **params: Unpack["CardSubmitCardParams"]
1907 ) -> "Card":
1908 """
1909 Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
1910 """
1911 return cast(
1912 "Card",
1913 self.resource._request(
1914 "post",
1915 "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format(
1916 card=sanitize_id(self.resource.get("id"))
1917 ),
1918 params=params,
1919 ),
1920 )
1921
1922 @classmethod
1923 async def _cls_submit_card_async(
1924 cls, card: str, **params: Unpack["CardSubmitCardParams"]
1925 ) -> "Card":
1926 """
1927 Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
1928 """
1929 return cast(
1930 "Card",
1931 await cls._static_request_async(
1932 "post",
1933 "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format(
1934 card=sanitize_id(card)
1935 ),
1936 params=params,
1937 ),
1938 )
1939
1940 @overload
1941 @staticmethod
1942 async def submit_card_async(
1943 card: str, **params: Unpack["CardSubmitCardParams"]
1944 ) -> "Card":
1945 """
1946 Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
1947 """
1948 ...
1949
1950 @overload
1951 async def submit_card_async(
1952 self, **params: Unpack["CardSubmitCardParams"]
1953 ) -> "Card":
1954 """
1955 Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
1956 """
1957 ...
1958
1959 @class_method_variant("_cls_submit_card_async")
1960 async def submit_card_async( # pyright: ignore[reportGeneralTypeIssues]
1961 self, **params: Unpack["CardSubmitCardParams"]
1962 ) -> "Card":
1963 """
1964 Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
1965 """
1966 return cast(
1967 "Card",
1968 await self.resource._request_async(
1969 "post",
1970 "/v1/test_helpers/issuing/cards/{card}/shipping/submit".format(
1971 card=sanitize_id(self.resource.get("id"))
1972 ),
1973 params=params,
1974 ),
1975 )
1976
1977 @property
1978 def test_helpers(self):
1979 return self.TestHelpers(self)
1980
1981 _inner_class_types = {
1982 "latest_fraud_warning": LatestFraudWarning,
1983 "shipping": Shipping,
1984 "spending_controls": SpendingControls,
1985 "wallets": Wallets,
1986 }
1987
1988
1989 Card.TestHelpers._resource_cls = Card