|
|
|
|
using System.Collections.Immutable;
|
|
|
|
|
using Connected.Annotations;
|
|
|
|
|
using Connected.Notifications;
|
|
|
|
|
using Connected.ServiceModel;
|
|
|
|
|
|
|
|
|
|
namespace Connected.Common.Types.TaxRates;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The service used to manipulate with the <see cref="ITaxRate"/> entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Service]
|
|
|
|
|
[ServiceUrl(Routes.TaxRates)]
|
|
|
|
|
public interface ITaxRateService : IServiceNotifications<int>
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Queries all valid <see cref="ITaxRate"/> entities.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>An <see cref="ImmutableList{T}"/> representing all valid entities.</returns>
|
|
|
|
|
[ServiceMethod(ServiceMethodVerbs.Get | ServiceMethodVerbs.Post)]
|
|
|
|
|
Task<ImmutableList<ITaxRate>?> Query(QueryArgs? args);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Performs a lookup on <see cref="ITaxRate"/> entities for the specified list of ids.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="e">The List of the ids for which the perform a query.</param>
|
|
|
|
|
/// <returns>An <see cref="ImmutableList{T}"/> of <see cref="ITaxRate"/> entities that matches
|
|
|
|
|
/// the passed ids.</returns>
|
|
|
|
|
[ServiceMethod(ServiceMethodVerbs.Get | ServiceMethodVerbs.Post)]
|
|
|
|
|
Task<ImmutableList<ITaxRate>?> Query(PrimaryKeyListArgs<int> e);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Selects an <see cref="ITaxRate"/> entity for the specified id.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="e">The <see cref="IPrimaryKeyArgs{T}"/> which contains id.</param>
|
|
|
|
|
/// <returns>First <see cref="ITaxRate"/> that matches the arguments. </returns>
|
|
|
|
|
[ServiceMethod(ServiceMethodVerbs.Get | ServiceMethodVerbs.Post)]
|
|
|
|
|
Task<ITaxRate?> Select(PrimaryKeyArgs<int> e);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Selects an <see cref="ITaxRate"/> for the specified <see cref="TaxRateArgs"/> arguments.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="e">The <see cref="TaxRateArgs"/> arguments for which the <see cref="ITaxRate"/> entity
|
|
|
|
|
/// will be returned.</param>
|
|
|
|
|
/// <returns>First <see cref="ITaxRate"/> that matches the arguments.</returns>
|
|
|
|
|
[ServiceMethod(ServiceMethodVerbs.Get | ServiceMethodVerbs.Post)]
|
|
|
|
|
Task<ITaxRate?> Select(TaxRateArgs e);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Inserts a new <see cref="ITaxRate"/> entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>
|
|
|
|
|
/// An Id of the newly inserted entity.
|
|
|
|
|
/// </returns>
|
|
|
|
|
[ServiceMethod(ServiceMethodVerbs.Post)]
|
|
|
|
|
Task<int> Insert(InsertTaxRateArgs e);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Updates <see cref="ITaxRate"/> entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="e">The <see cref="TaxRateArgs"/> containing values to be updated.</param>
|
|
|
|
|
[ServiceMethod(ServiceMethodVerbs.Post)]
|
|
|
|
|
Task Update(UpdateTaxRateArgs e);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes <see cref="ITaxRate"/> entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ServiceMethod(ServiceMethodVerbs.Delete | ServiceMethodVerbs.Post)]
|
|
|
|
|
Task Delete(PrimaryKeyArgs<int> e);
|
|
|
|
|
}
|