]> git.evergreen-ils.org Git - working/NCIPServer.git/blob - templates/includes/LookupUserResponse.inc
Add ElectronicAddress element.
[working/NCIPServer.git] / templates / includes / LookupUserResponse.inc
1 <UserId>
2 <UserIdentifierValue>
3 [% data.UserId.UserIdentifierValue | xml %]
4 </UserIdentifierValue>
5 [% IF data.UserId.UserIdentifierType -%]
6 <UserIdentifierType>
7 [% data.UserId.UserIdentifierType | xml %]
8 </UserIdentifierType>
9 [% END -%]
10 [% IF data.UserId.AgencyId -%]
11 <AgencyId>
12 [% data.UserId.AgencyId %]
13 </AgencyId>
14 [% END -%]
15 </UserId>
16 [% IF data.UserOptionalFields -%]
17 <UserOptionalFields>
18   [% IF data.UserOptionalFields.NameInformation -%]
19     <NameInformation>
20       <PersonalNameInformation>
21         <StructuredPersonalUserName>
22         [% IF data.UserOptionalFields.NameInformation.GivenName -%]
23           <GivenName>[% data.UserOptionalFields.NameInformation.GivenName | xml %]</GivenName>
24         [% END -%]
25           <Surname>[% data.UserOptionalFields.NameInformation.Surname | xml %]</Surname>
26         [% IF data.UserOptionalFields.NameInformation.Prefix -%]
27           <Prefix>[% data.UserOptionalFields.NameInformation.Prefix %]</Prefix>
28         [% END -%]
29         [% IF data.UserOptionalFields.NameInformation.Suffix -%]
30           <Suffix>[% data.UserOptionalFields.NameInformation.Suffix %]</Suffix>
31         [% END -%]
32         [% IF data.UserOptionalFields.NameInformation.Initials -%]
33           <Initials>[% data.UserOptionalFields.NameInformation.Initials %]</Initials>
34         [% END -%]
35         </StructuredPersonalUserName>
36       </PersonalNameInformation>
37     </NameInformation>
38   [% END -%]
39 [% IF data.UserOptionalFields.UserAddressInformation -%]
40   [% FOREACH element IN data.UserOptionalFields.UserAddressInformation -%]
41      <UserAddressInformation>
42      <UserAddressRoleType>[% element.AddressRoleType | xml %]</UserAddressRoleType>
43      [% IF element.PhysicalAddress -%]
44      <PhysicalAddress>
45        <StructuredAddress>
46        <Line1>[% element.PhysicalAddress.Line1 | xml %]</Line1>
47        [% IF element.PhysicalAddress.Line2 -%]
48        <Line2>[% element.PhysicalAddress.Line2 | xml %]</Line2>
49        [% END -%]
50        [% IF element.PhysicalAddress.Locality -%]
51        <Locality>[% element.PhysicalAddress.Locality | xml %]</Locality>
52        [% END -%]
53        [% IF element.PhysicalAddress.Region -%]
54        <Region>[% element.PhysicalAddress.Region | xml %]</Region>
55        [% END -%]
56        [% IF element.PhysicalAddress.PostalCode -%]
57        <PostalCode>[% element.PhysicalAddress.PostalCode | xml %]</PostalCode>
58        [% END -%]
59        [% IF element.PhysicalAddress.Country -%]
60        <Country>[% element.PhysicalAddress.Country | xml %]</Country>
61        [% END -%]
62        </StructuredAddress>
63      </PhysicalAddress>
64      [% ELSIF element.ElectronicAddress -%]
65      <ElectronicAddress>
66        <ElectronicAddressType>[% element.ElectronicAddress.Type | xml %]</ElectronicAddressType>
67        <ElectronicAddressData>[% element.ElectronicAddress.Data | xml %]</ElectronicAddressData>
68      </ElectronicAddress>
69      [% END -%]
70      </UserAddressInformation>
71   [% END -%]
72 [% END -%]
73 [% IF data.UserOptionalFields.UserPrivilege -%]
74 [% FOREACH privilege IN data.UserOptionalFields.UserPrivilege -%]
75     <UserPrivilege>
76         <AgencyId>[% privilege.AgencyId | xml -%]</AgencyId>
77         <AgencyUserPrivilegeType>[% privilege.AgencyUserPrivilegeType | xml %]</AgencyUserPrivilegeType>
78         [% IF privilege.ValidFromDate -%]
79         <ValidFromDate>[% privilege.ValidFromDate | xml %]</ValidFromDate>
80         [% END -%]
81         [% IF privilege.ValidToDate -%]
82         <ValidToDate>[% privilege.ValidToDate | xml %]</ValidToDate>
83         [% END -%]
84         [% IF privilege.UserPrivilegeDescription -%]
85         <UserPrivilegeDescription>[% privilege.UserPrivilegeDescription | xml %]</UserPrivilegeDescription>
86         [% END -%]
87         [% IF privilege.UserPrivilegeStatus -%]
88         <UserPrivilegeStatus>
89         <UserPrivilegeStatusType>
90         [% privilege.UserPrivilegeStatus.UserPrivilegeStatusType | xml %]
91         </UserPrivilegeStatusType>
92         [% IF privilege.UserPrivilegeStatus.DateOfUserPrivilegeStatus -%]
93         <DateOfUserPrivilegeStatus>
94         [% privilege.UserPrivilegeStatus.DateOfUserPrivilegeStatus | xml %]
95         </DateOfUserPrivilegeStatus>
96         [% END -%]
97         </UserPrivilegeStatus>
98         [% END -%]
99     </UserPrivilege>
100 [% END -%]
101 [% END -%]
102 [% IF data.UserOptionalFields.UserLanguage -%]
103 [% FOREACH language IN data.UserOptionalFields.UserLanguage -%]
104     <UserLanguage>[% language | xml %]</UserLanguage>
105 [% END -%]
106 [% END -%]
107 [% IF data.UserOptionalFields.BlockOrTrap -%]
108 [% FOREACH block IN data.UserOptionalFields.BlockOrTrap -%]
109     <BlockOrTrap>
110     <AgencyId>[% block.AgencyId | xml %]</AgencyId>
111     <BlockOrTrapType>[% block.BlockOrTrapType | xml %]</BlockOrTrapType>
112     [% IF block.ValidFromDate -%]
113     <ValidFromDate>[% block.ValidFromDate %]</ValidFromDate>
114     [% END -%]
115     [% IF block.ValidToDate -%]
116     <ValidToDate>[% block.ValidToDate %]</ValidToDate>
117     [% END %]
118     </BlockOrTrap>
119 [% END -%]
120 [% END -%]
121 </UserOptionalFields>
122 [% END -%]