PassKitInstallmentsSPI.h [plain text]
#ifndef PAL_PASSKIT_SPI_GUARD_AGAINST_INDIRECT_INCLUSION
#error "Please #include <pal/spi/cocoa/PassKitSPI.h> instead of this file directly."
#endif
#if HAVE(PASSKIT_INSTALLMENTS_IN_SDK)
#import <PassKit/PKPaymentRequest_Private.h>
#import <PassKitCore/PKPaymentMethod_Private.h>
#import <PassKitCore/PKPaymentRequestStatus_Private.h>
#import <PassKitCore/PKPayment_Private.h>
#elif HAVE(PASSKIT_INSTALLMENTS)
typedef NS_ENUM(NSInteger, PKInstallmentItemType) {
PKInstallmentItemTypeGeneric = 0,
PKInstallmentItemTypePhone,
PKInstallmentItemTypePad,
PKInstallmentItemTypeWatch,
PKInstallmentItemTypeMac,
};
typedef NS_ENUM(NSInteger, PKInstallmentRetailChannel) {
PKInstallmentRetailChannelUnknown = 0,
PKInstallmentRetailChannelApp,
PKInstallmentRetailChannelWeb,
PKInstallmentRetailChannelInStore,
};
typedef NS_ENUM(NSUInteger, PKPaymentRequestType) {
PKPaymentRequestTypeInstallment = 5,
};
@interface PKPaymentInstallmentConfiguration : NSObject <NSSecureCoding>
@end
@interface PKPaymentInstallmentItem : NSObject <NSSecureCoding>
@end
@interface PKPayment () <NSSecureCoding>
@property (nonatomic, copy) NSString *installmentAuthorizationToken;
@end
@interface PKPaymentInstallmentConfiguration ()
@property (nonatomic, assign) PKPaymentSetupFeatureType feature;
@property (nonatomic, copy) NSData *merchandisingImageData;
@property (nonatomic, strong) NSDecimalNumber *openToBuyThresholdAmount;
@property (nonatomic, strong) NSDecimalNumber *bindingTotalAmount;
@property (nonatomic, copy) NSString *currencyCode;
@property (nonatomic, assign, getter=isInStorePurchase) BOOL inStorePurchase;
@property (nonatomic, copy) NSString *installmentMerchantIdentifier;
@property (nonatomic, copy) NSString *referrerIdentifier;
@property (nonatomic, copy) NSArray<PKPaymentInstallmentItem *> *installmentItems;
@property (nonatomic, copy) NSDictionary<NSString *, id> *applicationMetadata;
@property (nonatomic, assign) PKInstallmentRetailChannel retailChannel;
@end
@interface PKPaymentInstallmentItem ()
@property (nonatomic, assign) PKInstallmentItemType installmentItemType;
@property (nonatomic, copy) NSDecimalNumber *amount;
@property (nonatomic, copy) NSString *currencyCode;
@property (nonatomic, copy) NSString *programIdentifier;
@property (nonatomic, copy) NSDecimalNumber *apr;
@property (nonatomic, copy) NSString *programTerms;
@end
@interface PKPaymentMethod () <NSSecureCoding>
@property (nonatomic, copy) NSString *bindToken;
@end
@interface PKPaymentRequest ()
@property (nonatomic, assign) PKPaymentRequestAPIType APIType;
@property (nonatomic, strong) PKPaymentInstallmentConfiguration *installmentConfiguration;
@property (nonatomic, assign) PKPaymentRequestType requestType;
@end
@interface PKPaymentRequestPaymentMethodUpdate ()
@property (nonatomic, copy) NSString *installmentGroupIdentifier;
@end
#if !USE(APPLE_INTERNAL_SDK) || !__has_include(<PassKitCore/PKPaymentInstallmentConfiguration.h>)
typedef NS_OPTIONS(NSInteger, PKPaymentSetupFeatureSupportedOptions) {
PKPaymentSetupFeatureSupportedOptionsInstallments = 1 << 0,
};
@interface PKPaymentSetupFeature ()
@property (nonatomic, assign, readonly) PKPaymentSetupFeatureSupportedOptions supportedOptions;
@end
#endif
#endif // HAVE(PASSKIT_INSTALLMENTS)