71 lines
2.9 KiB
Java
71 lines
2.9 KiB
Java
[
|
|
{
|
|
"Header": {
|
|
"ProjectID": "${projectRP}"
|
|
},
|
|
"ID": {
|
|
"RefID": "${RFXtoRPprefixConsignee(carrier.code?trim?json_string)}"
|
|
},
|
|
"Payload": {
|
|
"Name": "${carrier.designation?json_string}",
|
|
"PartnerID" : "${actorRP.Objects[0].Payload.PartnerID!""?json_string}",
|
|
"IsCarrier" : ${(actorRP.Objects[0].Payload.IsCarrier!false)?c},
|
|
"ManagedStock": ${(actorRP.Objects[0].Payload.ManagedStock!false)?c},
|
|
"IsShipFromConnected": ${(actorRP.Objects[0].Payload.IsShipFromConnected!false)?c},
|
|
"IsShipToConnected": ${(actorRP.Objects[0].Payload.IsShipToConnected!false)?c},
|
|
"PhotoURI": "${actorRP.Objects[0].Payload.PhotoURI!""}",
|
|
<#-- DOTO CarrierServices ID Label -->
|
|
<#if actorRP.Objects[0].Payload.CarrierServices??>
|
|
"CarrierServices" : [
|
|
<#list actorRP.Objects[0].Payload.CarrierServices as carrierService>
|
|
{
|
|
"ID" : "${carrierService.ID!""}",
|
|
"Label" : "${carrierService.Label!""}"
|
|
}<#sep>,</#sep>
|
|
</#list>
|
|
],
|
|
</#if>
|
|
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
|
|
|
"Address":
|
|
{
|
|
|
|
<#-- if Reflex WMS is structured -->
|
|
<#if carrier.consignee_structured_address??>
|
|
|
|
"Name": "${carrier.consignee_structured_address.name_or_company?json_string}",
|
|
"StreetAddressOne" : "${carrier.consignee_structured_address.street_and_PO?json_string}",
|
|
"StreetAddressTwo" : "${carrier.consignee_structured_address.additionnal_data?json_string}",
|
|
"PostalCode" : "${carrier.consignee_structured_address.postal_code?json_string}",
|
|
"City" : "${carrier.consignee_structured_address.post_code_area_name?json_string}",
|
|
<#assign isCountryCode = JsonUtil.isCountryCode(carrier.consignee_structured_address.country_code?upper_case) />
|
|
<#if isCountryCode>
|
|
"CountryCode" : "${carrier.consignee_structured_address.country_code?upper_case?json_string}",
|
|
<#else>
|
|
"CountryCode" : "",
|
|
</#if>
|
|
"ProvinceCode": "${carrier.consignee_structured_address.territorial_div_code?json_string}",
|
|
"State": "${carrier.consignee_structured_address.country_designation?json_string}"
|
|
|
|
<#-- if Reflex WMS is not structured -->
|
|
<#else>
|
|
<#if carrier.address?? >
|
|
|
|
"Name": "${carrier.address.company_name?json_string}",
|
|
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
|
|
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
|
|
"StreetAddressThree" : "${carrier.address.address_3?json_string}",
|
|
"CountryCode" : ""
|
|
</#if>
|
|
</#if>
|
|
},
|
|
<#if carrier.address?? >
|
|
"Phones": ["${carrier.address.telephone?json_string}",
|
|
"${carrier.address.other_number?json_string}"
|
|
],
|
|
</#if>
|
|
"Typology": "TYPOLOGY_UNKNOWN"
|
|
}
|
|
}
|
|
]
|