Skip to content

Instantly share code, notes, and snippets.

@ngallazzi
Last active February 4, 2022 14:46
Show Gist options
  • Save ngallazzi/bdf0d903f5f9d50b176f61d1cf1ceccf to your computer and use it in GitHub Desktop.
Save ngallazzi/bdf0d903f5f9d50b176f61d1cf1ceccf to your computer and use it in GitHub Desktop.
fun addAuthor(invoice: Invoice, author: String): Invoice {
return invoice.copy(printingAuthor = author)
}
fun addPrintTimeStamp(invoice: Invoice, timeStamp: LocalDateTime): Invoice {
return invoice.copy(printTimeStamp = timeStamp)
}
fun main() {
var invoice = Utils.getRandomInvoice(this, resources.configuration.locale)
invoice = controller.addAuthor(invoice, "Nicola")
invoice = controller.addPrintTimeStamp(invoice, LocalDateTime.now())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment