structured address from WMS
This commit is contained in:
parent
9c3f6cac3e
commit
d81489d59f
@ -18,23 +18,21 @@
|
||||
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
|
||||
"Address":
|
||||
"Address":
|
||||
{
|
||||
"StreetAddressOne" : "${carrier.address.address_1}",
|
||||
"StreetAddressTwo" : "${carrier.address.address_2}",
|
||||
|
||||
<#if carrier.address.address_3?length < 10>
|
||||
"PostalCode" : "${carrier.address.address_3?trim}",
|
||||
<#else>
|
||||
"PostalCode" : "${carrier.address.address_3?substring(0,9)?trim}",
|
||||
</#if>
|
||||
<#if carrier.address.address_4?length < 14>
|
||||
"CountryCode" : ""
|
||||
<#else>
|
||||
"CountryCode" : "${carrier.address.address_4?substring(10,13)?trim}"
|
||||
</#if>
|
||||
"Name": "${carrier.carrier_structured_address.name_or_company}",
|
||||
"StreetAddressOne" : "${carrier.carrier_structured_address.street_and_PO}",
|
||||
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data}",
|
||||
"PostalCode" : "${carrier.carrier_structured_address.postal_code}",
|
||||
"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}"
|
||||
},
|
||||
"Typology": "TYPOLOGY_CARRIER"
|
||||
"Phones": ["${carrier.address.telephone}",
|
||||
"${carrier.address.other_number}"
|
||||
],
|
||||
"Typology": "TYPOLOGY_CARRIER"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -18,26 +18,21 @@
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
|
||||
|
||||
"Address":
|
||||
{
|
||||
<#if actor.address.address_3?length > 10>
|
||||
"City" : "${actor.address.address_3?substring(10)?trim}",
|
||||
</#if>
|
||||
"StreetAddressOne" : "${actor.address.address_1}",
|
||||
"StreetAddressTwo" : "${actor.address.address_2}",
|
||||
<#if actor.address.address_3?length < 10>
|
||||
"PostalCode" : "${actor.address.address_3?trim}",
|
||||
<#else>
|
||||
"PostalCode" : "${actor.address.address_3?substring(0,9)?trim}",
|
||||
</#if>
|
||||
<#if actor.address.address_4?length < 14>
|
||||
"CountryCode" : ""
|
||||
<#else>
|
||||
"CountryCode" : "${actor.address.address_4?substring(10,13)?trim}"
|
||||
</#if>
|
||||
"Name": "${actor.consignee_structured_address.name_or_company}",
|
||||
"StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO}",
|
||||
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data}",
|
||||
"PostalCode" : "${actor.consignee_structured_address.postal_code}",
|
||||
"City" : "${actor.consignee_structured_address.post_code_area_name}",
|
||||
"CountryCode" : "${actor.consignee_structured_address.country_code}",
|
||||
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code}",
|
||||
"State": "${actor.consignee_structured_address.country_designation}"
|
||||
},
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
"Phones": ["${actor.address.telephone}",
|
||||
"${actor.address.other_number}"
|
||||
],
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -18,25 +18,20 @@
|
||||
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
|
||||
"Address":
|
||||
"Address":
|
||||
{
|
||||
<#if actor.optional_attributes.address_3?length > 10>
|
||||
"City" : "${actor.optional_attributes.address_3?substring(10)?trim}",
|
||||
</#if>
|
||||
"StreetAddressOne" : "${actor.optional_attributes.address_1}",
|
||||
"StreetAddressTwo" : "${actor.optional_attributes.address_2}",
|
||||
|
||||
<#if actor.optional_attributes.address_3?length < 10>
|
||||
"PostalCode" : "${actor.optional_attributes.address_3?trim}",
|
||||
<#else>
|
||||
"PostalCode" : "${actor.optional_attributes.address_3?substring(0,9)?trim}",
|
||||
</#if>
|
||||
<#if actor.optional_attributes.address_4?length < 14>
|
||||
"CountryCode" : ""
|
||||
<#else>
|
||||
"CountryCode" : "${actor.optional_attributes.address_4?substring(10,13)?trim}"
|
||||
</#if>
|
||||
"Name": "${actor.supplier_structured_address.name_or_company}",
|
||||
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO}",
|
||||
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data}",
|
||||
"PostalCode" : "${actor.supplier_structured_address.postal_code}",
|
||||
"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}"
|
||||
},
|
||||
"Phones": ["${actor.optional_attributes.telephone}",
|
||||
"${actor.optional_attributes.other_number}"
|
||||
],
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user