//
//  
//  TwilloCallSuccessModel.swift
//  WoWonder
//
//  Created by Mohammed Hamad on 04/09/2022.
//  Copyright © 2022 ScriptSun. All rights reserved.
//
//
import Foundation
import UIKit

struct TwilioCallSuccessModel: Codable {
    
    let api_status : Int?
    let access_token : String?
    let access_token_2 : String?
    let id : Int?
    let room_name : String?
    
    enum CodingKeys: String, CodingKey {
        case api_status = "api_status"
        case access_token = "access_token"
        case access_token_2 = "access_token_2"
        case id = "id"
        case room_name = "room_name"
    }
    
    init(from decoder: Decoder) throws {
        let values = try decoder.container(keyedBy: CodingKeys.self)
        api_status = try values.decodeIfPresent(Int.self, forKey: .api_status)
        access_token = try values.decodeIfPresent(String.self, forKey: .access_token)
        access_token_2 = try values.decodeIfPresent(String.self, forKey: .access_token_2)
        id = try values.decodeIfPresent(Int.self, forKey: .id)
        room_name = try values.decodeIfPresent(String.self, forKey: .room_name)
    }
    
}
