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/pkpaymenttokencontext?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct PKPaymentTokenContext;
);

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

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

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

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

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

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

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

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

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

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

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

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

        #[unsafe(method(initWithMerchantIdentifier:externalIdentifier:merchantName:merchantDomain:amount:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithMerchantIdentifier_externalIdentifier_merchantName_merchantDomain_amount(
            this: Allocated<Self>,
            merchant_identifier: &NSString,
            external_identifier: &NSString,
            merchant_name: &NSString,
            merchant_domain: Option<&NSString>,
            amount: &NSDecimalNumber,
        ) -> Retained<Self>;
    );
}

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