in src/main/scala/InvoiceHelper.scala [100:111]
def processAccount(accountId: String): Unit = {
val result = for {
invoices <- invoicesToProcess(accountId)
adjustments <- collectAdjustments(accountId, invoices)
_ <- processAdjustments(accountId, adjustments)
paymentPrep <- prepareForPayment(accountId)
} yield paymentPrep
result match {
case \/-(successfulUpdate) => logSuccessfulResult(accountId)
case -\/(error) => logFailureResult(accountId, error)
}
}