1#[derive(Clone, Debug)]
9#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
10pub struct Card {
11 pub account: Option<stripe_types::Expandable<stripe_shared::Account>>,
12 pub address_city: Option<String>,
14 pub address_country: Option<String>,
16 pub address_line1: Option<String>,
18 pub address_line1_check: Option<String>,
20 pub address_line2: Option<String>,
22 pub address_state: Option<String>,
24 pub address_zip: Option<String>,
26 pub address_zip_check: Option<String>,
28 pub allow_redisplay: Option<CardAllowRedisplay>,
32 pub available_payout_methods: Option<Vec<CardAvailablePayoutMethods>>,
35 pub brand: String,
38 pub country: Option<String>,
41 pub currency: Option<stripe_types::Currency>,
47 pub customer: Option<stripe_types::Expandable<stripe_shared::Customer>>,
50 pub cvc_check: Option<String>,
55 pub default_for_currency: Option<bool>,
58 pub description: Option<String>,
61 pub dynamic_last4: Option<String>,
63 pub exp_month: i64,
65 pub exp_year: i64,
67 pub fingerprint: Option<String>,
73 pub funding: String,
75 pub id: stripe_shared::CardId,
77 pub iin: Option<String>,
80 pub issuer: Option<String>,
83 pub last4: String,
85 pub metadata: Option<std::collections::HashMap<String, String>>,
88 pub name: Option<String>,
90 pub networks: Option<stripe_shared::TokenCardNetworks>,
91 pub regulated_status: Option<CardRegulatedStatus>,
93 pub status: Option<String>,
96 pub tokenization_method: Option<String>,
99}
100#[doc(hidden)]
101pub struct CardBuilder {
102 account: Option<Option<stripe_types::Expandable<stripe_shared::Account>>>,
103 address_city: Option<Option<String>>,
104 address_country: Option<Option<String>>,
105 address_line1: Option<Option<String>>,
106 address_line1_check: Option<Option<String>>,
107 address_line2: Option<Option<String>>,
108 address_state: Option<Option<String>>,
109 address_zip: Option<Option<String>>,
110 address_zip_check: Option<Option<String>>,
111 allow_redisplay: Option<Option<CardAllowRedisplay>>,
112 available_payout_methods: Option<Option<Vec<CardAvailablePayoutMethods>>>,
113 brand: Option<String>,
114 country: Option<Option<String>>,
115 currency: Option<Option<stripe_types::Currency>>,
116 customer: Option<Option<stripe_types::Expandable<stripe_shared::Customer>>>,
117 cvc_check: Option<Option<String>>,
118 default_for_currency: Option<Option<bool>>,
119 description: Option<Option<String>>,
120 dynamic_last4: Option<Option<String>>,
121 exp_month: Option<i64>,
122 exp_year: Option<i64>,
123 fingerprint: Option<Option<String>>,
124 funding: Option<String>,
125 id: Option<stripe_shared::CardId>,
126 iin: Option<Option<String>>,
127 issuer: Option<Option<String>>,
128 last4: Option<String>,
129 metadata: Option<Option<std::collections::HashMap<String, String>>>,
130 name: Option<Option<String>>,
131 networks: Option<Option<stripe_shared::TokenCardNetworks>>,
132 regulated_status: Option<Option<CardRegulatedStatus>>,
133 status: Option<Option<String>>,
134 tokenization_method: Option<Option<String>>,
135}
136
137#[allow(
138 unused_variables,
139 irrefutable_let_patterns,
140 clippy::let_unit_value,
141 clippy::match_single_binding,
142 clippy::single_match
143)]
144const _: () = {
145 use miniserde::de::{Map, Visitor};
146 use miniserde::json::Value;
147 use miniserde::{Deserialize, Result, make_place};
148 use stripe_types::miniserde_helpers::FromValueOpt;
149 use stripe_types::{MapBuilder, ObjectDeser};
150
151 make_place!(Place);
152
153 impl Deserialize for Card {
154 fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
155 Place::new(out)
156 }
157 }
158
159 struct Builder<'a> {
160 out: &'a mut Option<Card>,
161 builder: CardBuilder,
162 }
163
164 impl Visitor for Place<Card> {
165 fn map(&mut self) -> Result<Box<dyn Map + '_>> {
166 Ok(Box::new(Builder { out: &mut self.out, builder: CardBuilder::deser_default() }))
167 }
168 }
169
170 impl MapBuilder for CardBuilder {
171 type Out = Card;
172 fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
173 Ok(match k {
174 "account" => Deserialize::begin(&mut self.account),
175 "address_city" => Deserialize::begin(&mut self.address_city),
176 "address_country" => Deserialize::begin(&mut self.address_country),
177 "address_line1" => Deserialize::begin(&mut self.address_line1),
178 "address_line1_check" => Deserialize::begin(&mut self.address_line1_check),
179 "address_line2" => Deserialize::begin(&mut self.address_line2),
180 "address_state" => Deserialize::begin(&mut self.address_state),
181 "address_zip" => Deserialize::begin(&mut self.address_zip),
182 "address_zip_check" => Deserialize::begin(&mut self.address_zip_check),
183 "allow_redisplay" => Deserialize::begin(&mut self.allow_redisplay),
184 "available_payout_methods" => {
185 Deserialize::begin(&mut self.available_payout_methods)
186 }
187 "brand" => Deserialize::begin(&mut self.brand),
188 "country" => Deserialize::begin(&mut self.country),
189 "currency" => Deserialize::begin(&mut self.currency),
190 "customer" => Deserialize::begin(&mut self.customer),
191 "cvc_check" => Deserialize::begin(&mut self.cvc_check),
192 "default_for_currency" => Deserialize::begin(&mut self.default_for_currency),
193 "description" => Deserialize::begin(&mut self.description),
194 "dynamic_last4" => Deserialize::begin(&mut self.dynamic_last4),
195 "exp_month" => Deserialize::begin(&mut self.exp_month),
196 "exp_year" => Deserialize::begin(&mut self.exp_year),
197 "fingerprint" => Deserialize::begin(&mut self.fingerprint),
198 "funding" => Deserialize::begin(&mut self.funding),
199 "id" => Deserialize::begin(&mut self.id),
200 "iin" => Deserialize::begin(&mut self.iin),
201 "issuer" => Deserialize::begin(&mut self.issuer),
202 "last4" => Deserialize::begin(&mut self.last4),
203 "metadata" => Deserialize::begin(&mut self.metadata),
204 "name" => Deserialize::begin(&mut self.name),
205 "networks" => Deserialize::begin(&mut self.networks),
206 "regulated_status" => Deserialize::begin(&mut self.regulated_status),
207 "status" => Deserialize::begin(&mut self.status),
208 "tokenization_method" => Deserialize::begin(&mut self.tokenization_method),
209 _ => <dyn Visitor>::ignore(),
210 })
211 }
212
213 fn deser_default() -> Self {
214 Self {
215 account: Deserialize::default(),
216 address_city: Deserialize::default(),
217 address_country: Deserialize::default(),
218 address_line1: Deserialize::default(),
219 address_line1_check: Deserialize::default(),
220 address_line2: Deserialize::default(),
221 address_state: Deserialize::default(),
222 address_zip: Deserialize::default(),
223 address_zip_check: Deserialize::default(),
224 allow_redisplay: Deserialize::default(),
225 available_payout_methods: Deserialize::default(),
226 brand: Deserialize::default(),
227 country: Deserialize::default(),
228 currency: Deserialize::default(),
229 customer: Deserialize::default(),
230 cvc_check: Deserialize::default(),
231 default_for_currency: Deserialize::default(),
232 description: Deserialize::default(),
233 dynamic_last4: Deserialize::default(),
234 exp_month: Deserialize::default(),
235 exp_year: Deserialize::default(),
236 fingerprint: Deserialize::default(),
237 funding: Deserialize::default(),
238 id: Deserialize::default(),
239 iin: Deserialize::default(),
240 issuer: Deserialize::default(),
241 last4: Deserialize::default(),
242 metadata: Deserialize::default(),
243 name: Deserialize::default(),
244 networks: Deserialize::default(),
245 regulated_status: Deserialize::default(),
246 status: Deserialize::default(),
247 tokenization_method: Deserialize::default(),
248 }
249 }
250
251 fn take_out(&mut self) -> Option<Self::Out> {
252 let (
253 Some(account),
254 Some(address_city),
255 Some(address_country),
256 Some(address_line1),
257 Some(address_line1_check),
258 Some(address_line2),
259 Some(address_state),
260 Some(address_zip),
261 Some(address_zip_check),
262 Some(allow_redisplay),
263 Some(available_payout_methods),
264 Some(brand),
265 Some(country),
266 Some(currency),
267 Some(customer),
268 Some(cvc_check),
269 Some(default_for_currency),
270 Some(description),
271 Some(dynamic_last4),
272 Some(exp_month),
273 Some(exp_year),
274 Some(fingerprint),
275 Some(funding),
276 Some(id),
277 Some(iin),
278 Some(issuer),
279 Some(last4),
280 Some(metadata),
281 Some(name),
282 Some(networks),
283 Some(regulated_status),
284 Some(status),
285 Some(tokenization_method),
286 ) = (
287 self.account.take(),
288 self.address_city.take(),
289 self.address_country.take(),
290 self.address_line1.take(),
291 self.address_line1_check.take(),
292 self.address_line2.take(),
293 self.address_state.take(),
294 self.address_zip.take(),
295 self.address_zip_check.take(),
296 self.allow_redisplay.take(),
297 self.available_payout_methods.take(),
298 self.brand.take(),
299 self.country.take(),
300 self.currency.take(),
301 self.customer.take(),
302 self.cvc_check.take(),
303 self.default_for_currency,
304 self.description.take(),
305 self.dynamic_last4.take(),
306 self.exp_month,
307 self.exp_year,
308 self.fingerprint.take(),
309 self.funding.take(),
310 self.id.take(),
311 self.iin.take(),
312 self.issuer.take(),
313 self.last4.take(),
314 self.metadata.take(),
315 self.name.take(),
316 self.networks.take(),
317 self.regulated_status.take(),
318 self.status.take(),
319 self.tokenization_method.take(),
320 )
321 else {
322 return None;
323 };
324 Some(Self::Out {
325 account,
326 address_city,
327 address_country,
328 address_line1,
329 address_line1_check,
330 address_line2,
331 address_state,
332 address_zip,
333 address_zip_check,
334 allow_redisplay,
335 available_payout_methods,
336 brand,
337 country,
338 currency,
339 customer,
340 cvc_check,
341 default_for_currency,
342 description,
343 dynamic_last4,
344 exp_month,
345 exp_year,
346 fingerprint,
347 funding,
348 id,
349 iin,
350 issuer,
351 last4,
352 metadata,
353 name,
354 networks,
355 regulated_status,
356 status,
357 tokenization_method,
358 })
359 }
360 }
361
362 impl Map for Builder<'_> {
363 fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
364 self.builder.key(k)
365 }
366
367 fn finish(&mut self) -> Result<()> {
368 *self.out = self.builder.take_out();
369 Ok(())
370 }
371 }
372
373 impl ObjectDeser for Card {
374 type Builder = CardBuilder;
375 }
376
377 impl FromValueOpt for Card {
378 fn from_value(v: Value) -> Option<Self> {
379 let Value::Object(obj) = v else {
380 return None;
381 };
382 let mut b = CardBuilder::deser_default();
383 for (k, v) in obj {
384 match k.as_str() {
385 "account" => b.account = FromValueOpt::from_value(v),
386 "address_city" => b.address_city = FromValueOpt::from_value(v),
387 "address_country" => b.address_country = FromValueOpt::from_value(v),
388 "address_line1" => b.address_line1 = FromValueOpt::from_value(v),
389 "address_line1_check" => b.address_line1_check = FromValueOpt::from_value(v),
390 "address_line2" => b.address_line2 = FromValueOpt::from_value(v),
391 "address_state" => b.address_state = FromValueOpt::from_value(v),
392 "address_zip" => b.address_zip = FromValueOpt::from_value(v),
393 "address_zip_check" => b.address_zip_check = FromValueOpt::from_value(v),
394 "allow_redisplay" => b.allow_redisplay = FromValueOpt::from_value(v),
395 "available_payout_methods" => {
396 b.available_payout_methods = FromValueOpt::from_value(v)
397 }
398 "brand" => b.brand = FromValueOpt::from_value(v),
399 "country" => b.country = FromValueOpt::from_value(v),
400 "currency" => b.currency = FromValueOpt::from_value(v),
401 "customer" => b.customer = FromValueOpt::from_value(v),
402 "cvc_check" => b.cvc_check = FromValueOpt::from_value(v),
403 "default_for_currency" => b.default_for_currency = FromValueOpt::from_value(v),
404 "description" => b.description = FromValueOpt::from_value(v),
405 "dynamic_last4" => b.dynamic_last4 = FromValueOpt::from_value(v),
406 "exp_month" => b.exp_month = FromValueOpt::from_value(v),
407 "exp_year" => b.exp_year = FromValueOpt::from_value(v),
408 "fingerprint" => b.fingerprint = FromValueOpt::from_value(v),
409 "funding" => b.funding = FromValueOpt::from_value(v),
410 "id" => b.id = FromValueOpt::from_value(v),
411 "iin" => b.iin = FromValueOpt::from_value(v),
412 "issuer" => b.issuer = FromValueOpt::from_value(v),
413 "last4" => b.last4 = FromValueOpt::from_value(v),
414 "metadata" => b.metadata = FromValueOpt::from_value(v),
415 "name" => b.name = FromValueOpt::from_value(v),
416 "networks" => b.networks = FromValueOpt::from_value(v),
417 "regulated_status" => b.regulated_status = FromValueOpt::from_value(v),
418 "status" => b.status = FromValueOpt::from_value(v),
419 "tokenization_method" => b.tokenization_method = FromValueOpt::from_value(v),
420 _ => {}
421 }
422 }
423 b.take_out()
424 }
425 }
426};
427#[cfg(feature = "serialize")]
428impl serde::Serialize for Card {
429 fn serialize<S: serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
430 use serde::ser::SerializeStruct;
431 let mut s = s.serialize_struct("Card", 34)?;
432 s.serialize_field("account", &self.account)?;
433 s.serialize_field("address_city", &self.address_city)?;
434 s.serialize_field("address_country", &self.address_country)?;
435 s.serialize_field("address_line1", &self.address_line1)?;
436 s.serialize_field("address_line1_check", &self.address_line1_check)?;
437 s.serialize_field("address_line2", &self.address_line2)?;
438 s.serialize_field("address_state", &self.address_state)?;
439 s.serialize_field("address_zip", &self.address_zip)?;
440 s.serialize_field("address_zip_check", &self.address_zip_check)?;
441 s.serialize_field("allow_redisplay", &self.allow_redisplay)?;
442 s.serialize_field("available_payout_methods", &self.available_payout_methods)?;
443 s.serialize_field("brand", &self.brand)?;
444 s.serialize_field("country", &self.country)?;
445 s.serialize_field("currency", &self.currency)?;
446 s.serialize_field("customer", &self.customer)?;
447 s.serialize_field("cvc_check", &self.cvc_check)?;
448 s.serialize_field("default_for_currency", &self.default_for_currency)?;
449 s.serialize_field("description", &self.description)?;
450 s.serialize_field("dynamic_last4", &self.dynamic_last4)?;
451 s.serialize_field("exp_month", &self.exp_month)?;
452 s.serialize_field("exp_year", &self.exp_year)?;
453 s.serialize_field("fingerprint", &self.fingerprint)?;
454 s.serialize_field("funding", &self.funding)?;
455 s.serialize_field("id", &self.id)?;
456 s.serialize_field("iin", &self.iin)?;
457 s.serialize_field("issuer", &self.issuer)?;
458 s.serialize_field("last4", &self.last4)?;
459 s.serialize_field("metadata", &self.metadata)?;
460 s.serialize_field("name", &self.name)?;
461 s.serialize_field("networks", &self.networks)?;
462 s.serialize_field("regulated_status", &self.regulated_status)?;
463 s.serialize_field("status", &self.status)?;
464 s.serialize_field("tokenization_method", &self.tokenization_method)?;
465
466 s.serialize_field("object", "card")?;
467 s.end()
468 }
469}
470#[derive(Clone, Eq, PartialEq)]
474#[non_exhaustive]
475pub enum CardAllowRedisplay {
476 Always,
477 Limited,
478 Unspecified,
479 Unknown(String),
481}
482impl CardAllowRedisplay {
483 pub fn as_str(&self) -> &str {
484 use CardAllowRedisplay::*;
485 match self {
486 Always => "always",
487 Limited => "limited",
488 Unspecified => "unspecified",
489 Unknown(v) => v,
490 }
491 }
492}
493
494impl std::str::FromStr for CardAllowRedisplay {
495 type Err = std::convert::Infallible;
496 fn from_str(s: &str) -> Result<Self, Self::Err> {
497 use CardAllowRedisplay::*;
498 match s {
499 "always" => Ok(Always),
500 "limited" => Ok(Limited),
501 "unspecified" => Ok(Unspecified),
502 v => {
503 tracing::warn!("Unknown value '{}' for enum '{}'", v, "CardAllowRedisplay");
504 Ok(Unknown(v.to_owned()))
505 }
506 }
507 }
508}
509impl std::fmt::Display for CardAllowRedisplay {
510 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
511 f.write_str(self.as_str())
512 }
513}
514
515impl std::fmt::Debug for CardAllowRedisplay {
516 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
517 f.write_str(self.as_str())
518 }
519}
520#[cfg(feature = "serialize")]
521impl serde::Serialize for CardAllowRedisplay {
522 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
523 where
524 S: serde::Serializer,
525 {
526 serializer.serialize_str(self.as_str())
527 }
528}
529impl miniserde::Deserialize for CardAllowRedisplay {
530 fn begin(out: &mut Option<Self>) -> &mut dyn miniserde::de::Visitor {
531 crate::Place::new(out)
532 }
533}
534
535impl miniserde::de::Visitor for crate::Place<CardAllowRedisplay> {
536 fn string(&mut self, s: &str) -> miniserde::Result<()> {
537 use std::str::FromStr;
538 self.out = Some(CardAllowRedisplay::from_str(s).expect("infallible"));
539 Ok(())
540 }
541}
542
543stripe_types::impl_from_val_with_from_str!(CardAllowRedisplay);
544#[cfg(feature = "deserialize")]
545impl<'de> serde::Deserialize<'de> for CardAllowRedisplay {
546 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
547 use std::str::FromStr;
548 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
549 Ok(Self::from_str(&s).expect("infallible"))
550 }
551}
552#[derive(Clone, Eq, PartialEq)]
555#[non_exhaustive]
556pub enum CardAvailablePayoutMethods {
557 Instant,
558 Standard,
559 Unknown(String),
561}
562impl CardAvailablePayoutMethods {
563 pub fn as_str(&self) -> &str {
564 use CardAvailablePayoutMethods::*;
565 match self {
566 Instant => "instant",
567 Standard => "standard",
568 Unknown(v) => v,
569 }
570 }
571}
572
573impl std::str::FromStr for CardAvailablePayoutMethods {
574 type Err = std::convert::Infallible;
575 fn from_str(s: &str) -> Result<Self, Self::Err> {
576 use CardAvailablePayoutMethods::*;
577 match s {
578 "instant" => Ok(Instant),
579 "standard" => Ok(Standard),
580 v => {
581 tracing::warn!("Unknown value '{}' for enum '{}'", v, "CardAvailablePayoutMethods");
582 Ok(Unknown(v.to_owned()))
583 }
584 }
585 }
586}
587impl std::fmt::Display for CardAvailablePayoutMethods {
588 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
589 f.write_str(self.as_str())
590 }
591}
592
593impl std::fmt::Debug for CardAvailablePayoutMethods {
594 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
595 f.write_str(self.as_str())
596 }
597}
598#[cfg(feature = "serialize")]
599impl serde::Serialize for CardAvailablePayoutMethods {
600 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
601 where
602 S: serde::Serializer,
603 {
604 serializer.serialize_str(self.as_str())
605 }
606}
607impl miniserde::Deserialize for CardAvailablePayoutMethods {
608 fn begin(out: &mut Option<Self>) -> &mut dyn miniserde::de::Visitor {
609 crate::Place::new(out)
610 }
611}
612
613impl miniserde::de::Visitor for crate::Place<CardAvailablePayoutMethods> {
614 fn string(&mut self, s: &str) -> miniserde::Result<()> {
615 use std::str::FromStr;
616 self.out = Some(CardAvailablePayoutMethods::from_str(s).expect("infallible"));
617 Ok(())
618 }
619}
620
621stripe_types::impl_from_val_with_from_str!(CardAvailablePayoutMethods);
622#[cfg(feature = "deserialize")]
623impl<'de> serde::Deserialize<'de> for CardAvailablePayoutMethods {
624 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
625 use std::str::FromStr;
626 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
627 Ok(Self::from_str(&s).expect("infallible"))
628 }
629}
630#[derive(Clone, Eq, PartialEq)]
632#[non_exhaustive]
633pub enum CardRegulatedStatus {
634 Regulated,
635 Unregulated,
636 Unknown(String),
638}
639impl CardRegulatedStatus {
640 pub fn as_str(&self) -> &str {
641 use CardRegulatedStatus::*;
642 match self {
643 Regulated => "regulated",
644 Unregulated => "unregulated",
645 Unknown(v) => v,
646 }
647 }
648}
649
650impl std::str::FromStr for CardRegulatedStatus {
651 type Err = std::convert::Infallible;
652 fn from_str(s: &str) -> Result<Self, Self::Err> {
653 use CardRegulatedStatus::*;
654 match s {
655 "regulated" => Ok(Regulated),
656 "unregulated" => Ok(Unregulated),
657 v => {
658 tracing::warn!("Unknown value '{}' for enum '{}'", v, "CardRegulatedStatus");
659 Ok(Unknown(v.to_owned()))
660 }
661 }
662 }
663}
664impl std::fmt::Display for CardRegulatedStatus {
665 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
666 f.write_str(self.as_str())
667 }
668}
669
670impl std::fmt::Debug for CardRegulatedStatus {
671 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
672 f.write_str(self.as_str())
673 }
674}
675#[cfg(feature = "serialize")]
676impl serde::Serialize for CardRegulatedStatus {
677 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
678 where
679 S: serde::Serializer,
680 {
681 serializer.serialize_str(self.as_str())
682 }
683}
684impl miniserde::Deserialize for CardRegulatedStatus {
685 fn begin(out: &mut Option<Self>) -> &mut dyn miniserde::de::Visitor {
686 crate::Place::new(out)
687 }
688}
689
690impl miniserde::de::Visitor for crate::Place<CardRegulatedStatus> {
691 fn string(&mut self, s: &str) -> miniserde::Result<()> {
692 use std::str::FromStr;
693 self.out = Some(CardRegulatedStatus::from_str(s).expect("infallible"));
694 Ok(())
695 }
696}
697
698stripe_types::impl_from_val_with_from_str!(CardRegulatedStatus);
699#[cfg(feature = "deserialize")]
700impl<'de> serde::Deserialize<'de> for CardRegulatedStatus {
701 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
702 use std::str::FromStr;
703 let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
704 Ok(Self::from_str(&s).expect("infallible"))
705 }
706}
707impl stripe_types::Object for Card {
708 type Id = stripe_shared::CardId;
709 fn id(&self) -> &Self::Id {
710 &self.id
711 }
712
713 fn into_id(self) -> Self::Id {
714 self.id
715 }
716}
717stripe_types::def_id!(CardId);