Skip to content

Commit

Permalink
Merge branch 'develop' into feature/enable-formitemtoggleview-externa…
Browse files Browse the repository at this point in the history
…l-testability
  • Loading branch information
goergisn authored Oct 28, 2024
2 parents e566032 + 8e655b6 commit b6109d2
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ private struct PaymentMethodField: Decodable {
}
}

// swiftlint:disable file_length
internal enum AnyPaymentMethodDecoder {

private static var decoders: [PaymentMethodType: PaymentMethodDecoder] = [
Expand Down Expand Up @@ -514,3 +515,5 @@ private struct TwintPaymentMethodDecoder: PaymentMethodDecoder {
return nil
}
}

// swiftlint:enable file_length
1 change: 1 addition & 0 deletions Adyen/Model/PrefilledShopperInformation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public struct PrefilledShopperInformation: ShopperInformation {
/// - deliveryAddress: The delivery address of the shopper, optional.
/// - socialSecurityNumber: The social security number of the shopper, optional.
/// - card: Shopper's card basic information, optional.
// swiftlint:disable:next line_length
@available(*, deprecated, renamed: "init(shopperName:emailAddress:phoneNumber:billingAddress:deliveryAddress:socialSecurityNumber:card:)")
public init(
shopperName: ShopperName? = nil,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,16 @@ public class AddressInputFormViewController: FormViewController {
}()
}

internal extension AddressInputFormViewController {
extension AddressInputFormViewController {

@objc
func submitTapped() {
internal func submitTapped() {
guard validate() else { return }
viewModel.handleSubmit(validAddress: addressItem.value)
}

@objc
func dismissAddressLookup() {
internal func dismissAddressLookup() {
viewModel.handleDismiss()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

internal typealias VoidHandler = () -> Void

// swiftlint:disable file_length

#if canImport(AdyenAuthentication)
@_spi(AdyenInternal) import Adyen
import Adyen3DS2
Expand All @@ -15,6 +17,7 @@ internal typealias VoidHandler = () -> Void

/// Handles the 3D Secure 2 fingerprint and challenge actions separately + Delegated Authentication.
@available(iOS 16.0, *)
// swiftlint:disable:next type_body_length
internal class ThreeDS2PlusDACoreActionHandler: ThreeDS2CoreActionHandler {

internal var delegatedAuthenticationState: DelegatedAuthenticationState = .init()
Expand Down Expand Up @@ -324,7 +327,8 @@ internal typealias VoidHandler = () -> Void
switch result {
case .failure:
// If there is an error then we assume that the device is not registered and we try registration.
// Improvement: we could alternatively check the individual errors from AuthenticationSDK and based on which decide if we would like to call out if it is registered or not.
// Improvement: we could alternatively check the individual errors from AuthenticationSDK
// and based on which decide if we would like to call out if it is registered or not.
handler(false)
case let .success(isRegistered):
handler(isRegistered)
Expand Down Expand Up @@ -502,3 +506,5 @@ internal typealias VoidHandler = () -> Void
}

#endif

// swiftlint:enable file_length
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ internal protocol DelegatedAuthenticationViewDelegate: AnyObject {
}

@available(iOS 16.0, *)
// swiftlint:disable:next type_body_length
internal final class DelegatedAuthenticationView: UIView {

private enum Constants {
Expand Down
4 changes: 2 additions & 2 deletions AdyenCard/Form/FormCardLogosItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ internal final class FormCardLogosItemView: FormItemView<FormCardLogosItem>, UIC
collectionView.dataSource = self
}

func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
item.cardLogos.count
}

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: CardLogoCell.reuseIdentifier, for: indexPath)
if let cell = cell as? CardLogoCell, let logo = item.cardLogos.adyen[safeIndex: indexPath.row] {
cell.update(
Expand Down
12 changes: 6 additions & 6 deletions AdyenComponents/UPI/UPIComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ public final class UPIComponent: PaymentComponent,
}

internal enum Constants {
static let upiCollect = "upi_collect"
static let upiQRCode = "upi_qr"
static let upiIntent = "upi_intent"
static let vpaFlowIdentifier = "UPI/VPA"
static let noAppsVpaSegmentTitle = "VPA"
internal static let upiCollect = "upi_collect"
internal static let upiQRCode = "upi_qr"
internal static let upiIntent = "upi_intent"
internal static let vpaFlowIdentifier = "UPI/VPA"
internal static let noAppsVpaSegmentTitle = "VPA"

static let qrCodeIcon = "qrcode"
internal static let qrCodeIcon = "qrcode"
}

/// Configuration for UPI Component.
Expand Down
4 changes: 2 additions & 2 deletions AdyenEncryption/Extensions/JSONEncoder+SortedKeys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import Foundation

internal extension JSONEncoder {
static func encodeWithSortedKeys(_ encodable: Encodable) throws -> Data {
extension JSONEncoder {
internal static func encodeWithSortedKeys(_ encodable: Encodable) throws -> Data {
let encoder = JSONEncoder()
encoder.dateEncodingStrategy = .iso8601
encoder.outputFormatting = .sortedKeys
Expand Down
2 changes: 1 addition & 1 deletion Tests/SnapshotTests/Components/CardComponentUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private extension CardComponent.AddressFormType {

var description: String {
switch self {
case let .lookup(provider):
case .lookup:
"lookup"
case .full:
"full"
Expand Down

0 comments on commit b6109d2

Please sign in to comment.