package com.autotech.we1l.items

import com.autotech.we1l.my_classes.BaseItem
import com.autotech.we1l.tools.*
import org.json.JSONObject

class ShippingCompany(id: Int?, name: String?, val tel: String, val mobile: String, val email: String,
                      private val logoURL: String, private val websiteUrl: String) : BaseItem(id, name) {


    constructor(shippingCompanyJSON: JSONObject)
            : this(shippingCompanyJSON.getInt(ATTR_ID), shippingCompanyJSON.getString(ATTR_NAME), shippingCompanyJSON.getString(ATTR_TEL),
            shippingCompanyJSON.getString(ATTR_MOBILE), shippingCompanyJSON.getString(ATTR_EMAIL), shippingCompanyJSON.getString(ATTR_LOGO_URL),
            shippingCompanyJSON.getString(ATTR_WEBSITE_URL))
}