objc2_pass_kit/generated/
PKPaymentToken.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpaymenttoken?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct PKPaymentToken;
14);
15
16extern_conformance!(
17    unsafe impl NSObjectProtocol for PKPaymentToken {}
18);
19
20impl PKPaymentToken {
21    extern_methods!(
22        #[cfg(feature = "PKPaymentMethod")]
23        #[unsafe(method(paymentMethod))]
24        #[unsafe(method_family = none)]
25        pub unsafe fn paymentMethod(&self) -> Retained<PKPaymentMethod>;
26
27        #[deprecated = "Use paymentMethod instead"]
28        #[unsafe(method(paymentInstrumentName))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn paymentInstrumentName(&self) -> Retained<NSString>;
31
32        #[deprecated = "Use paymentMethod instead"]
33        #[unsafe(method(paymentNetwork))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn paymentNetwork(&self) -> Retained<NSString>;
36
37        #[unsafe(method(transactionIdentifier))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn transactionIdentifier(&self) -> Retained<NSString>;
40
41        #[unsafe(method(paymentData))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn paymentData(&self) -> Retained<NSData>;
44    );
45}
46
47/// Methods declared on superclass `NSObject`.
48impl PKPaymentToken {
49    extern_methods!(
50        #[unsafe(method(init))]
51        #[unsafe(method_family = init)]
52        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
53
54        #[unsafe(method(new))]
55        #[unsafe(method_family = new)]
56        pub unsafe fn new() -> Retained<Self>;
57    );
58}