Retailcrm.SDK 5.1.2

dotnet add package Retailcrm.SDK --version 5.1.2
NuGet\Install-Package Retailcrm.SDK -Version 5.1.2
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="Retailcrm.SDK" Version="5.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Retailcrm.SDK --version 5.1.2
#r "nuget: Retailcrm.SDK, 5.1.2"
#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 Retailcrm.SDK as a Cake Addin
#addin nuget:?package=Retailcrm.SDK&version=5.1.2

// Install Retailcrm.SDK as a Cake Tool
#tool nuget:?package=Retailcrm.SDK&version=5.1.2

NuGet

retailCRM API C# client

This is C# retailCRM API client. This library allows to use all available API versions.

Install

PM> Install-Package Retailcrm.SDK

Usage

Get order

using System.Diagnostics;
using Retailcrm;
using Retailcrm.Versions.V5;
...

Client api = new Client("https://demo.retailcrm.ru", "T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH");
Response response = api.OrdersGet("12345", "externalId");

if (response.IsSuccessful()) {
    Debug.WriteLine(response.GetRawResponse());
} else {
    Debug.WriteLine($"Ошибка: [Статус HTTP-ответа {response.GetStatusCode().ToString()}]");
}

Create order

using System.Diagnostics;
using Retailcrm;
using Retailcrm.Versions.V4;
...

Client api = new Client("https://demo.retailcrm.ru", "T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH");
Response response = api.OrdersCreate(new Dictionary<string, object>
{
    {"externalId", "12345"},
    {"createdAt", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")},
    {"lastName", "Doe"},
    {"firstName", "John"},
    {"email", "john@example.com"},
    {"phone", "+79999999999"},
    {"items", new List<object> {
        new Dictionary<string, object> {
            {"initialPrice", 100},
            {"quantity", 1},
            {"productId", 55},
            {"productName", "example"}
        },
        new Dictionary<string, object> {
            {"initialPrice", 200},
            {"quantity", 2},
            {"productId", 14},
            {"productName", "example too"}
        }
    }}
});

if (response.IsSuccessful()) {
    Debug.WriteLine(response.GetResponse()["externalId"].ToString());
} else {
    Debug.WriteLine($"Ошибка: [Статус HTTP-ответа {response.GetStatusCode().ToString()}]");
}

Documentation

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
5.1.2 1,020 1/28/2019
5.1.1 941 3/21/2018
5.1.0 863 12/21/2017
5.0.2 1,121 10/30/2017
5.0.1 811 10/30/2017
5.0.0 1,320 10/10/2017

Fix POST request for big data