Response.swift 1.19 KB
//
//  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 ?? "" }
    }
}