-
Notifications
You must be signed in to change notification settings - Fork 0
/
PassKit.framework.h
1595 lines (1211 loc) · 71.9 KB
/
PassKit.framework.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ========== PassKit.framework/Headers/PKDisbursementRequest.h
//
// PKDisbursementRequest.h
//
// Copyright © 2019 Apple, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class PKPaymentSummaryItem;
typedef NS_ENUM(NSInteger, PKDisbursementRequestSchedule) {
PKDisbursementRequestScheduleOneTime,
PKDisbursementRequestScheduleFuture,
} NS_SWIFT_NAME(PKDisbursementRequest.Schedule);
// PKDisbursementRequest defines an application's request to disburse an amount
@interface PKDisbursementRequest : NSObject
// An amount is always required. If the disbursement amount is pending, the amount should be zero
@property (nonatomic, copy) NSDecimalNumber *amount API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
// Currency code for this disbursement. The currency code is required unless the requestType is future
@property (nonatomic, copy, nullable) NSString *currencyCode API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
// The merchant's ISO country code.
@property (nonatomic, copy) NSString *countryCode API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
// Specifies if the disbursement is a one time request or a future request
@property (nonatomic, assign) PKDisbursementRequestSchedule requestSchedule API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
// The summary items are optional. The final amount summary item will be prepopulated by the amount specified above.
@property (nonatomic, copy, nullable) NSArray<PKPaymentSummaryItem *> *summaryItems API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
@end
NS_ASSUME_NONNULL_END
// ========== PassKit.framework/Headers/PKConstants.h
//
// PKConstants.h
// PassKit
//
// Copyright © 2015 Apple, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#ifndef PKCONSTANTS_H
#define PKCONSTANTS_H
typedef NSString * PKEncryptionScheme NS_STRING_ENUM;
extern PKEncryptionScheme const PKEncryptionSchemeECC_V2 API_AVAILABLE(ios(9.0));
extern PKEncryptionScheme const PKEncryptionSchemeRSA_V2 API_AVAILABLE(ios(10.0));
typedef NSString * PKPaymentNetwork NS_EXTENSIBLE_STRING_ENUM;
extern PKPaymentNetwork const PKPaymentNetworkAmex API_AVAILABLE(ios(8.0), watchos(3.0));
extern PKPaymentNetwork const PKPaymentNetworkCarteBancaire API_DEPRECATED("Use PKPaymentNetworkCartesBancaires instead.", macos(10.12, 10.13), ios(10.3, 11.0), watchos(3.2, 4.0));
extern PKPaymentNetwork const PKPaymentNetworkCarteBancaires API_DEPRECATED("Use PKPaymentNetworkCartesBancaires instead.", macos(10.13, 10.13), ios(11.0, 11.2), watchos(4.0, 4.2));
extern PKPaymentNetwork const PKPaymentNetworkCartesBancaires API_AVAILABLE(ios(11.2), watchos(4.2));
extern PKPaymentNetwork const PKPaymentNetworkChinaUnionPay API_AVAILABLE(ios(9.2), watchos(3.0));
extern PKPaymentNetwork const PKPaymentNetworkDiscover API_AVAILABLE(ios(9.0), watchos(3.0));
extern PKPaymentNetwork const PKPaymentNetworkEftpos API_AVAILABLE(ios(12.0), watchos(5.0));
extern PKPaymentNetwork const PKPaymentNetworkElectron API_AVAILABLE(ios(12.0), watchos(5.0));
extern PKPaymentNetwork const PKPaymentNetworkElo API_AVAILABLE(macos(10.14.2), ios(12.1.1), watchos(5.1.2));
extern PKPaymentNetwork const PKPaymentNetworkIDCredit API_AVAILABLE(ios(10.3), watchos(3.2));
extern PKPaymentNetwork const PKPaymentNetworkInterac API_AVAILABLE(ios(9.2), watchos(3.0));
extern PKPaymentNetwork const PKPaymentNetworkJCB API_AVAILABLE(ios(10.1), watchos(3.1));
extern PKPaymentNetwork const PKPaymentNetworkMada API_AVAILABLE(macos(10.14.2), ios(12.1.1), watchos(5.1.2));
extern PKPaymentNetwork const PKPaymentNetworkMaestro API_AVAILABLE(ios(12.0), watchos(5.0));
extern PKPaymentNetwork const PKPaymentNetworkMasterCard API_AVAILABLE(ios(8.0), watchos(3.0));
extern PKPaymentNetwork const PKPaymentNetworkPrivateLabel API_AVAILABLE(ios(9.0), watchos(3.0));
extern PKPaymentNetwork const PKPaymentNetworkQuicPay API_AVAILABLE(ios(10.3), watchos(3.2));
extern PKPaymentNetwork const PKPaymentNetworkSuica API_AVAILABLE(ios(10.1), watchos(3.1));
extern PKPaymentNetwork const PKPaymentNetworkVisa API_AVAILABLE(ios(8.0), watchos(3.0));
extern PKPaymentNetwork const PKPaymentNetworkVPay API_AVAILABLE(ios(12.0), watchos(5.0));
typedef NSString * PKContactField NS_STRING_ENUM;
extern PKContactField const PKContactFieldPostalAddress API_AVAILABLE(ios(11.0), watchos(4.0));
extern PKContactField const PKContactFieldEmailAddress API_AVAILABLE(ios(11.0), watchos(4.0));
extern PKContactField const PKContactFieldPhoneNumber API_AVAILABLE(ios(11.0), watchos(4.0));
extern PKContactField const PKContactFieldName API_AVAILABLE(ios(11.0), watchos(4.0));
extern PKContactField const PKContactFieldPhoneticName API_AVAILABLE(ios(11.0), watchos(4.0));
typedef NS_ENUM(NSInteger, PKPaymentAuthorizationStatus) {
PKPaymentAuthorizationStatusSuccess, // Merchant auth'd (or expects to auth) the transaction successfully.
PKPaymentAuthorizationStatusFailure, // Merchant failed to auth the transaction.
PKPaymentAuthorizationStatusInvalidBillingPostalAddress API_DEPRECATED("Use PKPaymentAuthorizationResult with PKPaymentAuthorizationStatusFailure and include the result of -paymentBillingAddressInvalidErrorWithKey:localizedDescription: in the errors array.", ios(8.0, 11.0), watchos(3.0, 4.0)), // Supplied billing address is insufficient or otherwise invalid
PKPaymentAuthorizationStatusInvalidShippingPostalAddress API_DEPRECATED("Use PKPaymentAuthorizationResult with PKPaymentAuthorizationStatusFailure and include the result of -paymentShippingAddressInvalidErrorWithKey:localizedDescription: in the errors array.", ios(8.0, 11.0), watchos(3.0, 4.0)), // Supplied postal address is insufficient or otherwise invalid
PKPaymentAuthorizationStatusInvalidShippingContact API_DEPRECATED("Use PKPaymentAuthorizationResult with PKPaymentAuthorizationStatusFailure and include the result of -paymentContactInvalidErrorWithContactField:localizedDescription: in the errors array.", ios(8.0, 11.0), watchos(3.0, 4.0)), // Supplied contact information is insufficient or otherwise invalid
PKPaymentAuthorizationStatusPINRequired API_AVAILABLE(ios(9.2), watchos(3.0)), // Transaction requires PIN entry.
PKPaymentAuthorizationStatusPINIncorrect API_AVAILABLE(ios(9.2), watchos(3.0)), // PIN was not entered correctly, retry.
PKPaymentAuthorizationStatusPINLockout API_AVAILABLE(ios(9.2), watchos(3.0)), // PIN retry limit exceeded.
} API_AVAILABLE(ios(8.0), watchos(3.0));
typedef NS_ENUM(NSInteger, PKPaymentButtonStyle) {
PKPaymentButtonStyleWhite = 0,
PKPaymentButtonStyleWhiteOutline,
PKPaymentButtonStyleBlack
} API_AVAILABLE(ios(8.3), watchos(3.0));
typedef NS_ENUM(NSInteger, PKPaymentButtonType) {
PKPaymentButtonTypePlain = 0,
PKPaymentButtonTypeBuy,
PKPaymentButtonTypeSetUp API_AVAILABLE(ios(9.0), watchos(3.0)),
PKPaymentButtonTypeInStore API_AVAILABLE(ios(10.0), watchos(3.0)),
PKPaymentButtonTypeDonate API_AVAILABLE(ios(10.2), watchos(3.2)),
PKPaymentButtonTypeCheckout API_AVAILABLE(ios(12.0), watchos(5.0)),
PKPaymentButtonTypeBook API_AVAILABLE(ios(12.0), watchos(5.0)),
PKPaymentButtonTypeSubscribe API_AVAILABLE(ios(12.0), watchos(5.0))
} API_AVAILABLE(ios(8.3), watchos(3.0));
#endif // PKCONSTANTS_H
// ========== PassKit.framework/Headers/PKPaymentButton.h
//
// PKPaymentButton.h
//
// Copyright © 2014 Apple, Inc. All rights reserved.
//
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#import <PassKit/PKConstants.h>
NS_ASSUME_NONNULL_BEGIN
// PKPaymentButton vends a number of Apple Pay related buttons for use inside of your app
// These buttons can be used to prompt the user to pay with Apple Pay, or set up cards for payment
// Refer to the Apple Pay developer documentation for more information on how to use this class
API_AVAILABLE(ios(8.3))
@interface PKPaymentButton : UIButton
+ (instancetype)buttonWithType:(PKPaymentButtonType)buttonType style:(PKPaymentButtonStyle)buttonStyle;
- (instancetype)initWithPaymentButtonType:(PKPaymentButtonType)type paymentButtonStyle:(PKPaymentButtonStyle)style API_AVAILABLE(ios(9.0)) NS_DESIGNATED_INITIALIZER;
@property (nonatomic, assign) CGFloat cornerRadius API_AVAILABLE(ios(12.0));
@end
NS_ASSUME_NONNULL_END
#endif
// ========== PassKit.framework/Headers/PKContact.h
//
// PKContact.h
//
// Copyright © 2015 Apple, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#if !TARGET_OS_TV
#import <Contacts/Contacts.h>
#endif
API_AVAILABLE(ios(9.0), watchos(3.0))
@interface PKContact : NSObject
@property (nonatomic, strong, nullable) NSPersonNameComponents *name;
#if TARGET_OS_TV
@property (nonatomic, strong, nullable) id postalAddress;
@property (nonatomic, strong, nullable) id phoneNumber;
#else
@property (nonatomic, strong, nullable) CNPostalAddress *postalAddress;
@property (nonatomic, strong, nullable) CNPhoneNumber *phoneNumber;
#endif
@property (nonatomic, strong, nullable) NSString *emailAddress;
// This property is now deprecated. Use the -subLocality property on [PKContact -postalAddress] instead
@property (nonatomic, retain, nullable) NSString *supplementarySubLocality API_DEPRECATED("Use subLocality and subAdministrativeArea on -postalAddress instead", ios(9.2, 10.3), watchos(3.0, 3.2));
@end
// ========== PassKit.framework/Headers/PKPaymentRequestStatus.h
//
// PKPaymentRequestStatus.h
//
// Copyright © 2016 Apple, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <PassKit/PKConstants.h>
NS_ASSUME_NONNULL_BEGIN
@class PKShippingMethod;
@class PKPaymentSummaryItem;
API_AVAILABLE(ios(11.0), watchos(4.0))
@interface PKPaymentAuthorizationResult : NSObject
- (instancetype)initWithStatus:(PKPaymentAuthorizationStatus)status
errors:(nullable NSArray<NSError *> *)errors NS_DESIGNATED_INITIALIZER;
// The status of the payment
@property (nonatomic, assign) PKPaymentAuthorizationStatus status;
// Any errors that applied. These errors will be displayed to the user to correct.
// Errors should be ordered from most to least serious.
// See PKError for specific NSError keys to use to enable rich error handling.
@property (null_resettable, nonatomic, copy) NSArray<NSError *> *errors;
@end
API_AVAILABLE(ios(11.0), watchos(4.0))
@interface PKPaymentRequestUpdate : NSObject
- (instancetype)initWithPaymentSummaryItems:(NSArray<PKPaymentSummaryItem *> *)paymentSummaryItems NS_DESIGNATED_INITIALIZER;
// The status of the payment request update. Set PKPaymentAuthorizationStatusSuccess for a successful update,
// and PKPaymentAuthorizationStatusFailure if you were unable to process the required changes.
// PKPaymentAuthorizationStatusSuccess by default
@property (nonatomic, assign) PKPaymentAuthorizationStatus status;
// The new payment summary items to update the payment request with
@property (nonatomic, copy) NSArray<PKPaymentSummaryItem *> *paymentSummaryItems;
@end
API_AVAILABLE(ios(11.0), watchos(4.0))
@interface PKPaymentRequestShippingContactUpdate : PKPaymentRequestUpdate
// You may optionally supply errors here.
// See PKError for specific NSError keys to use.
- (instancetype)initWithErrors:(nullable NSArray<NSError *> *)errors
paymentSummaryItems:(NSArray<PKPaymentSummaryItem *> *)paymentSummaryItems
shippingMethods:(NSArray<PKShippingMethod *> *)shippingMethods NS_DESIGNATED_INITIALIZER;
@property (nonatomic, copy) NSArray<PKShippingMethod *> *shippingMethods;
@property (null_resettable, nonatomic, copy) NSArray<NSError *> *errors;
@end
API_AVAILABLE(ios(11.0), watchos(4.0))
@interface PKPaymentRequestShippingMethodUpdate : PKPaymentRequestUpdate
@end
API_AVAILABLE(ios(11.0), watchos(4.0))
@interface PKPaymentRequestPaymentMethodUpdate : PKPaymentRequestUpdate
@end
NS_ASSUME_NONNULL_END
// ========== PassKit.framework/Headers/PKPassLibrary.h
//
// PKPassLibrary.h
// PassKit
//
// Copyright (c) 2011 Apple, Inc. All rights reserved.
//
// Threading contract: no concurrent usage.
#import <Foundation/Foundation.h>
#import <PassKit/PKPass.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, PKPassLibraryAddPassesStatus) {
PKPassLibraryDidAddPasses,
PKPassLibraryShouldReviewPasses,
PKPassLibraryDidCancelAddPasses,
} API_AVAILABLE(ios(7.0), watchos(3.0));
typedef NS_ENUM(NSUInteger, PKAutomaticPassPresentationSuppressionResult) {
PKAutomaticPassPresentationSuppressionResultNotSupported = 0, // Suppression is not supported for this device
PKAutomaticPassPresentationSuppressionResultAlreadyPresenting, // Passes are already being presented and cannot be suppressed
PKAutomaticPassPresentationSuppressionResultDenied, // Suppression was denied due to lack of entitlement
PKAutomaticPassPresentationSuppressionResultCancelled, // Suppression was cancelled before the response handler was fired
PKAutomaticPassPresentationSuppressionResultSuccess // Suppression of automatic pass presentation was successful
} __WATCHOS_PROHIBITED API_AVAILABLE(ios(9.0));
typedef NSUInteger PKSuppressionRequestToken;
API_AVAILABLE(ios(6.0), watchos(3.0))
@interface PKPassLibrary : NSObject
// The library is not available on iPad in 6.0.
+ (BOOL)isPassLibraryAvailable API_AVAILABLE(ios(6.0), watchos(3.0));
// These methods may be used to temporarily disable the automatic presentation of passes when a device encounters a contactless field.
// Use of these methods require an entitlement. Otherwise, requesting will always return a PKAutomaticPassPresentationSuppressionResultDenied as the result.
+ (PKSuppressionRequestToken)requestAutomaticPassPresentationSuppressionWithResponseHandler:(void(^)(PKAutomaticPassPresentationSuppressionResult result))responseHandler API_AVAILABLE(ios(9.0)) __WATCHOS_PROHIBITED NS_EXTENSION_UNAVAILABLE("Not available to extensions");
+ (void)endAutomaticPassPresentationSuppressionWithRequestToken:(PKSuppressionRequestToken)requestToken API_AVAILABLE(ios(9.0)) __WATCHOS_PROHIBITED NS_EXTENSION_UNAVAILABLE("Not available to extensions");
+ (BOOL)isSuppressingAutomaticPassPresentation API_AVAILABLE(ios(9.0)) __WATCHOS_PROHIBITED NS_EXTENSION_UNAVAILABLE("Not available to extensions");
// If device supports adding payment passes, this method will return YES. Otherwise, NO will be returned.
+ (BOOL)isPaymentPassActivationAvailable API_DEPRECATED("Use -[PKPassLibrary isPaymentPassActivationAvailable] instead", ios(8.0, 9.0));
// If this pass library supports activating payment passes, this method will return YES. Otherwise, NO will be returned.
- (BOOL)isPaymentPassActivationAvailable API_AVAILABLE(ios(9.0));
// These return only local passes the process is entitled to access.
- (NSArray<PKPass *> *)passes;
- (nullable PKPass *)passWithPassTypeIdentifier:(NSString *)identifier serialNumber:(NSString *)serialNumber;
- (NSArray<PKPass *> *)passesOfType:(PKPassType)passType API_AVAILABLE(ios(8.0), watchos(3.0));
// This returns the remote payment passes from attached devices
- (NSArray<PKPaymentPass *> *)remotePaymentPasses API_AVAILABLE(ios(9.0));
- (void)removePass:(PKPass *)pass;
// This returns YES even if the process is not entitled to access the pass in the library. An app like Mail is not entitled to get
// pass from the library, but it should avoid presenting UI for adding an email attachment pass that is already in the library.
- (BOOL)containsPass:(PKPass *)pass;
// This will fail if a pass with matching identifier and serial number is not already present in the library, or if the process
// is not entitled to access the pass. To add a completely new pass, use PKAddPassesViewController.
- (BOOL)replacePassWithPass:(PKPass *)pass;
// The user will be prompted to grant permission for the calling process to add passes to the Pass Library. The user may respond
// by allowing the passes to be added, or requesting to review the passes. The selection will be returned in the completionHandler
// as a PKPassLibraryAddPassesStatus. If PKPassLibraryPassesPresentReview is returned, you must present a PKAddPassesViewController
// initialized with the passes so that the user may review and add the passes manually. The completion handler for this method is
// called on an arbitrary queue - dispatch to the main queue if you're presenting UI.
- (void)addPasses:(NSArray<PKPass *> *)passes withCompletionHandler:(nullable void(^)(PKPassLibraryAddPassesStatus status))completion API_AVAILABLE(ios(7.0), watchos(3.0));
// Opens the card setup flow (in Wallet on iPhone, Settings on iPad). Use this to direct a user to card setup directly from your app.
- (void)openPaymentSetup API_AVAILABLE(ios(8.3)) __WATCHOS_PROHIBITED;
// Presents the pass for use above the current application. The pass must already be in the pass library for this to have effect.
- (void)presentPaymentPass:(PKPaymentPass *)pass API_AVAILABLE(ios(10.0)) __WATCHOS_PROHIBITED;
// Returns YES if either the current device or an attached device both supports adding payment passes and does not already contain
// a payment pass with the supplied primary account identifier.
- (BOOL)canAddPaymentPassWithPrimaryAccountIdentifier:(NSString *)primaryAccountIdentifier API_AVAILABLE(ios(9.0));
// If the library can add Felica passes, this method will return YES. Otherwise, NO will be returned.
- (BOOL)canAddFelicaPass API_AVAILABLE(ios(10.1), watchos(3.1));
// These methods may be utilized to activate a payment pass that is provisioned but currently in the inactive state, by providing
// either a cryptographic OTP, or an activation code.
- (void)activatePaymentPass:(PKPaymentPass *)paymentPass withActivationData:(NSData *)activationData completion:(nullable void(^)(BOOL success, NSError* error))completion API_AVAILABLE(ios(8.0)) __WATCHOS_PROHIBITED;
- (void)activatePaymentPass:(PKPaymentPass *)paymentPass withActivationCode:(NSString *)activationCode completion:(nullable void(^)(BOOL success, NSError* error))completion API_DEPRECATED("Use activatePaymentPass:withActivationData:completion: instead", ios(8.0, 9.0)) __WATCHOS_PROHIBITED;
@end
// This notification is issued by a library instance, with that instance as the sender. If there are no instantiated library objects,
// no notifications. There are no guarantees about what thread or queue these come in on.
typedef NSString * PKPassLibraryNotificationName NS_EXTENSIBLE_STRING_ENUM;
extern PKPassLibraryNotificationName const PKPassLibraryDidChangeNotification API_AVAILABLE(ios(6.0), watchos(3.0));
extern PKPassLibraryNotificationName const PKPassLibraryRemotePaymentPassesDidChangeNotification API_AVAILABLE(ios(9.0), watchos(3.0));
// Entries in user info dictionary for PKPassLibraryDidChangeNotification.
// - PKPassLibraryAddedPassesUserInfoKey is the key for an array of passes
// - PKPassLibraryReplacementPassesUserInfoKey is the key for an array of passes
// - PKPassLibraryRemovedPassInfosUserInfoKey is the key for an array of dictionaries, each of which has keys
// PKPassLibraryPassTypeIdentifierUserInfoKey and PKPassLibrarySerialNumberUserInfoKey mapping to strings.
typedef NSString * PKPassLibraryNotificationKey NS_STRING_ENUM;
extern PKPassLibraryNotificationKey const PKPassLibraryAddedPassesUserInfoKey API_AVAILABLE(ios(6.0), watchos(3.0));
extern PKPassLibraryNotificationKey const PKPassLibraryReplacementPassesUserInfoKey API_AVAILABLE(ios(6.0), watchos(3.0));
extern PKPassLibraryNotificationKey const PKPassLibraryRemovedPassInfosUserInfoKey API_AVAILABLE(ios(6.0), watchos(3.0));
extern PKPassLibraryNotificationKey const PKPassLibraryPassTypeIdentifierUserInfoKey API_AVAILABLE(ios(6.0), watchos(3.0));
extern PKPassLibraryNotificationKey const PKPassLibrarySerialNumberUserInfoKey API_AVAILABLE(ios(6.0), watchos(3.0));
NS_ASSUME_NONNULL_END
// ========== PassKit.framework/Headers/PKAddPassButton.h
//
// PKAddPassButton.h
// PassKit
//
// Copyright © 2015 Apple, Inc. All rights reserved.
//
#if TARGET_OS_IOS
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, PKAddPassButtonStyle) {
PKAddPassButtonStyleBlack = 0,
PKAddPassButtonStyleBlackOutline,
} API_AVAILABLE(ios(9.0));
// Use PKAddPassButton to show an "Add to Apple Wallet" button. Two types are available for barcode or payment passes.
// Refer to the Apple Pay developer documentation for more information on how to use this class
API_AVAILABLE(ios(9.0))
@interface PKAddPassButton : UIButton
+ (instancetype)addPassButtonWithStyle:(PKAddPassButtonStyle)addPassButtonStyle;
- (instancetype)initWithAddPassButtonStyle:(PKAddPassButtonStyle)style NS_DESIGNATED_INITIALIZER;
@property (nonatomic, assign) PKAddPassButtonStyle addPassButtonStyle UI_APPEARANCE_SELECTOR;
@end
NS_ASSUME_NONNULL_END
#endif
// ========== PassKit.framework/Headers/PKLabeledValue.h
//
// PKLabeledValue.h
// PassKit
//
// Copyright © 2016 Apple, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(ios(10.1))
@interface PKLabeledValue : NSObject
- (instancetype)initWithLabel:(NSString *)label
value:(NSString *)value NS_DESIGNATED_INITIALIZER;
@property (nonatomic, copy, readonly) NSString *label;
@property (nonatomic, copy, readonly) NSString *value;
@end
NS_ASSUME_NONNULL_END
// ========== PassKit.framework/Headers/PKObject.h
//
// PKObject.h
// PassKit
//
// Copyright (c) 2013 Apple, Inc. All rights reserved.
//
#ifndef __PKOBJECT_H
#define __PKOBJECT_H
#import <Foundation/Foundation.h>
#import <PassKit/PKError.h>
@interface PKObject : NSObject
@end
#endif // __PKOBJECT_H
// ========== PassKit.framework/Headers/PKAddPassesViewController.h
//
// PKAddPassesViewController.h
// PassKit
//
// Copyright (c) 2011 Apple, Inc. All rights reserved.
//
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
@class PKPass;
@class PKAddPassesViewController;
NS_ASSUME_NONNULL_BEGIN
@protocol PKAddPassesViewControllerDelegate <NSObject>
@optional
-(void)addPassesViewControllerDidFinish:(PKAddPassesViewController *)controller; // delegate should dismiss presentation
@end
API_AVAILABLE(ios(6.0))
@interface PKAddPassesViewController : UIViewController
/* controller should be presented with -presentViewController:animated:completion:
pass should be a pass you want the user to add.
*/
- (nullable instancetype)initWithPass:(PKPass *)pass;
- (nullable instancetype)initWithPasses:(NSArray<PKPass *> *)passes API_AVAILABLE(ios(7.0));
+ (BOOL)canAddPasses API_AVAILABLE(ios(8.0));
@property(nonatomic,assign,nullable) id <PKAddPassesViewControllerDelegate> delegate;
@end
NS_ASSUME_NONNULL_END
#endif
// ========== PassKit.framework/Headers/PKDisbursementVoucher.h
//
// PKDisbursementVoucher.h
//
// Copyright © 2019 Apple, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
// PKDisbursementVoucher defines information for disbursement
@interface PKDisbursementVoucher : NSObject
// The data containing information for the disbursement
@property (nonatomic, copy, readonly) NSData *data API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
// The URL for redeeming the voucher
@property (nonatomic, copy, readonly) NSURL *redemptionURL API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
@end
NS_ASSUME_NONNULL_END
// ========== PassKit.framework/Headers/PKSuicaPassProperties.h
//
// PKSuicaPassProperties.h
// PassKit
//
// Copyright (c) 2016 Apple, Inc. All rights reserved.
//
//
#import <PassKit/PKTransitPassProperties.h>
@class PKPass;
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(ios(10.1), watchos(3.1))
@interface PKSuicaPassProperties : PKTransitPassProperties
/// Properties for a given pass, or nil if the pass doesn’t support the set of properties being requested
+ (nullable instancetype)passPropertiesForPass:(PKPass *)pass;
@property (nonatomic, copy, readonly) NSDecimalNumber *transitBalance;
@property (nonatomic, copy, readonly) NSString *transitBalanceCurrencyCode;
@property (nonatomic, assign, readonly, getter=isInStation) BOOL inStation;
/// Note: isInShinkansenStation is not a subset of isInStation.
@property (nonatomic, assign, readonly, getter=isInShinkansenStation) BOOL inShinkansenStation;
@property (nonatomic, assign, getter=isBalanceAllowedForCommute, readonly) BOOL balanceAllowedForCommute API_AVAILABLE(ios(11.3), watchos(4.3));
@property (nonatomic, assign, getter=isLowBalanceGateNotificationEnabled, readonly) BOOL lowBalanceGateNotificationEnabled API_AVAILABLE(ios(11.3), watchos(4.3));
@property (nonatomic, assign, readonly, getter=isGreenCarTicketUsed) BOOL greenCarTicketUsed;
@property (nonatomic, assign, readonly, getter=isBlacklisted) BOOL blacklisted;
@end
NS_ASSUME_NONNULL_END
// ========== PassKit.framework/Headers/PKPaymentToken.h
//
// PKPaymentToken.h
//
// Copyright (c) 2014, Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@class PKPaymentMethod;
// Contains the user's payment credentials, encrypted to the merchant.
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(ios(8.0), watchos(3.0))
@interface PKPaymentToken : NSObject
// Describes the properties of the underlying payment instrument selected to fund the payment
@property (nonatomic, strong, readonly) PKPaymentMethod *paymentMethod API_AVAILABLE(ios(9.0), watchos(3.0));
// A string that describes the payment instrument the user has selected to fund the payment.
// Suitable for display, e.g. "Amex 1234".
@property (nonatomic, copy, readonly) NSString *paymentInstrumentName API_DEPRECATED("Use paymentMethod instead", ios(8.0, 9.0)) __WATCHOS_PROHIBITED;
// Payment network for the card that funds the payment.
@property (nonatomic, copy, readonly) NSString *paymentNetwork API_DEPRECATED("Use paymentMethod instead", ios(8.0, 9.0)) __WATCHOS_PROHIBITED;
// A string that describes a globally unique identifier for this transaction that can be used
// for receipt purposes.
@property (nonatomic, copy, readonly) NSString *transactionIdentifier;
// UTF-8 encoded JSON dictionary of encrypted payment data. Ready for transmission to
// merchant's e-commerce backend for decryption and submission to a payment processor's
// gateway.
@property (nonatomic, copy, readonly) NSData *paymentData;
@end
NS_ASSUME_NONNULL_END
// ========== PassKit.framework/Headers/PKPaymentAuthorizationController.h
//
// PKPaymentAuthorizationController.h
// PassKit
//
// Copyright © 2015 Apple, Inc. All rights reserved.
//
#if TARGET_OS_IPHONE
#import <PassKit/PKConstants.h>
#import <PassKit/PKPaymentRequest.h>
NS_ASSUME_NONNULL_BEGIN
@class PKPayment;
@class PKContact;
@class PKPaymentMethod;
@class PKShippingMethod;
@class PKPaymentSummaryItem;
@class PKPaymentAuthorizationResult;
@class PKPaymentAuthorizationController;
@class PKPaymentRequestPaymentMethodUpdate;
@class PKPaymentRequestShippingMethodUpdate;
@class PKPaymentRequestShippingContactUpdate;
@protocol PKPaymentAuthorizationControllerDelegate <NSObject>
@required
// Sent to the delegate when payment authorization is finished. This may occur when
// the user cancels the request, or after the PKPaymentAuthorizationStatus parameter of the
// paymentAuthorizationController:didAuthorizePayment:completion: has been shown to the user.
//
// The delegate is responsible for dismissing and releasing the controller in this method.
- (void)paymentAuthorizationControllerDidFinish:(PKPaymentAuthorizationController *)controller;
@optional
// Sent to the delegate after the user has acted on the payment request. The application
// should inspect the payment to determine whether the payment request was authorized.
//
// If the application requested a shipping contact then the full contact is now part of the payment.
//
// The delegate must call completion with an appropriate authorization status, as may be determined
// by submitting the payment credential to a processing gateway for payment authorization.
- (void)paymentAuthorizationController:(PKPaymentAuthorizationController *)controller
didAuthorizePayment:(PKPayment *)payment
handler:(void (^)(PKPaymentAuthorizationResult *result))completion API_AVAILABLE(ios(11.0), watchos(4.0));
- (void)paymentAuthorizationController:(PKPaymentAuthorizationController *)controller
didAuthorizePayment:(PKPayment *)payment
completion:(void (^)(PKPaymentAuthorizationStatus status))completion API_DEPRECATED("Use paymentAuthorizationController:didAuthorizePayment:handler: instead to provide more granular errors", ios(10.0, 11.0), watchos(3.0, 4.0));
// Sent to the delegate before the payment is authorized, but after the user has authenticated using
// the side button. Optional.
- (void)paymentAuthorizationControllerWillAuthorizePayment:(PKPaymentAuthorizationController *)controller;
// Sent when the user has selected a new shipping method. The delegate should determine
// shipping costs based on the shipping method and either the shipping address contact in the original
// PKPaymentRequest or the contact provided by the last call to paymentAuthorizationController:
// didSelectShippingContact:completion:.
//
// The delegate must invoke the completion block with an updated array of PKPaymentSummaryItem objects.
//
// The delegate will receive no further callbacks except paymentAuthorizationControllerDidFinish:
// until it has invoked the completion block.
- (void)paymentAuthorizationController:(PKPaymentAuthorizationController *)controller
didSelectShippingMethod:(PKShippingMethod *)shippingMethod
handler:(void (^)(PKPaymentRequestShippingMethodUpdate *requestUpdate))completion API_AVAILABLE(ios(11.0), watchos(4.0));
- (void)paymentAuthorizationController:(PKPaymentAuthorizationController *)controller
didSelectShippingContact:(PKContact *)contact
handler:(void (^)(PKPaymentRequestShippingContactUpdate *requestUpdate))completion API_AVAILABLE(ios(11.0), watchos(4.0));
// Sent when the user has selected a new payment card. Use this delegate callback if you need to
// update the summary items in response to the card type changing (for example, applying credit card surcharges)
//
// The delegate will receive no further callbacks except paymentAuthorizationControllerDidFinish:
// until it has invoked the completion block.
- (void)paymentAuthorizationController:(PKPaymentAuthorizationController *)controller
didSelectPaymentMethod:(PKPaymentMethod *)paymentMethod
handler:(void (^)(PKPaymentRequestPaymentMethodUpdate *requestUpdate))completion API_AVAILABLE(ios(11.0), watchos(4.0));
// These delegate methods are deprecated and have been replaced with new callbacks that allow more granular
// and comprehensive errors to be surfaced to users
- (void)paymentAuthorizationController:(PKPaymentAuthorizationController *)controller
didSelectShippingMethod:(PKShippingMethod *)shippingMethod
completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray<PKPaymentSummaryItem *> *summaryItems))completion API_DEPRECATED("Use paymentAuthorizationController:didSelectShippingMethod:handler: instead to provide more granular errors", ios(10.0, 11.0), watchos(3.0, 4.0));
- (void)paymentAuthorizationController:(PKPaymentAuthorizationController *)controller
didSelectShippingContact:(PKContact *)contact
completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray<PKShippingMethod *> *shippingMethods,
NSArray<PKPaymentSummaryItem *> *summaryItems))completion API_DEPRECATED("Use paymentAuthorizationController:didSelectShippingContact:handler: instead to provide more granular errors", ios(10.0, 11.0), watchos(3.0, 4.0));
- (void)paymentAuthorizationController:(PKPaymentAuthorizationController *)controller
didSelectPaymentMethod:(PKPaymentMethod *)paymentMethod
completion:(void (^)(NSArray<PKPaymentSummaryItem *> *summaryItems))completion API_DEPRECATED("Use paymentAuthorizationController:didSelectPaymentMethod:handler: instead to provide more granular errors", ios(10.0, 11.0), watchos(3.0, 4.0));
@end
// PKPaymentAuthorizationController prompts the user to authorize a PKPaymentRequest, funding the
// payment amount with a valid payment card.
API_AVAILABLE(ios(10.0), watchos(3.0))
@interface PKPaymentAuthorizationController : NSObject
// Determine whether this device can process payment requests.
// YES if the device is generally capable of making in-app payments.
// NO if the device cannot make in-app payments or if the user is restricted from authorizing payments.
+ (BOOL)canMakePayments;
// Determine whether this device can process payment requests using specific payment network brands.
// Your application should confirm that the user can make payments before attempting to authorize a payment.
// Your application may also want to alter its appearance or behavior when the user is not allowed
// to make payments.
// YES if the user can authorize payments on this device using one of the payment networks supported
// by the merchant.
// NO if the user cannot authorize payments on these networks or if the user is restricted from
// authorizing payments.
+ (BOOL)canMakePaymentsUsingNetworks:(NSArray<PKPaymentNetwork> *)supportedNetworks;
// Determine whether this device can process payments using the specified networks and capabilities bitmask
// See +canMakePaymentsUsingNetworks:
+ (BOOL)canMakePaymentsUsingNetworks:(NSArray<PKPaymentNetwork> *)supportedNetworks capabilities:(PKMerchantCapability)capabilties;
// The controller's delegate.
@property (nonatomic, weak, nullable) id<PKPaymentAuthorizationControllerDelegate> delegate;
// Initialize the controller with a payment request.
- (instancetype)initWithPaymentRequest:(PKPaymentRequest *)request NS_DESIGNATED_INITIALIZER;
// Presents the Apple Pay UI modally over your app. You are responsible for dismissal
- (void)presentWithCompletion:(nullable void(^)(BOOL success))completion;
// Dismisses the Apple Pay UI. Call this when you receive the paymentAuthorizationControllerDidFinish delegate
// callback, or otherwise wish a dismissal to occur
- (void)dismissWithCompletion:(nullable void(^)(void))completion;
@end
NS_ASSUME_NONNULL_END
#endif
// ========== PassKit.framework/Headers/PKPaymentPass.h
//
// PKPaymentPass.h
// PassKit
//
// Copyright (c) 2014 Apple, Inc. All rights reserved.
//
#ifndef __PKPAYMENTPASS_H
#define __PKPAYMENTPASS_H
#import <PassKit/PKPass.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, PKPaymentPassActivationState) {
PKPaymentPassActivationStateActivated,
PKPaymentPassActivationStateRequiresActivation,
PKPaymentPassActivationStateActivating,
PKPaymentPassActivationStateSuspended,
PKPaymentPassActivationStateDeactivated
} API_AVAILABLE(ios(8.0), watchos(3.0));
API_AVAILABLE(ios(8.0), watchos(3.0))
@interface PKPaymentPass : PKPass
@property (nonatomic, copy, readonly) NSString *primaryAccountIdentifier;
@property (nonatomic, copy, readonly) NSString *primaryAccountNumberSuffix;
@property (weak, readonly) NSString *deviceAccountIdentifier;
@property (weak, readonly) NSString *deviceAccountNumberSuffix;
@property (nonatomic, readonly) PKPaymentPassActivationState activationState;
@end
NS_ASSUME_NONNULL_END
#endif // End __PKPAYMENTPASS_H
// ========== PassKit.framework/Headers/PKDisbursementAuthorizationController.h
//
// PKDisbursementAuthorizationController.h
//
// Copyright © 2019 Apple, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class PKDisbursementRequest;
@class PKDisbursementVoucher;
@class PKDisbursementAuthorizationController;
@protocol PKDisbursementAuthorizationControllerDelegate <NSObject>
@required
// Sent to the delegate when disbursement controller has authorized the disbursement request.
- (void)disbursementAuthorizationController:(PKDisbursementAuthorizationController *)controller
didAuthorizeWithDisbursementVoucher:(PKDisbursementVoucher *)disbursementVoucher API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
// Sent to the delegate when disbursement controller is finished. This may occur when
// the user cancels the request or after the disbursement has been authorized.
- (void)disbursementAuthorizationControllerDidFinish:(PKDisbursementAuthorizationController *)controller API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
@end
@interface PKDisbursementAuthorizationController : NSObject
// Initializes and returns a newly created controller for the supplied disbursement request.
- (nullable instancetype)initWithDisbursementRequest:(PKDisbursementRequest *)disbursementRequest
delegate:(id<PKDisbursementAuthorizationControllerDelegate>)delegate API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
// The controller's delegate.
@property (nonatomic, assign, readonly) id<PKDisbursementAuthorizationControllerDelegate> delegate API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
// This presents the Apple Pay sheet. If the sheet is presented successfully, success is YES. Otherwise, an error will be returned.
- (void)authorizeDisbursementWithCompletion:(void(^)(BOOL success, NSError * _Nullable error))completion API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
// Determine whether this user's account supports disbursements.
+ (BOOL)supportsDisbursements API_AVAILABLE(ios(12.2)) API_UNAVAILABLE(tvos, watchos, macos);
@end
NS_ASSUME_NONNULL_END
// ========== PassKit.framework/Headers/PKPaymentRequest.h
//
// PKPaymentRequest.h
//
// Copyright (c) 2014, Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <PassKit/PKConstants.h>
#if TARGET_OS_IOS && !TARGET_OS_UIKITFORMAC
#import <AddressBook/ABRecord.h>
#endif // TARGET_OS_IOS
#import <PassKit/PKConstants.h>
#ifndef __PKPAYMENTREQUEST_H__
#define __PKPAYMENTREQUEST_H__
@class PKContact;
NS_ASSUME_NONNULL_BEGIN
typedef NS_OPTIONS(NSUInteger, PKMerchantCapability) {
PKMerchantCapability3DS = 1UL << 0, // Merchant supports 3DS
PKMerchantCapabilityEMV = 1UL << 1, // Merchant supports EMV
PKMerchantCapabilityCredit NS_ENUM_AVAILABLE_IOS(9_0) = 1UL << 2, // Merchant supports credit
PKMerchantCapabilityDebit NS_ENUM_AVAILABLE_IOS(9_0) = 1UL << 3 // Merchant supports debit
} API_AVAILABLE(ios(8.0), watchos(3.0));
typedef NS_OPTIONS(NSUInteger, PKAddressField) {
PKAddressFieldNone = 0UL, // No address fields required.
PKAddressFieldPostalAddress = 1UL << 0, // Full street address including name, street, city, state/province, postal code, country.
PKAddressFieldPhone = 1UL << 1,
PKAddressFieldEmail = 1UL << 2,
PKAddressFieldName NS_ENUM_AVAILABLE_IOS(8_3) = 1UL << 3,
PKAddressFieldAll = (PKAddressFieldPostalAddress|PKAddressFieldPhone|PKAddressFieldEmail|PKAddressFieldName)
} API_DEPRECATED("Use PKContactField and -requiredShippingContactFields / -requiredBillingContactFields", ios(8.0, 11.0), watchos(3.0, 4.0));
typedef NS_ENUM(NSUInteger, PKShippingType) {
PKShippingTypeShipping,
PKShippingTypeDelivery,
PKShippingTypeStorePickup,
PKShippingTypeServicePickup
} API_AVAILABLE(ios(8.3), watchos(3.0));
typedef NS_ENUM(NSUInteger, PKPaymentSummaryItemType) {
PKPaymentSummaryItemTypeFinal, // The payment summary item's amount is known to be correct
PKPaymentSummaryItemTypePending // The payment summary item's amount is estimated or unknown - e.g, a taxi fare
} API_AVAILABLE(ios(9.0), watchos(3.0));
// PKPaymentSummaryItem Defines a line-item for a payment such as tax, shipping, or discount.
API_AVAILABLE(ios(8.0), watchos(3.0))
@interface PKPaymentSummaryItem : NSObject
+ (instancetype)summaryItemWithLabel:(NSString *)label amount:(NSDecimalNumber *)amount;
+ (instancetype)summaryItemWithLabel:(NSString *)label amount:(NSDecimalNumber *)amount type:(PKPaymentSummaryItemType)type API_AVAILABLE(ios(9.0), watchos(3.0));
// A short localized description of the item, e.g. "Tax" or "Gift Card".
@property (nonatomic, copy) NSString *label;
// Same currency as the enclosing PKPaymentRequest. Negative values are permitted, for example when
// redeeming a coupon. An amount is always required unless the summary item's type is set to pending
@property (nonatomic, copy) NSDecimalNumber *amount;
// Defaults to PKPaymentSummaryItemTypeFinal
// Set to PKPaymentSummaryItemTypePending if the amount of the item is not known at this time
@property (nonatomic, assign) PKPaymentSummaryItemType type API_AVAILABLE(ios(9.0), watchos(3.0));
@end
// Defines a shipping method for delivering physical goods.
API_AVAILABLE(ios(8.0), watchos(3.0))
@interface PKShippingMethod : PKPaymentSummaryItem
// Application-defined unique identifier for this shipping method. The application will receive this
// in paymentAuthorizationViewController:didAuthorizePayment:completion:.
@property (nonatomic, copy, nullable) NSString *identifier;
// Additional localized information about the shipping method, e.g. "Ships in 24 hours" or
// "Arrives Friday April 4."
@property (nonatomic, copy, nullable) NSString *detail;
@end
// PKPaymentRequest defines an application's request to produce a payment instrument for the
// purchase of goods and services. It encapsulates information about the selling party's payment
// processing capabilities, an amount to pay, and the currency code.
API_AVAILABLE(ios(8.0), watchos(3.0))
@interface PKPaymentRequest : NSObject
// The payment networks and platforms supported for in-app payment
+ (NSArray<PKPaymentNetwork> *)availableNetworks API_AVAILABLE(ios(10.0), watchos(3.0));
// Convenience method to create a payment contact error with the supplied field
// You may optionally provide a localized description to be displayed to the user.
// Available display space for descriptions may be limited, so you should keep your messages concise
+ (NSError *)paymentContactInvalidErrorWithContactField:(PKContactField)field
localizedDescription:(nullable NSString *)localizedDescription API_AVAILABLE(ios(11.0), watchos(4.0));
// Convenience method to create a payment shipping address error with the supplied CNPostalAddressKey and description
+ (NSError *)paymentShippingAddressInvalidErrorWithKey:(NSString *)postalAddressKey
localizedDescription:(nullable NSString *)localizedDescription API_AVAILABLE(ios(11.0), watchos(4.0));
// Convenience method to create a payment billing address error with the supplied CNPostalAddressKey and description
+ (NSError *)paymentBillingAddressInvalidErrorWithKey:(NSString *)postalAddressKey
localizedDescription:(nullable NSString *)localizedDescription API_AVAILABLE(ios(11.0), watchos(4.0));
// Convenience method to create a payment shipping address service error with the supplied description
+ (NSError *)paymentShippingAddressUnserviceableErrorWithLocalizedDescription:(nullable NSString *)localizedDescription API_AVAILABLE(ios(11.0), watchos(4.0));
// Identifies the merchant, as previously agreed with Apple. Must match one of the merchant
// identifiers in the application's entitlement.
@property (nonatomic, copy) NSString *merchantIdentifier;
// The merchant's ISO country code.
@property (nonatomic, copy) NSString *countryCode;
// The payment networks supported by the merchant, for example @[ PKPaymentNetworkVisa,
// PKPaymentNetworkMasterCard ]. This property constrains payment cards that may fund the payment.
@property (nonatomic, copy) NSArray<PKPaymentNetwork> *supportedNetworks;
// The payment processing capabilities of the merchant.
@property (nonatomic, assign) PKMerchantCapability merchantCapabilities;
// Array of PKPaymentSummaryItem objects which should be presented to the user.
// The last item should be the total you wish to charge, and should not be pending
@property (nonatomic, copy) NSArray<PKPaymentSummaryItem *> *paymentSummaryItems;
// Currency code for this payment.
@property (nonatomic, copy) NSString *currencyCode;
// Indicates which billing contact fields the merchant requires in order to process a transaction.
// Currently only postal address may be requested for billing contact. For all other fields use -requiredShippingContactFields
@property (nonatomic, strong) NSSet<PKContactField> *requiredBillingContactFields API_AVAILABLE(ios(11.0), watchos(4.0));
// Indicates which billing address fields are required. The default is PKAddressFieldNone.
// This property is deprecated and should not be used.
@property (nonatomic, assign) PKAddressField requiredBillingAddressFields API_DEPRECATED_WITH_REPLACEMENT("requiredBillingContactFields", ios(8.0, 11.0), watchos(2.0, 4.0));
// If the merchant already has a billing address on file, set it here.
@property (nonatomic, strong, nullable) PKContact *billingContact API_AVAILABLE(ios(9.0), watchos(3.0));
// Indicates which shipping contact fields the merchant requires in order to process a transactions
//
@property (nonatomic, strong) NSSet<PKContactField> *requiredShippingContactFields API_AVAILABLE(ios(11.0), watchos(4.0));
// Indicates which shipping address fields are required. The default is PKAddressFieldNone.
// This property is deprecated and should not be used
@property (nonatomic, assign) PKAddressField requiredShippingAddressFields API_DEPRECATED_WITH_REPLACEMENT("requiredShippingContactFields", ios(8.0, 11.0), watchos(2.0, 4.0));
// If the merchant already has a shipping address on file, set it here.
@property (nonatomic, strong, nullable) PKContact *shippingContact API_AVAILABLE(ios(9.0), watchos(3.0));
// Shipping methods supported by the merchant.
@property (nonatomic, copy, nullable) NSArray<PKShippingMethod *> *shippingMethods;
// Indicates the display mode for the shipping (e.g, "Pick Up", "Ship To", "Deliver To"). Localized.
// The default is PKShippingTypeShipping
@property (nonatomic, assign) PKShippingType shippingType API_AVAILABLE(ios(8.3), watchos(3.0));
// Optional merchant-supplied information about the payment request. Examples of this are an order
// or cart identifier. It will be signed and included in the resulting PKPaymentToken.
@property (nonatomic, copy, nullable) NSData *applicationData;
// Set of two-letter ISO 3166 country codes. When provided will filter the selectable payment passes to those
// issued in the supported countries.
@property (nonatomic, copy, nullable) NSSet<NSString *> *supportedCountries API_AVAILABLE(ios(11.0), watchos(4.0));
#if TARGET_OS_IOS && !TARGET_OS_UIKITFORMAC
// These properties have been deprecated and should not be used.
@property (nonatomic, assign, nullable) ABRecordRef shippingAddress __WATCHOS_PROHIBITED API_DEPRECATED("ABRecordRef has been deprecated, and does not support all available address properties. You should migrate to shippingContact.", ios(8.0, 9.0));
@property (nonatomic, assign, nullable) ABRecordRef billingAddress __WATCHOS_PROHIBITED API_DEPRECATED("ABRecordRef has been deprecated, and does not support all available address properties. You should migrate to billingContact.", ios(8.0, 9.0));
#endif
@end
NS_ASSUME_NONNULL_END
#endif // __PKPAYMENTREQUEST_H__
// ========== PassKit.framework/Headers/PKPaymentAuthorizationViewController.h
//
// PKPaymentAuthorizationViewController.h
// PassKit
//
// Copyright (c) 2014 Apple, Inc. All rights reserved.
//
#if !TARGET_OS_WATCH && !TARGET_OS_TV
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#if !TARGET_OS_UIKITFORMAC