objc2-store-kit 0.3.2

Bindings to the StoreKit 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/storekit/skreceiptrefreshrequest?language=objc)
    #[unsafe(super(SKRequest, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "SKRequest")]
    #[deprecated = "Use Transaction.all and AppTransaction.shared"]
    pub struct SKReceiptRefreshRequest;
);

#[cfg(feature = "SKRequest")]
extern_conformance!(
    unsafe impl NSObjectProtocol for SKReceiptRefreshRequest {}
);

#[cfg(feature = "SKRequest")]
impl SKReceiptRefreshRequest {
    extern_methods!(
        /// # Safety
        ///
        /// `properties` generic should be of the correct type.
        #[deprecated = "Use Transaction.all and AppTransaction.shared"]
        #[unsafe(method(initWithReceiptProperties:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithReceiptProperties(
            this: Allocated<Self>,
            properties: Option<&NSDictionary<NSString, AnyObject>>,
        ) -> Retained<Self>;

        #[deprecated = "Use Transaction.all and AppTransaction.shared"]
        #[unsafe(method(receiptProperties))]
        #[unsafe(method_family = none)]
        pub unsafe fn receiptProperties(
            &self,
        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "SKRequest")]
impl SKReceiptRefreshRequest {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern "C-unwind" {
    pub fn SKTerminateForInvalidReceipt();
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skreceiptpropertyisexpired?language=objc)
    #[deprecated = "No longer supported"]
    pub static SKReceiptPropertyIsExpired: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skreceiptpropertyisrevoked?language=objc)
    #[deprecated = "No longer supported"]
    pub static SKReceiptPropertyIsRevoked: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skreceiptpropertyisvolumepurchase?language=objc)
    #[deprecated = "No longer supported"]
    pub static SKReceiptPropertyIsVolumePurchase: &'static NSString;
}