Skip to content

Commit 355b320

Browse files
author
JW Wesson
committed
updates to CompareProfessions
1 parent 4509967 commit 355b320

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

src/main/java/com/sovren/SovrenClient.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,14 +1584,15 @@ public LookupProfessionCodesResponse lookupProfessions(List<Integer> codeIds) th
15841584
* Compare two professions based on the skills associated with each.
15851585
* @param profession1 A profession code ID from the <a href="https://sovren.com/technical-specs/latest/rest-api/data-enrichment/overview/#professions-taxonomies">Professions Taxonomy</a> to compare.
15861586
* @param profession2 A profession code ID from the <a href="https://sovren.com/technical-specs/latest/rest-api/data-enrichment/overview/#professions-taxonomies">Professions Taxonomy</a> to compare.
1587+
* @param outputLanguage The language to use for the returned descriptions.
15871588
* @return The API response body
15881589
* @throws SovrenException Thrown when an API error occurs
15891590
*/
1590-
public CompareProfessionsResponse compareProfessions(int profession1, int profession2) throws SovrenException {
1591+
public CompareProfessionsResponse compareProfessions(int profession1, int profession2, String outputLanguage) throws SovrenException {
15911592
CompareProfessionsRequest request = new CompareProfessionsRequest();
1592-
request.ProfessionCodeIds = new ArrayList<Integer>();
1593-
request.ProfessionCodeIds.add(profession1);
1594-
request.ProfessionCodeIds.add(profession2);
1593+
request.ProfessionACodeId = profession1;
1594+
request.ProfessionBCodeId = profession2;
1595+
request.OutputLanguage = outputLanguage;
15951596

15961597
RequestBody body = createJsonBody(request);
15971598
Request apiRequest = new Request.Builder()

src/main/java/com/sovren/models/api/dataenrichment/ontology/request/CompareProfessionsRequest.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55

66
package com.sovren.models.api.dataenrichment.ontology.request;
77

8-
import java.util.List;
9-
108
/** Request body for a 'CompareProfessions' request */
119
public class CompareProfessionsRequest {
12-
/** The two profession code IDs from the <a href="https://sovren.com/technical-specs/latest/rest-api/data-enrichment/overview/#professions-taxonomies">Professions Taxonomy</a> to compare. This list must have 2 values. */
13-
public List<Integer> ProfessionCodeIds;
10+
/** A profession code ID from the <a href="https://sovren.com/technical-specs/latest/rest-api/data-enrichment/overview/#professions-taxonomies">Professions Taxonomy</a> to compare. */
11+
public int ProfessionACodeId;
12+
/** A profession code ID from the <a href="https://sovren.com/technical-specs/latest/rest-api/data-enrichment/overview/#professions-taxonomies">Professions Taxonomy</a> to compare. */
13+
public int ProfessionBCodeId;
14+
/** The language to use for the returned descriptions. */
15+
public String OutputLanguage;
1416
}

src/test/java/com/sovren/integration/DataEnrichmentServiceTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void testProfessionsLookup() {
109109
@Test
110110
public void testCompareProfessions() {
111111
assertDoesNotThrow(() -> {
112-
Client.compareProfessions(696,3178);
112+
Client.compareProfessions(696, 3178, "en");
113113
});
114114
}
115115

0 commit comments

Comments
 (0)