From 74cc2fb9bcef7a6658b5f7e0173b534891b1905b Mon Sep 17 00:00:00 2001 From: avk Date: Mon, 30 Mar 2020 00:16:24 +0500 Subject: [PATCH 1/5] sync Common.DotSettings with main EDI repository --- Common.DotSettings | 36 ++++++++++++++++++++++++++++++++--- EdiApi.Client.sln.DotSettings | 15 ++++++++++----- 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/Common.DotSettings b/Common.DotSettings index a3d6674..6454b43 100644 --- a/Common.DotSettings +++ b/Common.DotSettings @@ -1,17 +1,22 @@  False True + True AssemblyInfo.cs True DO_NOT_SHOW DO_NOT_SHOW ERROR + ERROR + DO_NOT_SHOW True HINT DO_NOT_SHOW DO_NOT_SHOW - <?xml version="1.0" encoding="utf-16"?><Profile name="CatalogueCleanup"><AspOptimizeRegisterDirectives>True</AspOptimizeRegisterDirectives><HtmlReformatCode>True</HtmlReformatCode><CSArrangeThisQualifier>True</CSArrangeThisQualifier><CSRemoveCodeRedundancies>True</CSRemoveCodeRedundancies><CSUseAutoProperty>True</CSUseAutoProperty><CSMakeFieldReadonly>True</CSMakeFieldReadonly><CSUseVar><BehavourStyle>CAN_CHANGE_BOTH</BehavourStyle><LocalVariableStyle>ALWAYS_IMPLICIT</LocalVariableStyle><ForeachVariableStyle>ALWAYS_IMPLICIT</ForeachVariableStyle></CSUseVar><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSharpFormatDocComments>True</CSharpFormatDocComments><CSReorderTypeMembers>True</CSReorderTypeMembers><JsReformatCode>True</JsReformatCode><JsFormatDocComments>True</JsFormatDocComments><XMLReformatCode>True</XMLReformatCode></Profile> + <?xml version="1.0" encoding="utf-16"?><Profile name="CatalogueCleanup"><AspOptimizeRegisterDirectives>True</AspOptimizeRegisterDirectives><HtmlReformatCode>True</HtmlReformatCode><CSArrangeThisQualifier>True</CSArrangeThisQualifier><CSRemoveCodeRedundancies>True</CSRemoveCodeRedundancies><CSUseVar><BehavourStyle>CAN_CHANGE_BOTH</BehavourStyle><LocalVariableStyle>ALWAYS_IMPLICIT</LocalVariableStyle><ForeachVariableStyle>ALWAYS_IMPLICIT</ForeachVariableStyle></CSUseVar><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSharpFormatDocComments>True</CSharpFormatDocComments><CSReorderTypeMembers>True</CSReorderTypeMembers><JsReformatCode>True</JsReformatCode><JsFormatDocComments>True</JsFormatDocComments><XMLReformatCode>True</XMLReformatCode><IDEA_SETTINGS>&lt;profile version="1.0"&gt; + &lt;option name="myName" value="CatalogueCleanup" /&gt; +&lt;/profile&gt;</IDEA_SETTINGS></Profile> CatalogueCleanup public protected internal private new abstract virtual override sealed static readonly extern unsafe volatile async True @@ -22,12 +27,16 @@ True True NEXT_LINE_SHIFTED_2 + 0 NEXT_LINE_SHIFTED_2 NEXT_LINE_SHIFTED_2 - True + 10000 + False NEVER NEVER + False 120 + WRAP_IF_LONG False False <?xml version="1.0" encoding="utf-16"?> @@ -119,7 +128,8 @@ WB $object$_On$event$ - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="" Suffix="_Test" Style="AaBb_AaBb" /></Policy> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="Test" Suffix="" Style="AaBb_AaBb" /><ExtraRule Prefix="" Suffix="Test" Style="AaBb_AaBb" /></Policy> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="" Suffix="_Test" Suffix="Test" Style="AaBb_AaBb" /></Policy> <Policy Inspect="True" Prefix="I" Suffix="" Style="AaBb" /> <Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" /> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="" Suffix="" Style="AaBb_AaBb" /></Policy> @@ -178,6 +188,22 @@ True True True + True + True + True + getCurrentDate("dd.MM.yyyy") + -1 + 1 + True + getUserName() + -1 + 0 + True + True + Everywhere + unstable + True + [Category("Unstable")] // marked by $user$ $date$$END$ True True Imported 29.01.2015 @@ -326,6 +352,10 @@ public void SetUp() ipse True throw new InvalidProgramStateException("$TODO$"); + True + True + True + True diff --git a/EdiApi.Client.sln.DotSettings b/EdiApi.Client.sln.DotSettings index 0d13456..87a738d 100644 --- a/EdiApi.Client.sln.DotSettings +++ b/EdiApi.Client.sln.DotSettings @@ -1,7 +1,12 @@  - C:\workspace\KonturEdiApi\Common.DotSettings - Common.DotSettings - True - True - 1 + True + D:\projects\edi\git\edi-api-client\Common.DotSettings + ..\Common.DotSettings + True + 1 + + + + + True \ No newline at end of file From c9e80ed6ed46225b5ac5f59962f5950724820e79 Mon Sep 17 00:00:00 2001 From: avk Date: Mon, 30 Mar 2020 00:17:17 +0500 Subject: [PATCH 2/5] prepare for v1.2 release --- CHANGELOG.md | 9 ++++++--- global.json | 2 +- version.json | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fde9f2..ea5253c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,12 @@ # История изменений +## v1.2 - 2020.04.?? +- Доработка метода `AddOrUpdateParty` для интеграции с Контур.Продажами (EDISUP-13100). + ## v1.1 - 2020.03.05 -- Добавлена информация о принятии организацией публичной оферты: свойство `LicenseAgreementAccepted` в `PartyInfo`. -- Добавлена информация о стратегии маршрутизации EDI-сообщений: свойства `BuyerBoxSelectionStrategy`, `SupplierBoxSelectionStrategy` в `PartyInfo`. -- Добавлен GLN точки доставки сообщения в метод `GetInboxMessageMeta`: свойство `DeliveryPointGln` в `DocumentDetails`. +- Добавлена информация о принятии организацией публичной оферты: свойство `LicenseAgreementAccepted` в `PartyInfo` (EDISUP-12819). +- Добавлена информация о стратегии маршрутизации EDI-сообщений: свойства `BuyerBoxSelectionStrategy`, `SupplierBoxSelectionStrategy` в `PartyInfo` (EDITSKS-2246). +- Добавлен GLN точки доставки сообщения в метод `GetInboxMessageMeta`: свойство `DeliveryPointGln` в `DocumentDetails` (EDITSKS-2244). ## v1.0 - 2020.01.28 - Выпустили первую версию API-клиента EDI. diff --git a/global.json b/global.json index 3cd92d1..f1c2b2b 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "2.2.402" + "version": "3.1.101" } } \ No newline at end of file diff --git a/version.json b/version.json index b6f5416..81f435c 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "1.1", + "version": "1.2-pre", "assemblyVersion": { "precision": "build" }, From 93eda2c06aa180cbee4079fd8da4ace9efc58da3 Mon Sep 17 00:00:00 2001 From: avk Date: Mon, 30 Mar 2020 01:09:15 +0500 Subject: [PATCH 3/5] extend EditablePartySettings for https://edo-yt.skbkontur.ru/issue/EDISUP-13100 --- .../Types/Internal/EditablePartySettings.cs | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/EdiApi.Client/Types/Internal/EditablePartySettings.cs b/EdiApi.Client/Types/Internal/EditablePartySettings.cs index cdcc1e9..7cce99b 100644 --- a/EdiApi.Client/Types/Internal/EditablePartySettings.cs +++ b/EdiApi.Client/Types/Internal/EditablePartySettings.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using JetBrains.Annotations; @@ -12,24 +12,20 @@ public class EditablePartySettings [NotNull] public EditablePartyInfo PartyInfo { get; set; } - [CanBeNull] - public EditableBillingSettings BillingSettings { get; set; } + [NotNull] + public EditableDeliverySettings DeliverySettings { get; set; } [CanBeNull] public EditableConnectorSettings ConnectorSettings { get; set; } - [NotNull] - public EditableDeliverySettings DeliverySettings { get; set; } - } - - public class EditableBillingSettings - { - [NotNull] - public string BillingId { get; set; } + [CanBeNull] + public EditableWebInterfaceSettings WebInterfaceSettings { get; set; } } public class EditableDeliverySettings { + public bool UseTestBoxes { get; set; } + [CanBeNull] public EditableApiSettings ApiBoxSettings { get; set; } @@ -78,19 +74,24 @@ public class EditableConnectorBoxForDocType public class EditablePartyInfo { + public PartyType PartyType { get; set; } + [NotNull] public string Gln { get; set; } [NotNull] public string Name { get; set; } - public PartyType PartyType { get; set; } - [NotNull] public string Inn { get; set; } [NotNull] public string Kpp { get; set; } + + [CanBeNull] + public string BillingAccountId { get; set; } + + public bool CreateNewBillingAccount { get; set; } } public class EditableTradingPartnersSettings @@ -110,4 +111,15 @@ public class EditableTradingPartnersSettings [NotNull] public DocumentType[] UsedMessages { get; set; } } + + public class EditableWebInterfaceSettings + { + public WebInterfaceKind DefaultWebInterface { get; set; } + } + + public enum WebInterfaceKind + { + Monitoring, + SupplierInterface + } } \ No newline at end of file From eeed86e997b039113770a736741350b60a680969 Mon Sep 17 00:00:00 2001 From: avk Date: Sun, 5 Apr 2020 17:09:42 +0500 Subject: [PATCH 4/5] make /AddEmployee use POST http method --- CHANGELOG.md | 3 ++- EdiApi.Client/Http/Internal/InternalEdiApiHttpClient.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea5253c..18021cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # История изменений -## v1.2 - 2020.04.?? +## v1.2 - 2020.04.05 - Доработка метода `AddOrUpdateParty` для интеграции с Контур.Продажами (EDISUP-13100). +- Метод `AddEmployee` использует POST-запрос. ## v1.1 - 2020.03.05 - Добавлена информация о принятии организацией публичной оферты: свойство `LicenseAgreementAccepted` в `PartyInfo` (EDISUP-12819). diff --git a/EdiApi.Client/Http/Internal/InternalEdiApiHttpClient.cs b/EdiApi.Client/Http/Internal/InternalEdiApiHttpClient.cs index b3ccd84..644933f 100644 --- a/EdiApi.Client/Http/Internal/InternalEdiApiHttpClient.cs +++ b/EdiApi.Client/Http/Internal/InternalEdiApiHttpClient.cs @@ -130,7 +130,7 @@ public void AddEmployee([NotNull] string authToken, [NotNull] string partyId, [N var url = new UrlBuilder(BaseUri, relativeUrl + "AddEmployee") .AddParameter("partyId", partyId) .AddParameter("email", email); - MakeGetRequest(url.ToUri(), authToken); + MakePostRequest(url.ToUri(), authToken, content : null); } public void AddOrUpdateTradingPartnersSettings([NotNull] string authToken, [NotNull] EditableTradingPartnersSettings settingsToWrite) From 437debfd0b44754ceb921206531f88d6d2beef98 Mon Sep 17 00:00:00 2001 From: avk Date: Sun, 5 Apr 2020 17:13:52 +0500 Subject: [PATCH 5/5] reformat --- EdiApi.Client/Http/BaseEdiApiHttpClient.cs | 24 +++++----- .../TransformerConnectorEdiApiClient.cs | 38 +++++++-------- .../Http/Internal/InternalEdiApiHttpClient.cs | 24 +++++----- .../Http/Messages/MessagesEdiApiHttpClient.cs | 48 +++++++++---------- EdiApi.Client/Types/Parties/PartyInfo.cs | 4 +- .../Types/Serialization/XmlSerializer.cs | 4 +- 6 files changed, 71 insertions(+), 71 deletions(-) diff --git a/EdiApi.Client/Http/BaseEdiApiHttpClient.cs b/EdiApi.Client/Http/BaseEdiApiHttpClient.cs index 9ec2fdb..f350b1b 100644 --- a/EdiApi.Client/Http/BaseEdiApiHttpClient.cs +++ b/EdiApi.Client/Http/BaseEdiApiHttpClient.cs @@ -57,8 +57,8 @@ public PartiesInfo GetAccessiblePartiesInfo([NotNull] string authToken) public PartyInfo GetPartyInfo([NotNull] string authToken, [NotNull] string partyId) { var url = new UrlBuilder(BaseUri, "V1/Parties/GetPartyInfo") - .AddParameter("partyId", partyId) - .ToUri(); + .AddParameter("partyId", partyId) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -66,8 +66,8 @@ public PartyInfo GetPartyInfo([NotNull] string authToken, [NotNull] string party public PartyInfo GetPartyInfoByGln([NotNull] string authToken, [NotNull] string partyGln) { var url = new UrlBuilder(BaseUri, "V1/Parties/GetPartyInfoByGln") - .AddParameter("partyGln", partyGln) - .ToUri(); + .AddParameter("partyGln", partyGln) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -75,8 +75,8 @@ public PartyInfo GetPartyInfoByGln([NotNull] string authToken, [NotNull] string public PartyInfo GetPartyInfoByDepartmentGln([NotNull] string authToken, [NotNull] string departmentGln) { var url = new UrlBuilder(BaseUri, "V1/Parties/GetPartyInfoByDepartmentGln") - .AddParameter("departmentGln", departmentGln) - .ToUri(); + .AddParameter("departmentGln", departmentGln) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -91,8 +91,8 @@ public BoxesInfo GetBoxesInfo([NotNull] string authToken) public BoxInfo GetMainApiBox([NotNull] string authToken, [NotNull] string partyId) { var url = new UrlBuilder(BaseUri, "V1/Boxes/GetMainApiBox") - .AddParameter("partyId", partyId) - .ToUri(); + .AddParameter("partyId", partyId) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -100,8 +100,8 @@ public BoxInfo GetMainApiBox([NotNull] string authToken, [NotNull] string partyI public OrganizationCatalogueInfo GetOrganizationCatalogueInfo([NotNull] string authToken, [NotNull] string partyId) { var url = new UrlBuilder(BaseUri, "V1/Organizations/GetOrganizationCatalogueInfo") - .AddParameter("partyId", partyId) - .ToUri(); + .AddParameter("partyId", partyId) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -109,8 +109,8 @@ public OrganizationCatalogueInfo GetOrganizationCatalogueInfo([NotNull] string a public UsersInfo GetUsersInfo([NotNull] string authToken, [NotNull] string partyId) { var url = new UrlBuilder(BaseUri, "V1/Users/GetUsersInfo") - .AddParameter("partyId", partyId) - .ToUri(); + .AddParameter("partyId", partyId) + .ToUri(); return MakeGetRequest(url, authToken); } diff --git a/EdiApi.Client/Http/Connectors/TransformerConnectorEdiApiClient.cs b/EdiApi.Client/Http/Connectors/TransformerConnectorEdiApiClient.cs index 055e233..e3b5930 100644 --- a/EdiApi.Client/Http/Connectors/TransformerConnectorEdiApiClient.cs +++ b/EdiApi.Client/Http/Connectors/TransformerConnectorEdiApiClient.cs @@ -28,36 +28,36 @@ public TransformerConnectorEdiApiClient(string apiClientId, Uri baseUri, IEdiApi public void TransformationStarted([NotNull] string authToken, [NotNull] string connectorBoxId, [NotNull] string connectorInteractionId) { var url = new UrlBuilder(BaseUri, relativeUrl + "TransformationStarted") - .AddParameter(boxIdUrlParameterName, connectorBoxId) - .AddParameter(connectorInteractionIdUrlParameterName, connectorInteractionId) - .ToUri(); + .AddParameter(boxIdUrlParameterName, connectorBoxId) + .AddParameter(connectorInteractionIdUrlParameterName, connectorInteractionId) + .ToUri(); MakePostRequest(url, authToken, content : null); } public void TransformationPaused([NotNull] string authToken, [NotNull] string connectorBoxId, [NotNull] string connectorInteractionId, [CanBeNull] string reason) { var url = new UrlBuilder(BaseUri, relativeUrl + "TransformationPaused") - .AddParameter(boxIdUrlParameterName, connectorBoxId) - .AddParameter(connectorInteractionIdUrlParameterName, connectorInteractionId) - .ToUri(); + .AddParameter(boxIdUrlParameterName, connectorBoxId) + .AddParameter(connectorInteractionIdUrlParameterName, connectorInteractionId) + .ToUri(); MakePostRequest(url, authToken, reason); } public void TransformationResumed([NotNull] string authToken, [NotNull] string connectorBoxId, [NotNull] string connectorInteractionId) { var url = new UrlBuilder(BaseUri, relativeUrl + "TransformationResumed") - .AddParameter(boxIdUrlParameterName, connectorBoxId) - .AddParameter(connectorInteractionIdUrlParameterName, connectorInteractionId) - .ToUri(); + .AddParameter(boxIdUrlParameterName, connectorBoxId) + .AddParameter(connectorInteractionIdUrlParameterName, connectorInteractionId) + .ToUri(); MakePostRequest(url, authToken, content : null); } public void TransformationFinished([NotNull] string authToken, [NotNull] string connectorBoxId, [NotNull] string connectorInteractionId, [NotNull] ConnectorTransformationResult transformationResult) { var url = new UrlBuilder(BaseUri, relativeUrl + "TransformationFinished") - .AddParameter(boxIdUrlParameterName, connectorBoxId) - .AddParameter(connectorInteractionIdUrlParameterName, connectorInteractionId) - .ToUri(); + .AddParameter(boxIdUrlParameterName, connectorBoxId) + .AddParameter(connectorInteractionIdUrlParameterName, connectorInteractionId) + .ToUri(); MakePostRequest(url, authToken, transformationResult); } @@ -65,8 +65,8 @@ public void TransformationFinished([NotNull] string authToken, [NotNull] string public TransformerConnectorBoxEventBatch GetEvents([NotNull] string authToken, [NotNull] string connectorBoxId, [CanBeNull] string exclusiveEventId, uint? count = null) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetEvents") - .AddParameter(boxIdUrlParameterName, connectorBoxId) - .AddParameter("exclusiveEventId", exclusiveEventId); + .AddParameter(boxIdUrlParameterName, connectorBoxId) + .AddParameter("exclusiveEventId", exclusiveEventId); if (count.HasValue) url.AddParameter("count", count.Value.ToString(CultureInfo.InvariantCulture)); return GetEvents(authToken, url); @@ -76,8 +76,8 @@ public TransformerConnectorBoxEventBatch GetEvents([NotNull] string authToken, [ public TransformerConnectorBoxEventBatch GetEvents([NotNull] string authToken, [NotNull] string connectorBoxId, DateTime fromDateTime, uint? count = null) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetEventsFrom") - .AddParameter(boxIdUrlParameterName, connectorBoxId) - .AddParameter("fromDateTime", DateTimeUtils.ToString(fromDateTime)); + .AddParameter(boxIdUrlParameterName, connectorBoxId) + .AddParameter("fromDateTime", DateTimeUtils.ToString(fromDateTime)); if (count.HasValue) url.AddParameter("count", count.Value.ToString(CultureInfo.InvariantCulture)); return GetEvents(authToken, url); @@ -102,9 +102,9 @@ private TransformerConnectorBoxEventBatch GetEvents([NotNull] string authToken, public MessageEntity GetMessage([NotNull] string authToken, [NotNull] string connectorBoxId, [NotNull] string messageId) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetMessage") - .AddParameter(boxIdUrlParameterName, connectorBoxId) - .AddParameter("messageId", messageId) - .ToUri(); + .AddParameter(boxIdUrlParameterName, connectorBoxId) + .AddParameter("messageId", messageId) + .ToUri(); return MakeGetRequest(url, authToken); } diff --git a/EdiApi.Client/Http/Internal/InternalEdiApiHttpClient.cs b/EdiApi.Client/Http/Internal/InternalEdiApiHttpClient.cs index 644933f..aa2d2e0 100644 --- a/EdiApi.Client/Http/Internal/InternalEdiApiHttpClient.cs +++ b/EdiApi.Client/Http/Internal/InternalEdiApiHttpClient.cs @@ -33,10 +33,10 @@ public InternalEdiApiHttpClient(string apiClientId, Uri baseUri, IEdiApiTypesSer public Document GetDocument([NotNull] string authToken, [NotNull] DocumentId documentId, bool includeRelatedDocuments = true) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetDocument") - .AddParameter("boxId", documentId.BoxId) - .AddParameter("entityId", documentId.EntityId) - .AddParameter("includeRelatedDocuments", includeRelatedDocuments.ToString()) - .ToUri(); + .AddParameter("boxId", documentId.BoxId) + .AddParameter("entityId", documentId.EntityId) + .AddParameter("includeRelatedDocuments", includeRelatedDocuments.ToString()) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -94,8 +94,8 @@ public InternalPartyInfo GetInternalPartyInfo([NotNull] string authToken, [NotNu public PartyInfoWithEmployee[] GetPartiesByUser([NotNull] string authToken, [NotNull] string userId) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetPartiesByUser") - .AddParameter("userId", userId) - .ToUri(); + .AddParameter("userId", userId) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -103,8 +103,8 @@ public PartyInfoWithEmployee[] GetPartiesByUser([NotNull] string authToken, [Not public PartyInfoWithEmployees[] GetPartiesInfoByInn([NotNull] string authToken, [NotNull] string partyInn) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetPartiesInfoByInn") - .AddParameter("partyInn", partyInn) - .ToUri(); + .AddParameter("partyInn", partyInn) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -112,8 +112,8 @@ public PartyInfoWithEmployees[] GetPartiesInfoByInn([NotNull] string authToken, public PartySettings GetPartySettings([NotNull] string authToken, [NotNull] string partyId) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetPartySettings") - .AddParameter("partyId", partyId) - .ToUri(); + .AddParameter("partyId", partyId) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -128,8 +128,8 @@ public string AddOrUpdateParty([NotNull] string authToken, [NotNull] string part public void AddEmployee([NotNull] string authToken, [NotNull] string partyId, [NotNull] string email) { var url = new UrlBuilder(BaseUri, relativeUrl + "AddEmployee") - .AddParameter("partyId", partyId) - .AddParameter("email", email); + .AddParameter("partyId", partyId) + .AddParameter("email", email); MakePostRequest(url.ToUri(), authToken, content : null); } diff --git a/EdiApi.Client/Http/Messages/MessagesEdiApiHttpClient.cs b/EdiApi.Client/Http/Messages/MessagesEdiApiHttpClient.cs index c8e0fb4..8e174fa 100644 --- a/EdiApi.Client/Http/Messages/MessagesEdiApiHttpClient.cs +++ b/EdiApi.Client/Http/Messages/MessagesEdiApiHttpClient.cs @@ -29,8 +29,8 @@ public MessagesEdiApiHttpClient(string apiClientId, Uri baseUri, IEdiApiTypesSer public BoxDocumentsSettings GetBoxDocumentsSettings([NotNull] string authToken, [NotNull] string boxId) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetBoxDocumentsSettings") - .AddParameter("boxId", boxId) - .ToUri(); + .AddParameter("boxId", boxId) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -38,9 +38,9 @@ public BoxDocumentsSettings GetBoxDocumentsSettings([NotNull] string authToken, public MessageData GetMessage([NotNull] string authToken, [NotNull] string boxId, [NotNull] string messageId) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetMessage") - .AddParameter("boxId", boxId) - .AddParameter("messageId", messageId) - .ToUri(); + .AddParameter("boxId", boxId) + .AddParameter("messageId", messageId) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -48,9 +48,9 @@ public MessageData GetMessage([NotNull] string authToken, [NotNull] string boxId public InboxMessageMeta GetInboxMessageMeta([NotNull] string authToken, [NotNull] string boxId, [NotNull] string messageId) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetInboxMessageMeta") - .AddParameter("boxId", boxId) - .AddParameter("messageId", messageId) - .ToUri(); + .AddParameter("boxId", boxId) + .AddParameter("messageId", messageId) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -58,9 +58,9 @@ public InboxMessageMeta GetInboxMessageMeta([NotNull] string authToken, [NotNull public OutboxMessageMeta GetOutboxMessageMeta([NotNull] string authToken, [NotNull] string boxId, [NotNull] string messageId) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetOutboxMessageMeta") - .AddParameter("boxId", boxId) - .AddParameter("messageId", messageId) - .ToUri(); + .AddParameter("boxId", boxId) + .AddParameter("messageId", messageId) + .ToUri(); return MakeGetRequest(url, authToken); } @@ -68,27 +68,27 @@ public OutboxMessageMeta GetOutboxMessageMeta([NotNull] string authToken, [NotNu public OutboxMessageMeta SendMessage([NotNull] string authToken, [NotNull] string boxId, [NotNull] MessageData messageData) { var url = new UrlBuilder(BaseUri, relativeUrl + "SendMessage") - .AddParameter("boxId", boxId) - .AddParameter("messageFileName", messageData.MessageFileName) - .ToUri(); + .AddParameter("boxId", boxId) + .AddParameter("messageFileName", messageData.MessageFileName) + .ToUri(); return MakePostRequest(url, authToken, messageData.MessageBody); } public void MessageDeliveryStarted([NotNull] string authToken, [NotNull] string boxId, [NotNull] string messageId) { var url = new UrlBuilder(BaseUri, relativeUrl + "MessageDeliveryStarted") - .AddParameter("boxId", boxId) - .AddParameter("messageId", messageId) - .ToUri(); + .AddParameter("boxId", boxId) + .AddParameter("messageId", messageId) + .ToUri(); MakePostRequest(url, authToken, content : null); } public void MessageDeliveryFinished([NotNull] string authToken, [NotNull] string boxId, [NotNull] string messageId, [NotNull] MessageDeliveryResult messageDeliveryResult) { var url = new UrlBuilder(BaseUri, relativeUrl + "MessageDeliveryFinished") - .AddParameter("boxId", boxId) - .AddParameter("messageId", messageId) - .ToUri(); + .AddParameter("boxId", boxId) + .AddParameter("messageId", messageId) + .ToUri(); MakePostRequest(url, authToken, messageDeliveryResult); } @@ -96,8 +96,8 @@ public void MessageDeliveryFinished([NotNull] string authToken, [NotNull] string public MessageBoxEventBatch GetEvents([NotNull] string authToken, [NotNull] string boxId, string exclusiveEventId, uint? count = null) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetEvents") - .AddParameter(boxIdUrlParameterName, boxId) - .AddParameter("exclusiveEventId", exclusiveEventId); + .AddParameter(boxIdUrlParameterName, boxId) + .AddParameter("exclusiveEventId", exclusiveEventId); if (count.HasValue) url.AddParameter("count", count.Value.ToString(CultureInfo.InvariantCulture)); return GetEvents(authToken, url); @@ -107,8 +107,8 @@ public MessageBoxEventBatch GetEvents([NotNull] string authToken, [NotNull] stri public MessageBoxEventBatch GetEvents([NotNull] string authToken, [NotNull] string boxId, DateTime fromDateTime, uint? count = null) { var url = new UrlBuilder(BaseUri, relativeUrl + "GetEventsFrom") - .AddParameter(boxIdUrlParameterName, boxId) - .AddParameter("fromDateTime", DateTimeUtils.ToString(fromDateTime)); + .AddParameter(boxIdUrlParameterName, boxId) + .AddParameter("fromDateTime", DateTimeUtils.ToString(fromDateTime)); if (count.HasValue) url.AddParameter("count", count.Value.ToString(CultureInfo.InvariantCulture)); return GetEvents(authToken, url); diff --git a/EdiApi.Client/Types/Parties/PartyInfo.cs b/EdiApi.Client/Types/Parties/PartyInfo.cs index 04bf20f..ab3de09 100644 --- a/EdiApi.Client/Types/Parties/PartyInfo.cs +++ b/EdiApi.Client/Types/Parties/PartyInfo.cs @@ -13,7 +13,7 @@ public class PartyInfo public string DiadocOrgId { get; set; } public DateTime? OrganizationCatalogueUpdateTime { get; set; } public bool LicenseAgreementAccepted { get; set; } - public BuyerBoxSelectionStrategy BuyerBoxSelectionStrategy {get; set; } - public SupplierBoxSelectionStrategy SupplierBoxSelectionStrategy {get; set; } + public BuyerBoxSelectionStrategy BuyerBoxSelectionStrategy { get; set; } + public SupplierBoxSelectionStrategy SupplierBoxSelectionStrategy { get; set; } } } \ No newline at end of file diff --git a/EdiApi.Client/Types/Serialization/XmlSerializer.cs b/EdiApi.Client/Types/Serialization/XmlSerializer.cs index 7dee438..c47a52c 100644 --- a/EdiApi.Client/Types/Serialization/XmlSerializer.cs +++ b/EdiApi.Client/Types/Serialization/XmlSerializer.cs @@ -52,8 +52,8 @@ private static XmlAttributeOverrides MapTypeWithName(this XmlAttributeOve } private static readonly XmlAttributeOverrides xmlAttributeOverrides = new XmlAttributeOverrides() - .MapTypeWithName("BoxEventBatch") //Для обратной совместимости со старыми клиентами - .MapTypeWithName("BoxEvent"); + .MapTypeWithName("BoxEventBatch") //Для обратной совместимости со старыми клиентами + .MapTypeWithName("BoxEvent"); private static readonly Type[] knownTypes = new[]