Skip to content

guibranco/VTEX-SDK-dotnet

Repository files navigation

VTEX SDK

πŸ›’ βš™οΈ VTEX platform .NET SDK.

GitHub license Time tracker

VTEX logo

CI/CD

Build status Last commit Tests Coverage Code Smells LoC
Build status GitHub last commit AppVeyor tests (branch) Coverage Code Smells Lines of Code

Code Quality

Codacy Badge Codacy Badge

codecov CodeFactor

Maintainability Test Coverage

Quality Gate Status Maintainability Rating

Technical Debt Duplicated Lines (%)

Reliability Rating Security Rating

Bugs Vulnerabilities


Installation

Github Releases

GitHub last release Github All Releases

Download the latest .zip file from the Releases page.

Nuget package manager

Package Version Downloads
VTEX VTEX NuGet Version VTEX NuGet Downloads
VTEX.Health VTEX Health NuGet Version VTEX Health NuGet Downloads

Features


Usage

Dependency Injection (IoC)

Register the VTEX Service using the CrispyWaffle toolkit's Service Locator:

var connectionVtex = new Connection(); // Fill in your details
ServiceLocator.Register(() => new VTEXContext(connectionVtex), LifeStyle.Singleton);

Constructor Injection

public class MyClass
{
    private readonly VTEXContext _vtexContext;

    public MyClass(VTEXContext vtexContext)
    {
        _vtexContext = vtexContext ?? throw new ArgumentNullException(nameof(vtexContext));
    }
}

Manual Resolution

var vtexContext = ServiceLocator.Resolve<VTEXContext>();

Authentication

Authenticate with VTEX platform API keys. Refer to this tutorial.

var vtex = new VTEXContext("store name", "app-key-xyz", "app-token-secret-hash");
var order = vtex.GetOrder("V-123456789-01");
Console.WriteLine($"Sequence: {order.Sequence} | Value: {order.Value}");

Support

If you need help, feel free to open an issue.


Contributing

Contributions are welcome! Check out the CONTRIBUTING.md guide for details.


Contributors

Thanks to all contributors! πŸ’™

guibranco
Guilherme Branco Stracini
joaovaladares
JoΓ£o VΓ­tor Valadares
viktoriussuwandi
Viktorius Suwandi

Bots

dependabot[bot]
dependabot[bot]
github-actions[bot]
github-actions[bot]
penify-dev[bot]
penify-dev[bot]
stack-file[bot]
stack-file[bot]
codefactor-io[bot]
codefactor-io[bot]
snyk-bot
Snyk bot