From 65717271765b4cb048005d6099813dba61266633 Mon Sep 17 00:00:00 2001 From: Cameron Sabol Date: Tue, 24 Mar 2020 14:49:28 -0700 Subject: [PATCH] Fixes completion block type definition --- Stripe/STPAPIClient+Private.h | 2 +- Stripe/STPAPIClient.m | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Stripe/STPAPIClient+Private.h b/Stripe/STPAPIClient+Private.h index 29c61f8c308..0a3a7b56bff 100644 --- a/Stripe/STPAPIClient+Private.h +++ b/Stripe/STPAPIClient+Private.h @@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN - (NSURLSessionDataTask *)retrieveSourceWithId:(NSString *)identifier clientSecret:(NSString *)secret - responseCompletion:(STPAPIResponseBlock)completion; + responseCompletion:(void (^)(STPSource * _Nullable, NSHTTPURLResponse * _Nullable, NSError * _Nullable))completion; @end diff --git a/Stripe/STPAPIClient.m b/Stripe/STPAPIClient.m index 72dd4ab5fbe..25c2f5edafe 100644 --- a/Stripe/STPAPIClient.m +++ b/Stripe/STPAPIClient.m @@ -515,7 +515,9 @@ - (void)retrieveSourceWithId:(NSString *)identifier clientSecret:(NSString *)sec }]; } -- (NSURLSessionDataTask *)retrieveSourceWithId:(NSString *)identifier clientSecret:(NSString *)secret responseCompletion:(STPAPIResponseBlock)completion { +- (NSURLSessionDataTask *)retrieveSourceWithId:(NSString *)identifier + clientSecret:(NSString *)secret + responseCompletion:(void (^)(STPSource * _Nullable, NSHTTPURLResponse * _Nullable, NSError * _Nullable))completion { NSString *endpoint = [NSString stringWithFormat:@"%@/%@", APIEndpointSources, identifier]; NSDictionary *parameters = @{@"client_secret": secret}; return [STPAPIRequest getWithAPIClient:self