objc2_pass_kit/generated/
PKDisbursementRequest.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct PKDisbursementRequest;
15);
16
17extern_conformance!(
18 unsafe impl NSObjectProtocol for PKDisbursementRequest {}
19);
20
21impl PKDisbursementRequest {
22 extern_methods!(
23 #[unsafe(method(merchantIdentifier))]
24 #[unsafe(method_family = none)]
25 pub unsafe fn merchantIdentifier(&self) -> Retained<NSString>;
26
27 #[unsafe(method(setMerchantIdentifier:))]
31 #[unsafe(method_family = none)]
32 pub unsafe fn setMerchantIdentifier(&self, merchant_identifier: &NSString);
33
34 #[unsafe(method(regionCode))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn regionCode(&self) -> Retained<NSString>;
37
38 #[unsafe(method(setRegionCode:))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn setRegionCode(&self, region_code: &NSString);
44
45 #[cfg(feature = "PKConstants")]
46 #[unsafe(method(supportedNetworks))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn supportedNetworks(&self) -> Retained<NSArray<PKPaymentNetwork>>;
49
50 #[cfg(feature = "PKConstants")]
51 #[unsafe(method(setSupportedNetworks:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn setSupportedNetworks(&self, supported_networks: &NSArray<PKPaymentNetwork>);
57
58 #[cfg(feature = "PKPaymentRequest")]
59 #[unsafe(method(merchantCapabilities))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn merchantCapabilities(&self) -> PKMerchantCapability;
62
63 #[cfg(feature = "PKPaymentRequest")]
64 #[unsafe(method(setMerchantCapabilities:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn setMerchantCapabilities(&self, merchant_capabilities: PKMerchantCapability);
68
69 #[cfg(feature = "PKPaymentSummaryItem")]
70 #[unsafe(method(summaryItems))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn summaryItems(&self) -> Retained<NSArray<PKPaymentSummaryItem>>;
73
74 #[cfg(feature = "PKPaymentSummaryItem")]
75 #[unsafe(method(setSummaryItems:))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn setSummaryItems(&self, summary_items: &NSArray<PKPaymentSummaryItem>);
81
82 #[unsafe(method(currencyCode))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn currencyCode(&self) -> Retained<NSString>;
85
86 #[unsafe(method(setCurrencyCode:))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn setCurrencyCode(&self, currency_code: &NSString);
92
93 #[cfg(feature = "PKConstants")]
94 #[unsafe(method(requiredRecipientContactFields))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn requiredRecipientContactFields(&self) -> Retained<NSArray<PKContactField>>;
97
98 #[cfg(feature = "PKConstants")]
99 #[unsafe(method(setRequiredRecipientContactFields:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setRequiredRecipientContactFields(
103 &self,
104 required_recipient_contact_fields: &NSArray<PKContactField>,
105 );
106
107 #[cfg(feature = "PKContact")]
108 #[unsafe(method(recipientContact))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn recipientContact(&self) -> Option<Retained<PKContact>>;
111
112 #[cfg(feature = "PKContact")]
113 #[unsafe(method(setRecipientContact:))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn setRecipientContact(&self, recipient_contact: Option<&PKContact>);
117
118 #[unsafe(method(supportedRegions))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn supportedRegions(&self) -> Option<Retained<NSArray<NSString>>>;
121
122 #[unsafe(method(setSupportedRegions:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn setSupportedRegions(&self, supported_regions: Option<&NSArray<NSString>>);
128
129 #[unsafe(method(applicationData))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn applicationData(&self) -> Option<Retained<NSData>>;
132
133 #[unsafe(method(setApplicationData:))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn setApplicationData(&self, application_data: Option<&NSData>);
139
140 #[cfg(all(
141 feature = "PKConstants",
142 feature = "PKPaymentRequest",
143 feature = "PKPaymentSummaryItem"
144 ))]
145 #[unsafe(method(initWithMerchantIdentifier:currencyCode:regionCode:supportedNetworks:merchantCapabilities:summaryItems:))]
146 #[unsafe(method_family = init)]
147 pub unsafe fn initWithMerchantIdentifier_currencyCode_regionCode_supportedNetworks_merchantCapabilities_summaryItems(
148 this: Allocated<Self>,
149 merchant_identifier: &NSString,
150 currency_code: &NSString,
151 region_code: &NSString,
152 supported_networks: &NSArray<PKPaymentNetwork>,
153 merchant_capabilities: PKMerchantCapability,
154 summary_items: &NSArray<PKPaymentSummaryItem>,
155 ) -> Retained<Self>;
156
157 #[cfg(feature = "PKConstants")]
158 #[unsafe(method(disbursementContactInvalidErrorWithContactField:localizedDescription:))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn disbursementContactInvalidErrorWithContactField_localizedDescription(
161 field: &PKContactField,
162 localized_description: Option<&NSString>,
163 ) -> Retained<NSError>;
164
165 #[unsafe(method(disbursementCardUnsupportedError))]
166 #[unsafe(method_family = none)]
167 pub unsafe fn disbursementCardUnsupportedError() -> Retained<NSError>;
168 );
169}
170
171impl PKDisbursementRequest {
173 extern_methods!(
174 #[unsafe(method(init))]
175 #[unsafe(method_family = init)]
176 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
177
178 #[unsafe(method(new))]
179 #[unsafe(method_family = new)]
180 pub unsafe fn new() -> Retained<Self>;
181 );
182}