Response.swift
1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// Response.swift
// SwiftWarplyFramework
//
// Created by Warply on 06/06/2025.
// Copyright © 2025 Warply. All rights reserved.
//
import Foundation
// MARK: - Response Models
public class VerifyTicketResponseModel {
public let result: String?
public let status: Int?
init(dictionary: [String: Any]) {
self.result = dictionary["result"] as? String? ?? ""
self.status = dictionary["status"] as? Int? ?? -1
}
public var getResult: String {
get { return self.result ?? "" }
}
public var getStatus: Int {
get { return self.status ?? -1 }
}
}
public class GenericResponseModel {
private var result: Int?
private var status: Int?
private var msg: String?
init(dictionary: [String: Any]) {
self.result = dictionary["result"] as? Int? ?? -1
self.status = dictionary["status"] as? Int? ?? -1
self.msg = dictionary["msg"] as? String? ?? ""
}
public var getResult: Int {
get { return self.result ?? -1 }
}
public var getStatus: Int {
get { return self.status ?? -1 }
}
public var getMsg: String {
get { return self.msg ?? "" }
}
}