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:))]
29 #[unsafe(method_family = none)]
30 pub unsafe fn setMerchantIdentifier(&self, merchant_identifier: &NSString);
31
32 #[unsafe(method(regionCode))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn regionCode(&self) -> Retained<NSString>;
35
36 #[unsafe(method(setRegionCode:))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn setRegionCode(&self, region_code: &NSString);
40
41 #[cfg(feature = "PKConstants")]
42 #[unsafe(method(supportedNetworks))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn supportedNetworks(&self) -> Retained<NSArray<PKPaymentNetwork>>;
45
46 #[cfg(feature = "PKConstants")]
47 #[unsafe(method(setSupportedNetworks:))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn setSupportedNetworks(&self, supported_networks: &NSArray<PKPaymentNetwork>);
51
52 #[cfg(feature = "PKPaymentRequest")]
53 #[unsafe(method(merchantCapabilities))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn merchantCapabilities(&self) -> PKMerchantCapability;
56
57 #[cfg(feature = "PKPaymentRequest")]
58 #[unsafe(method(setMerchantCapabilities:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn setMerchantCapabilities(&self, merchant_capabilities: PKMerchantCapability);
62
63 #[cfg(feature = "PKPaymentSummaryItem")]
64 #[unsafe(method(summaryItems))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn summaryItems(&self) -> Retained<NSArray<PKPaymentSummaryItem>>;
67
68 #[cfg(feature = "PKPaymentSummaryItem")]
69 #[unsafe(method(setSummaryItems:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn setSummaryItems(&self, summary_items: &NSArray<PKPaymentSummaryItem>);
73
74 #[unsafe(method(currencyCode))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn currencyCode(&self) -> Retained<NSString>;
77
78 #[unsafe(method(setCurrencyCode:))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn setCurrencyCode(&self, currency_code: &NSString);
82
83 #[cfg(feature = "PKConstants")]
84 #[unsafe(method(requiredRecipientContactFields))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn requiredRecipientContactFields(&self) -> Retained<NSArray<PKContactField>>;
87
88 #[cfg(feature = "PKConstants")]
89 #[unsafe(method(setRequiredRecipientContactFields:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn setRequiredRecipientContactFields(
93 &self,
94 required_recipient_contact_fields: &NSArray<PKContactField>,
95 );
96
97 #[cfg(feature = "PKContact")]
98 #[unsafe(method(recipientContact))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn recipientContact(&self) -> Option<Retained<PKContact>>;
101
102 #[cfg(feature = "PKContact")]
103 #[unsafe(method(setRecipientContact:))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn setRecipientContact(&self, recipient_contact: Option<&PKContact>);
107
108 #[unsafe(method(supportedRegions))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn supportedRegions(&self) -> Option<Retained<NSArray<NSString>>>;
111
112 #[unsafe(method(setSupportedRegions:))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn setSupportedRegions(&self, supported_regions: Option<&NSArray<NSString>>);
116
117 #[unsafe(method(applicationData))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn applicationData(&self) -> Option<Retained<NSData>>;
120
121 #[unsafe(method(setApplicationData:))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn setApplicationData(&self, application_data: Option<&NSData>);
125
126 #[cfg(all(
127 feature = "PKConstants",
128 feature = "PKPaymentRequest",
129 feature = "PKPaymentSummaryItem"
130 ))]
131 #[unsafe(method(initWithMerchantIdentifier:currencyCode:regionCode:supportedNetworks:merchantCapabilities:summaryItems:))]
132 #[unsafe(method_family = init)]
133 pub unsafe fn initWithMerchantIdentifier_currencyCode_regionCode_supportedNetworks_merchantCapabilities_summaryItems(
134 this: Allocated<Self>,
135 merchant_identifier: &NSString,
136 currency_code: &NSString,
137 region_code: &NSString,
138 supported_networks: &NSArray<PKPaymentNetwork>,
139 merchant_capabilities: PKMerchantCapability,
140 summary_items: &NSArray<PKPaymentSummaryItem>,
141 ) -> Retained<Self>;
142
143 #[cfg(feature = "PKConstants")]
144 #[unsafe(method(disbursementContactInvalidErrorWithContactField:localizedDescription:))]
145 #[unsafe(method_family = none)]
146 pub unsafe fn disbursementContactInvalidErrorWithContactField_localizedDescription(
147 field: &PKContactField,
148 localized_description: Option<&NSString>,
149 ) -> Retained<NSError>;
150
151 #[unsafe(method(disbursementCardUnsupportedError))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn disbursementCardUnsupportedError() -> Retained<NSError>;
154 );
155}
156
157impl PKDisbursementRequest {
159 extern_methods!(
160 #[unsafe(method(init))]
161 #[unsafe(method_family = init)]
162 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
163
164 #[unsafe(method(new))]
165 #[unsafe(method_family = new)]
166 pub unsafe fn new() -> Retained<Self>;
167 );
168}