diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
new file mode 100644
index 0000000..507537b
--- /dev/null
+++ b/.github/workflows/dotnet.yml
@@ -0,0 +1,28 @@
+# This workflow will build a .NET project
+# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
+
+name: .NET
+
+on:
+ push:
+ branches: [ "*" ]
+ pull_request:
+ branches: [ "*" ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: 8.0.x
+ - name: Restore dependencies
+ run: dotnet restore
+ - name: Build
+ run: dotnet build --no-restore
+ - name: Test
+ run: dotnet test --no-build --verbosity normal
\ No newline at end of file
diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml
new file mode 100644
index 0000000..a73fa1f
--- /dev/null
+++ b/.github/workflows/nuget.yml
@@ -0,0 +1,28 @@
+name: NuGet - Release
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ publish-nuget:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup .NET Core
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: '7.x.x'
+ - name: Set output
+ id: vars
+ run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
+ - name: Publish to NuGet
+ uses: kelson-dev/publish-nuget-fixed@2.5.6
+ with:
+ PROJECT_FILE_PATH: Lava.NET.csproj
+ VERSION_STATIC: ${{ steps.vars.outputs.tags }}
+ TAG_COMMIT: true
+ TAG_FORMAT: "*"
+ NUGET_KEY: ${{secrets.NUGET_API_KEY}}
+ NUGET_SOURCE: https://api.nuget.org
+ INCLUDE_SYMBOLS: false
\ No newline at end of file
diff --git a/Exceptions.cs b/Exceptions.cs
new file mode 100644
index 0000000..bb81383
--- /dev/null
+++ b/Exceptions.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Exceptions
+{
+ ///
+ /// Sending error when Lava.ru type is not equals your type
+ ///
+ public class TypeException : Exception {
+ public TypeException(string? message) : base(message) { }
+ public TypeException() : base() { }
+ public TypeException(string? message, Exception exception) : base(message, exception) { }
+ }
+}
diff --git a/Lava.NET.csproj b/Lava.NET.csproj
new file mode 100644
index 0000000..f4a9bff
--- /dev/null
+++ b/Lava.NET.csproj
@@ -0,0 +1,22 @@
+
+
+
+ net8.0
+ enable
+ enable
+ v1.0.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lava.NET.sln b/Lava.NET.sln
new file mode 100644
index 0000000..34958ce
--- /dev/null
+++ b/Lava.NET.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.9.34622.214
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lava.NET", "Lava.NET.csproj", "{D273E6E8-53EC-483F-985D-E71A6E0BA041}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D273E6E8-53EC-483F-985D-E71A6E0BA041}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D273E6E8-53EC-483F-985D-E71A6E0BA041}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D273E6E8-53EC-483F-985D-E71A6E0BA041}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D273E6E8-53EC-483F-985D-E71A6E0BA041}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {26DE234C-76FC-4D24-BF3C-9ECAD7823E1C}
+ EndGlobalSection
+EndGlobal
diff --git a/Program.cs b/Program.cs
new file mode 100644
index 0000000..f78658a
--- /dev/null
+++ b/Program.cs
@@ -0,0 +1,92 @@
+using Lava.NET.Types.Enums;
+using Lava.NET.Types.LavaAPI;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System.Net.Http;
+using System.Net.Http.Json;
+using System.Text.Json.Nodes;
+
+namespace Lava.NET
+{
+ ///
+ /// Ограниченный класс, который используется как базовый для бизнес части и публичной части Lava API. Использование нежелательно!
+ ///
+ /// Токен от Lava.ru
+ /// Тип вашего аккаунта
+ public class ILavaAPI(string token, LavaType type)
+ {
+ internal readonly HttpClient _httpClient = new HttpClient()
+ {
+ BaseAddress = new("https://api.lava.ru/")
+ };
+ internal async Task SendRequest(string path, LavaType? neededType, HttpMethod method, string? body = null)
+ {
+ if (neededType != LavaType.any && neededType != type) throw new Exceptions.TypeException("Your Lava.ru account type is not equals needed type");
+ _httpClient.DefaultRequestHeaders.Authorization = new("", token);
+ using (var message = new HttpRequestMessage(method, path))
+ {
+ message.Content = body == null ? new StringContent(body.ToString()) : null;
+ var req = await _httpClient.SendAsync(message);
+ return await req.Content.ReadAsStringAsync();
+ }
+ }
+
+ public async Task CreatePaymentAsync(PaymentRequest data)
+ => JsonConvert.DeserializeObject(await SendRequest("invoice/create", LavaType.any, HttpMethod.Post, data.ToString()));
+ public async Task GetPaymentInfoAsync(string id)
+ => JsonConvert.DeserializeObject(await SendRequest("invoice/info", LavaType.any, HttpMethod.Post, id));
+ public async Task SetWebhookUrl(string url)
+ => await SendRequest("invoice/set-webhook", LavaType.any, HttpMethod.Post, url);
+ public async Task pingAsync()
+ => JsonNode.Parse(await SendRequest("test/ping", LavaType.any, HttpMethod.Get))?["status"]?.ToString().Equals(true) ?? false;
+ }
+ public class PublicLavaAPI : ILavaAPI
+ {
+ // Для обычных юзеров + общедоступное
+ public PublicLavaAPI(string token) : base(token, LavaType.wallet) { }
+
+ public async Task getWallets()
+ => JsonConvert.DeserializeObject(await SendRequest("wallet/list", LavaType.wallet, HttpMethod.Get));
+ public async Task MakeWithdraw(Withdraw withdraw)
+ => JsonConvert.DeserializeObject(await SendRequest("withdraw/create", LavaType.wallet, HttpMethod.Post, withdraw.ToString()));
+ public async Task InfoWithdrawAsync(string id)
+ => JsonConvert.DeserializeObject(await SendRequest("withdraw/info", LavaType.wallet, HttpMethod.Post, id));
+ public async Task MakeTransfer(Transfer data)
+ => JsonConvert.DeserializeObject(await SendRequest("transfer/create", LavaType.wallet, HttpMethod.Post, data.ToString()));
+ public async Task GetTransferDataAsync(string id)
+ => JsonConvert.DeserializeObject(await SendRequest("transfer/info", LavaType.wallet, HttpMethod.Post, id));
+ public async Task GetTransactionsAsync(TransactionParam? transaction = null)
+ => JsonConvert.DeserializeObject(await SendRequest("transactions/list", LavaType.wallet, HttpMethod.Post, transaction?.ToString()));
+ public async Task GetSBPBanksAsync()
+ => JsonConvert.DeserializeObject(await SendRequest("withdraw/get-sbp-bank-list", LavaType.wallet, HttpMethod.Post));
+ }
+ public class BusinessLavaAPI(string token) : ILavaAPI(token, LavaType.business)
+ {
+ internal async Task SendRequest(string path, LavaType? neededType = LavaType.business, HttpMethod? method = null, string? body = null, bool isSpecial = true)
+ {
+ method ??= HttpMethod.Post;
+ if (neededType != LavaType.any && neededType != LavaType.business) throw new Exceptions.TypeException("Your Lava.ru account type is not equals needed type");
+ _httpClient.DefaultRequestHeaders.Authorization = new("", token);
+ if (isSpecial)
+ {
+ _httpClient.DefaultRequestHeaders.Accept.Add(new("application/json"));
+ _httpClient.DefaultRequestHeaders.Add("Content-Type", "application/json");
+ }
+ using (var message = new HttpRequestMessage(method, path))
+ {
+ message.Content = body == null ? new StringContent(body.ToString()) : null;
+ var req = await _httpClient.SendAsync(message);
+ return await req.Content.ReadAsStringAsync();
+ }
+ }
+ public async Task CreatePayoffAsync(PayoffRequest request)
+ => JsonConvert.DeserializeObject(await SendRequest("business/payoff/create", body: request.ToString()));
+ public async Task GetPayoffDataAsync(PayoffDataRequest request)
+ => JsonConvert.DeserializeObject(await SendRequest("business/payoff/info", body: request.ToString()));
+ public async Task GetPayoffTariffAsync(PayoffTariffRequest request)
+ => JsonConvert.DeserializeObject(await SendRequest("business/payoff/get-tariffs", body: request.ToString()));
+ public async Task CheckPayoffTariffAsync(PayoffCheckoutRequest request)
+ => JsonConvert.DeserializeObject(await SendRequest("business/payoff/check-wallet", body: request.ToString()));
+ // В разработке...
+ }
+}
diff --git a/Types/Base.cs b/Types/Base.cs
new file mode 100644
index 0000000..fec5d44
--- /dev/null
+++ b/Types/Base.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Text.Json;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types
+{
+ public interface IBase
+ {
+ public string ToString()
+ {
+ return JsonSerializer.Serialize(this);
+ }
+ }
+ public static class Statics
+ {
+ public static string ToString(this IBase @base)
+ => JsonSerializer.Serialize(@base);
+ }
+}
diff --git a/Types/Enums/ErrorCodes.cs b/Types/Enums/ErrorCodes.cs
new file mode 100644
index 0000000..a49d40c
--- /dev/null
+++ b/Types/Enums/ErrorCodes.cs
@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types.Enums
+{
+ public enum ErrorCode
+ {
+ /// Неизвестная ошибка
+ UnknownError = 0,
+ /// Объект не найден
+ ObjectNotFound = 1,
+ /// Неверное значение параметра
+ InvalidParameterValue = 2,
+ /// Неверный JWT-токен
+ InvalidJWTToken = 5,
+ /// Серверная ошибка
+ ServerError = 6,
+ /// Неверный тип запроса
+ InvalidRequestType = 7,
+ /// Переданы неверный параметры
+ InvalidParameters = 100,
+ /// Неверный номер счета
+ InvalidInvoiceNumber = 101,
+ /// Сумма меньше минимальной
+ AmountBelowMinimum = 102,
+ /// Сумма больше максимальной
+ AmountAboveMaximum = 103,
+ /// Недостаточно средств на балансе
+ InsufficientBalance = 104,
+ /// Транзакция не найдена
+ TransactionNotFound = 105,
+ /// Перевод недоступен
+ TransferUnavailable = 107,
+ /// Время жизни меньше минимальной
+ ExpireBelowMinimum = 202,
+ /// Время жизни больше максимальной
+ ExpireAboveMaximum = 203,
+ /// Номер больше 255 символов
+ OrderNumberTooLong = 204,
+ /// Такой номер заказа уже существует
+ OrderNumberAlreadyExists = 205,
+ /// Счет на оплату не найден
+ InvoiceNotFound = 206,
+ /// Срок жизни счета истек
+ InvoiceExpired = 207,
+ /// Счет уже оплачен
+ InvoiceAlreadyPaid = 208,
+ /// Не установлен секретный ключ
+ SecretKeyNotSet = 209,
+ /// Неверная сигнатура
+ InvalidSignature = 210,
+ /// Конвертация недоступна
+ ConversionUnavailable = 251
+ }
+
+}
diff --git a/Types/Enums/LavaType.cs b/Types/Enums/LavaType.cs
new file mode 100644
index 0000000..5a69974
--- /dev/null
+++ b/Types/Enums/LavaType.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types.Enums
+{
+ public enum LavaType
+ {
+ business,
+ wallet,
+ any
+ }
+}
diff --git a/Types/Enums/Methods.cs b/Types/Enums/Methods.cs
new file mode 100644
index 0000000..e57f3d8
--- /dev/null
+++ b/Types/Enums/Methods.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types.Enums
+{
+ public enum Methods
+ {
+ Qiwi = 10,
+ YooMoney = 10,
+ Card = 1000,
+ AdvCash = 50,
+ Payeer = 50,
+ Phone = 10,
+ PerfectMoney = 50,
+ SBP = 50
+ }
+}
diff --git a/Types/LavaAPI/Default.cs b/Types/LavaAPI/Default.cs
new file mode 100644
index 0000000..4292a72
--- /dev/null
+++ b/Types/LavaAPI/Default.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types.LavaAPI
+{
+ public class DefaultResponse : IBase
+ {
+ public string id { get; set; }
+ public string status { get; set; }
+ public string amount { get; set; }
+ public int commission { get; set; }
+ }
+
+}
diff --git a/Types/LavaAPI/Payment.cs b/Types/LavaAPI/Payment.cs
new file mode 100644
index 0000000..352fc9e
--- /dev/null
+++ b/Types/LavaAPI/Payment.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types.LavaAPI
+{
+ public class PaymentRequest : IBase
+ {
+ public string wallet_to { get; set; }
+ public float sum { get; set; }
+ public string? order_id { get; set; }
+ public string? hook_url { get; set; }
+ public string? success_url { get; set; }
+ public string? fail_url { get; set; }
+ public int? expire { get; set; } = 43200;
+ public string? subtract { get; set; }
+ public string? custom_fields { get; set; }
+ public string? comment { get; set; }
+ public string? merchant_id { get; set; }
+ public string? merchant_name { get; set; }
+ }
+ public class PaymentResponse : IBase
+ {
+ public string status { get; set; }
+ public string id { get; set; }
+ public string url { get; set; }
+ public int expire { get; set; }
+ public string sum { get; set; }
+ public string success_url { get; set; }
+ public string fail_url { get; set; }
+ public string hook_url { get; set; }
+ public string custom_fields { get; set; }
+ public string merchant_name { get; set; }
+ public string merchant_id { get; set; }
+ }
+ public class Invoice : IBase
+ {
+ public string id { get; set; }
+ public string order_id { get; set; }
+ public int expire { get; set; }
+ public string sum { get; set; }
+ public string comment { get; set; }
+ public string status { get; set; }
+ public string success_url { get; set; }
+ public string fail_url { get; set; }
+ public string hook_url { get; set; }
+ public string custom_fields { get; set; }
+ }
+
+ public class PaymentInfo : IBase
+ {
+ public string status { get; set; }
+ public Invoice invoice { get; set; }
+ }
+}
diff --git a/Types/LavaAPI/Payoff.cs b/Types/LavaAPI/Payoff.cs
new file mode 100644
index 0000000..f412c85
--- /dev/null
+++ b/Types/LavaAPI/Payoff.cs
@@ -0,0 +1,178 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types.LavaAPI
+{
+ ///
+ /// Параметры запроса на вывод средств.
+ ///
+ public class PayoffRequest : IBase
+ {
+ ///
+ /// Сумма вывода.
+ ///
+ public double amount { get; set; }
+
+ ///
+ /// Уникальный идентификатор платежа в системе мерчанта.
+ ///
+ public string orderId { get; set; }
+
+ ///
+ /// Подпись запроса.
+ ///
+ public string signature { get; set; }
+
+ ///
+ /// Идентификатор проекта.
+ ///
+ public Guid shopId { get; set; }
+
+ ///
+ /// Куда отправлять хук (Max: 500).
+ ///
+ public string hookUrl { get; set; }
+
+ ///
+ /// Сервис, на который производится вывод средств.
+ ///
+ public string service { get; set; }
+
+ ///
+ /// Номер кошелька, на который производится вывод средств.
+ /// При выводе на свой лава кошелёк параметр не указывается.
+ ///
+ public string walletTo { get; set; }
+
+ ///
+ /// С кого списывать коммиссию: с магазина или с суммы.
+ /// По умолчанию 0, 1 - с магазина, 0 - с суммы.
+ ///
+ public string subtract { get; set; }
+ }
+ public class Data : IBase
+ {
+ public string payoff_id { get; set; }
+ public string payoff_status { get; set; }
+ }
+ public class PayoffResponse : IBase
+ {
+ public Data data { get; set; }
+ public int status { get; set; }
+ public bool status_check { get; set; }
+ }
+ ///
+ /// Параметры запроса.
+ ///
+ public class PayoffDataRequest : IBase
+ {
+ ///
+ /// Подпись запроса.
+ ///
+ public string? signature { get; set; }
+
+ ///
+ /// Идентификатор проекта.
+ ///
+ public Guid shopId { get; set; }
+
+ ///
+ /// Уникальный идентификатор платежа в системе мерчанта.
+ ///
+ public Guid? orderId { get; set; }
+
+ ///
+ /// Номер вывода.
+ ///
+ public Guid? payoffId { get; set; }
+ }
+ public class ResponseData : IBase
+ {
+ public string id { get; set; }
+ public object orderId { get; set; }
+ public string status { get; set; }
+ public string wallet { get; set; }
+ public string service { get; set; }
+ public int amountPay { get; set; }
+ public double commission { get; set; }
+ public double amountReceive { get; set; }
+ public int tryCount { get; set; }
+ public object errorMessage { get; set; }
+ }
+ public class PayoffDataResponse : IBase
+ {
+ public ResponseData data { get; set; }
+ public int status { get; set; }
+ public bool status_check { get; set; }
+ }
+ public class PayoffTariffData : IBase
+ {
+ public List tariffs { get; set; }
+ }
+ public class PayoffTariffResponse : IBase
+ {
+ public PayoffTariffData data { get; set; }
+ public int status { get; set; }
+ public bool status_check { get; set; }
+ }
+ public class PayoffTariffRequest : IBase
+ {
+ ///
+ /// Подпись запроса.
+ ///
+ public string signature { get; set; }
+
+ ///
+ /// Идентификатор проекта.
+ ///
+ public Guid shopId { get; set; }
+ }
+ public class Tariff : IBase
+ {
+ public double percent { get; set; }
+ public int min_sum { get; set; }
+ public int max_sum { get; set; }
+ public string service { get; set; }
+ public int fix { get; set; }
+ public string title { get; set; }
+ public string currency { get; set; }
+ }
+ ///
+ /// Класс, представляющий параметры запроса.
+ ///
+ public class PayoffCheckoutRequest : IBase
+ {
+ ///
+ /// Кошелёк/аккаунт.
+ ///
+ public string walletTo { get; set; }
+
+ ///
+ /// Сервис для выплаты.
+ /// Тип: ['card_payoff', 'qiwi_payoff', 'lava_payoff', 'steam_payoff']
+ ///
+ public string service { get; set; }
+ ///
+ /// Подпись запроса
+ ///
+ public string? signature { get; set; }
+ ///
+ /// Идентификатор проекта
+ ///
+ public Guid shopId { get; set; }
+ }
+ public class PayoffData
+ {
+ public bool status { get; set; }
+ }
+
+ public class PayoffCheckoutResponse
+ {
+ public PayoffData data { get; set; }
+ public int status { get; set; }
+ public bool status_check { get; set; }
+ }
+}
diff --git a/Types/LavaAPI/SBPBanks.cs b/Types/LavaAPI/SBPBanks.cs
new file mode 100644
index 0000000..938a189
--- /dev/null
+++ b/Types/LavaAPI/SBPBanks.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types.LavaAPI
+{
+ public class Datum : IBase
+ {
+ public object id { get; set; }
+ public string name { get; set; }
+ }
+
+ public class SBPBanks : IBase
+ {
+ public List data { get; set; }
+ }
+}
diff --git a/Types/LavaAPI/Transaction.cs b/Types/LavaAPI/Transaction.cs
new file mode 100644
index 0000000..b253ec5
--- /dev/null
+++ b/Types/LavaAPI/Transaction.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types.LavaAPI
+{
+
+ public class TransactionParam : IBase
+ {
+ public string? transfer_type { get; set; }
+ public string? account { get; set; }
+ public string? period_start { get; set; }
+ public string? period_end { get; set; }
+ public int? offset { get; set; }
+ public int? limit { get; set; }
+ }
+
+ public class Transaction : IBase
+ {
+ public string id { get; set; }
+ public string created_at { get; set; }
+ public DateTime created_date { get; set; }
+ public string amount { get; set; }
+ public string status { get; set; }
+ public string transfer_type { get; set; }
+ public string comment { get; set; }
+ public string method { get; set; }
+ public string currency { get; set; }
+ public string account { get; set; }
+ public string commission { get; set; }
+ public string type { get; set; }
+ public string receiver { get; set; }
+ }
+}
diff --git a/Types/LavaAPI/Transfer.cs b/Types/LavaAPI/Transfer.cs
new file mode 100644
index 0000000..fdc7cad
--- /dev/null
+++ b/Types/LavaAPI/Transfer.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types.LavaAPI
+{
+ public class Transfer : IBase
+ {
+ public string account_from { get; set; }
+ public string account_to { get; set;}
+ public int substract { get; set; } = 0;
+ public int amount { get; set; }
+ public string? comment { get; set; }
+ }
+ public class TransferData : IBase
+ {
+ public string id { get; set; }
+ public string created_at { get; set; }
+ public string amount { get; set; }
+ public string status { get; set; }
+ public object comment { get; set; }
+ public string currency { get; set; }
+ public string type { get; set; }
+ public string receiver { get; set; }
+ public string commission { get; set; }
+ }
+}
diff --git a/Types/LavaAPI/Wallet.cs b/Types/LavaAPI/Wallet.cs
new file mode 100644
index 0000000..6513228
--- /dev/null
+++ b/Types/LavaAPI/Wallet.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types.LavaAPI
+{
+ public class Wallet : IBase
+ {
+ public string account { get; set; }
+ public string currency { get; set; }
+ public string balance { get; set; }
+ }
+}
diff --git a/Types/LavaAPI/WebhookResponse.cs b/Types/LavaAPI/WebhookResponse.cs
new file mode 100644
index 0000000..0cf3db9
--- /dev/null
+++ b/Types/LavaAPI/WebhookResponse.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types.LavaAPI
+{
+ public class WebhookResponse : IBase
+ {
+ public int type { get; set; }
+ public string invoice_id { get; set; }
+ public string order_id { get; set; }
+ public string status { get; set; }
+ public int pay_time { get; set; }
+ public string amount { get; set; }
+ public string custom_fields { get; set; }
+ public string credited { get; set; }
+ public string merchant_id { get; set; }
+ public string merchant_name { get; set; }
+ public string sign { get; set; }
+ }
+}
diff --git a/Types/LavaAPI/Withdraw.cs b/Types/LavaAPI/Withdraw.cs
new file mode 100644
index 0000000..4d58ebb
--- /dev/null
+++ b/Types/LavaAPI/Withdraw.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lava.NET.Types.LavaAPI
+{
+ public class WithdrawInfo : IBase
+ {
+ public string id { get; set; }
+ public string created_at { get; set; }
+ public string amount { get; set; }
+ public string commission { get; set; }
+ public string status { get; set; }
+ public string service { get; set; }
+ public string comment { get; set; }
+ public string currency { get; set; }
+ }
+ public class Withdraw : IBase
+ {
+ public string account { get; set; }
+ public float amount { get; set; }
+ public string order_id { get; set; }
+ public string hook_url { get; set; }
+ public int subtract { get; set; } = 0;
+ public string service { get; set; } = "card";
+ public string wallet_to { get; set; }
+ public string comment { get; set; }
+ public string sbp_bank_id { get; set; }
+ }
+
+}