Skip to content

Migration Guide 2.3

Migration SDK from old versions

This section will provide a detailed description of the API changes during the upgrade. We strongly recommend reading this documentation when upgrading the SDK version to understand the API differences and update your API calls accordingly based on the version disparities.

Migration to version 2.3.0

Support Upload Status Flag

In The GetTripsCall API response object TripInfo will return new attribute to indicate whether the trip has been uploaded to server or not. In the TripInfo object, add new Filed isUploaded.

Aggregated Safety Score Support TimeZoneId

Added the timeZoneId parameter to AggregatedSafetyScoreRequest, now you can request the aggregated safety score of the corresponding timezone.

Support Structure Minimal Requirement

In The response object ScoreDetail will return new attribute to indicate score qualification criteria. In the ScoreDetail object, add new Filed scoreQualificationCriteria, it's a Condition type, it's a tree type, you can parse it customize.

Example structure, you can parse to minimal requirement string "5_TRIPS_AND_50_MILES" abstract expressions: "${criteriaValue}_${criteriaType}_${operation}_${criteriaValue2}_${criteriaType2}":

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
    "score_qualification_criteria": {
        "operation": "AND",
        "conditions": [
            {
                "criteriaType": "MINIMUM_TRIP_COUNT",
                "criteriaValue": "5"
            },
            {
                "criteriaType": "MINIMUM_MILEAGE",
                "criteriaValue": "50"
            }
        ]
    }
}

Another complex example, you can parse to minimal requirement string like: "(minimumTripCount is 5 or minimumMileage is 50) and minimumTripCount is 30 and minimumMileage is 80"

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
    "operation": "AND",
    "conditions": [
        {
            "operation": "OR",
            "conditions": [
                {
                    "criteria_value": "5",
                    "criteria_type": "MINIMUM_TRIP_COUNT"
                },
                {
                    "criteria_type": "MINIMUM_MILEAGE",
                    "criteria_value": "50"
                }
            ]
        },
        {
            "criteria_type": "MINIMUM_TRIP_COUNT",
            "criteria_value": "30"
        },
        {
            "criteria_value": "80",
            "criteria_type": "MINIMUM_MILEAGE"
        }
    ]
}