caueferreira/akka-bank

View on GitHub
src/main/java/requests/CreditRequest.kt

Summary

Maintainability
A
0 mins
Test Coverage
package requests

import com.fasterxml.jackson.annotation.JsonProperty
import commands.Operation

data class CreditRequest(@JsonProperty("amount") val amount: Long, @JsonProperty("requestId") val requestId: String, @JsonProperty("accountId") val accountId: String)

fun CreditRequest.operation() = Operation.Credit(amount, requestId, accountId)