Table of Contents

Class FuelTransaction

Namespace
Geotab.Checkmate.ObjectModel.Fuel
Assembly
Geotab.Checkmate.ObjectModel.dll

Information from a fuel card provider representing a fuel transaction. Fuel card information will be matched to a Device by one of these fields: vehicleIdentificationNumber, serialNumber, licencePlate or comments.

[ReportClass]
public class FuelTransaction : FuelEvent, IEntity, IComparable, IIdentifiable, IVersion, IDateTimeProvider, IOdometerProvider, ISimpleCoordinatesProvider, IDefaultable, IDeviceProvider, IDriverProvider, IDeletedDateTimeProvider
Inheritance
FuelTransaction
Implements
Inherited Members

Remarks

The combination of all fields (excluding sourceData) are used to ensure no duplicate transactions can be added.

Constructors

FuelTransaction()

Initializes a new instance of the FuelTransaction class.

public FuelTransaction()

FuelTransaction(Id?, long?, string?, string?, string?, string?, string?, DateTime?, double?, double?, decimal?, string?, FuelTransactionProvider?, ISimpleCoordinate?, string?, FuelTransactionProductType?, string?, string?, string?, string?, string?, Device?, Driver?)

Initializes a new instance of the FuelTransaction class.

public FuelTransaction(Id? id, long? version, string? vin, string? description, string? serialNumber, string? licencePlate, string? comments, DateTime? dateTime, double? odometer, double? volume, decimal? cost, string? currencyCode, FuelTransactionProvider? provider, ISimpleCoordinate? location, string? driverName, FuelTransactionProductType? productType, string? sourceData, string? externalReference = null, string? cardNumber = null, string? siteName = null, string? providerProductDescription = null, Device? device = null, Driver? driver = null)

Parameters

id Id

The id.

version long?

The version.

vin string

The VIN.

description string

The description.

serialNumber string

The serialNumber.

licencePlate string

The licencePlate.

comments string

The comments.

dateTime DateTime?

The {@link Instant}.

odometer double?

The odometer.

volume double?

The volume.

cost decimal?

The cost.

currencyCode string

The currencyCode.

provider FuelTransactionProvider?

The provider.

location ISimpleCoordinate

The location.

driverName string

The driverName.

productType FuelTransactionProductType?

The product type.

sourceData string

The sourceData.

externalReference string

The external reference to this transaction.

cardNumber string

The partial card number.

siteName string

The transaction site name.

providerProductDescription string

The provider product description associated to this transaction.

device Device

The device associated to the transaction.

driver Driver

The driver associated to this transaction.

Properties

CardNumber

Gets or sets the masked or partial purchasing card number.

public string? CardNumber { get; set; }

Property Value

string

CardNumber

Comments

Gets or sets the free text field where any user information can be stored and referenced for this entity. This can be used to associate the transaction with a Device. Maximum length [1024] Default [""].

public string? Comments { get; set; }

Property Value

string

string

DeletedDateTime

An interface for an entity that can be marked as deleted.

public DateTime? DeletedDateTime { get; set; }

Property Value

DateTime?

Description

Gets or sets the vehicle description of the vehicle. This can be used to associate the transaction with a Device. Maximum length [255] Default [""].

public string? Description { get; set; }

Property Value

string

string

Device

Gets or sets the Device the transaction belongs to. Default [null].

public Device? Device { get; set; }

Property Value

Device

Device.

Remarks

If null, best attempt will be auto matched to a device based on vehicleIdentificationNumber, serialNumber, licencePlate or comments properties.

Driver

Gets or sets the Driver the transaction belongs to.

public Driver? Driver { get; set; }

Property Value

Driver

Driver.

Remarks

If null, best attempt will be auto matched to a driver based on driverName property.

DriverName

Gets or sets the fuel card holder name. This can be used to associate the transaction with a Driver. Maximum length [255] Default [""].

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.FuelTransacationDriverName })]
public string? DriverName { get; set; }

Property Value

string

string

ExternalReference

Gets or sets the external reference to the transaction. Typically this is an external identifier. Maximum length [255] Default [""].

public string? ExternalReference { get; set; }

Property Value

string

string

LicencePlate

Gets or sets the licence plate of the vehicle of the vehicle. This can be used to associate the transaction with a Device. Maximum length [255] Default [""].

public string? LicencePlate { get; set; }

Property Value

string

string

Provider

Gets or sets the FuelTransactionProvider of this transaction. Default [Unknown].

public FuelTransactionProvider? Provider { get; set; }

Property Value

FuelTransactionProvider?

FuelTransactionProvider

ProviderProductDescription

Gets or sets the Product Description given by the Provider.

public string? ProviderProductDescription { get; set; }

Property Value

string

SiteName

SerialNumber

Gets or sets the serial number of the device. This can be used to associate the transaction with a Device. Maximum length [255] Default [""].

public string? SerialNumber { get; set; }

Property Value

string

string

SiteName

Gets or sets the site/merchant name where the transaction took place.

public string? SiteName { get; set; }

Property Value

string

SiteName

SourceData

Gets or sets the JSON string representing the source data. Default [""].

public string? SourceData { get; set; }

Property Value

string

string. string

VehicleIdentificationNumber

Gets or sets the vehicle identification number (VIN) of the vehicle. This is used to associate the transaction with a Device. Maximum length [255] Default [""].

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.FuelTransacationVin })]
public string? VehicleIdentificationNumber { get; set; }

Property Value

string

string

Methods

Clone()

Creates a new object that is a copy of the current instance.

public override IEntity Clone()

Returns

IEntity

A new object that is a copy of this instance.

IsValidCoordinate(ISimpleCoordinate?)

Determines whether coordinate is in valid range.

public static bool IsValidCoordinate(ISimpleCoordinate? coordinate)

Parameters

coordinate ISimpleCoordinate

The coordinate.

Returns

bool

true if the coordinate is in valid range; otherwise, false.

PopulateDefaults()

Populate non-required empty (null) properties with default values.

public void PopulateDefaults()

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.