objc2_pass_kit/generated/
PKPayment.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::*;
5
6use crate::*;
7
8extern_class!(
9    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpayment?language=objc)
10    #[unsafe(super(NSObject))]
11    #[derive(Debug, PartialEq, Eq, Hash)]
12    pub struct PKPayment;
13);
14
15extern_conformance!(
16    unsafe impl NSObjectProtocol for PKPayment {}
17);
18
19impl PKPayment {
20    extern_methods!(
21        #[cfg(feature = "PKPaymentToken")]
22        #[unsafe(method(token))]
23        #[unsafe(method_family = none)]
24        pub unsafe fn token(&self) -> Retained<PKPaymentToken>;
25
26        #[cfg(feature = "PKContact")]
27        #[unsafe(method(billingContact))]
28        #[unsafe(method_family = none)]
29        pub unsafe fn billingContact(&self) -> Option<Retained<PKContact>>;
30
31        #[cfg(feature = "PKContact")]
32        #[unsafe(method(shippingContact))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn shippingContact(&self) -> Option<Retained<PKContact>>;
35
36        #[cfg(all(feature = "PKPaymentSummaryItem", feature = "PKShippingMethod"))]
37        #[unsafe(method(shippingMethod))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn shippingMethod(&self) -> Option<Retained<PKShippingMethod>>;
40    );
41}
42
43/// Methods declared on superclass `NSObject`.
44impl PKPayment {
45    extern_methods!(
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[unsafe(method(new))]
51        #[unsafe(method_family = new)]
52        pub unsafe fn new() -> Retained<Self>;
53    );
54}