Add payment import
This commit is contained in:
@ -76,6 +76,7 @@
|
||||
<Compile Include="TestApp\Scenario\NsiCommonScenario.cs" />
|
||||
<Compile Include="TestApp\Scenario\NsiScenario.cs" />
|
||||
<Compile Include="TestApp\Scenario\OrgRegistryCommonScenario.cs" />
|
||||
<Compile Include="TestApp\Scenario\PaymentsScenario.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
|
||||
|
||||
@ -42,6 +42,7 @@ namespace Hcs.TestApp
|
||||
var nsiScenario = new NsiScenario(client);
|
||||
var nsiCommonScenario = new NsiCommonScenario(client);
|
||||
var orgRegistryCommonScenario = new OrgRegistryCommonScenario(client);
|
||||
var paymentsScenario = new PaymentsScenario(client);
|
||||
try
|
||||
{
|
||||
//billsScenario.ImportPaymentDocument();
|
||||
@ -77,6 +78,8 @@ namespace Hcs.TestApp
|
||||
//nsiCommonScenario.ExportNsiItem276();
|
||||
|
||||
//orgRegistryCommonScenario.ExportOrgRegistry();
|
||||
|
||||
//paymentsScenario.ImportSupplierNotificationsOfOrderExecution();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
27
Hcs.TestApp/TestApp/Scenario/PaymentsScenario.cs
Normal file
27
Hcs.TestApp/TestApp/Scenario/PaymentsScenario.cs
Normal file
@ -0,0 +1,27 @@
|
||||
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 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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user