This commit is contained in:
Tizian.Breuch
2025-09-25 16:11:46 +02:00
parent 36cc2d97a0
commit c80b5ccc22
3 changed files with 163 additions and 96 deletions

View File

@@ -2,18 +2,19 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Webshop.Application;
using Webshop.Application.DTOs.Customers;
namespace Webshop.Application.Services.Customers
{
public interface IAddressService
{
Task<IEnumerable<AddressDto>> GetMyAddressesAsync(string userId);
Task<AddressDto?> GetMyAddressByIdAsync(Guid addressId, string userId);
Task<(AddressDto? CreatedAddress, string? ErrorMessage)> CreateAddressAsync(CreateAddressDto addressDto, string userId);
Task<(bool Success, string? ErrorMessage)> UpdateAddressAsync(UpdateAddressDto addressDto, string userId);
Task<(bool Success, string? ErrorMessage)> DeleteAddressAsync(Guid addressId, string userId);
Task<(bool Success, string? ErrorMessage)> SetDefaultShippingAddressAsync(Guid addressId, string userId);
Task<(bool Success, string? ErrorMessage)> SetDefaultBillingAddressAsync(Guid addressId, string userId);
Task<ServiceResult<IEnumerable<AddressDto>>> GetMyAddressesAsync(string userId);
Task<ServiceResult<AddressDto>> GetMyAddressByIdAsync(Guid addressId, string userId);
Task<ServiceResult<AddressDto>> CreateAddressAsync(CreateAddressDto addressDto, string userId);
Task<ServiceResult> UpdateAddressAsync(UpdateAddressDto addressDto, string userId);
Task<ServiceResult> DeleteAddressAsync(Guid addressId, string userId);
Task<ServiceResult> SetDefaultShippingAddressAsync(Guid addressId, string userId);
Task<ServiceResult> SetDefaultBillingAddressAsync(Guid addressId, string userId);
}
}