objc2_pass_kit/generated/
PKDeferredPaymentRequest.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkdeferredpaymentrequest?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct PKDeferredPaymentRequest;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for PKDeferredPaymentRequest {}
19);
20
21impl PKDeferredPaymentRequest {
22    extern_methods!(
23        #[unsafe(method(paymentDescription))]
24        #[unsafe(method_family = none)]
25        pub unsafe fn paymentDescription(&self) -> Retained<NSString>;
26
27        /// Setter for [`paymentDescription`][Self::paymentDescription].
28        #[unsafe(method(setPaymentDescription:))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn setPaymentDescription(&self, payment_description: &NSString);
31
32        #[cfg(all(
33            feature = "PKDeferredPaymentSummaryItem",
34            feature = "PKPaymentSummaryItem"
35        ))]
36        #[unsafe(method(deferredBilling))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn deferredBilling(&self) -> Retained<PKDeferredPaymentSummaryItem>;
39
40        #[cfg(all(
41            feature = "PKDeferredPaymentSummaryItem",
42            feature = "PKPaymentSummaryItem"
43        ))]
44        /// Setter for [`deferredBilling`][Self::deferredBilling].
45        #[unsafe(method(setDeferredBilling:))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn setDeferredBilling(&self, deferred_billing: &PKDeferredPaymentSummaryItem);
48
49        #[unsafe(method(billingAgreement))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn billingAgreement(&self) -> Option<Retained<NSString>>;
52
53        /// Setter for [`billingAgreement`][Self::billingAgreement].
54        #[unsafe(method(setBillingAgreement:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn setBillingAgreement(&self, billing_agreement: Option<&NSString>);
57
58        #[unsafe(method(managementURL))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn managementURL(&self) -> Retained<NSURL>;
61
62        /// Setter for [`managementURL`][Self::managementURL].
63        #[unsafe(method(setManagementURL:))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn setManagementURL(&self, management_url: &NSURL);
66
67        #[unsafe(method(tokenNotificationURL))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn tokenNotificationURL(&self) -> Option<Retained<NSURL>>;
70
71        /// Setter for [`tokenNotificationURL`][Self::tokenNotificationURL].
72        #[unsafe(method(setTokenNotificationURL:))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn setTokenNotificationURL(&self, token_notification_url: Option<&NSURL>);
75
76        #[unsafe(method(freeCancellationDate))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn freeCancellationDate(&self) -> Option<Retained<NSDate>>;
79
80        /// Setter for [`freeCancellationDate`][Self::freeCancellationDate].
81        #[unsafe(method(setFreeCancellationDate:))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn setFreeCancellationDate(&self, free_cancellation_date: Option<&NSDate>);
84
85        #[unsafe(method(freeCancellationDateTimeZone))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn freeCancellationDateTimeZone(&self) -> Option<Retained<NSTimeZone>>;
88
89        /// Setter for [`freeCancellationDateTimeZone`][Self::freeCancellationDateTimeZone].
90        #[unsafe(method(setFreeCancellationDateTimeZone:))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn setFreeCancellationDateTimeZone(
93            &self,
94            free_cancellation_date_time_zone: Option<&NSTimeZone>,
95        );
96
97        #[unsafe(method(init))]
98        #[unsafe(method_family = init)]
99        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
100
101        #[cfg(all(
102            feature = "PKDeferredPaymentSummaryItem",
103            feature = "PKPaymentSummaryItem"
104        ))]
105        #[unsafe(method(initWithPaymentDescription:deferredBilling:managementURL:))]
106        #[unsafe(method_family = init)]
107        pub unsafe fn initWithPaymentDescription_deferredBilling_managementURL(
108            this: Allocated<Self>,
109            payment_description: &NSString,
110            deferred_billing: &PKDeferredPaymentSummaryItem,
111            management_url: &NSURL,
112        ) -> Retained<Self>;
113    );
114}
115
116/// Methods declared on superclass `NSObject`.
117impl PKDeferredPaymentRequest {
118    extern_methods!(
119        #[unsafe(method(new))]
120        #[unsafe(method_family = new)]
121        pub unsafe fn new() -> Retained<Self>;
122    );
123}