ePlatform.Api 1.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ePlatform.Api --version 1.3.0
NuGet\Install-Package ePlatform.Api -Version 1.3.0
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="ePlatform.Api" Version="1.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ePlatform.Api --version 1.3.0
#r "nuget: ePlatform.Api, 1.3.0"
#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 ePlatform.Api as a Cake Addin
#addin nuget:?package=ePlatform.Api&version=1.3.0

// Install ePlatform.Api as a Cake Tool
#tool nuget:?package=ePlatform.Api&version=1.3.0

Turkcell e-Şirket .NET Client Örnekleri

e-Belge ve e-Bilet uygulamaları için .Net Client kullanım örnekleri.

Kütüphaneler NET Standard 2.0 ile geliştirilmiştir. Uyumlu versiyonlar için Net Standard Versiyon uyumluluk tablosuna gözatabilirsiniz.

Başlarken

Servisleri nuget paketleri ile kullanmak için nuget adresimizi takip edebilir, teknik dokümantasyon için Turkcell e-Şirket Teknik Dokümanlar adresimizi ziyaret edebilirsiniz. Entegrasyon süreçlerinizde entegrasyon@eplatform.com.tr üzerinden iletişime geçebilirsiniz.

Kullanım

Tüm servis metodlarında authentication sağlamak için ApiKey kullanılması gerekmektedir. ApiKey'inizi oluşturmak için e-Şirket Kimlik Doğrulama dokümanını inceleyin.

Console Uygulaması/Minimal API Örneği

Console uygulamanızda main metodu içine aşağıdaki satırları ekledikten sonra, interfaceler üzerinden servis metodlarına erişebilirsiniz.

ServiceProvider serviceProvider = new ServiceCollection()
	.AddePlatformClients(clientOptions =>
	{
		clientOptions.InvoiceServiceUrl = "https://efaturaservicetest.isim360.com";
		clientOptions.TicketServiceUrl = "https://ebiletservicetest.isim360.com";
		clientOptions.ApiKey = "";
	})
	.BuildServiceProvider();

	var outboxInvoiceClient = serviceProvider.GetService<IOutboxInvoiceClient>();
	var inboxInvoiceClient = serviceProvider.GetService<IInboxInvoiceClient>();
	var commonClient = serviceProvider.GetService<ICommonClient>();
	var earchiveClient = serviceProvider.GetService<IEArchiveInvoiceClient>();
	var eventTicketClient = serviceProvider.GetService<IEventTicketClient>();
	var passengerTicketClient = serviceProvider.GetService<IPassengerTicketClient>();
}

.NET Core Örneği

.NET core uygulamanızda Startup dosyanızı aşağıdaki gibi yapılandırın,

public Startup(IConfiguration configuration)
{
    Configuration = configuration;
}

public IConfiguration Configuration { get; }

public void ConfigureServices(IServiceCollection services)
{
    services.AddePlatformClients(Configuration);
    services.AddControllers();
}

appsettings.json dosyasınıza aşağıdaki nodu ekleyin,

"ePlatformClientOptions": {

	"InvoiceServiceUrl" : "https://efaturaservicetest.isim360.com",
	"TicketServiceUrl" : "https://ebiletservicetest.isim360.com",
	"ApiKey": ""
},

Controller injection

private readonly IOutboxInvoiceClient _outboxInvoiceClient;

public OutboxInvoiceController(IOutboxInvoiceClient outboxInvoiceClient)
{
    _outboxInvoiceClient = outboxInvoiceClient;
}

[HttpGet("pdf/{id}")]
public async Task<ActionResult> GetPdf(Guid id)
{
    var data = await _outboxInvoiceClient.GetPdf(id);
    return File(data, "application/pdf", $"{id}.zip");
}

.NET Framework Örneği

protected void Application_Start()
{
    var services = new ServiceCollection();

    //Use this method to add invoice clients
    services.AddePlatformClients(clientOptions =>
    {
        clientOptions.InvoiceServiceUrl = "https://efaturaservicetest.isim360.com";
        clientOptions.ApiKey = "";
    });

    var providerFactory = new AutofacServiceProviderFactory();
    //to populate your container
    ContainerBuilder builder = providerFactory.CreateBuilder(services);

    // MVC - Register your MVC controllers.
    builder.RegisterControllers(typeof(WebApiApplication).Assembly);

    // MVC - OPTIONAL: Register model binders that require DI.
    builder.RegisterModelBinders(typeof(WebApiApplication).Assembly);
    builder.RegisterModelBinderProvider();

    // MVC - OPTIONAL: Register web abstractions like HttpContextBase.
    builder.RegisterModule<AutofacWebTypesModule>();

    // MVC - OPTIONAL: Enable property injection in view pages.
    builder.RegisterSource(new ViewRegistrationSource());

    // MVC - OPTIONAL: Enable property injection into action filters.
    builder.RegisterFilterProvider();

    // MVC - Set Autofac as dependency resolver.
    var container = builder.Build();
    DependencyResolver.SetResolver(new AutofacDependencyResolver(container));

    // Standard MVC setup:

    AreaRegistration.RegisterAllAreas();
    GlobalConfiguration.Configure(WebApiConfig.Register);
    FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
    RouteConfig.RegisterRoutes(RouteTable.Routes);
    BundleConfig.RegisterBundles(BundleTable.Bundles);
}

Controller injection

private readonly IOutboxInvoiceClient _outboxInvoiceClient;

public OutboxInvoiceController(IOutboxInvoiceClient outboxInvoiceClient)
{
    _outboxInvoiceClient = outboxInvoiceClient;
}

[HttpGet("pdf/{id}")]
public async Task<ActionResult> GetPdf(Guid id)
{
    var data = await _outboxInvoiceClient.GetPdf(id);
    return File(data, "application/pdf", $"{id}.zip");
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.3.4 386 11/2/2022
1.3.3 400 9/22/2022
1.3.2 404 5/24/2022
1.3.1 424 4/22/2022
1.3.0 389 4/22/2022