Add more overrides
This commit is contained in:
@ -16,10 +16,10 @@ namespace Hcs.Client.Api
|
||||
/// <param name="paymentDocumentID">Идентификатор платежного документа</param>
|
||||
/// <param name="token">Токен отмены</param>
|
||||
/// <returns>Платежные документы</returns>
|
||||
public async Task<IEnumerable<exportPaymentDocumentResultType>> ExportPaymentDocumentDataAsync(string paymentDocumentID, CancellationToken token = default)
|
||||
public async Task<IEnumerable<exportPaymentDocumentResultType>> ExportPaymentDocumentDataByPaymentDocumentIDAsync(string paymentDocumentID, CancellationToken token = default)
|
||||
{
|
||||
var request = new ExportPaymentDocumentDataRequest(client);
|
||||
return await request.ExecuteAsync(paymentDocumentID, token);
|
||||
return await request.ExecuteByPaymentDocumentIDAsync(paymentDocumentID, token);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -28,13 +28,29 @@ namespace Hcs.Client.Api
|
||||
/// <param name="year">Год</param>
|
||||
/// <param name="month">Месяц</param>
|
||||
/// <param name="fiasHouseGuid">Глобальный уникальный идентификатор дома по ФИАС</param>
|
||||
/// <param name="accountGUID">Идентификатор ЛС в ГИС ЖКХ</param>
|
||||
/// <param name="accountNumber">Номер лицевого счета/иной идентификатор плательщика</param>
|
||||
/// <param name="token">Токен отмены</param>
|
||||
/// <returns>Платежные документы</returns>
|
||||
public async Task<IEnumerable<exportPaymentDocumentResultType>> ExportPaymentDocumentDataAsync(short year, int month, string fiasHouseGuid, string accountGUID, CancellationToken token = default)
|
||||
public async Task<IEnumerable<exportPaymentDocumentResultType>> ExportPaymentDocumentDataByAccountNumberAsync(short year, int month, string fiasHouseGuid, string accountNumber, CancellationToken token = default)
|
||||
{
|
||||
var request = new ExportPaymentDocumentDataRequest(client);
|
||||
return await request.ExecuteAsync(year, month, fiasHouseGuid, accountGUID, token);
|
||||
return await request.ExecuteByAccountNumberAsync(year, month, fiasHouseGuid, accountNumber, token);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Экспорт платежных документов
|
||||
/// </summary>
|
||||
/// <param name="year">Год</param>
|
||||
/// <param name="month">Месяц</param>
|
||||
/// <param name="fiasHouseGuid">Глобальный уникальный идентификатор дома по ФИАС</param>
|
||||
/// <param name="paymentDocumentNumber">Номер платежного документа, по которому внесена плата,
|
||||
/// присвоенный такому документу исполнителем в целях осуществления расчетов по внесению платы</param>
|
||||
/// <param name="token">Токен отмены</param>
|
||||
/// <returns>Платежные документы</returns>
|
||||
public async Task<IEnumerable<exportPaymentDocumentResultType>> ExportPaymentDocumentDataByPaymentDocumentNumberAsync(short year, int month, string fiasHouseGuid, string paymentDocumentNumber, CancellationToken token = default)
|
||||
{
|
||||
var request = new ExportPaymentDocumentDataRequest(client);
|
||||
return await request.ExecuteByPaymentDocumentNumberAsync(year, month, fiasHouseGuid, paymentDocumentNumber, token);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -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 =>
|
||||
|
||||
Reference in New Issue
Block a user