Commit c9b3e283 by Brent Gulanowski

Add nullability specificiers.

parent 5801c8bc
......@@ -27,7 +27,9 @@
@import UIKit;
#import "BUYPaymentProvider.h"
extern NSString *const _Nonnull BUYApplePayPaymentProviderId;
NS_ASSUME_NONNULL_BEGIN
extern NSString *const BUYApplePayPaymentProviderId;
@class BUYClient;
......@@ -41,20 +43,20 @@ extern NSString *const _Nonnull BUYApplePayPaymentProviderId;
*
* @return an instance of `BUYApplePayPaymentProvider`
*/
- (instancetype _Nullable)initWithClient:(BUYClient * _Nonnull)client merchantID:(NSString * _Nonnull)merchantID NS_DESIGNATED_INITIALIZER;
- (instancetype _Nullable)init NS_UNAVAILABLE;
- (instancetype)initWithClient:(BUYClient *)client merchantID:(NSString *)merchantID NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
/**
* The supported credit card payment networks. Default values:
* iOS 8.3: PKPaymentNetworkAmex, PKPaymentNetworkMasterCard, PKPaymentNetworkVisa.
* iOS 9.0: PKPaymentNetworkAmex, PKPaymentNetworkDiscover, PKPaymentNetworkMasterCard, PKPaymentNetworkVisa.
*/
@property (nonatomic, copy) NSArray * _Nonnull supportedNetworks;
@property (nonatomic, copy) NSArray * supportedNetworks;
/**
* The merchant ID required for Apple Pay
*/
@property (nonatomic, copy, readonly) NSString * _Nonnull merchantID;
@property (nonatomic, copy, readonly) NSString * merchantID;
/**
* If the merchantId is set and the device support Apple Pay but no credit card is present this allows the user to add a payment pass to the Wallet.
......@@ -73,3 +75,5 @@ extern NSString *const _Nonnull BUYApplePayPaymentProviderId;
- (BOOL)canShowApplePaySetup;
@end
NS_ASSUME_NONNULL_END
......@@ -26,8 +26,12 @@
#import <Buy/Buy.h>
NS_ASSUME_NONNULL_BEGIN
@interface BUYClient (Checkout)
- (NSURLSessionDataTask *)handleCheckout:(BUYCheckout *)checkout completion:(BUYDataCheckoutBlock)completion;
@end
NS_ASSUME_NONNULL_END
......@@ -27,6 +27,8 @@
@import Foundation;
#import "BUYPaymentProvider.h"
NS_ASSUME_NONNULL_BEGIN
@interface BUYPaymentController : NSObject
/**
......@@ -50,7 +52,7 @@
*
* @return The payment provider matching the given identifier
*/
- (id <BUYPaymentProvider>)providerForType:(NSString *)type;
- (id <BUYPaymentProvider> _Nullable)providerForType:(NSString *)type;
/**
* Start a checkout
......@@ -61,3 +63,5 @@
- (void)startCheckout:(BUYCheckout *)checkout withProviderType:(NSString *)typeIdentifier;
@end
NS_ASSUME_NONNULL_END
......@@ -28,6 +28,8 @@
#import "BUYClient.h"
NS_ASSUME_NONNULL_BEGIN
@class BUYCheckout;
@protocol BUYPaymentProvider;
......@@ -86,7 +88,7 @@ extern NSString *const BUYPaymentProviderDidCompleteCheckoutNotificationKey;
* @param provider the `BUYPaymentProvider`
* @param error the optional `NSError`
*/
- (void)paymentProvider:(id <BUYPaymentProvider>)provider didFailCheckoutWithError:(NSError *)error;
- (void)paymentProvider:(id <BUYPaymentProvider>)provider didFailCheckoutWithError:(NSError * _Nullable)error;
/**
* Called when the checkout has completed
......@@ -139,3 +141,5 @@ extern NSString *const BUYPaymentProviderDidCompleteCheckoutNotificationKey;
@property (nonatomic, weak) id <BUYPaymentProviderDelegate> delegate;
@end
NS_ASSUME_NONNULL_END
......@@ -27,9 +27,11 @@
#import <Foundation/Foundation.h>
#import "BUYPaymentProvider.h"
extern NSString * _Nonnull BUYSafariCallbackURLNotification;
extern NSString * _Nonnull BUYURLKey;
extern NSString * _Nonnull const BUYWebPaymentProviderId;
NS_ASSUME_NONNULL_BEGIN
extern NSString * BUYSafariCallbackURLNotification;
extern NSString * BUYURLKey;
extern NSString * const BUYWebPaymentProviderId;
@interface BUYWebCheckoutPaymentProvider : NSObject <BUYPaymentProvider>
......@@ -40,7 +42,9 @@ extern NSString * _Nonnull const BUYWebPaymentProviderId;
*
* @return an instance of `BUYWebCheckoutPaymentProvider`
*/
- (instancetype _Nullable)initWithClient:(BUYClient * _Nonnull)client NS_DESIGNATED_INITIALIZER;
- (instancetype _Nullable)init NS_UNAVAILABLE;
- (instancetype)initWithClient:(BUYClient *)client NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment