Implement bank transfer app flows
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import Foundation
|
||||
|
||||
struct FahipaySession: Codable {
|
||||
let authId: String
|
||||
let sessionCookie: String
|
||||
}
|
||||
|
||||
struct FahipayLoginStep {
|
||||
let twoFactorRequired: Bool
|
||||
let authId: String?
|
||||
}
|
||||
|
||||
struct FahipayContactGroup: Codable, Identifiable {
|
||||
let id: String
|
||||
let name: String
|
||||
let contacts: [BankContact]
|
||||
}
|
||||
|
||||
enum FahipayError: LocalizedError {
|
||||
case networkError(String)
|
||||
case loginFailed(String)
|
||||
case otpFailed(String)
|
||||
case sessionExpired
|
||||
case invalidResponse
|
||||
|
||||
var errorDescription: String? {
|
||||
switch self {
|
||||
case .networkError(let msg): return "Network error: \(msg)"
|
||||
case .loginFailed(let msg): return "Login failed: \(msg)"
|
||||
case .otpFailed(let msg): return "OTP verification failed: \(msg)"
|
||||
case .sessionExpired: return "Session expired."
|
||||
case .invalidResponse: return "Unexpected server response."
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user