public static function createFromJSON($json_obj)
    {
        $result = new self();
        if (isset($json_obj->toAddresses)) {
            $result->toAddresses = (array) $json_obj->toAddresses->address;
            unset($json_obj->toAddresses);
        }
        foreach ($json_obj as $k => $v) {
            $result->$k = $v;
        }
        return $result;
    }