From 76c785f46684db299aea0d1d6a972d045092cb21 Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Thu, 20 Jun 2024 16:15:31 -0700 Subject: [PATCH 1/7] deprecation lines for BTPayPalNativeCheckoutClient --- .../BTPayPalNativeCheckoutAccountNonce.swift | 1 + .../BTPayPalNativeCheckoutClient.swift | 1 + .../BTPayPalNativeCheckoutError.swift | 1 + .../BTPayPalNativeCheckoutRequest.swift | 1 + .../BTPayPalNativeVaultRequest.swift | 1 + 5 files changed, 5 insertions(+) diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutAccountNonce.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutAccountNonce.swift index e82a517780..dccd6a5d35 100644 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutAccountNonce.swift +++ b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutAccountNonce.swift @@ -10,6 +10,7 @@ import BraintreePayPal import PayPalCheckout +@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") /// Contains information about a PayPal payment method. @objcMembers public class BTPayPalNativeCheckoutAccountNonce: BTPaymentMethodNonce { diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift index 120860b856..9a45f5b5ba 100644 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift +++ b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift @@ -10,6 +10,7 @@ import BraintreePayPal import PayPalCheckout +@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") /// Client used to collect PayPal payment methods. If possible, this client will present a native flow; otherwise, it will fall back to a web flow. @objc public class BTPayPalNativeCheckoutClient: NSObject { diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutError.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutError.swift index 2ccc8f2933..2262d66bdd 100644 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutError.swift +++ b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutError.swift @@ -1,6 +1,7 @@ import Foundation import PayPalCheckout +@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") /// Error returned from the native PayPal flow public enum BTPayPalNativeCheckoutError: Error, CustomNSError, LocalizedError, Equatable { diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutRequest.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutRequest.swift index f333a61fd7..a5591b46ac 100644 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutRequest.swift +++ b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutRequest.swift @@ -8,6 +8,7 @@ import BraintreeCore import BraintreePayPal #endif +@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") /// Options for the PayPal Checkout flow. @objcMembers public class BTPayPalNativeCheckoutRequest: BTPayPalCheckoutRequest { diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeVaultRequest.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeVaultRequest.swift index 6fa44883b7..ecd4fa7400 100644 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeVaultRequest.swift +++ b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeVaultRequest.swift @@ -8,6 +8,7 @@ import BraintreeCore import BraintreePayPal #endif +@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") /// Options for the PayPal Vault flow. @objcMembers public class BTPayPalNativeVaultRequest: BTPayPalVaultBaseRequest { From d05fc1a54d12a1a22026567bc35e43f1be45190a Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Thu, 20 Jun 2024 16:21:19 -0700 Subject: [PATCH 2/7] add deprecate message for public functions --- .../BTPayPalNativeCheckoutClient.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift index 9a45f5b5ba..b216ea9074 100644 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift +++ b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift @@ -26,6 +26,7 @@ import PayPalCheckout private let nativeCheckoutProvider: BTPayPalNativeCheckoutStartable + @available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") /// Initializes a PayPal Native client. /// - Parameter apiClient: The Braintree API client @objc(initWithAPIClient:) @@ -38,6 +39,7 @@ import PayPalCheckout self.nativeCheckoutProvider = nativeCheckoutProvider } + @available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") // MARK: - Public Methods /// Tokenize a PayPal request to be used with the PayPal Native Checkout flow. @@ -57,6 +59,7 @@ import PayPalCheckout tokenize(request: request, userAuthenticationEmail: request.userAuthenticationEmail, completion: completion) } + @available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") /// Tokenize a PayPal request to be used with the PayPal Native Checkout flow. /// /// On success, you will receive an instance of `BTPayPalNativeCheckoutAccountNonce`. @@ -78,6 +81,7 @@ import PayPalCheckout } } + @available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") /// Tokenize a PayPal request to be used with the PayPal Native Vault flow. /// /// On success, you will receive an instance of `BTPayPalNativeCheckoutAccountNonce`. @@ -95,6 +99,7 @@ import PayPalCheckout tokenize(request: request, completion: completion) } + @available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") /// Tokenize a PayPal request to be used with the PayPal Native Vault flow. /// /// On success, you will receive an instance of `BTPayPalNativeCheckoutAccountNonce`. From 1a51dd562b3a5f00fabcfb7f51ac570ca96b780e Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Thu, 20 Jun 2024 16:23:04 -0700 Subject: [PATCH 3/7] CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec3f4c87e9..384633eb7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## unreleased * BraintreeCore * For analytics, only call `fetchOrReturnRemoteConfig()` when batch uploading, not on each analytic event enqueue +* BraintreePayPalNativeCheckout + * Add deprecated warning in public classes and methods ## 6.21.0 (2024-06-12) * BraintreePayPal From fd589bb2a0736b68253eb84ee906310d9b4684b3 Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Fri, 21 Jun 2024 08:09:26 -0700 Subject: [PATCH 4/7] add annotation on non public related classes to suppress lint errors --- .../Features/PayPalNativeCheckoutViewController.swift | 1 + .../BTPayPalNativeCheckoutProvider.swift | 1 + .../BTPayPalNativeCheckoutStartable.swift | 1 + .../BTPayPalNativeOrderCreationClient.swift | 1 + .../BTPayPalNativeTokenizationClient.swift | 1 + .../BTPayPalNativeTokenizationRequest.swift | 1 + 6 files changed, 6 insertions(+) diff --git a/Demo/Application/Features/PayPalNativeCheckoutViewController.swift b/Demo/Application/Features/PayPalNativeCheckoutViewController.swift index ad1aa0703b..d666057c06 100644 --- a/Demo/Application/Features/PayPalNativeCheckoutViewController.swift +++ b/Demo/Application/Features/PayPalNativeCheckoutViewController.swift @@ -2,6 +2,7 @@ import Foundation import UIKit import BraintreePayPalNativeCheckout +@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") class PayPalNativeCheckoutViewController: PaymentButtonBaseViewController { lazy var payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient) diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutProvider.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutProvider.swift index e7cc3e3f9f..2532b2511b 100644 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutProvider.swift +++ b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutProvider.swift @@ -5,6 +5,7 @@ import PayPalCheckout import BraintreePayPal #endif +@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") class BTPayPalNativeCheckoutProvider: BTPayPalNativeCheckoutStartable { /// Used in POST body for FPTI analytics. diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutStartable.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutStartable.swift index 45ef0ad665..c1da08dbe3 100644 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutStartable.swift +++ b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutStartable.swift @@ -5,6 +5,7 @@ import PayPalCheckout import BraintreePayPal #endif +@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") protocol BTPayPalNativeCheckoutStartable { typealias StartableApproveCallback = (String?, User?) -> Void diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeOrderCreationClient.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeOrderCreationClient.swift index b4cfa4da3f..715942b48c 100644 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeOrderCreationClient.swift +++ b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeOrderCreationClient.swift @@ -14,6 +14,7 @@ struct BTPayPalNativeOrder: Equatable { let orderID: String } +@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") class BTPayPalNativeOrderCreationClient { var payPalContextID: String? = nil diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationClient.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationClient.swift index e9e8f15689..eaf345712e 100644 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationClient.swift +++ b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationClient.swift @@ -8,6 +8,7 @@ import BraintreePayPal import PayPalCheckout +@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") class BTPayPalNativeTokenizationClient { private let apiClient: BTAPIClient diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationRequest.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationRequest.swift index 4a7ca7862f..da131fb7aa 100644 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationRequest.swift +++ b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationRequest.swift @@ -8,6 +8,7 @@ import BraintreePayPal import PayPalCheckout +@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") class BTPayPalNativeTokenizationRequest { private let request: BTPayPalRequest From 59485d6ee2974840bd7803272d6b4c3bdb056e95 Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Fri, 21 Jun 2024 09:42:26 -0700 Subject: [PATCH 5/7] Jax PR feedback --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 384633eb7b..cbeea4c562 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,9 @@ ## unreleased * BraintreeCore * For analytics, only call `fetchOrReturnRemoteConfig()` when batch uploading, not on each analytic event enqueue -* BraintreePayPalNativeCheckout - * Add deprecated warning in public classes and methods +* BraintreePayPalNativeCheckout (DEPRECATED) + * **Note:** This module is deprecated and will be removed in a future version of the SDK + * Add deprecated warning message to all public classes and methods ## 6.21.0 (2024-06-12) * BraintreePayPal From 991982b41a3dd722ba7c0c40ae1aab7861a0985a Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Fri, 21 Jun 2024 12:27:34 -0700 Subject: [PATCH 6/7] Jax PR feedback: remove annotation in demo app vc --- .../Features/PayPalNativeCheckoutViewController.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Demo/Application/Features/PayPalNativeCheckoutViewController.swift b/Demo/Application/Features/PayPalNativeCheckoutViewController.swift index d666057c06..ad1aa0703b 100644 --- a/Demo/Application/Features/PayPalNativeCheckoutViewController.swift +++ b/Demo/Application/Features/PayPalNativeCheckoutViewController.swift @@ -2,7 +2,6 @@ import Foundation import UIKit import BraintreePayPalNativeCheckout -@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") class PayPalNativeCheckoutViewController: PaymentButtonBaseViewController { lazy var payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient) From 6e51bafa12452310abae2828b89630f02fea0aa8 Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Mon, 1 Jul 2024 07:41:53 -0700 Subject: [PATCH 7/7] Jax PR feedback --- .../BTPayPalNativeCheckoutClient.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift index b216ea9074..4b0e0a6b4e 100644 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift +++ b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift @@ -39,9 +39,9 @@ import PayPalCheckout self.nativeCheckoutProvider = nativeCheckoutProvider } - @available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") // MARK: - Public Methods + @available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") /// Tokenize a PayPal request to be used with the PayPal Native Checkout flow. /// /// On success, you will receive an instance of `BTPayPalNativeCheckoutAccountNonce`.