1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 00:22:50 -05:00

[PM-212] Sync Organization Billing Email from Stripe Webhook (#3305)

* Add StripeFacade and StripeEventService

* Add StripeEventServiceTests

* Handle customer.updated event in StripeController
This commit is contained in:
Alex Morask
2023-10-11 15:57:51 -04:00
committed by GitHub
parent 3a71e7b081
commit b2af73f00f
19 changed files with 2316 additions and 214 deletions

View File

@ -0,0 +1,22 @@
using System.Reflection;
namespace Bit.Billing.Test.Utilities;
public static class EmbeddedResourceReader
{
public static async Task<string> ReadAsync(string resourceType, string fileName)
{
var assembly = Assembly.GetExecutingAssembly();
await using var stream = assembly.GetManifestResourceStream($"Bit.Billing.Test.Resources.{resourceType}.{fileName}");
if (stream == null)
{
throw new Exception($"Failed to retrieve manifest resource stream for file: {fileName}.");
}
using var reader = new StreamReader(stream);
return await reader.ReadToEndAsync();
}
}