objc2_intents/generated/
INSendPaymentIntentResponse.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct INSendPaymentIntentResponseCode(pub NSInteger);
15impl INSendPaymentIntentResponseCode {
16 #[doc(alias = "INSendPaymentIntentResponseCodeUnspecified")]
17 pub const Unspecified: Self = Self(0);
18 #[doc(alias = "INSendPaymentIntentResponseCodeReady")]
19 pub const Ready: Self = Self(1);
20 #[doc(alias = "INSendPaymentIntentResponseCodeInProgress")]
21 pub const InProgress: Self = Self(2);
22 #[doc(alias = "INSendPaymentIntentResponseCodeSuccess")]
23 pub const Success: Self = Self(3);
24 #[doc(alias = "INSendPaymentIntentResponseCodeFailure")]
25 pub const Failure: Self = Self(4);
26 #[doc(alias = "INSendPaymentIntentResponseCodeFailureRequiringAppLaunch")]
27 pub const FailureRequiringAppLaunch: Self = Self(5);
28 #[doc(alias = "INSendPaymentIntentResponseCodeFailureCredentialsUnverified")]
29 pub const FailureCredentialsUnverified: Self = Self(6);
30 #[doc(alias = "INSendPaymentIntentResponseCodeFailurePaymentsAmountBelowMinimum")]
31 pub const FailurePaymentsAmountBelowMinimum: Self = Self(7);
32 #[doc(alias = "INSendPaymentIntentResponseCodeFailurePaymentsAmountAboveMaximum")]
33 pub const FailurePaymentsAmountAboveMaximum: Self = Self(8);
34 #[doc(alias = "INSendPaymentIntentResponseCodeFailurePaymentsCurrencyUnsupported")]
35 pub const FailurePaymentsCurrencyUnsupported: Self = Self(9);
36 #[doc(alias = "INSendPaymentIntentResponseCodeFailureInsufficientFunds")]
37 pub const FailureInsufficientFunds: Self = Self(10);
38 #[doc(alias = "INSendPaymentIntentResponseCodeFailureNoBankAccount")]
39 pub const FailureNoBankAccount: Self = Self(11);
40 #[doc(alias = "INSendPaymentIntentResponseCodeFailureNotEligible")]
41 pub const FailureNotEligible: Self = Self(12);
42 #[doc(alias = "INSendPaymentIntentResponseCodeFailureTermsAndConditionsAcceptanceRequired")]
43 pub const FailureTermsAndConditionsAcceptanceRequired: Self = Self(13);
44}
45
46unsafe impl Encode for INSendPaymentIntentResponseCode {
47 const ENCODING: Encoding = NSInteger::ENCODING;
48}
49
50unsafe impl RefEncode for INSendPaymentIntentResponseCode {
51 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
52}
53
54extern_class!(
55 #[unsafe(super(INIntentResponse, NSObject))]
57 #[derive(Debug, PartialEq, Eq, Hash)]
58 #[cfg(feature = "INIntentResponse")]
59 pub struct INSendPaymentIntentResponse;
60);
61
62#[cfg(feature = "INIntentResponse")]
63extern_conformance!(
64 unsafe impl NSCoding for INSendPaymentIntentResponse {}
65);
66
67#[cfg(feature = "INIntentResponse")]
68extern_conformance!(
69 unsafe impl NSCopying for INSendPaymentIntentResponse {}
70);
71
72#[cfg(feature = "INIntentResponse")]
73unsafe impl CopyingHelper for INSendPaymentIntentResponse {
74 type Result = Self;
75}
76
77#[cfg(feature = "INIntentResponse")]
78extern_conformance!(
79 unsafe impl NSObjectProtocol for INSendPaymentIntentResponse {}
80);
81
82#[cfg(feature = "INIntentResponse")]
83extern_conformance!(
84 unsafe impl NSSecureCoding for INSendPaymentIntentResponse {}
85);
86
87#[cfg(feature = "INIntentResponse")]
88impl INSendPaymentIntentResponse {
89 extern_methods!(
90 #[unsafe(method(init))]
91 #[unsafe(method_family = init)]
92 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93
94 #[unsafe(method(initWithCode:userActivity:))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn initWithCode_userActivity(
97 this: Allocated<Self>,
98 code: INSendPaymentIntentResponseCode,
99 user_activity: Option<&NSUserActivity>,
100 ) -> Retained<Self>;
101
102 #[unsafe(method(code))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn code(&self) -> INSendPaymentIntentResponseCode;
105
106 #[cfg(feature = "INPaymentRecord")]
107 #[unsafe(method(paymentRecord))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn paymentRecord(&self) -> Option<Retained<INPaymentRecord>>;
110
111 #[cfg(feature = "INPaymentRecord")]
112 #[unsafe(method(setPaymentRecord:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn setPaymentRecord(&self, payment_record: Option<&INPaymentRecord>);
118 );
119}
120
121#[cfg(feature = "INIntentResponse")]
123impl INSendPaymentIntentResponse {
124 extern_methods!(
125 #[unsafe(method(new))]
126 #[unsafe(method_family = new)]
127 pub unsafe fn new() -> Retained<Self>;
128 );
129}