Skip to content

Commit

Permalink
Merge pull request #295 from basmus/master
Browse files Browse the repository at this point in the history
add optional documentVersion to GenerateTovTorg551XmlForBuyer
  • Loading branch information
basmus authored Mar 14, 2018
2 parents 21a19db + 70cd2c6 commit 71827ec
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
7 changes: 4 additions & 3 deletions src/ComDiadocApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/DiadocApi.Async.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,10 @@ public Task<GeneratedFile> GenerateTorg12XmlForBuyerAsync(string authToken, Torg
return diadocHttpApi.GenerateTorg12XmlForBuyerAsync(authToken, buyerInfo, boxId, sellerTitleMessageId, sellerTitleAttachmentId);
}

public Task<GeneratedFile> GenerateTovTorg551XmlForBuyerAsync(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId)
public Task<GeneratedFile> 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<GeneratedFile> GenerateAcceptanceCertificateXmlForSellerAsync(string authToken,
Expand Down
4 changes: 2 additions & 2 deletions src/DiadocApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/DiadocHttpApi.Invoicing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions src/DiadocHttpApi.InvoicingAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ public Task<GeneratedFile> GenerateTorg12XmlForBuyerAsync(string authToken, Torg
return PerformGenerateXmlHttpRequestAsync(authToken, queryBuilder.BuildPathAndQuery(), buyerInfo);
}

public Task<GeneratedFile> GenerateTovTorg551XmlForBuyerAsync(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId)
public Task<GeneratedFile> 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);
}

Expand Down
4 changes: 2 additions & 2 deletions src/IDiadocApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -212,7 +212,7 @@ public interface IDiadocApi
Task<GeneratedFile> GenerateTorg12XmlForSellerAsync(string authToken, Torg12SellerTitleInfo sellerInfo, bool disableValidation = false);
Task<GeneratedFile> GenerateTovTorg551XmlForSellerAsync(string authToken, TovTorgSellerTitleInfo sellerInfo, bool disableValidation = false);
Task<GeneratedFile> GenerateTorg12XmlForBuyerAsync(string authToken, Torg12BuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId);
Task<GeneratedFile> GenerateTovTorg551XmlForBuyerAsync(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId);
Task<GeneratedFile> GenerateTovTorg551XmlForBuyerAsync(string authToken, TovTorgBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId, string documentVersion = null);
Task<GeneratedFile> GenerateAcceptanceCertificateXmlForSellerAsync(string authToken, AcceptanceCertificateSellerTitleInfo sellerInfo, bool disableValidation = false);
Task<GeneratedFile> GenerateAcceptanceCertificateXmlForBuyerAsync(string authToken, AcceptanceCertificateBuyerTitleInfo buyerInfo, string boxId, string sellerTitleMessageId, string sellerTitleAttachmentId);
Task<GeneratedFile> GenerateAcceptanceCertificate552XmlForSellerAsync(string authToken, AcceptanceCertificate552SellerTitleInfo sellerInfo, bool disableValidation = false);
Expand Down

0 comments on commit 71827ec

Please sign in to comment.