Browse Source

edit

pull/1/head
InKwon James Kim 5 years ago
parent
commit
9a2346194c
  1. 32
      GME Remit/Modules/PowerCallModules/PhoneCardRecharge/Application Logic/Model/CardInformation.swift
  2. 24
      GME Remit/Modules/PowerCallModules/PhoneCardRecharge/Application Logic/Model/DetailPlanInformation.swift
  3. 36
      GME Remit/Modules/PowerCallModules/PhoneCardRecharge/Application Logic/Model/MainCardInformation.swift
  4. 2185
      GME Remit/Modules/PowerCallModules/PhoneCardRecharge/Application Logic/Service/PhoneCardRechargeService.swift

32
GME Remit/Modules/PowerCallModules/PhoneCardRecharge/Application Logic/Model/CardInformation.swift

@ -15,24 +15,32 @@ struct CardInformation: Mappable {
var productName: String?
var facePrice: String?
var productType: String?
var planInfo: String?
var planInfo: DetailPlanInformation?
var cardName: String?
var telecomCode: String?
var subInfo: [CardInformation]?
init?(map: Map) {
}
mutating func mapping(map: Map) {
mvnoCode <- map["mvno_code"]
salePrice <- map["sale_price"]
cardType <- map["card_type"]
productName <- map["product_name"]
facePrice <- map["face_price"]
productType <- map["product_type"]
planInfo <- map["plan_info"]
cardName <- map["card_name"]
telecomCode <- map["telecom_code"]
subInfo <- map["SubInfo"]
mvnoCode <- map["Mvno_code"]
salePrice <- map["Sale_price"]
cardType <- map["Card_type"]
productName <- map["Product_name"]
facePrice <- map["Face_price"]
productType <- map["Product_type"]
planInfo <- map["Plan_info"]
cardName <- map["Card_name"]
telecomCode <- map["Telecom_code"]
}
}
extension CardInformation: TablePresenterProtocol {
var cellTitle: String? {
return cardName
}
var cellImage: UIImage? {
return nil
}
}

24
GME Remit/Modules/PowerCallModules/PhoneCardRecharge/Application Logic/Model/DetailPlanInformation.swift

@ -0,0 +1,24 @@
//
// DetailPlanInformation.swift
// GME Remit
//
// Created by InKwon James Kim on 2019/10/22.
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
//
import ObjectMapper
struct DetailPlanInformation: Mappable {
var data: String?
var voice: String?
var sms: String?
init?(map: Map) {
}
mutating func mapping(map: Map) {
data <- map["data"]
voice <- map["voice"]
sms <- map["sms"]
}
}

36
GME Remit/Modules/PowerCallModules/PhoneCardRecharge/Application Logic/Model/MainCardInformation.swift

@ -0,0 +1,36 @@
//
// MainCardInformation.swift
// GME Remit
//
// Created by InKwon James Kim on 2019/10/22.
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
//
import ObjectMapper
struct MainCardInformation: Mappable {
var cardCode: String?
var cardName: String?
var facePrice: String?
var subCardInfo: [CardInformation]?
init?(map: Map) {
}
mutating func mapping(map: Map) {
cardCode <- map["CardCode"]
facePrice <- map["FacePrice"]
cardName <- map["CardName"]
subCardInfo <- map["SubInfo"]
}
}
extension MainCardInformation: TablePresenterProtocol {
var cellTitle: String? {
return "\(cardName ?? "") \(facePrice?.decimalToCurrency(as: .krw, isFront: true) ?? "")"
}
var cellImage: UIImage? {
return nil
}
}

2185
GME Remit/Modules/PowerCallModules/PhoneCardRecharge/Application Logic/Service/PhoneCardRechargeService.swift
File diff suppressed because it is too large
View File

Loading…
Cancel
Save