objc2-pass-kit 0.3.2

Bindings to the PassKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkdeferredpaymentrequest?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct PKDeferredPaymentRequest;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for PKDeferredPaymentRequest {}
);

impl PKDeferredPaymentRequest {
    extern_methods!(
        #[unsafe(method(paymentDescription))]
        #[unsafe(method_family = none)]
        pub unsafe fn paymentDescription(&self) -> Retained<NSString>;

        /// Setter for [`paymentDescription`][Self::paymentDescription].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setPaymentDescription:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPaymentDescription(&self, payment_description: &NSString);

        #[cfg(all(
            feature = "PKDeferredPaymentSummaryItem",
            feature = "PKPaymentSummaryItem"
        ))]
        #[unsafe(method(deferredBilling))]
        #[unsafe(method_family = none)]
        pub unsafe fn deferredBilling(&self) -> Retained<PKDeferredPaymentSummaryItem>;

        #[cfg(all(
            feature = "PKDeferredPaymentSummaryItem",
            feature = "PKPaymentSummaryItem"
        ))]
        /// Setter for [`deferredBilling`][Self::deferredBilling].
        #[unsafe(method(setDeferredBilling:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDeferredBilling(&self, deferred_billing: &PKDeferredPaymentSummaryItem);

        #[unsafe(method(billingAgreement))]
        #[unsafe(method_family = none)]
        pub unsafe fn billingAgreement(&self) -> Option<Retained<NSString>>;

        /// Setter for [`billingAgreement`][Self::billingAgreement].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setBillingAgreement:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setBillingAgreement(&self, billing_agreement: Option<&NSString>);

        #[unsafe(method(managementURL))]
        #[unsafe(method_family = none)]
        pub unsafe fn managementURL(&self) -> Retained<NSURL>;

        /// Setter for [`managementURL`][Self::managementURL].
        #[unsafe(method(setManagementURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setManagementURL(&self, management_url: &NSURL);

        #[unsafe(method(tokenNotificationURL))]
        #[unsafe(method_family = none)]
        pub unsafe fn tokenNotificationURL(&self) -> Option<Retained<NSURL>>;

        /// Setter for [`tokenNotificationURL`][Self::tokenNotificationURL].
        #[unsafe(method(setTokenNotificationURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTokenNotificationURL(&self, token_notification_url: Option<&NSURL>);

        #[unsafe(method(freeCancellationDate))]
        #[unsafe(method_family = none)]
        pub unsafe fn freeCancellationDate(&self) -> Option<Retained<NSDate>>;

        /// Setter for [`freeCancellationDate`][Self::freeCancellationDate].
        #[unsafe(method(setFreeCancellationDate:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setFreeCancellationDate(&self, free_cancellation_date: Option<&NSDate>);

        #[unsafe(method(freeCancellationDateTimeZone))]
        #[unsafe(method_family = none)]
        pub unsafe fn freeCancellationDateTimeZone(&self) -> Option<Retained<NSTimeZone>>;

        /// Setter for [`freeCancellationDateTimeZone`][Self::freeCancellationDateTimeZone].
        #[unsafe(method(setFreeCancellationDateTimeZone:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setFreeCancellationDateTimeZone(
            &self,
            free_cancellation_date_time_zone: Option<&NSTimeZone>,
        );

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(all(
            feature = "PKDeferredPaymentSummaryItem",
            feature = "PKPaymentSummaryItem"
        ))]
        #[unsafe(method(initWithPaymentDescription:deferredBilling:managementURL:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPaymentDescription_deferredBilling_managementURL(
            this: Allocated<Self>,
            payment_description: &NSString,
            deferred_billing: &PKDeferredPaymentSummaryItem,
            management_url: &NSURL,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl PKDeferredPaymentRequest {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}