Skip to content

Commit

Permalink
MOB-853 Deprecating SDK in favour of new SDK
Browse files Browse the repository at this point in the history
	- Added deprecating tags and messages to app header files that are publicly used by developers
  • Loading branch information
Peter-John-paystack committed Nov 15, 2023
1 parent 37356c1 commit 9108665
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
8 changes: 4 additions & 4 deletions Paystack/PublicHeaders/PSTCKAPIClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ typedef void (^PSTCKNotifyCompletionBlock)(void);
onViewController:(nonnull UIViewController *)viewController
didEndWithError:(nonnull PSTCKErrorCompletionBlock)errorCompletion
didRequestValidation:(nonnull PSTCKTransactionCompletionBlock)beforeValidateCompletion
didTransactionSuccess:(nonnull PSTCKTransactionCompletionBlock)successCompletion;
didTransactionSuccess:(nonnull PSTCKTransactionCompletionBlock)successCompletion __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

/// Charges a card using the Paystack API
/// @param card The user's card details. Cannot be nil
Expand All @@ -95,16 +95,16 @@ typedef void (^PSTCKNotifyCompletionBlock)(void);
didRequestValidation:(nonnull PSTCKTransactionCompletionBlock)beforeValidateCompletion
willPresentDialog:(nonnull PSTCKNotifyCompletionBlock)showingDialogCompletion
dismissedDialog:(nonnull PSTCKNotifyCompletionBlock)dialogDismissedCompletion
didTransactionSuccess:(nonnull PSTCKTransactionCompletionBlock)successCompletion;
didTransactionSuccess:(nonnull PSTCKTransactionCompletionBlock)successCompletion __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

- (void) chargeCard:(nonnull PSTCKCardParams *)card
forTransaction:(nonnull PSTCKTransactionParams *)transaction
onViewController:(nonnull UIViewController *)viewController
didEndWithError:(nonnull PSTCKErrorCompletionBlock)errorCompletion
willPresentDialog:(nonnull PSTCKNotifyCompletionBlock)showingDialogCompletion
dismissedDialog:(nonnull PSTCKNotifyCompletionBlock)dialogDismissedCompletion
didTransactionSuccess:(nonnull PSTCKTransactionCompletionBlock)successCompletion;
didTransactionSuccess:(nonnull PSTCKTransactionCompletionBlock)successCompletion __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

- (void) setProcessingStatus:(Boolean)status;
- (void) setProcessingStatus:(Boolean)status __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

@end
12 changes: 6 additions & 6 deletions Paystack/PublicHeaders/PSTCKCard.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,24 @@ typedef NS_ENUM(NSInteger, PSTCKCardFundingType) {
/**
* The Paystack ID for the card.
*/
@property (nonatomic, readonly, nullable) NSString *cardId;
@property (nonatomic, readonly, nullable) NSString *cardId __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

/**
* The issuer of the card.
*/
@property (nonatomic, readonly) PSTCKCardBrand brand;
@property (nonatomic, readonly) PSTCKCardBrand brand __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

/**
* The issuer of the card.
* Can be one of "Visa", "American Express", "MasterCard", "Discover", "JCB", "Diners Club", or "Unknown"
* @deprecated use "brand" instead.
*/
@property (nonatomic, readonly, nonnull) NSString *type __attribute__((deprecated));
@property (nonatomic, readonly, nonnull) NSString *type __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

/**
* The funding source for the card (credit, debit, prepaid, or other)
*/
@property (nonatomic, readonly) PSTCKCardFundingType funding;
@property (nonatomic, readonly) PSTCKCardFundingType funding __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

/**
* A proxy for the card's number, this uniquely identifies the credit card and can be used to compare different cards.
Expand All @@ -95,12 +95,12 @@ typedef NS_ENUM(NSInteger, PSTCKCardFundingType) {
/**
* Two-letter ISO code representing the issuing country of the card.
*/
@property (nonatomic, readonly, nullable) NSString *country;
@property (nonatomic, readonly, nullable) NSString *country __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

/**
* This is only applicable when tokenizing debit cards to issue payouts to managed accounts. You should not set it otherwise. The card can then be used as a transfer destination for funds in this currency.
*/
@property (nonatomic, copy, nullable) NSString *currency;
@property (nonatomic, copy, nullable) NSString *currency __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

#pragma mark - deprecated properties

Expand Down
12 changes: 8 additions & 4 deletions Paystack/PublicHeaders/PSTCKTransactionParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,21 @@

- (nullable PSTCKTransactionParams *) setMetadataValue:(nonnull NSString*)value
forKey:(nonnull NSString*)key
error:(NSError * _Nullable __autoreleasing * _Nonnull) error;
error:(NSError * _Nullable __autoreleasing * _Nonnull) error
__attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

- (nullable PSTCKTransactionParams *) setMetadataValueDict:(nonnull NSMutableDictionary*)dict
forKey:(nonnull NSString*)key
error:(NSError * _Nullable __autoreleasing * _Nonnull) error;
error:(NSError * _Nullable __autoreleasing * _Nonnull) error
__attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

- (nullable PSTCKTransactionParams *) setMetadataValueArray:(nonnull NSMutableArray*)arr
forKey:(nonnull NSString*)key
error:(NSError * _Nullable __autoreleasing * _Nonnull) error;
error:(NSError * _Nullable __autoreleasing * _Nonnull) error
__attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));

- (nullable PSTCKTransactionParams *) setCustomFieldValue:(nonnull NSString*)value
displayedAs:(nonnull NSString*)display_name
error:(NSError * _Nullable __autoreleasing * _Nonnull) error;
error:(NSError * _Nullable __autoreleasing * _Nonnull) error
__attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios")));
@end
2 changes: 1 addition & 1 deletion Paystack/UI/PSTCKPaymentCardTextField.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#import "UIImage+Paystack.h"

#define FAUXPAS_IGNORED_IN_METHOD(...)

__deprecated
@interface PSTCKPaymentCardTextField()<PSTCKFormTextFieldDelegate>

@property(nonatomic, readwrite, strong)PSTCKFormTextField *sizingField;
Expand Down

0 comments on commit 9108665

Please sign in to comment.