Commit 2025e5fe by Dima Bart

Add nullability annotations to util classes.

parent 2d7c1eed
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#import <Buy/BUYCheckout.h> #import <Buy/BUYCheckout.h>
#import <Buy/BUYShippingRate.h> #import <Buy/BUYShippingRate.h>
#import <Buy/BUYAddress.h> #import <Buy/BUYAddress.h>
NS_ASSUME_NONNULL_BEGIN
@interface BUYCheckout (ApplePay) @interface BUYCheckout (ApplePay)
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
* Returns an array of summary items for all Apple Pay requests. Will use 'PAY TOTAL' as the summary label. Apple recommends * Returns an array of summary items for all Apple Pay requests. Will use 'PAY TOTAL' as the summary label. Apple recommends
* including the business name in the summary label, so it is recommended to use `buy_summaryItemsWithShopName` instead. * including the business name in the summary label, so it is recommended to use `buy_summaryItemsWithShopName` instead.
*/ */
- (nonnull NSArray<PKPaymentSummaryItem *> *)buy_summaryItems; - (NSArray<PKPaymentSummaryItem *> *)buy_summaryItems;
/** /**
* Returns an array of summary items for all Apple Pay requests using the shop name in the "PAY" section * Returns an array of summary items for all Apple Pay requests using the shop name in the "PAY" section
...@@ -46,7 +47,7 @@ ...@@ -46,7 +47,7 @@
* *
* @return An array of PKPaymentSummaryItems * @return An array of PKPaymentSummaryItems
*/ */
- (nonnull NSArray<PKPaymentSummaryItem *> *)buy_summaryItemsWithShopName:(nullable NSString *)shopName; - (NSArray<PKPaymentSummaryItem *> *)buy_summaryItemsWithShopName:(nullable NSString *)shopName;
@end @end
...@@ -59,7 +60,7 @@ ...@@ -59,7 +60,7 @@
* *
* @return An array of PKShippingMethods * @return An array of PKShippingMethods
*/ */
+ (nonnull NSArray<PKShippingMethod *> *)buy_convertShippingRatesToShippingMethods:(nonnull NSArray<BUYShippingRate *> *)rates; + (NSArray<PKShippingMethod *> *)buy_convertShippingRatesToShippingMethods:(NSArray<BUYShippingRate *> *)rates;
@end @end
...@@ -72,3 +73,5 @@ ...@@ -72,3 +73,5 @@
- (void)updateWithContact:(nullable PKContact*)contact NS_AVAILABLE_IOS(9_0); - (void)updateWithContact:(nullable PKContact*)contact NS_AVAILABLE_IOS(9_0);
@end @end
NS_ASSUME_NONNULL_END
...@@ -25,12 +25,20 @@ ...@@ -25,12 +25,20 @@
// //
#import <Buy/BUYError.h> #import <Buy/BUYError.h>
NS_ASSUME_NONNULL_BEGIN
@interface BUYError (Checkout) @interface BUYError (Checkout)
+ (NSArray<BUYError *> *)errorsFromCheckoutJSON:(NSDictionary *)json;
@property (readonly) NSString *quantityRemainingMessage; @property (readonly) NSString *quantityRemainingMessage;
+ (nullable NSArray<BUYError *> *)errorsFromCheckoutJSON:(NSDictionary *)json;
@end @end
@interface BUYError (Customer) @interface BUYError (Customer)
+ (NSArray<BUYError *> *)errorsFromSignUpJSON:(NSDictionary *)json; + (NSArray<BUYError *> *)errorsFromSignUpJSON:(NSDictionary *)json;
@end @end
NS_ASSUME_NONNULL_END
...@@ -24,8 +24,9 @@ ...@@ -24,8 +24,9 @@
// THE SOFTWARE. // THE SOFTWARE.
// //
#import <Buy/BUYModelManager.h>
@import PassKit; @import PassKit;
#import "BUYModelManager.h"
NS_ASSUME_NONNULL_BEGIN
@class BUYAddress; @class BUYAddress;
...@@ -49,4 +50,6 @@ ...@@ -49,4 +50,6 @@
*/ */
- (BUYAddress *)buyAddressWithContact:(PKContact *)contact NS_AVAILABLE_IOS(9_0); - (BUYAddress *)buyAddressWithContact:(PKContact *)contact NS_AVAILABLE_IOS(9_0);
@end @end
\ No newline at end of file
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