objc2_store_kit/generated/
SKPaymentDiscount.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skpaymentdiscount?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[deprecated = "Create a Product.PurchaseOption.promotionalOffer to use in Product.purchase(confirmIn:options:)"]
14    pub struct SKPaymentDiscount;
15);
16
17unsafe impl Send for SKPaymentDiscount {}
18
19unsafe impl Sync for SKPaymentDiscount {}
20
21extern_conformance!(
22    unsafe impl NSObjectProtocol for SKPaymentDiscount {}
23);
24
25impl SKPaymentDiscount {
26    extern_methods!(
27        #[deprecated = "Create a Product.PurchaseOption.promotionalOffer to use in Product.purchase(confirmIn:options:)"]
28        #[unsafe(method(initWithIdentifier:keyIdentifier:nonce:signature:timestamp:))]
29        #[unsafe(method_family = init)]
30        pub unsafe fn initWithIdentifier_keyIdentifier_nonce_signature_timestamp(
31            this: Allocated<Self>,
32            identifier: &NSString,
33            key_identifier: &NSString,
34            nonce: &NSUUID,
35            signature: &NSString,
36            timestamp: &NSNumber,
37        ) -> Retained<Self>;
38
39        /// This property is not atomic.
40        ///
41        /// # Safety
42        ///
43        /// This might not be thread-safe.
44        #[deprecated = "Create a Product.PurchaseOption.promotionalOffer to use in Product.purchase(confirmIn:options:)"]
45        #[unsafe(method(identifier))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn identifier(&self) -> Retained<NSString>;
48
49        /// This property is not atomic.
50        ///
51        /// # Safety
52        ///
53        /// This might not be thread-safe.
54        #[deprecated = "Create a Product.PurchaseOption.promotionalOffer to use in Product.purchase(confirmIn:options:)"]
55        #[unsafe(method(keyIdentifier))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn keyIdentifier(&self) -> Retained<NSString>;
58
59        /// This property is not atomic.
60        ///
61        /// # Safety
62        ///
63        /// This might not be thread-safe.
64        #[deprecated = "Create a Product.PurchaseOption.promotionalOffer to use in Product.purchase(confirmIn:options:)"]
65        #[unsafe(method(nonce))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn nonce(&self) -> Retained<NSUUID>;
68
69        /// This property is not atomic.
70        ///
71        /// # Safety
72        ///
73        /// This might not be thread-safe.
74        #[deprecated = "Create a Product.PurchaseOption.promotionalOffer to use in Product.purchase(confirmIn:options:)"]
75        #[unsafe(method(signature))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn signature(&self) -> Retained<NSString>;
78
79        /// This property is not atomic.
80        ///
81        /// # Safety
82        ///
83        /// This might not be thread-safe.
84        #[deprecated = "Create a Product.PurchaseOption.promotionalOffer to use in Product.purchase(confirmIn:options:)"]
85        #[unsafe(method(timestamp))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn timestamp(&self) -> Retained<NSNumber>;
88    );
89}
90
91/// Methods declared on superclass `NSObject`.
92impl SKPaymentDiscount {
93    extern_methods!(
94        #[unsafe(method(init))]
95        #[unsafe(method_family = init)]
96        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
97
98        #[unsafe(method(new))]
99        #[unsafe(method_family = new)]
100        pub unsafe fn new() -> Retained<Self>;
101    );
102}