From a842743c629b7aa75d111af6041d02d8b81f535d Mon Sep 17 00:00:00 2001 From: Andrii Vysotskyi Date: Wed, 16 Aug 2023 12:37:32 +0200 Subject: [PATCH] feat(POM-245): deprecate gateway configuration's native APM config (#154) Deprecate use of `nativeApmConfig` in POGatewayConfiguration --- .../Methods/ViewModel/AlternativePaymentMethodsViewModel.swift | 2 +- .../Responses/POGatewayConfiguration.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Example/Example/Sources/UI/Modules/AlternativePayment/Methods/ViewModel/AlternativePaymentMethodsViewModel.swift b/Example/Example/Sources/UI/Modules/AlternativePayment/Methods/ViewModel/AlternativePaymentMethodsViewModel.swift index ae5bf92e9..4cd287012 100644 --- a/Example/Example/Sources/UI/Modules/AlternativePayment/Methods/ViewModel/AlternativePaymentMethodsViewModel.swift +++ b/Example/Example/Sources/UI/Modules/AlternativePayment/Methods/ViewModel/AlternativePaymentMethodsViewModel.swift @@ -119,7 +119,7 @@ final class AlternativePaymentMethodsViewModel: .contains(gatewayConfiguration.gatewayName ?? "") ?? false if !isSubaccount { return - } else if prefersNative, gatewayConfiguration.gateway?.nativeApmConfig != nil { + } else if prefersNative { let paymentRoute = AlternativePaymentMethodsRoute.NativeAlternativePayment( gatewayConfigurationId: gatewayConfiguration.id, invoiceId: invoice.id, diff --git a/Sources/ProcessOut/Sources/Repositories/GatewayConfigurations/Responses/POGatewayConfiguration.swift b/Sources/ProcessOut/Sources/Repositories/GatewayConfigurations/Responses/POGatewayConfiguration.swift index c8964ba1d..64aed6a3c 100644 --- a/Sources/ProcessOut/Sources/Repositories/GatewayConfigurations/Responses/POGatewayConfiguration.swift +++ b/Sources/ProcessOut/Sources/Repositories/GatewayConfigurations/Responses/POGatewayConfiguration.swift @@ -39,6 +39,7 @@ public struct POGatewayConfiguration: Decodable { public let canRefund: Bool /// Native alternative payment method configuration. + @available(*, deprecated, message: "Use POInvoicesService/nativeAlternativePaymentMethodTransactionDetails(request:) instead.") // swiftlint:disable:this line_length public let nativeApmConfig: NativeAlternativePaymentMethodConfig? }