mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
23 lines
785 B
C#
23 lines
785 B
C#
using System;
|
|
using System.Net.Http;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using BTCPayServer.Client.Models;
|
|
|
|
namespace BTCPayServer.Client
|
|
{
|
|
public partial class BTCPayServerClient
|
|
{
|
|
|
|
public virtual async Task<PointOfSaleAppData> CreatePointOfSaleApp(string storeId,
|
|
CreatePointOfSaleAppRequest request, CancellationToken token = default)
|
|
{
|
|
if (request == null)
|
|
throw new ArgumentNullException(nameof(request));
|
|
var response = await _httpClient.SendAsync(
|
|
CreateHttpRequest($"api/v1/stores/{storeId}/apps/pos", bodyPayload: request,
|
|
method: HttpMethod.Post), token);
|
|
return await HandleResponse<PointOfSaleAppData>(response);
|
|
}
|
|
}
|
|
}
|