Add callback doc

This commit is contained in:
nicolas.dorier
2020-11-16 12:05:15 +09:00
parent df79c2cf48
commit 07c5c2972d
8 changed files with 359 additions and 12 deletions

View File

@@ -54,12 +54,12 @@ namespace BTCPayServer.Client
return await HandleResponse<string>(response);
}
public async Task<JObject> GetWebhookDeliveryRequest(string storeId, string webhookId, string deliveryId, CancellationToken token = default)
public async Task<WebhookEvent> GetWebhookDeliveryRequest(string storeId, string webhookId, string deliveryId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/request"), token);
if (response.StatusCode == System.Net.HttpStatusCode.NotFound)
return null;
return await HandleResponse<JObject>(response);
return await HandleResponse<WebhookEvent>(response);
}
}
}