structured adress on actors
This commit is contained in:
parent
d81489d59f
commit
da36927874
@ -17,19 +17,32 @@
|
|||||||
<#--
|
<#--
|
||||||
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
"Name": "${carrier.carrier_structured_address.name_or_company}",
|
<#-- if Reflex WMS address is structured -->
|
||||||
"StreetAddressOne" : "${carrier.carrier_structured_address.street_and_PO}",
|
<#if carrier.carrier_structured_address?? >
|
||||||
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data}",
|
|
||||||
"PostalCode" : "${carrier.carrier_structured_address.postal_code}",
|
"Name": "${carrier.carrier_structured_address.name_or_company}",
|
||||||
"City" : "${carrier.carrier_structured_address.post_code_area_name}",
|
"StreetAddressOne" : "${carrier.carrier_structured_address.street_and_PO}",
|
||||||
"CountryCode" : "${carrier.carrier_structured_address.country_code}",
|
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data}",
|
||||||
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code}",
|
"PostalCode" : "${carrier.carrier_structured_address.postal_code}",
|
||||||
"State": "${carrier.carrier_structured_address.country_designation}"
|
"City" : "${carrier.carrier_structured_address.post_code_area_name}",
|
||||||
|
"CountryCode" : "${carrier.carrier_structured_address.country_code}",
|
||||||
|
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code}",
|
||||||
|
"State": "${carrier.carrier_structured_address.country_designation}"
|
||||||
|
|
||||||
|
<#-- if Reflex WMS address is not structured -->
|
||||||
|
<#else>
|
||||||
|
"Name": "${carrier.address.company_name}",
|
||||||
|
"StreetAddressOne" : "${carrier.address.address_1}",
|
||||||
|
"StreetAddressTwo" : "${carrier.address.address_2}",
|
||||||
|
"StreetAddressThree" : "${carrier.address.address_3}"
|
||||||
|
</#if>
|
||||||
},
|
},
|
||||||
"Phones": ["${carrier.address.telephone}",
|
|
||||||
|
"Phones": ["${carrier.address.telephone}",
|
||||||
"${carrier.address.other_number}"
|
"${carrier.address.other_number}"
|
||||||
],
|
],
|
||||||
"Typology": "TYPOLOGY_CARRIER"
|
"Typology": "TYPOLOGY_CARRIER"
|
||||||
|
|||||||
@ -17,9 +17,13 @@
|
|||||||
<#--
|
<#--
|
||||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
"Address":
|
||||||
|
{
|
||||||
|
|
||||||
|
<#-- if Reflex WMS is structured -->
|
||||||
|
<#if actor.consignee_structured_address??>
|
||||||
|
|
||||||
"Address":
|
|
||||||
{
|
|
||||||
"Name": "${actor.consignee_structured_address.name_or_company}",
|
"Name": "${actor.consignee_structured_address.name_or_company}",
|
||||||
"StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO}",
|
"StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO}",
|
||||||
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data}",
|
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data}",
|
||||||
@ -27,12 +31,23 @@
|
|||||||
"City" : "${actor.consignee_structured_address.post_code_area_name}",
|
"City" : "${actor.consignee_structured_address.post_code_area_name}",
|
||||||
"CountryCode" : "${actor.consignee_structured_address.country_code}",
|
"CountryCode" : "${actor.consignee_structured_address.country_code}",
|
||||||
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code}",
|
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code}",
|
||||||
"State": "${actor.consignee_structured_address.country_designation}"
|
"State": "${actor.consignee_structured_address.country_designation}"
|
||||||
},
|
|
||||||
"Phones": ["${actor.address.telephone}",
|
<#-- if Reflex WMS is not structured -->
|
||||||
"${actor.address.other_number}"
|
<#else>
|
||||||
],
|
|
||||||
"Typology": "TYPOLOGY_UNKNOWN"
|
"Name": "${actor.address.company_name}",
|
||||||
|
"StreetAddressOne" : "${actor.address.address_1}",
|
||||||
|
"StreetAddressTwo" : "${actor.address.address_2}",
|
||||||
|
"StreetAddressThree" : "${actor.address.address_3}",
|
||||||
|
|
||||||
|
</#if>
|
||||||
|
},
|
||||||
|
|
||||||
|
"Phones": ["${actor.address.telephone}",
|
||||||
|
"${actor.address.other_number}"
|
||||||
|
],
|
||||||
|
"Typology": "TYPOLOGY_UNKNOWN"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -20,14 +20,26 @@
|
|||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
"Name": "${actor.supplier_structured_address.name_or_company}",
|
<#-- if Reflex WMS address is structured -->
|
||||||
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO}",
|
<#if actor.supplier_structured_address?? >
|
||||||
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data}",
|
|
||||||
"PostalCode" : "${actor.supplier_structured_address.postal_code}",
|
"Name": "${actor.supplier_structured_address.name_or_company}",
|
||||||
"City" : "${actor.supplier_structured_address.post_code_area_name}",
|
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO}",
|
||||||
"CountryCode" : "${actor.supplier_structured_address.country_code}",
|
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data}",
|
||||||
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code}",
|
"PostalCode" : "${actor.supplier_structured_address.postal_code}",
|
||||||
"State": "${actor.supplier_structured_address.country_designation}"
|
"City" : "${actor.supplier_structured_address.post_code_area_name}",
|
||||||
|
"CountryCode" : "${actor.supplier_structured_address.country_code}",
|
||||||
|
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code}",
|
||||||
|
"State": "${actor.supplier_structured_address.country_designation}"
|
||||||
|
|
||||||
|
<#-- if Reflex WMS address is not structured -->
|
||||||
|
<#else>
|
||||||
|
"Name": "${actor.optional_attributes.company_name}",
|
||||||
|
"StreetAddressOne" : "${actor.optional_attributes.address_1}",
|
||||||
|
"StreetAddressTwo" : "${actor.optional_attributes.address_2}",
|
||||||
|
"StreetAddressThree" : "${actor.optional_attributes.address_3}"
|
||||||
|
</#if>
|
||||||
|
|
||||||
},
|
},
|
||||||
"Phones": ["${actor.optional_attributes.telephone}",
|
"Phones": ["${actor.optional_attributes.telephone}",
|
||||||
"${actor.optional_attributes.other_number}"
|
"${actor.optional_attributes.other_number}"
|
||||||
|
|||||||
@ -18,22 +18,33 @@
|
|||||||
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
||||||
-->
|
-->
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
"StreetAddressOne" : "${depot.physical_depot_address.address_1}",
|
<#-- if Reflex WMS address is structured -->
|
||||||
"StreetAddressTwo" : "${depot.physical_depot_address.address_2}",
|
<#if depot.physical_depot_structured_address?? >
|
||||||
|
|
||||||
<#if depot.physical_depot_address.address_3?length < 10>
|
"Name": "${depot.physical_depot_structured_address.name_or_company}",
|
||||||
"PostalCode" : "${depot.physical_depot_address.address_3?trim}",
|
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO}",
|
||||||
<#else>
|
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data}",
|
||||||
"PostalCode" : "${depot.physical_depot_address.address_3?substring(0,9)?trim}",
|
"PostalCode" : "${depot.physical_depot_structured_address.postal_code}",
|
||||||
</#if>
|
"City" : "${depot.physical_depot_structured_address.post_code_area_name}",
|
||||||
<#if depot.physical_depot_address.address_4?length < 14>
|
"CountryCode" : "${depot.physical_depot_structured_address.country_code}",
|
||||||
"CountryCode" : ""
|
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code}",
|
||||||
<#else>
|
"State": "${depot.physical_depot_structured_address.country_designation}"
|
||||||
"CountryCode" : "${depot.physical_depot_address.address_4?substring(10,13)?trim}"
|
|
||||||
</#if>
|
<#-- if Reflex WMS address is not structured -->
|
||||||
}
|
<#else>
|
||||||
|
"Name": "${depot.physical-depot_address.company_name}",
|
||||||
|
"StreetAddressOne" : "${depot.physical-depot_address.address_1}",
|
||||||
|
"StreetAddressTwo" : "${depot.physical-depot_address.address_2}",
|
||||||
|
"StreetAddressThree" : "${depot.physical-depot_address.address_3}"
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
},
|
||||||
|
"Phones": ["${depot.physical-depot_address.telephone}",
|
||||||
|
"${depot.physical-depot_address.other_number}"
|
||||||
|
],
|
||||||
|
"Typology": "TYPOLOGY_UNKNOWN"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user