//
//  TransactionResponse.swift
//  iPOS
//
//  Created by bbc on 06/02/17.
//  Copyright © 2017 BBC. All rights reserved.
//

import Foundation
import ObjectMapper

class TransactionResponse: Mappable {
    var transactionId: UUID
    var transactionNumber: Int = 1
    var resultCode: Int = -1
    var resultMessage: String = ""
    var resultErrorDetails: String = ""
    var effectVouchers: [EffectVoucher] = []
    
    
    required init?(map: Map) {
        self.transactionId = UUID.init()
    }
    
    init() {
        self.transactionId = UUID.init()
    }
    
    func mapping(map: Map) {
        transactionId <- (map["TransactionId"], Util.CustomUuidTransform())
        transactionNumber <- map["TransactionNumber"]
        resultCode <- map["ResultCode"]
        resultMessage <- map["ResultMessage"]
        resultErrorDetails <- map["ResultErrorDetails"]
        effectVouchers <- map["EffectVouchers"]
    }
}
