Merge pull request #700 from stripe/bdorfman-deprecate-source-polling

Source polling is deprecated
This commit is contained in:
Brian Dorfman 2017-06-13 17:07:57 -07:00 committed by GitHub
commit 734f9436d0
3 changed files with 8 additions and 2 deletions

View File

@ -82,6 +82,8 @@
} }
} }
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
- (void)pay { - (void)pay {
if (![Stripe defaultPublishableKey]) { if (![Stripe defaultPublishableKey]) {
[self.delegate exampleViewController:self didFinishWithMessage:@"Please set a Stripe Publishable Key in Constants.m"]; [self.delegate exampleViewController:self didFinishWithMessage:@"Please set a Stripe Publishable Key in Constants.m"];
@ -130,5 +132,6 @@
} }
}]; }];
} }
#pragma clang diagnostic pop
@end @end

View File

@ -104,6 +104,8 @@
self.navigationItem.rightBarButtonItem.enabled = textField.isValid; self.navigationItem.rightBarButtonItem.enabled = textField.isValid;
} }
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
- (void)pay { - (void)pay {
if (![self.paymentTextField isValid]) { if (![self.paymentTextField isValid]) {
return; return;
@ -169,5 +171,6 @@
} }
}]; }];
} }
#pragma clang diagnostic pop
@end @end

View File

@ -239,7 +239,7 @@ static NSString *const STPSDKVersion = @"10.1.0";
* @param timeout The timeout for the polling operation, in seconds. Timeouts are capped at 5 minutes. * @param timeout The timeout for the polling operation, in seconds. Timeouts are capped at 5 minutes.
* @param completion The callback to run with the returned Source object, or an error. * @param completion The callback to run with the returned Source object, or an error.
*/ */
- (void)startPollingSourceWithId:(NSString *)identifier clientSecret:(NSString *)secret timeout:(NSTimeInterval)timeout completion:(STPSourceCompletionBlock)completion NS_EXTENSION_UNAVAILABLE("Source polling is not available in extensions");; - (void)startPollingSourceWithId:(NSString *)identifier clientSecret:(NSString *)secret timeout:(NSTimeInterval)timeout completion:(STPSourceCompletionBlock)completion NS_EXTENSION_UNAVAILABLE("Source polling is not available in extensions") DEPRECATED_MSG_ATTRIBUTE("You should poll your own backend to update based on source status change webhook events it may receive.");
/** /**
* Stops polling the Source object with the given ID. Note that the completion block passed to * Stops polling the Source object with the given ID. Note that the completion block passed to
@ -247,7 +247,7 @@ static NSString *const STPSDKVersion = @"10.1.0";
* *
* @param identifier The identifier of the source to be retrieved. Cannot be nil. * @param identifier The identifier of the source to be retrieved. Cannot be nil.
*/ */
- (void)stopPollingSourceWithId:(NSString *)identifier NS_EXTENSION_UNAVAILABLE("Source polling is not available in extensions");; - (void)stopPollingSourceWithId:(NSString *)identifier NS_EXTENSION_UNAVAILABLE("Source polling is not available in extensions") DEPRECATED_ATTRIBUTE;
@end @end