Table of Contents

Class MerchantStorageFoundationService

Namespace
arolariu.Backend.Domain.Invoices.Services.Foundation.MerchantStorage
Assembly
arolariu.Backend.Domain.Invoices.dll

Class that implements the merchant storage foundation service.

public class MerchantStorageFoundationService : IMerchantStorageFoundationService
Inheritance
MerchantStorageFoundationService
Implements
Inherited Members

Constructors

MerchantStorageFoundationService(IInvoiceNoSqlBroker, ILoggerFactory)

Public constructor.

public MerchantStorageFoundationService(IInvoiceNoSqlBroker invoiceNoSqlBroker, ILoggerFactory loggerFactory)

Parameters

invoiceNoSqlBroker IInvoiceNoSqlBroker
loggerFactory ILoggerFactory

Fields

invoiceNoSqlBroker

private readonly IInvoiceNoSqlBroker invoiceNoSqlBroker

Field Value

IInvoiceNoSqlBroker

logger

private readonly ILogger<IMerchantStorageFoundationService> logger

Field Value

ILogger<IMerchantStorageFoundationService>

Methods

CreateAndLogDependencyException(Exception)

private MerchantFoundationServiceDependencyException CreateAndLogDependencyException(Exception exception)

Parameters

exception Exception

Returns

MerchantFoundationServiceDependencyException

CreateAndLogDependencyValidationException(Exception)

private MerchantFoundationServiceDependencyValidationException CreateAndLogDependencyValidationException(Exception exception)

Parameters

exception Exception

Returns

MerchantFoundationServiceDependencyValidationException

CreateAndLogServiceException(Exception)

private MerchantFoundationServiceException CreateAndLogServiceException(Exception exception)

Parameters

exception Exception

Returns

MerchantFoundationServiceException

CreateAndLogValidationException(Exception)

private MerchantFoundationServiceValidationException CreateAndLogValidationException(Exception exception)

Parameters

exception Exception

Returns

MerchantFoundationServiceValidationException

CreateMerchantObject(Merchant)

Creates a merchant object.

public Task<Merchant> CreateMerchantObject(Merchant merchant)

Parameters

merchant Merchant

Returns

Task<Merchant>

DeleteMerchantObject(Guid)

Deletes a merchant object.

public Task DeleteMerchantObject(Guid identifier)

Parameters

identifier Guid

Returns

Task

DeleteMerchantObject(Guid, Guid)

Deletes a merchant object.

public Task DeleteMerchantObject(Guid identifier, Guid parentCompanyId)

Parameters

identifier Guid
parentCompanyId Guid

Returns

Task

ReadAllMerchantObjects()

Reads all merchant objects.

public Task<IEnumerable<Merchant>> ReadAllMerchantObjects()

Returns

Task<IEnumerable<Merchant>>

ReadAllMerchantObjects(Guid)

Reads all merchant objects.

public Task<IEnumerable<Merchant>> ReadAllMerchantObjects(Guid parentCompanyId)

Parameters

parentCompanyId Guid

Returns

Task<IEnumerable<Merchant>>

ReadMerchantObject(Guid)

Reads a merchant object.

public Task<Merchant> ReadMerchantObject(Guid identifier)

Parameters

identifier Guid

Returns

Task<Merchant>

ReadMerchantObject(Guid, Guid)

Reads a merchant object.

public Task<Merchant> ReadMerchantObject(Guid identifier, Guid parentCompanyId)

Parameters

identifier Guid
parentCompanyId Guid

Returns

Task<Merchant>

TryCatchAsync(CallbackFunctionForMerchant)

private Task<Merchant> TryCatchAsync(MerchantStorageFoundationService.CallbackFunctionForMerchant callbackFunction)

Parameters

callbackFunction MerchantStorageFoundationService.CallbackFunctionForMerchant

Returns

Task<Merchant>

TryCatchAsync(CallbackFunctionForMerchantList)

private Task<IEnumerable<Merchant>> TryCatchAsync(MerchantStorageFoundationService.CallbackFunctionForMerchantList callbackFunction)

Parameters

callbackFunction MerchantStorageFoundationService.CallbackFunctionForMerchantList

Returns

Task<IEnumerable<Merchant>>

TryCatchAsync(CallbackFunctionWithNoReturn)

private Task TryCatchAsync(MerchantStorageFoundationService.CallbackFunctionWithNoReturn callbackFunction)

Parameters

callbackFunction MerchantStorageFoundationService.CallbackFunctionWithNoReturn

Returns

Task

UpdateMerchantObject(Guid, Merchant)

Updates a merchant object.

public Task<Merchant> UpdateMerchantObject(Guid merchantIdentifier, Merchant updatedMerchant)

Parameters

merchantIdentifier Guid
updatedMerchant Merchant

Returns

Task<Merchant>

UpdateMerchantObject(Merchant, Merchant)

Updates a merchant object.

public Task<Merchant> UpdateMerchantObject(Merchant currentMerchant, Merchant updatedMerchant)

Parameters

currentMerchant Merchant
updatedMerchant Merchant

Returns

Task<Merchant>

ValidateMerchantIdentifierIsSet(Guid?)

private static void ValidateMerchantIdentifierIsSet(Guid? identifier)

Parameters

identifier Guid?

ValidateParentCompanyIdentifierIsSet(Guid?)

private static void ValidateParentCompanyIdentifierIsSet(Guid? parentCompanyId)

Parameters

parentCompanyId Guid?