//
//  ltProducts.swift
//  LegendTeam
//
//  Created by dong on 2021/12/27.
//

import Foundation

class IAPTiersResponse : NSObject, Codable{
    var productList:[IAPProducts]?
}

class IAPProducts: NSObject, Codable {
    var chargeAmount: Int?
    var payAmount: CGFloat?
    var productId: String?
    var giftAmount: Int?
    var hot: Bool?
    
    // MARK: Custom properties

    var currencySymbol: String?

    // additional
    var tradeId: String?

    override required init() {}
}

class VIPSubcribeProduct:NSObject, Codable {
    override required init() {}
    
    var period: PriceType?              // e.g. "SUB_YEAR"
    var productType: String?         // e.g. "SUBSCRIPTION"
    var freeDays: Int?               // null → Int?
    var platform: String?            // e.g. "ios"
    var productId: String?           // e.g. "gg.epal.lab.ios.vip12months"
    var discount: String?            // e.g. "16.6"
    var bundleId: String?            // e.g. "com.crushlevel"
    var memberType: MemberType?          // e.g. "VIP"
    var chargeAmount: Int?           // e.g. 0
    var payAmount: Int?              // e.g. 5779
}


class ChargePreOrder: NSObject, Codable {
    /**
     WAITPAY(1, "待付款"),

     PAID(2, "已付款"),

     PROCESSING(3, "处理中"),

     FINISHED(4, "交易成功"),

     CLOSED(5, "交易关闭"),

     REFUNDING(6, "退款中"),

     REFUNDED(7, "已退款"),
     */
    var tradeStatus: String = ""
    var tradeNo: String = ""

    required override init() {}
}
