objc2_intents/generated/
INRequestPaymentIntent.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(INIntent, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "INIntent")]
15 pub struct INRequestPaymentIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20 unsafe impl NSCoding for INRequestPaymentIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25 unsafe impl NSCopying for INRequestPaymentIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INRequestPaymentIntent {
30 type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35 unsafe impl NSObjectProtocol for INRequestPaymentIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40 unsafe impl NSSecureCoding for INRequestPaymentIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INRequestPaymentIntent {
45 extern_methods!(
46 #[cfg(all(feature = "INCurrencyAmount", feature = "INPerson"))]
47 #[unsafe(method(initWithPayer:currencyAmount:note:))]
48 #[unsafe(method_family = init)]
49 pub unsafe fn initWithPayer_currencyAmount_note(
50 this: Allocated<Self>,
51 payer: Option<&INPerson>,
52 currency_amount: Option<&INCurrencyAmount>,
53 note: Option<&NSString>,
54 ) -> Retained<Self>;
55
56 #[cfg(feature = "INPerson")]
57 #[unsafe(method(payer))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn payer(&self) -> Option<Retained<INPerson>>;
60
61 #[cfg(feature = "INCurrencyAmount")]
62 #[unsafe(method(currencyAmount))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn currencyAmount(&self) -> Option<Retained<INCurrencyAmount>>;
65
66 #[unsafe(method(note))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn note(&self) -> Option<Retained<NSString>>;
69 );
70}
71
72#[cfg(feature = "INIntent")]
74impl INRequestPaymentIntent {
75 extern_methods!(
76 #[unsafe(method(init))]
77 #[unsafe(method_family = init)]
78 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
79
80 #[unsafe(method(new))]
81 #[unsafe(method_family = new)]
82 pub unsafe fn new() -> Retained<Self>;
83 );
84}
85
86extern_protocol!(
87 pub unsafe trait INRequestPaymentIntentHandling: NSObjectProtocol {
93 #[cfg(all(
94 feature = "INIntent",
95 feature = "INIntentResponse",
96 feature = "INRequestPaymentIntentResponse",
97 feature = "block2"
98 ))]
99 #[unsafe(method(handleRequestPayment:completion:))]
111 #[unsafe(method_family = none)]
112 unsafe fn handleRequestPayment_completion(
113 &self,
114 intent: &INRequestPaymentIntent,
115 completion: &block2::DynBlock<dyn Fn(NonNull<INRequestPaymentIntentResponse>)>,
116 );
117
118 #[cfg(all(
119 feature = "INIntent",
120 feature = "INIntentResponse",
121 feature = "INRequestPaymentIntentResponse",
122 feature = "block2"
123 ))]
124 #[optional]
136 #[unsafe(method(confirmRequestPayment:completion:))]
137 #[unsafe(method_family = none)]
138 unsafe fn confirmRequestPayment_completion(
139 &self,
140 intent: &INRequestPaymentIntent,
141 completion: &block2::DynBlock<dyn Fn(NonNull<INRequestPaymentIntentResponse>)>,
142 );
143
144 #[cfg(all(
145 feature = "INIntent",
146 feature = "INIntentResolutionResult",
147 feature = "INPersonResolutionResult",
148 feature = "block2"
149 ))]
150 #[deprecated = "resolvePayerForRequestPayment:withCompletion: is deprecated. Use resolvePayerForRequestPayment:completion: instead"]
162 #[optional]
163 #[unsafe(method(resolvePayerForRequestPayment:withCompletion:))]
164 #[unsafe(method_family = none)]
165 unsafe fn resolvePayerForRequestPayment_withCompletion(
166 &self,
167 intent: &INRequestPaymentIntent,
168 completion: &block2::DynBlock<dyn Fn(NonNull<INPersonResolutionResult>)>,
169 );
170
171 #[cfg(all(
172 feature = "INIntent",
173 feature = "INIntentResolutionResult",
174 feature = "INPersonResolutionResult",
175 feature = "INRequestPaymentPayerResolutionResult",
176 feature = "block2"
177 ))]
178 #[optional]
179 #[unsafe(method(resolvePayerForRequestPayment:completion:))]
180 #[unsafe(method_family = none)]
181 unsafe fn resolvePayerForRequestPayment_completion(
182 &self,
183 intent: &INRequestPaymentIntent,
184 completion: &block2::DynBlock<dyn Fn(NonNull<INRequestPaymentPayerResolutionResult>)>,
185 );
186
187 #[cfg(all(
188 feature = "INCurrencyAmountResolutionResult",
189 feature = "INIntent",
190 feature = "INIntentResolutionResult",
191 feature = "block2"
192 ))]
193 #[deprecated = "resolveCurrencyAmountForRequestPayment:withCompletion: is deprecated. Use resolveCurrencyAmountForRequestPayment:completion: instead"]
194 #[optional]
195 #[unsafe(method(resolveCurrencyAmountForRequestPayment:withCompletion:))]
196 #[unsafe(method_family = none)]
197 unsafe fn resolveCurrencyAmountForRequestPayment_withCompletion(
198 &self,
199 intent: &INRequestPaymentIntent,
200 completion: &block2::DynBlock<dyn Fn(NonNull<INCurrencyAmountResolutionResult>)>,
201 );
202
203 #[cfg(all(
204 feature = "INCurrencyAmountResolutionResult",
205 feature = "INIntent",
206 feature = "INIntentResolutionResult",
207 feature = "INRequestPaymentCurrencyAmountResolutionResult",
208 feature = "block2"
209 ))]
210 #[optional]
211 #[unsafe(method(resolveCurrencyAmountForRequestPayment:completion:))]
212 #[unsafe(method_family = none)]
213 unsafe fn resolveCurrencyAmountForRequestPayment_completion(
214 &self,
215 intent: &INRequestPaymentIntent,
216 completion: &block2::DynBlock<
217 dyn Fn(NonNull<INRequestPaymentCurrencyAmountResolutionResult>),
218 >,
219 );
220
221 #[cfg(all(
222 feature = "INIntent",
223 feature = "INIntentResolutionResult",
224 feature = "INStringResolutionResult",
225 feature = "block2"
226 ))]
227 #[optional]
228 #[unsafe(method(resolveNoteForRequestPayment:withCompletion:))]
229 #[unsafe(method_family = none)]
230 unsafe fn resolveNoteForRequestPayment_withCompletion(
231 &self,
232 intent: &INRequestPaymentIntent,
233 completion: &block2::DynBlock<dyn Fn(NonNull<INStringResolutionResult>)>,
234 );
235 }
236);