-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature_Twint
- Loading branch information
Showing
76 changed files
with
821 additions
and
685 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// Copyright (c) 2023 Adyen N.V. | ||
// | ||
// This file is open source and available under the MIT license. See the LICENSE file for more info. | ||
// | ||
|
||
import Foundation | ||
|
||
@_spi(AdyenInternal) | ||
public enum AnalyticsFlavor { | ||
case components(type: PaymentMethodType) | ||
case dropIn(type: String = "dropin", paymentMethods: [String]) | ||
|
||
public var value: String { | ||
switch self { | ||
case .components: | ||
return "components" | ||
case .dropIn: | ||
return "dropin" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// Copyright (c) 2023 Adyen N.V. | ||
// | ||
// This file is open source and available under the MIT license. See the LICENSE file for more info. | ||
// | ||
|
||
import Foundation | ||
|
||
@_spi(AdyenInternal) | ||
/// Used as a singleton to update the sessionId | ||
public final class AnalyticsForSession { | ||
|
||
/// Needed to be able to determine if using session | ||
public static var sessionId: String? | ||
|
||
private init() { /* Private empty init */ } | ||
} | ||
|
||
@_spi(AdyenInternal) | ||
/// A protocol that defines the events that can occur under Checkout Analytics. | ||
public protocol AnalyticsEvent: Encodable { | ||
var timestamp: TimeInterval { get } | ||
|
||
var component: String { get } | ||
} | ||
|
||
@_spi(AdyenInternal) | ||
public extension AnalyticsEvent { | ||
|
||
var timestamp: TimeInterval { | ||
Date().timeIntervalSince1970 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// Copyright (c) 2023 Adyen N.V. | ||
// | ||
// This file is open source and available under the MIT license. See the LICENSE file for more info. | ||
// | ||
|
||
import Foundation | ||
|
||
@_spi(AdyenInternal) | ||
/// Represents an error in the analytics scheme that indicates the flow was interrupted due to an error in the SDK. | ||
public struct AnalyticsEventError: AnalyticsEvent { | ||
|
||
public var component: String | ||
|
||
public var type: ErrorType | ||
|
||
public var code: String? | ||
|
||
public var message: String? | ||
|
||
public enum ErrorType: String, Encodable { | ||
case network = "Network" | ||
case implementation = "Implementation" | ||
case `internal` = "Internal" | ||
case api = "ApiError" | ||
case sdk = "SdkError" | ||
case thirdParty = "ThirdParty" | ||
case generic = "Generic" | ||
} | ||
} |
Oops, something went wrong.