many fixes and improvements - rework for modules/ and common/
feat(emailer): add Postmark and Resend providers
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
namespace Hutopy.Modules.Memberships.Contracts;
|
||||
|
||||
public interface IMembershipCancellationProcessor
|
||||
{
|
||||
Task<DateTimeOffset?> CancelAsync(string subscriptionId, CancellationToken ct = default);
|
||||
}
|
||||
26
backend/Modules/Memberships/Contracts/IMembershipNotifier.cs
Normal file
26
backend/Modules/Memberships/Contracts/IMembershipNotifier.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
namespace Hutopy.Modules.Memberships.Contracts;
|
||||
|
||||
public interface IMembershipNotifier
|
||||
{
|
||||
Task NotifyCheckoutSessionCompleted(string stripeSessionId, string stripeSubscriptionId,
|
||||
string userId,
|
||||
string creatorId,
|
||||
string tierId,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task NotifyPaymentSucceedAsync(
|
||||
string stripeSubscriptionId,
|
||||
string hostedInvoiceUrl,
|
||||
decimal amount,
|
||||
string currency,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task NotifySubscriptionUpdatedAsync(
|
||||
string subscriptionId,
|
||||
DateTimeOffset? endDate,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task NotifySubscriptionDeletedAsync(
|
||||
string subscriptionId,
|
||||
CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Hutopy.Modules.Creators.Contracts;
|
||||
|
||||
namespace Hutopy.Modules.Memberships.Contracts;
|
||||
|
||||
public interface IMembershipPaymentProcessor
|
||||
{
|
||||
Task<MembershipCheckoutSession> CreateCheckoutSessionAsync(
|
||||
Guid userId,
|
||||
CreatorReference creatorReference,
|
||||
Guid tierId,
|
||||
string priceId,
|
||||
string successUrl,
|
||||
string cancelUrl);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace Hutopy.Modules.Memberships.Contracts;
|
||||
|
||||
public interface IMembershipTierProcessor
|
||||
{
|
||||
Task<string> CreateAsync(
|
||||
Guid creatorId,
|
||||
Guid tierId,
|
||||
string productName,
|
||||
string currencyCode,
|
||||
decimal amount);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Hutopy.Modules.Memberships.Contracts;
|
||||
|
||||
[PublicAPI]
|
||||
public record MembershipCheckoutSession(
|
||||
string Id,
|
||||
string Url);
|
||||
Reference in New Issue
Block a user