Skip to content

Commit 2b72789

Browse files
committed
Deprecate delegate methods
1 parent 13865f9 commit 2b72789

8 files changed

+9
-0
lines changed

Sources/CardPayments/CardClient.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public class CardClient: NSObject {
4343
/// If `didAttempt3DSecureVerification` is `true`, check verification status with `/v3/vault/setup-token/{id}` in your server.
4444
/// - Parameters:
4545
/// - vaultRequest: The request containing setupTokenID and card
46+
@available(*, deprecated, message: "This method is deprecated and will be removed in a future release. Use the new completion handler-based approach instead.")
4647
public func vault(_ vaultRequest: CardVaultRequest) {
4748
analyticsService = AnalyticsService(coreConfig: config, setupToken: vaultRequest.setupTokenID)
4849
analyticsService?.sendEvent("card-payments:vault-wo-purchase:started")
@@ -75,6 +76,7 @@ public class CardClient: NSObject {
7576
/// - Parameters:
7677
/// - orderId: Order id for approval
7778
/// - request: The request containing the card
79+
@available(*, deprecated, message: "This method is deprecated and will be removed in a future release. Use the new completion handler-based approach instead.")
7880
public func approveOrder(request: CardRequest) {
7981
analyticsService = AnalyticsService(coreConfig: config, orderID: request.orderID)
8082
analyticsService?.sendEvent("card-payments:3ds:started")

Sources/CardPayments/CardClientError.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Foundation
33
import CorePayments
44
#endif
55

6+
@available(*, deprecated, renamed: "CardError")
67
enum CardClientError {
78

89
static let domain = "CardClientErrorDomain"

Sources/CardPayments/CardDelegate.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import CorePayments
44
#endif
55

66
/// Card delegate to handle events from CardClient
7+
@available(*, deprecated, message: "This protocol is deprecated and will be removed in a future release. Use the new completion handler-based approach instead.")
78
public protocol CardDelegate: AnyObject {
89

910
/// Notify that the Card flow finished with a successful result

Sources/CardPayments/CardVaultDelegate.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import CorePayments
44
#endif
55

66
/// CardVault delegate to handle events from CardClient
7+
@available(*, deprecated, message: "This protocol is deprecated and will be removed in a future release. Use the new completion handler-based approach instead.")
78
public protocol CardVaultDelegate: AnyObject {
89

910
/// Notify that the Card vault flow finished with a successful result

Sources/PayPalWebPayments/PayPalVaultDelegate.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import CorePayments
44
#endif
55

66
/// PayPalVault delegate to vault results from PayPalWebCheckoutClient
7+
@available(*, deprecated, message: "This protocol is deprecated and will be removed in a future release. Use the new completion handler-based approach instead.")
78
public protocol PayPalVaultDelegate: AnyObject {
89

910
/// Notify that the PayPal vault flow finished with a successful result

Sources/PayPalWebPayments/PayPalWebCheckoutClient.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class PayPalWebCheckoutClient: NSObject {
3232
/// Launch the PayPal web flow
3333
/// - Parameters:
3434
/// - request: the PayPalRequest for the transaction
35+
@available(*, deprecated, message: "This method is deprecated and will be removed in a future release. Use the new completion handler-based approach instead.")
3536
public func start(request: PayPalWebCheckoutRequest) {
3637
analyticsService = AnalyticsService(coreConfig: config, orderID: request.orderID)
3738
analyticsService?.sendEvent("paypal-web-payments:started")

Sources/PayPalWebPayments/PayPalWebCheckoutClientError.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Foundation
44
import CorePayments
55
#endif
66

7+
@available(*, deprecated, renamed: "PayPalError")
78
enum PayPalWebCheckoutClientError {
89

910
static let domain = "PayPalClientErrorDomain"

Sources/PayPalWebPayments/PayPalWebCheckoutDelegate.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import CorePayments
44
#endif
55

66
/// PayPal delegate to handle events from PayPalNativeCheckoutClient
7+
@available(*, deprecated, message: "This protocol is deprecated and will be removed in a future release. Use the new completion handler-based approach instead.")
78
public protocol PayPalWebCheckoutDelegate: AnyObject {
89

910
/// Notify that the PayPal flow finished with a successful result

0 commit comments

Comments
 (0)