using Hcs.Broker.Api.Payload.Payments;
using Hcs.Broker.Api.Request.Payments;

namespace Hcs.Broker.Api
{
    /// <inheritdoc cref="IPaymentsApi"/>
    public class PaymentsApi(Client client) : ApiBase(client), IPaymentsApi
    {
        /// <inheritdoc cref="IPaymentsApi"/>
        public async Task<bool> ImportNotificationsOfOrderExecutionAsync(ImportNotificationsOfOrderExecutionPayload payload, CancellationToken token = default)
        {
            var request = new ImportNotificationsOfOrderExecutionRequest(client);
            return await request.ExecuteAsync(payload, token);
        }

        /// <inheritdoc cref="IPaymentsApi"/>
        public async Task<bool> ImportSupplierNotificationsOfOrderExecutionAsync(ImportSupplierNotificationsOfOrderExecutionPayload payload, CancellationToken token = default)
        {
            var request = new ImportSupplierNotificationsOfOrderExecutionRequest(client);
            return await request.ExecuteAsync(payload, token);
        }
    }
}
