Monovi.UETDS 1.0.1

dotnet add package Monovi.UETDS --version 1.0.1
NuGet\Install-Package Monovi.UETDS -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Monovi.UETDS" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Monovi.UETDS --version 1.0.1
#r "nuget: Monovi.UETDS, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Monovi.UETDS as a Cake Addin
#addin nuget:?package=Monovi.UETDS&version=1.0.1

// Install Monovi.UETDS as a Cake Tool
#tool nuget:?package=Monovi.UETDS&version=1.0.1

Monovi.UETDS

MonoviUETDS is a C# class library for dealing with UETDS (Ulaştırma Elektronik Takip ve Denetim Sistemi) services.

Installation

Click the link to download package or run the following command from Package Manager Console.

Install-Package Monovi.UETDS -Version x.y.z

Usage

Use a DI container to register the application. In this section, used AutoFac DI container for an example.

Register to container

Identification information must be entered for test and live services while registering the application. UETDSHandler's constructor consist of testCredentials and liveCredentials parameters which is UETDSCredentialBase type.

builder.RegisterType<UETDSHandler>()
                .WithParameter("testCredentials", new UETDSServiceCredential
                {
                    Username = ConfigurationManager.AppSettings["uetdsTestUsername"],
                    Password = ConfigurationManager.AppSettings["uetdsTestPassword"]
                })
                .WithParameter("liveCredentials", new UETDSServiceCredential
                {
                    Username = ConfigurationManager.AppSettings["uetdsLiveUsername"],
                    Password = ConfigurationManager.AppSettings["uetdsLivePassword"]
                })
                .Keyed<IUETDSHandler>("keyName");

Resolve

The Application includes a UETDS validator to validate informations before send it to the UETDS service. You can use this validator. Validation results is inherited from UETDSValidationResultBase type. So this results includes IsValid and ErrorList properties.

IUETDSHandler _keyNameHandler = EngineContext.Current.Resolve<IUETDSHandler>("keyName");
IUETDSValidator _validator = _keyNameHandler.GetValidator();
UETDSValidationResultBase _loadInfoValidationResult = _validator.ValidateLoadInfo(IVerifiable loadInfo);
UETDSValidationResultBase  _vehicleInfoValidationResult = _validator.ValidateVehicleInfo(IVerifiable vehicleInfo);

Notify the information to service

UETDSHandler class provides you test or live clients. You can handle UETDS processes to using this client methods.

IUETDSHandler _keyNameHandler = EngineContext.Current.Resolve<IUETDSHandler>("keyName");
UETDSClientBase _testClient = _keyNameHandler.GetService().GetTestClient();
UETDSCancelTypeResponse _uetdsCancelTypeResponse = _testClient.GetCancelTypes();
UETDSClientBase _liveClient = _keyNameHandler.GetService().GetLiveClient();
UETDSLoadNotificationDetailResponse _uetdsLoadNotificationDetailResponse = _liveClient.GetLoadNotificationDetail(loadNotificationId: 1232133424);

public partial class UETDSVehicleModel : IVerifiable, ISerializableObject
{
    public string Plate1 { get; set; }
    public bool IsPlate1Private { get; set; }
    public string Plate2 { get; set; }
    public bool IsPlate2Private { get; set; }
    public string Driver1IdentityNumber { get; set; }
    public string Driver2IdentityNumber { get; set; }
    public TransportationTypeCode TransportationTypeCode { get; set; }
}

public partial class UETDSLoadInfoModel : IVerifiable, ISerializableObject
{
    public string FirmLoadNumber { get; set; }
    public string SenderTaxNumber { get; set; }
    public string SenderCompanyName { get; set; }
    public string ReceiverTaxNumber { get; set; }
    public string ReceiverCompanyName { get; set; }
    public string LoadingCountryCode { get; set; }
    public int LoadingCityCode { get; set; }
    public int LoadingTownCode { get; set; }
    public string UnloadingCountryCode { get; set; }
    public int UnloadingCityCode { get; set; }
    public int UnloadingTownCode { get; set; }
    public DateTime LoadingDate { get; set; }
    public DateTime LoadingTime { get; set; }
    public DateTime UnloadingDate { get; set; }
    public DateTime UnloadingTime { get; set; }
    public LoadType LoadType { get; set; }
    public LoadUnit LoadUnit { get; set; }
    public string LoadQuantity { get; set; }
    public decimal TransportationCost { get; set; }
    public string UNNumber { get; set; }
    public HazardousMaterialTransportationType? HazardousMaterialTransportationType { get; set; }
    public string OtherDescription { get; set; }
}

UETDSNewLoadNotificationResponse _newLoadNotificationResponse = _liveClient().NotifyNewLoad(uetdsVehicleModel, uetdsLoadInfoModelList);


Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update the package as appropriate.

License

--

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 567 6/24/2020
1.0.0 426 6/24/2020

Add README.md file.