Inherits from NSObject
Declared in ZendriveInsurance.h

Overview

All drives (automatically detected or manually started) when a period is in progress will be tagged with the period id. This period id will be made available in the reports and API that Fairmatic provides via Zendrive.

Only one period can be active at a time. Switching periods or calling stopPeriod stops any active drives (automatic or manual). A drive with multiple insurance periods will be split into multiple trips for different insurance periods.

Class Methods

startDriveWithPeriod2:error:

Start Fairmatic insurance period 2 in the SDK.

+ (void)startDriveWithPeriod2:(NSString *)trackingId error:(NSError **)error

Parameters

trackingId

An identifier which allows identifying this drive uniquely. This drive identifier must be unique for the user.

error

A valid error of ZendriveErrorDomain.kZendriveErrorDomain (‘ZendriveError’) is returned in case of a failure. Possible error codes returned: kZendriveErrorNotSetup, kZendriveErrorInsurancePeriodSame, kZendriveErrorInvalidTrackingId. Refer to ZendriveError for more details on the errors.

Discussion

A manual trip of id trackingId will be started immediately on this call. The entire duration in this period will be recorded as a single trip. If period 2 is already in progress with the same trackingId, this call will be a no-op.

Declared In

ZendriveInsurance.h

startDriveWithPeriod3:error:

Start Fairmatic insurance period 3 in the SDK.

+ (void)startDriveWithPeriod3:(NSString *)trackingId error:(NSError **)error

Parameters

trackingId

An identifier which allows identifying this drive uniquely. This drive identifier must be unique for the user.

error

A valid error of ZendriveErrorDomain.kZendriveErrorDomain (‘ZendriveError’) is returned in case of a failure. Possible error codes returned: kZendriveErrorNotSetup, kZendriveErrorInsurancePeriodSame, kZendriveErrorInvalidTrackingId. Refer to ZendriveError for more details on the errors.

Discussion

A manual trip of id trackingId will be started immediately on this call. The entire duration in this period will be recorded as a single trip. If period 3 is already in progress with the same trackingId, this call will be a no-op.

Declared In

ZendriveInsurance.h

startPeriod1:

Start Fairmatic insurance period 1 in the SDK.

+ (void)startPeriod1:(NSError **)error

Parameters

error

A valid error of ZendriveErrorDomain.kZendriveErrorDomain (‘ZendriveError’) is returned in case of a failure. Possible error codes returned: kZendriveErrorNotSetup, kZendriveErrorInsurancePeriodSame. Refer to ZendriveError for more details on the errors.

Discussion

Trips in this period will be detected automatically.

Declared In

ZendriveInsurance.h

stopPeriod:

Stop currently ongoing Fairmatic insurance period if any.

+ (void)stopPeriod:(NSError **)error

Parameters

error

A valid error of ZendriveErrorDomain.kZendriveErrorDomain (‘ZendriveError’) is returned in case of a failure. Possible error codes returned: kZendriveErrorNotSetup. Refer to ZendriveError for more details on the errors.

Discussion

Ongoing trips at the time of this call will be stopped. Auto trip detection is turned off on this call.

Declared In

ZendriveInsurance.h