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
IdThe id.
version
long?The version.
vin
stringThe VIN.
description
stringThe description.
serialNumber
stringThe serialNumber.
licencePlate
stringThe licencePlate.
comments
stringThe comments.
dateTime
DateTime?The {@link Instant}.
odometer
double?The odometer.
volume
double?The volume.
cost
decimal?The cost.
currencyCode
stringThe currencyCode.
provider
FuelTransactionProvider?The provider.
location
ISimpleCoordinateThe location.
driverName
stringThe driverName.
productType
FuelTransactionProductType?The product type.
sourceData
stringThe sourceData.
externalReference
stringThe external reference to this transaction.
cardNumber
stringThe partial card number.
siteName
stringThe transaction site name.
providerProductDescription
stringThe provider product description associated to this transaction.
device
DeviceThe device associated to the transaction.
driver
DriverThe driver associated to this transaction.
Properties
CardNumber
Gets or sets the masked or partial purchasing card number.
public string? CardNumber { get; set; }
Property Value
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
DeletedDateTime
An interface for an entity that can be marked as deleted.
public DateTime? DeletedDateTime { get; set; }
Property Value
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
Device
Gets or sets the Device the transaction belongs to. Default [null].
public Device? Device { get; set; }
Property Value
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
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
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
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
Provider
Gets or sets the FuelTransactionProvider of this transaction. Default [Unknown].
public FuelTransactionProvider? Provider { get; set; }
Property Value
ProviderProductDescription
Gets or sets the Product Description given by the Provider.
public string? ProviderProductDescription { get; set; }
Property Value
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
SiteName
Gets or sets the site/merchant name where the transaction took place.
public string? SiteName { get; set; }
Property Value
SourceData
Gets or sets the JSON string representing the source data. Default [""].
public string? SourceData { get; set; }
Property Value
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
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
ISimpleCoordinateThe coordinate.
Returns
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()