From c5df223509aad17b6e6205d8ba6a3b8dce4f8072 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Mon, 29 Apr 2024 11:04:38 +0100 Subject: [PATCH] Add example DELETE message which needs work --- vstp/convert.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vstp/convert.go b/vstp/convert.go index e07e58b..fb6a7ff 100644 --- a/vstp/convert.go +++ b/vstp/convert.go @@ -14,6 +14,9 @@ func convertCifType(in *upstreamApi.VSTPSchedule) (error, *upstreamApi.JsonSched return errors.New("input is nil"), nil } + // Delete Message Example - Does not process as is. + // {"VSTPCIFMsgV1":{"schedule":{"transaction_type":"Delete","train_status":" ","schedule_start_date":"2024-04-29","schedule_end_date":"2024-04-29","schedule_days_runs":"1000000","CIF_train_uid":" 68613","CIF_stp_indicator":"N","CIF_bank_holiday_running":" "},"Sender":{"organisation":"Network Rail","application":"TSIA","component":"TSIA","userID":"#QJP0070","sessionID":"CT02000"},"classification":"industry","timestamp":"1714372444000","owner":"Network Rail","originMsgId":"2024-04-29T06:34:04-00:00@vstp.networkrail.co.uk"}} + out := &upstreamApi.JsonScheduleV1{ TransactionType: in.TransactionType, CifBankHolidayRunning: in.CifBankHolidayRunning,