Add more overrides

This commit is contained in:
2025-09-17 17:38:40 +09:00
parent a1a4ee4043
commit 4cb9b72d6c
4 changed files with 57 additions and 15 deletions

View File

@ -11,7 +11,7 @@ namespace Hcs.Client.Api.Request.Bills
{
protected override bool CanBeRestarted => true;
internal async Task<IEnumerable<exportPaymentDocumentResultType>> ExecuteAsync(string paymentDocumentID, CancellationToken token)
internal async Task<IEnumerable<exportPaymentDocumentResultType>> ExecuteByPaymentDocumentIDAsync(string paymentDocumentID, CancellationToken token)
{
var request = new exportPaymentDocumentRequest()
{
@ -30,14 +30,33 @@ namespace Hcs.Client.Api.Request.Bills
return result.Items.OfType<exportPaymentDocumentResultType>();
}
internal async Task<IEnumerable<exportPaymentDocumentResultType>> ExecuteAsync(short year, int month, string fiasHouseGuid, string accountGUID, CancellationToken token)
internal async Task<IEnumerable<exportPaymentDocumentResultType>> ExecuteByAccountNumberAsync(short year, int month, string fiasHouseGuid, string accountNumber, CancellationToken token)
{
var request = new exportPaymentDocumentRequest()
{
Id = Constants.SIGNED_XML_ELEMENT_ID,
version = "13.1.0.1",
Items = [year, month, fiasHouseGuid, accountGUID],
ItemsElementName = [ItemsChoiceType7.Year, ItemsChoiceType7.Month, ItemsChoiceType7.FIASHouseGuid, ItemsChoiceType7.AccountGUID]
Items = [year, month, fiasHouseGuid, accountNumber],
ItemsElementName = [ItemsChoiceType7.Year, ItemsChoiceType7.Month, ItemsChoiceType7.FIASHouseGuid, ItemsChoiceType7.AccountNumber]
};
var result = await SendAndWaitResultAsync(request, async asyncClient =>
{
var response = await asyncClient.exportPaymentDocumentDataAsync(CreateRequestHeader(), request);
return response.AckRequest.Ack;
}, token);
return result.Items.OfType<exportPaymentDocumentResultType>();
}
internal async Task<IEnumerable<exportPaymentDocumentResultType>> ExecuteByPaymentDocumentNumberAsync(short year, int month, string fiasHouseGuid, string paymentDocumentNumber, CancellationToken token)
{
var request = new exportPaymentDocumentRequest()
{
Id = Constants.SIGNED_XML_ELEMENT_ID,
version = "13.1.0.1",
Items = [year, month, fiasHouseGuid, paymentDocumentNumber],
ItemsElementName = [ItemsChoiceType7.Year, ItemsChoiceType7.Month, ItemsChoiceType7.FIASHouseGuid, ItemsChoiceType7.PaymentDocumentNumber]
};
var result = await SendAndWaitResultAsync(request, async asyncClient =>