using Hcs.Client;
using Hcs.Client.Api.Payload.Payments;
using System;

namespace Hcs.TestApp.Scenario
{
    internal class PaymentsScenario(UniClient client)
    {
        private readonly UniClient client = client;

        internal void ImportNotificationsOfOrderExecution()
        {
            var payload = new ImportNotificationsOfOrderExecutionPayload()
            {
                orderId = "10010314020441452509150000156006",
                orderDate = new DateTime(2025, 9, 5),
                amount = 4000M,
                onlinePayment = true,
                year = 2025,
                month = 8,
                paymentDocumentId = "00АА095186-02-5081",
                paymentDocumentGUID = "019940ff-7817-7dc5-8c61-79593979e281"
            };

            var result = client.Payments.ImportNotificationsOfOrderExecutionAsync(payload).Result;
            Console.WriteLine("Scenario execution " + (result ? "succeeded" : "failed"));
        }

        internal void ImportSupplierNotificationsOfOrderExecution()
        {
            var payload = new ImportSupplierNotificationsOfOrderExecutionPayload()
            {
                orderDate = new DateTime(2025, 9, 5),
                month = 8,
                year = 2025,
                paymentDocumentId = "00АА095186-02-5081",
                amount = 4000M,
                onlinePayment = true
            };

            var result = client.Payments.ImportSupplierNotificationsOfOrderExecutionAsync(payload).Result;
            Console.WriteLine("Scenario execution " + (result ? "succeeded" : "failed"));
        }
    }
}
