You've already forked reflex-wms-connector
RDV
This commit is contained in:
31
RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl
Normal file
31
RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||
"route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}",
|
||||
"method" : "PUT",
|
||||
"uri_substitutions": {
|
||||
"physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}",
|
||||
"appointment_reference":"${eventRP.refid?json_string}"
|
||||
},
|
||||
"payload" :
|
||||
{
|
||||
<#switch appointment.AppointmentType>
|
||||
<#case "APPOINTMENT_TYPE_LOADING">
|
||||
|
||||
"unloading_appointment" : "false",
|
||||
"load_appointment" : "true",
|
||||
"planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}",
|
||||
"planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}"
|
||||
|
||||
<#break>
|
||||
|
||||
<#case "APPOINTMENT_TYPE_UNLOADING">
|
||||
"unloading_appointment" : "true",
|
||||
"load_appointment" : "false",
|
||||
"planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}",
|
||||
"planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}"
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop "appointment.AppointmentType not implemented" >
|
||||
</#switch>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user