objc2_pass_kit/generated/
PKAutomaticReloadPaymentRequest.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/pkautomaticreloadpaymentrequest?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct PKAutomaticReloadPaymentRequest;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for PKAutomaticReloadPaymentRequest {}
19);
20
21impl PKAutomaticReloadPaymentRequest {
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 = "PKAutomaticReloadPaymentSummaryItem",
34            feature = "PKPaymentSummaryItem"
35        ))]
36        #[unsafe(method(automaticReloadBilling))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn automaticReloadBilling(
39            &self,
40        ) -> Retained<PKAutomaticReloadPaymentSummaryItem>;
41
42        #[cfg(all(
43            feature = "PKAutomaticReloadPaymentSummaryItem",
44            feature = "PKPaymentSummaryItem"
45        ))]
46        /// Setter for [`automaticReloadBilling`][Self::automaticReloadBilling].
47        #[unsafe(method(setAutomaticReloadBilling:))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn setAutomaticReloadBilling(
50            &self,
51            automatic_reload_billing: &PKAutomaticReloadPaymentSummaryItem,
52        );
53
54        #[unsafe(method(billingAgreement))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn billingAgreement(&self) -> Option<Retained<NSString>>;
57
58        /// Setter for [`billingAgreement`][Self::billingAgreement].
59        #[unsafe(method(setBillingAgreement:))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn setBillingAgreement(&self, billing_agreement: Option<&NSString>);
62
63        #[unsafe(method(managementURL))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn managementURL(&self) -> Retained<NSURL>;
66
67        /// Setter for [`managementURL`][Self::managementURL].
68        #[unsafe(method(setManagementURL:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn setManagementURL(&self, management_url: &NSURL);
71
72        #[unsafe(method(tokenNotificationURL))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn tokenNotificationURL(&self) -> Option<Retained<NSURL>>;
75
76        /// Setter for [`tokenNotificationURL`][Self::tokenNotificationURL].
77        #[unsafe(method(setTokenNotificationURL:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn setTokenNotificationURL(&self, token_notification_url: Option<&NSURL>);
80
81        #[unsafe(method(init))]
82        #[unsafe(method_family = init)]
83        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
84
85        #[cfg(all(
86            feature = "PKAutomaticReloadPaymentSummaryItem",
87            feature = "PKPaymentSummaryItem"
88        ))]
89        #[unsafe(method(initWithPaymentDescription:automaticReloadBilling:managementURL:))]
90        #[unsafe(method_family = init)]
91        pub unsafe fn initWithPaymentDescription_automaticReloadBilling_managementURL(
92            this: Allocated<Self>,
93            payment_description: &NSString,
94            automatic_reload_billing: &PKAutomaticReloadPaymentSummaryItem,
95            management_url: &NSURL,
96        ) -> Retained<Self>;
97    );
98}
99
100/// Methods declared on superclass `NSObject`.
101impl PKAutomaticReloadPaymentRequest {
102    extern_methods!(
103        #[unsafe(method(new))]
104        #[unsafe(method_family = new)]
105        pub unsafe fn new() -> Retained<Self>;
106    );
107}