From 70cd2c619163a73b653dc9a135dd2bea4d27376b Mon Sep 17 00:00:00 2001 From: basmanov Date: Wed, 14 Mar 2018 17:07:24 +0500 Subject: [PATCH] add optional documentVersion to GenerateTovTorg551XmlForBuyer --- src/ComDiadocApi.cs | 7 ++++--- src/DiadocApi.Async.cs | 4 ++-- src/DiadocApi.cs | 4 ++-- src/DiadocHttpApi.Invoicing.cs | 4 ++-- src/DiadocHttpApi.InvoicingAsync.cs | 4 ++-- src/IDiadocApi.cs | 4 ++-- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/ComDiadocApi.cs b/src/ComDiadocApi.cs index 8010e43a..956cb280 100644 --- a/src/ComDiadocApi.cs +++ b/src/ComDiadocApi.cs @@ -75,7 +75,7 @@ GeneratedFile GenerateTorg12XmlForBuyer(string authToken, [MarshalAs(UnmanagedTy string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId); GeneratedFile GenerateTovTorg551XmlForBuyer(string authToken, [MarshalAs(UnmanagedType.IDispatch)] object buyerInfo, - string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId); + string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId, string documentVersion = null); GeneratedFile GenerateAcceptanceCertificateXmlForSeller(string authToken, [MarshalAs(UnmanagedType.IDispatch)] object sellerInfo, bool disableValidation = false); @@ -492,13 +492,14 @@ public GeneratedFile GenerateTorg12XmlForBuyer(string authToken, object buyerInf sellerTitleAttachmentId); } - public GeneratedFile GenerateTovTorg551XmlForBuyer(string authToken, object buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId) + public GeneratedFile GenerateTovTorg551XmlForBuyer(string authToken, object buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId, string documentVersion = null) { return diadoc.GenerateTovTorg551XmlForBuyer(authToken, (TovTorgBuyerTitleInfo) buyerInfo, boxId, sellerTitleMessageId, - sellerTitleAttachmentId); + sellerTitleAttachmentId, + documentVersion); } public GeneratedFile GenerateAcceptanceCertificateXmlForSeller(string authToken, object sellerInfo, diff --git a/src/DiadocApi.Async.cs b/src/DiadocApi.Async.cs index 322b151e..3a3bccc8 100644 --- a/src/DiadocApi.Async.cs +++ b/src/DiadocApi.Async.cs @@ -319,10 +319,10 @@ public Task GenerateTorg12XmlForBuyerAsync(string authToken, Torg return diadocHttpApi.GenerateTorg12XmlForBuyerAsync(authToken, buyerInfo, boxId, sellerTitleMessageId, sellerTitleAttachmentId); } - public Task GenerateTovTorg551XmlForBuyerAsync(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId) + public Task GenerateTovTorg551XmlForBuyerAsync(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId, string documentVersion = null) { if (buyerInfo == null) throw new ArgumentNullException("buyerInfo"); - return diadocHttpApi.GenerateTovTorg551XmlForBuyerAsync(authToken, buyerInfo, boxId, sellerTitleMessageId, sellerTitleAttachmentId); + return diadocHttpApi.GenerateTovTorg551XmlForBuyerAsync(authToken, buyerInfo, boxId, sellerTitleMessageId, sellerTitleAttachmentId, documentVersion); } public Task GenerateAcceptanceCertificateXmlForSellerAsync(string authToken, diff --git a/src/DiadocApi.cs b/src/DiadocApi.cs index 0efde866..d69a13b4 100644 --- a/src/DiadocApi.cs +++ b/src/DiadocApi.cs @@ -374,10 +374,10 @@ public GeneratedFile GenerateTorg12XmlForBuyer(string authToken, Torg12BuyerTitl return diadocHttpApi.GenerateTorg12XmlForBuyer(authToken, buyerInfo, boxId, sellerTitleMessageId, sellerTitleAttachmentId); } - public GeneratedFile GenerateTovTorg551XmlForBuyer(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId) + public GeneratedFile GenerateTovTorg551XmlForBuyer(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId, string documentVersion = null) { if (buyerInfo == null) throw new ArgumentNullException("buyerInfo"); - return diadocHttpApi.GenerateTovTorg551XmlForBuyer(authToken, buyerInfo, boxId, sellerTitleMessageId, sellerTitleAttachmentId); + return diadocHttpApi.GenerateTovTorg551XmlForBuyer(authToken, buyerInfo, boxId, sellerTitleMessageId, sellerTitleAttachmentId, documentVersion); } public GeneratedFile GenerateAcceptanceCertificateXmlForSeller(string authToken, diff --git a/src/DiadocHttpApi.Invoicing.cs b/src/DiadocHttpApi.Invoicing.cs index 8095a869..ca13261a 100644 --- a/src/DiadocHttpApi.Invoicing.cs +++ b/src/DiadocHttpApi.Invoicing.cs @@ -90,13 +90,13 @@ public GeneratedFile GenerateTorg12XmlForBuyer(string authToken, Torg12BuyerTitl return PerformGenerateXmlHttpRequest(authToken, queryBuilder.BuildPathAndQuery(), buyerInfo); } - public GeneratedFile GenerateTovTorg551XmlForBuyer(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId) + public GeneratedFile GenerateTovTorg551XmlForBuyer(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId, string documentVersion = null) { var queryBuilder = new PathAndQueryBuilder("/GenerateTorg12XmlForBuyer"); queryBuilder.AddParameter("boxId", boxId); queryBuilder.AddParameter("sellerTitleMessageId", sellerTitleMessageId); queryBuilder.AddParameter("sellerTitleAttachmentId", sellerTitleAttachmentId); - queryBuilder.AddParameter("documentVersion", "tovtorg_05_01_02"); + queryBuilder.AddParameter("documentVersion", documentVersion ?? "tovtorg_05_01_02"); return PerformGenerateXmlHttpRequest(authToken, queryBuilder.BuildPathAndQuery(), buyerInfo); } diff --git a/src/DiadocHttpApi.InvoicingAsync.cs b/src/DiadocHttpApi.InvoicingAsync.cs index ebbd31c4..4f20daa3 100644 --- a/src/DiadocHttpApi.InvoicingAsync.cs +++ b/src/DiadocHttpApi.InvoicingAsync.cs @@ -93,13 +93,13 @@ public Task GenerateTorg12XmlForBuyerAsync(string authToken, Torg return PerformGenerateXmlHttpRequestAsync(authToken, queryBuilder.BuildPathAndQuery(), buyerInfo); } - public Task GenerateTovTorg551XmlForBuyerAsync(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId) + public Task GenerateTovTorg551XmlForBuyerAsync(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId, string documentVersion = null) { var queryBuilder = new PathAndQueryBuilder("/GenerateTorg12XmlForBuyer"); queryBuilder.AddParameter("boxId", boxId); queryBuilder.AddParameter("sellerTitleMessageId", sellerTitleMessageId); queryBuilder.AddParameter("sellerTitleAttachmentId", sellerTitleAttachmentId); - queryBuilder.AddParameter("documentVersion", "tovtorg_05_01_02"); + queryBuilder.AddParameter("documentVersion", documentVersion ?? "tovtorg_05_01_02"); return PerformGenerateXmlHttpRequestAsync(authToken, queryBuilder.BuildPathAndQuery(), buyerInfo); } diff --git a/src/IDiadocApi.cs b/src/IDiadocApi.cs index 5fa0b196..24817b7f 100644 --- a/src/IDiadocApi.cs +++ b/src/IDiadocApi.cs @@ -75,7 +75,7 @@ public interface IDiadocApi GeneratedFile GenerateTorg12XmlForSeller(string authToken, Torg12SellerTitleInfo sellerInfo, bool disableValidation = false); GeneratedFile GenerateTovTorg551XmlForSeller(string authToken, TovTorgSellerTitleInfo sellerInfo, bool disableValidation = false); GeneratedFile GenerateTorg12XmlForBuyer(string authToken, Torg12BuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId); - GeneratedFile GenerateTovTorg551XmlForBuyer(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId); + GeneratedFile GenerateTovTorg551XmlForBuyer(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId, string documentVersion = null); GeneratedFile GenerateAcceptanceCertificateXmlForSeller(string authToken, AcceptanceCertificateSellerTitleInfo sellerInfo, bool disableValidation = false); GeneratedFile GenerateAcceptanceCertificateXmlForBuyer(string authToken, AcceptanceCertificateBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId); GeneratedFile GenerateAcceptanceCertificate552XmlForSeller(string authToken, AcceptanceCertificate552SellerTitleInfo sellerInfo, bool disableValidation = false); @@ -212,7 +212,7 @@ public interface IDiadocApi Task GenerateTorg12XmlForSellerAsync(string authToken, Torg12SellerTitleInfo sellerInfo, bool disableValidation = false); Task GenerateTovTorg551XmlForSellerAsync(string authToken, TovTorgSellerTitleInfo sellerInfo, bool disableValidation = false); Task GenerateTorg12XmlForBuyerAsync(string authToken, Torg12BuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId); - Task GenerateTovTorg551XmlForBuyerAsync(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId); + Task GenerateTovTorg551XmlForBuyerAsync(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId, string documentVersion = null); Task GenerateAcceptanceCertificateXmlForSellerAsync(string authToken, AcceptanceCertificateSellerTitleInfo sellerInfo, bool disableValidation = false); Task GenerateAcceptanceCertificateXmlForBuyerAsync(string authToken, AcceptanceCertificateBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId); Task GenerateAcceptanceCertificate552XmlForSellerAsync(string authToken, AcceptanceCertificate552SellerTitleInfo sellerInfo, bool disableValidation = false);