Stripe Shipping Rate Database Service
A service which handles getting the Stripe Shipping Rates from the database
The Stripe Shipping Rate database service is what handles the insertion, retrieval, updating, and deletion of the Shipping Rates within the database.
You can access the database service by injecting IStripeShippingRateDatabaseService which can be found within the namespace UmbCheckout.Stripe.Interfaces
Every method takes an optional CancellationToken as its last parameter. Reads publish OnShippingRatesLoadedNotification, and saves and deletes publish the cancellable OnShippingRateSavingNotification and OnShippingRateDeletingNotification (see Extending UmbCheckout).
GetShippingRatesAsync
Gets the Shipping Rates
Task<IEnumerable<ShippingRate>> GetShippingRatesAsync(CancellationToken cancellationToken = default);GetShippingRateAsync
Gets a specified Shipping Rate by its key, or by its Stripe ID
key
Key of the Stripe Shipping Rate
value
StripeId of the Stripe Shipping Rate
Task<ShippingRate?> GetShippingRateAsync(Guid key, CancellationToken cancellationToken = default);
Task<ShippingRate?> GetShippingRateAsync(string value, CancellationToken cancellationToken = default);CreateShippingRateAsync
Creates a Shipping Rate. Returns null when a rate with the same Stripe ID already exists.
Task<ShippingRate?> CreateShippingRateAsync(ShippingRate shippingRate, CancellationToken cancellationToken = default);UpdateShippingRateAsync
Updates a specified Shipping Rate
DeleteShippingRateAsync
Deletes a specified Shipping Rate
key
Key of the Stripe Shipping Rate
Last updated