Table of Contents

Interface IPaymentPriceClient

Namespace
NuvTools.Payment.Contracts
Assembly
NuvTools.Payment.dll

Reading the prices kept by the provider, found by the lookup keys the caller's catalogue names them by.

public interface IPaymentPriceClient

Remarks

Read only. Prices are created and replaced in the provider's dashboard; a caller only needs to show what a plan costs before it is bought, and the checkout or the subscription charges what the provider holds whatever the caller showed.

Its own contract, because a caller that shows a catalogue is not necessarily one that subscribes anybody, and a provider without lookup keys can simply not implement it.

Methods

GetPricesAsync(IReadOnlyCollection<string>, CancellationToken)

The active prices holding the given lookup keys.

Task<IResult<IReadOnlyList<PaymentPriceDTO>>> GetPricesAsync(IReadOnlyCollection<string> lookupKeys, CancellationToken cancellationToken = default)

Parameters

lookupKeys IReadOnlyCollection<string>

The lookup keys to resolve.

cancellationToken CancellationToken

Cancels the call.

Returns

Task<IResult<IReadOnlyList<PaymentPriceDTO>>>

Remarks

A key that names no active price is left out rather than failing the call, so one price retired in the dashboard does not hide the others.