stripe_shared/
payment_flows_private_payment_methods_satispay_setup_attempt_details.rs1#[derive(Copy, 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 PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetails {}
6#[cfg(feature = "redact-generated-debug")]
7impl std::fmt::Debug for PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetails {
8 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
9 f.debug_struct("PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetails")
10 .finish_non_exhaustive()
11 }
12}
13#[doc(hidden)]
14pub struct PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetailsBuilder {}
15
16#[allow(
17 unused_variables,
18 irrefutable_let_patterns,
19 clippy::let_unit_value,
20 clippy::match_single_binding,
21 clippy::single_match
22)]
23const _: () = {
24 use miniserde::de::{Map, Visitor};
25 use miniserde::json::Value;
26 use miniserde::{Deserialize, Result, make_place};
27 use stripe_types::miniserde_helpers::FromValueOpt;
28 use stripe_types::{MapBuilder, ObjectDeser};
29
30 make_place!(Place);
31
32 impl Deserialize for PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetails {
33 fn begin(out: &mut Option<Self>) -> &mut dyn Visitor {
34 Place::new(out)
35 }
36 }
37
38 struct Builder<'a> {
39 out: &'a mut Option<PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetails>,
40 builder: PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetailsBuilder,
41 }
42
43 impl Visitor for Place<PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetails> {
44 fn map(&mut self) -> Result<Box<dyn Map + '_>> {
45 Ok(Box::new(Builder {
46 out: &mut self.out,
47 builder: PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetailsBuilder::deser_default(),
48 }))
49 }
50 }
51
52 impl MapBuilder for PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetailsBuilder {
53 type Out = PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetails;
54 fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
55 Ok(match k {
56 _ => <dyn Visitor>::ignore(),
57 })
58 }
59
60 fn deser_default() -> Self {
61 Self {}
62 }
63
64 fn take_out(&mut self) -> Option<Self::Out> {
65 let () = () else {
66 return None;
67 };
68 Some(Self::Out {})
69 }
70 }
71
72 impl Map for Builder<'_> {
73 fn key(&mut self, k: &str) -> Result<&mut dyn Visitor> {
74 self.builder.key(k)
75 }
76
77 fn finish(&mut self) -> Result<()> {
78 *self.out = self.builder.take_out();
79 Ok(())
80 }
81 }
82
83 impl ObjectDeser for PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetails {
84 type Builder = PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetailsBuilder;
85 }
86
87 impl FromValueOpt for PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetails {
88 fn from_value(v: Value) -> Option<Self> {
89 let Value::Object(obj) = v else {
90 return None;
91 };
92 let mut b =
93 PaymentFlowsPrivatePaymentMethodsSatispaySetupAttemptDetailsBuilder::deser_default(
94 );
95 for (k, v) in obj {
96 match k.as_str() {
97 _ => {}
98 }
99 }
100 b.take_out()
101 }
102 }
103};