Package fi.moprim.tmd.sdk.trips
Class TripApi
- java.lang.Object
-
- fi.moprim.tmd.sdk.trips.TripApi
-
public class TripApi extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TripApi()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Result<Trip>annotate(android.content.Context context, Trip trip, java.lang.String purpose, java.lang.String[] reasons, java.lang.String metadata, boolean validation)Annotate the trip with a purpose, metadata and the validationstatic Result<Trip>setMetadata(android.content.Context context, Trip trip, java.lang.String metadata)Set the metadata for the tripstatic Result<Trip>setPurpose(android.content.Context context, Trip trip, java.lang.String purpose)Set the purpose for the tripstatic Result<Trip>setReasons(android.content.Context context, Trip trip, java.lang.String[] reasons)Set the reasons for the tripstatic Result<Trip>validateTrip(android.content.Context context, Trip trip, boolean validation)Set the validation for the trip
-
-
-
Method Detail
-
setMetadata
public static Result<Trip> setMetadata(@NonNull android.content.Context context, Trip trip, java.lang.String metadata)
Set the metadata for the trip- Parameters:
context- the contexttrip- the tripmetadata- the metadata- Returns:
- the trip with the set metadata
-
validateTrip
public static Result<Trip> validateTrip(@NonNull android.content.Context context, Trip trip, boolean validation)
Set the validation for the trip- Parameters:
context- the contexttrip- the tripvalidation- the validation flag- Returns:
- the validated trip
-
setPurpose
public static Result<Trip> setPurpose(@NonNull android.content.Context context, Trip trip, java.lang.String purpose)
Set the purpose for the trip- Parameters:
context- the contexttrip- the trippurpose- the purpose
-
setReasons
public static Result<Trip> setReasons(@NonNull android.content.Context context, Trip trip, java.lang.String[] reasons)
Set the reasons for the trip- Parameters:
context- the contexttrip- the tripreasons- the reasoning for this trip
-
annotate
public static Result<Trip> annotate(@NonNull android.content.Context context, Trip trip, java.lang.String purpose, java.lang.String[] reasons, java.lang.String metadata, boolean validation)
Annotate the trip with a purpose, metadata and the validation- Parameters:
context- the contexttrip- the trippurpose- the purposereasons- the reasonsmetadata- the metadatavalidation- the validation flag- Returns:
- the annotated trip
-
-