package com.e6yun.project.sdk.api.example;

import com.e6yun.project.sdk.api.E6SdkApi;
import com.e6yun.project.sdk.api.exception.ApiException;
import com.e6yun.project.sdk.api.pojo.basevo.smart.UpdateVehicleVO;

import java.util.Date;

public class VehicleUpdate {
    static E6SdkApi e6SdkApi = new E6SdkApi("http://api.e6yun.com/", "您的appkey", "您的secreKey");

    public static void main(String[] args) {

        try {
            UpdateVehicleVO updateVehicleVO = new UpdateVehicleVO();
            updateVehicleVO.setTimestamp(String.valueOf(new Date().getTime()));
            updateVehicleVO.setVehicleNo("陕A0000");
            updateVehicleVO.setMotorcade("1");
            updateVehicleVO.setBrand("1");
            updateVehicleVO.setRegDate("2021-07-07 10:00:00");
            updateVehicleVO.setLength(0.0D);
            updateVehicleVO.setVolume(0.0D);
            updateVehicleVO.setLoad(0.0D);
            updateVehicleVO.setIsValid(0);

            System.out.println(e6SdkApi.vehicleUpdate(updateVehicleVO));
        } catch (ApiException e) {
            e.printStackTrace();
        }
    }
}
