This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root | |
|-- BusinessUnit: array (nullable = true) | |
| |-- element: struct (containsNull = true) | |
| | |-- UnitID: struct (nullable = true) | |
| | | |-- _Name: string (nullable = true) | |
| | | |-- _TypeCode: string (nullable = true) | |
| | | |-- _VALUE: string (nullable = true) | |
|-- Channel: struct (nullable = true) | |
| |-- ChannelID: struct (nullable = true) | |
| | |-- _Description: string (nullable = true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object RetailTransactionValidator extends PoslogValidator { | |
implicit val fieldLog: FieldLog = FieldLog(nameOf(RetailTransaction)) | |
def validate(retailTransaction: Option[UntypedRetailTransaction])(implicit | |
transactionId: String): Validation[ValidationError, RetailTransaction] = | |
retailTransaction match { | |
case None => Validation.fail(EMPTY_FIELD) | |
case Some(urt) => | |
for { |