Table of Contents

Interface IInvoiceNoSqlBroker

Namespace
arolariu.Backend.Domain.Invoices.Brokers.DatabaseBroker
Assembly
arolariu.Backend.Domain.Invoices.dll

The invoice NoSQL broker interface. This interface is used to interact with the database. This is the low level interface used to interact with the database.

public interface IInvoiceNoSqlBroker

Methods

CreateInvoiceAsync(Invoice)

Creates a new invoice. This method is used to create a new invoice in the database.

ValueTask<Invoice> CreateInvoiceAsync(Invoice invoice)

Parameters

invoice Invoice

Returns

ValueTask<Invoice>

CreateMerchantAsync(Merchant)

Creates a new merchant.

ValueTask<Merchant> CreateMerchantAsync(Merchant merchant)

Parameters

merchant Merchant

Returns

ValueTask<Merchant>

DeleteInvoiceAsync(Guid)

Deletes an invoice. This method is used to delete an invoice from the database. The invoice is identified by the invoice identifier.

ValueTask DeleteInvoiceAsync(Guid invoiceIdentifier)

Parameters

invoiceIdentifier Guid

Returns

ValueTask

DeleteInvoiceAsync(Guid, Guid)

Deletes an invoice. This method is used to delete an invoice from the database. The invoice is identified by the invoice identifier.

ValueTask DeleteInvoiceAsync(Guid invoiceIdentifier, Guid userIdentifier)

Parameters

invoiceIdentifier Guid
userIdentifier Guid

Returns

ValueTask

DeleteMerchantAsync(Guid)

Deletes a merchant.

ValueTask DeleteMerchantAsync(Guid merchantIdentifier)

Parameters

merchantIdentifier Guid

Returns

ValueTask

ReadInvoiceAsync(Guid)

Reads an invoice. This method is used to read an invoice from the database. The invoice is identified by the invoice identifier.

ValueTask<Invoice> ReadInvoiceAsync(Guid invoiceIdentifier)

Parameters

invoiceIdentifier Guid

Returns

ValueTask<Invoice>

ReadInvoiceAsync(Guid, Guid)

Reads an invoice. This method is used to read an invoice from the database. The invoice is identified by the invoice identifier.

ValueTask<Invoice> ReadInvoiceAsync(Guid invoiceIdentifier, Guid userIdentifier)

Parameters

invoiceIdentifier Guid
userIdentifier Guid

Returns

ValueTask<Invoice>

ReadInvoicesAsync()

Reads all the invoices. This method is used to read all the invoices from the database. The invoices are returned as an enumerable.

ValueTask<IEnumerable<Invoice>> ReadInvoicesAsync()

Returns

ValueTask<IEnumerable<Invoice>>

ReadInvoicesAsync(Guid)

Reads all the invoices. This method is used to read all the invoices from the database. The invoices are returned as an enumerable.

ValueTask<IEnumerable<Invoice>> ReadInvoicesAsync(Guid userIdentifier)

Parameters

userIdentifier Guid

Returns

ValueTask<IEnumerable<Invoice>>

ReadMerchantAsync(Guid)

Reads a merchant.

ValueTask<Merchant?> ReadMerchantAsync(Guid merchantIdentifier)

Parameters

merchantIdentifier Guid

Returns

ValueTask<Merchant>

ReadMerchantsAsync()

Reads all the merchants.

ValueTask<IEnumerable<Merchant>> ReadMerchantsAsync()

Returns

ValueTask<IEnumerable<Merchant>>

ReadMerchantsAsync(Guid)

Reads all the merchants.

ValueTask<IEnumerable<Merchant>> ReadMerchantsAsync(Guid parentCompanyId)

Parameters

parentCompanyId Guid

Returns

ValueTask<IEnumerable<Merchant>>

UpdateInvoiceAsync(Guid, Invoice)

Updates an invoice. This method is used to update an invoice in the database. The invoice is identified by the invoice identifier.

ValueTask<Invoice> UpdateInvoiceAsync(Guid invoiceIdentifier, Invoice updatedInvoice)

Parameters

invoiceIdentifier Guid
updatedInvoice Invoice

Returns

ValueTask<Invoice>

UpdateInvoiceAsync(Invoice, Invoice)

Updates an invoice. This method is used to update an invoice in the database. The invoice is identified by the invoice identifier.

ValueTask<Invoice> UpdateInvoiceAsync(Invoice currentInvoice, Invoice updatedInvoice)

Parameters

currentInvoice Invoice
updatedInvoice Invoice

Returns

ValueTask<Invoice>

UpdateMerchantAsync(Guid, Merchant)

Updates a merchant.

ValueTask<Merchant> UpdateMerchantAsync(Guid merchantIdentifier, Merchant updatedMerchant)

Parameters

merchantIdentifier Guid
updatedMerchant Merchant

Returns

ValueTask<Merchant>

UpdateMerchantAsync(Merchant, Merchant)

Updates a merchant.

ValueTask<Merchant> UpdateMerchantAsync(Merchant currentMerchant, Merchant updatedMerchant)

Parameters

currentMerchant Merchant
updatedMerchant Merchant

Returns

ValueTask<Merchant>