Skip to content

Latest commit

 

History

History
843 lines (755 loc) · 42 KB

README.md

File metadata and controls

843 lines (755 loc) · 42 KB

Employees

(hris().employees())

Overview

Available Operations

list

Apideck operates as a stateless Unified API, which means that the list endpoint only provides a portion of the employee model. This is due to the fact that most HRIS systems do not readily provide all data in every call. However, you can access the complete employee model through an employee detail call.

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.EmployeesFilter;
import com.apideck.unify.models.components.EmployeesFilterEmploymentStatus;
import com.apideck.unify.models.components.EmployeesSort;
import com.apideck.unify.models.components.EmployeesSortBy;
import com.apideck.unify.models.components.SortDirection;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.HrisEmployeesAllRequest;
import com.apideck.unify.models.operations.HrisEmployeesAllResponse;
import java.lang.Exception;
import java.util.Map;

public class Application {

    public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {

        Apideck sdk = Apideck.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
            .build();

        HrisEmployeesAllRequest req = HrisEmployeesAllRequest.builder()
                .serviceId("salesforce")
                .filter(EmployeesFilter.builder()
                    .companyId("1234")
                    .email("[email protected]")
                    .firstName("Elon")
                    .title("Manager")
                    .lastName("Musk")
                    .managerId("1234")
                    .employmentStatus(EmployeesFilterEmploymentStatus.ACTIVE)
                    .employeeNumber("123456-AB")
                    .departmentId("1234")
                    .build())
                .sort(EmployeesSort.builder()
                    .by(EmployeesSortBy.CREATED_AT)
                    .direction(SortDirection.DESC)
                    .build())
                .passThrough(Map.ofEntries(
                    Map.entry("search", "San Francisco")))
                .fields("id,updated_at")
                .build();

        HrisEmployeesAllResponse res = sdk.hris().employees().list()
                .request(req)
                .call();

        if (res.getEmployeesResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request HrisEmployeesAllRequest ✔️ The request object to use for the request.

Response

HrisEmployeesAllResponse

Errors

Error Type Status Code Content Type
models/errors/BadRequestResponse 400 application/json
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/UnprocessableResponse 422 application/json
models/errors/APIException 4XX, 5XX */*

create

Create Employee

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.AccountType;
import com.apideck.unify.models.components.Address;
import com.apideck.unify.models.components.BankAccount;
import com.apideck.unify.models.components.Currency;
import com.apideck.unify.models.components.CustomField;
import com.apideck.unify.models.components.Email;
import com.apideck.unify.models.components.EmailType;
import com.apideck.unify.models.components.EmployeeCompensationInput;
import com.apideck.unify.models.components.EmployeeInput;
import com.apideck.unify.models.components.EmployeeJobInput;
import com.apideck.unify.models.components.EmployeeJobStatus;
import com.apideck.unify.models.components.EmploymentStatus;
import com.apideck.unify.models.components.ExtendPaths;
import com.apideck.unify.models.components.FlsaStatus;
import com.apideck.unify.models.components.Gender;
import com.apideck.unify.models.components.LeavingReason;
import com.apideck.unify.models.components.Manager;
import com.apideck.unify.models.components.PassThroughBody;
import com.apideck.unify.models.components.PaymentUnit;
import com.apideck.unify.models.components.PersonInput;
import com.apideck.unify.models.components.PhoneNumber;
import com.apideck.unify.models.components.PhoneNumberType;
import com.apideck.unify.models.components.ProbationPeriod;
import com.apideck.unify.models.components.SocialLink;
import com.apideck.unify.models.components.Team;
import com.apideck.unify.models.components.Type;
import com.apideck.unify.models.components.Value;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.HrisEmployeesAddRequest;
import com.apideck.unify.models.operations.HrisEmployeesAddResponse;
import java.lang.Exception;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;

public class Application {

    public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {

        Apideck sdk = Apideck.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
            .build();

        HrisEmployeesAddRequest req = HrisEmployeesAddRequest.builder()
                .employee(EmployeeInput.builder()
                    .id("12345")
                    .firstName("Elon")
                    .lastName("Musk")
                    .middleName("D.")
                    .displayName("Technoking")
                    .preferredName("Elon Musk")
                    .initials("EM")
                    .salutation("Mr")
                    .title("CEO")
                    .maritalStatus("married")
                    .partner(PersonInput.builder()
                        .firstName("Elon")
                        .lastName("Musk")
                        .middleName("D.")
                        .gender(Gender.MALE)
                        .initials("EM")
                        .birthday(LocalDate.parse("2000-08-12"))
                        .deceasedOn(LocalDate.parse("2000-08-12"))
                        .build())
                    .division("Europe")
                    .divisionId("12345")
                    .departmentId("12345")
                    .departmentName("12345")
                    .team(Team.builder()
                        .id("1234")
                        .name("Full Stack Engineers")
                        .build())
                    .companyId("23456")
                    .companyName("SpaceX")
                    .employmentStartDate("2021-10-26")
                    .employmentEndDate("2028-10-26")
                    .leavingReason(LeavingReason.RESIGNED)
                    .employeeNumber("123456-AB")
                    .employmentStatus(EmploymentStatus.ACTIVE)
                    .ethnicity("African American")
                    .manager(Manager.builder()
                        .id("12345")
                        .name("Elon Musk")
                        .firstName("Elon")
                        .lastName("Musk")
                        .email("[email protected]")
                        .employmentStatus(EmploymentStatus.ACTIVE)
                        .build())
                    .directReports(List.of(
                        "a0d636c6-43b3-4bde-8c70-85b707d992f4",
                        "a98lfd96-43b3-4bde-8c70-85b707d992e6"))
                    .socialSecurityNumber("123456789")
                    .birthday(LocalDate.parse("2000-08-12"))
                    .deceasedOn(LocalDate.parse("2000-08-12"))
                    .countryOfBirth("US")
                    .description("A description")
                    .gender(Gender.MALE)
                    .pronouns("she,her")
                    .preferredLanguage("EN")
                    .languages(List.of(
                        "EN"))
                    .nationalities(List.of(
                        "US"))
                    .photoUrl("https://unavatar.io/elon-musk")
                    .timezone("Europe/London")
                    .source("lever")
                    .sourceId("12345")
                    .recordUrl("https://app.intercom.io/contacts/12345")
                    .jobs(List.of(
                        EmployeeJobInput.builder()
                            .title("CEO")
                            .role("Sales")
                            .startDate(LocalDate.parse("2020-08-12"))
                            .endDate(LocalDate.parse("2020-08-12"))
                            .compensationRate(72000d)
                            .currency(Currency.USD)
                            .paymentUnit(PaymentUnit.YEAR)
                            .hiredAt(LocalDate.parse("2020-08-12"))
                            .isPrimary(true)
                            .isManager(true)
                            .status(EmployeeJobStatus.ACTIVE)
                            .location(Address.builder()
                                .id("123")
                                .type(Type.PRIMARY)
                                .string("25 Spring Street, Blackburn, VIC 3130")
                                .name("HQ US")
                                .line1("Main street")
                                .line2("apt #")
                                .line3("Suite #")
                                .line4("delivery instructions")
                                .streetNumber("25")
                                .city("San Francisco")
                                .state("CA")
                                .postalCode("94104")
                                .country("US")
                                .latitude("40.759211")
                                .longitude("-73.984638")
                                .county("Santa Clara")
                                .contactName("Elon Musk")
                                .salutation("Mr")
                                .phoneNumber("111-111-1111")
                                .fax("122-111-1111")
                                .email("[email protected]")
                                .website("https://elonmusk.com")
                                .notes("Address notes or delivery instructions.")
                                .rowVersion("1-12345")
                                .build())
                            .build()))
                    .compensations(List.of(
                        EmployeeCompensationInput.builder()
                            .rate(50d)
                            .paymentUnit(PaymentUnit.HOUR)
                            .flsaStatus(FlsaStatus.NONEXEMPT)
                            .effectiveDate("2021-06-11")
                            .build()))
                    .worksRemote(true)
                    .addresses(List.of(
                        Address.builder()
                            .id("123")
                            .type(Type.PRIMARY)
                            .string("25 Spring Street, Blackburn, VIC 3130")
                            .name("HQ US")
                            .line1("Main street")
                            .line2("apt #")
                            .line3("Suite #")
                            .line4("delivery instructions")
                            .streetNumber("25")
                            .city("San Francisco")
                            .state("CA")
                            .postalCode("94104")
                            .country("US")
                            .latitude("40.759211")
                            .longitude("-73.984638")
                            .county("Santa Clara")
                            .contactName("Elon Musk")
                            .salutation("Mr")
                            .phoneNumber("111-111-1111")
                            .fax("122-111-1111")
                            .email("[email protected]")
                            .website("https://elonmusk.com")
                            .notes("Address notes or delivery instructions.")
                            .rowVersion("1-12345")
                            .build()))
                    .phoneNumbers(List.of(
                        PhoneNumber.builder()
                            .number("111-111-1111")
                            .id("12345")
                            .countryCode("1")
                            .areaCode("323")
                            .extension("105")
                            .type(PhoneNumberType.PRIMARY)
                            .build()))
                    .emails(List.of(
                        Email.builder()
                            .email("[email protected]")
                            .id("123")
                            .type(EmailType.PRIMARY)
                            .build()))
                    .customFields(List.of(
                        CustomField.builder()
                            .id("2389328923893298")
                            .name("employee_level")
                            .description("Employee Level")
                            .value(Value.of(true))
                            .build()))
                    .socialLinks(List.of(
                        SocialLink.builder()
                            .url("https://www.twitter.com/apideck")
                            .id("12345")
                            .type("twitter")
                            .build()))
                    .bankAccounts(List.of(
                        BankAccount.builder()
                            .bankName("Monzo")
                            .accountNumber("123465")
                            .accountName("SPACEX LLC")
                            .accountType(AccountType.CREDIT_CARD)
                            .iban("CH2989144532982975332")
                            .bic("AUDSCHGGXXX")
                            .routingNumber("012345678")
                            .bsbNumber("062-001")
                            .branchIdentifier("001")
                            .bankCode("BNH")
                            .currency(Currency.USD)
                            .build()))
                    .taxCode("1111")
                    .taxId("234-32-0000")
                    .dietaryPreference("Veggie")
                    .foodAllergies(List.of(
                        "No allergies"))
                    .probationPeriod(ProbationPeriod.builder()
                        .startDate(LocalDate.parse("2021-10-01"))
                        .endDate(LocalDate.parse("2021-11-28"))
                        .build())
                    .tags(List.of(
                        "New"))
                    .rowVersion("1-12345")
                    .deleted(true)
                    .passThrough(List.of(
                        PassThroughBody.builder()
                            .serviceId("<id>")
                            .extendPaths(List.of(
                                ExtendPaths.builder()
                                    .path("$.nested.property")
                                    .value(Map.ofEntries(\n    Map.entry("TaxClassificationRef", Map.ofEntries(\n    Map.entry("value", "EUC-99990201-V1-00020000")))))
                                    .build()))
                            .build()))
                    .build())
                .serviceId("salesforce")
                .build();

        HrisEmployeesAddResponse res = sdk.hris().employees().create()
                .request(req)
                .call();

        if (res.createEmployeeResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request HrisEmployeesAddRequest ✔️ The request object to use for the request.

Response

HrisEmployeesAddResponse

Errors

Error Type Status Code Content Type
models/errors/BadRequestResponse 400 application/json
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/UnprocessableResponse 422 application/json
models/errors/APIException 4XX, 5XX */*

get

Get Employee

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.EmployeesOneFilter;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.HrisEmployeesOneRequest;
import com.apideck.unify.models.operations.HrisEmployeesOneResponse;
import java.lang.Exception;
import java.util.Map;

public class Application {

    public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {

        Apideck sdk = Apideck.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
            .build();

        HrisEmployeesOneRequest req = HrisEmployeesOneRequest.builder()
                .id("<id>")
                .serviceId("salesforce")
                .fields("id,updated_at")
                .filter(EmployeesOneFilter.builder()
                    .companyId("1234")
                    .build())
                .passThrough(Map.ofEntries(
                    Map.entry("search", "San Francisco")))
                .build();

        HrisEmployeesOneResponse res = sdk.hris().employees().get()
                .request(req)
                .call();

        if (res.getEmployeeResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request HrisEmployeesOneRequest ✔️ The request object to use for the request.

Response

HrisEmployeesOneResponse

Errors

Error Type Status Code Content Type
models/errors/BadRequestResponse 400 application/json
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/UnprocessableResponse 422 application/json
models/errors/APIException 4XX, 5XX */*

update

Update Employee

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.AccountType;
import com.apideck.unify.models.components.Address;
import com.apideck.unify.models.components.BankAccount;
import com.apideck.unify.models.components.Currency;
import com.apideck.unify.models.components.CustomField;
import com.apideck.unify.models.components.Email;
import com.apideck.unify.models.components.EmailType;
import com.apideck.unify.models.components.EmployeeCompensationInput;
import com.apideck.unify.models.components.EmployeeInput;
import com.apideck.unify.models.components.EmployeeJobInput;
import com.apideck.unify.models.components.EmployeeJobStatus;
import com.apideck.unify.models.components.EmploymentStatus;
import com.apideck.unify.models.components.ExtendPaths;
import com.apideck.unify.models.components.FlsaStatus;
import com.apideck.unify.models.components.Gender;
import com.apideck.unify.models.components.LeavingReason;
import com.apideck.unify.models.components.Manager;
import com.apideck.unify.models.components.PassThroughBody;
import com.apideck.unify.models.components.PaymentUnit;
import com.apideck.unify.models.components.PersonInput;
import com.apideck.unify.models.components.PhoneNumber;
import com.apideck.unify.models.components.PhoneNumberType;
import com.apideck.unify.models.components.ProbationPeriod;
import com.apideck.unify.models.components.Six;
import com.apideck.unify.models.components.SocialLink;
import com.apideck.unify.models.components.Team;
import com.apideck.unify.models.components.Type;
import com.apideck.unify.models.components.Value;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.HrisEmployeesUpdateRequest;
import com.apideck.unify.models.operations.HrisEmployeesUpdateResponse;
import java.lang.Exception;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;

public class Application {

    public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {

        Apideck sdk = Apideck.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
            .build();

        HrisEmployeesUpdateRequest req = HrisEmployeesUpdateRequest.builder()
                .id("<id>")
                .employee(EmployeeInput.builder()
                    .id("12345")
                    .firstName("Elon")
                    .lastName("Musk")
                    .middleName("D.")
                    .displayName("Technoking")
                    .preferredName("Elon Musk")
                    .initials("EM")
                    .salutation("Mr")
                    .title("CEO")
                    .maritalStatus("married")
                    .partner(PersonInput.builder()
                        .firstName("Elon")
                        .lastName("Musk")
                        .middleName("D.")
                        .gender(Gender.MALE)
                        .initials("EM")
                        .birthday(LocalDate.parse("2000-08-12"))
                        .deceasedOn(LocalDate.parse("2000-08-12"))
                        .build())
                    .division("Europe")
                    .divisionId("12345")
                    .departmentId("12345")
                    .departmentName("12345")
                    .team(Team.builder()
                        .id("1234")
                        .name("Full Stack Engineers")
                        .build())
                    .companyId("23456")
                    .companyName("SpaceX")
                    .employmentStartDate("2021-10-26")
                    .employmentEndDate("2028-10-26")
                    .leavingReason(LeavingReason.RESIGNED)
                    .employeeNumber("123456-AB")
                    .employmentStatus(EmploymentStatus.ACTIVE)
                    .ethnicity("African American")
                    .manager(Manager.builder()
                        .id("12345")
                        .name("Elon Musk")
                        .firstName("Elon")
                        .lastName("Musk")
                        .email("[email protected]")
                        .employmentStatus(EmploymentStatus.ACTIVE)
                        .build())
                    .directReports(List.of(
                        "a0d636c6-43b3-4bde-8c70-85b707d992f4",
                        "a98lfd96-43b3-4bde-8c70-85b707d992e6"))
                    .socialSecurityNumber("123456789")
                    .birthday(LocalDate.parse("2000-08-12"))
                    .deceasedOn(LocalDate.parse("2000-08-12"))
                    .countryOfBirth("US")
                    .description("A description")
                    .gender(Gender.MALE)
                    .pronouns("she,her")
                    .preferredLanguage("EN")
                    .languages(List.of(
                        "EN"))
                    .nationalities(List.of(
                        "US"))
                    .photoUrl("https://unavatar.io/elon-musk")
                    .timezone("Europe/London")
                    .source("lever")
                    .sourceId("12345")
                    .recordUrl("https://app.intercom.io/contacts/12345")
                    .jobs(List.of(
                        EmployeeJobInput.builder()
                            .title("CEO")
                            .role("Sales")
                            .startDate(LocalDate.parse("2020-08-12"))
                            .endDate(LocalDate.parse("2020-08-12"))
                            .compensationRate(72000d)
                            .currency(Currency.USD)
                            .paymentUnit(PaymentUnit.YEAR)
                            .hiredAt(LocalDate.parse("2020-08-12"))
                            .isPrimary(true)
                            .isManager(true)
                            .status(EmployeeJobStatus.ACTIVE)
                            .location(Address.builder()
                                .id("123")
                                .type(Type.PRIMARY)
                                .string("25 Spring Street, Blackburn, VIC 3130")
                                .name("HQ US")
                                .line1("Main street")
                                .line2("apt #")
                                .line3("Suite #")
                                .line4("delivery instructions")
                                .streetNumber("25")
                                .city("San Francisco")
                                .state("CA")
                                .postalCode("94104")
                                .country("US")
                                .latitude("40.759211")
                                .longitude("-73.984638")
                                .county("Santa Clara")
                                .contactName("Elon Musk")
                                .salutation("Mr")
                                .phoneNumber("111-111-1111")
                                .fax("122-111-1111")
                                .email("[email protected]")
                                .website("https://elonmusk.com")
                                .notes("Address notes or delivery instructions.")
                                .rowVersion("1-12345")
                                .build())
                            .build()))
                    .compensations(List.of(
                        EmployeeCompensationInput.builder()
                            .rate(50d)
                            .paymentUnit(PaymentUnit.HOUR)
                            .flsaStatus(FlsaStatus.NONEXEMPT)
                            .effectiveDate("2021-06-11")
                            .build()))
                    .worksRemote(true)
                    .addresses(List.of(
                        Address.builder()
                            .id("123")
                            .type(Type.PRIMARY)
                            .string("25 Spring Street, Blackburn, VIC 3130")
                            .name("HQ US")
                            .line1("Main street")
                            .line2("apt #")
                            .line3("Suite #")
                            .line4("delivery instructions")
                            .streetNumber("25")
                            .city("San Francisco")
                            .state("CA")
                            .postalCode("94104")
                            .country("US")
                            .latitude("40.759211")
                            .longitude("-73.984638")
                            .county("Santa Clara")
                            .contactName("Elon Musk")
                            .salutation("Mr")
                            .phoneNumber("111-111-1111")
                            .fax("122-111-1111")
                            .email("[email protected]")
                            .website("https://elonmusk.com")
                            .notes("Address notes or delivery instructions.")
                            .rowVersion("1-12345")
                            .build()))
                    .phoneNumbers(List.of(
                        PhoneNumber.builder()
                            .number("111-111-1111")
                            .id("12345")
                            .countryCode("1")
                            .areaCode("323")
                            .extension("105")
                            .type(PhoneNumberType.PRIMARY)
                            .build()))
                    .emails(List.of(
                        Email.builder()
                            .email("[email protected]")
                            .id("123")
                            .type(EmailType.PRIMARY)
                            .build()))
                    .customFields(List.of(
                        CustomField.builder()
                            .id("2389328923893298")
                            .name("employee_level")
                            .description("Employee Level")
                            .value(Value.of6(List.of(
                                Six.builder()
                                    .build())))
                            .build()))
                    .socialLinks(List.of(
                        SocialLink.builder()
                            .url("https://www.twitter.com/apideck")
                            .id("12345")
                            .type("twitter")
                            .build()))
                    .bankAccounts(List.of(
                        BankAccount.builder()
                            .bankName("Monzo")
                            .accountNumber("123465")
                            .accountName("SPACEX LLC")
                            .accountType(AccountType.CREDIT_CARD)
                            .iban("CH2989144532982975332")
                            .bic("AUDSCHGGXXX")
                            .routingNumber("012345678")
                            .bsbNumber("062-001")
                            .branchIdentifier("001")
                            .bankCode("BNH")
                            .currency(Currency.USD)
                            .build()))
                    .taxCode("1111")
                    .taxId("234-32-0000")
                    .dietaryPreference("Veggie")
                    .foodAllergies(List.of(
                        "No allergies"))
                    .probationPeriod(ProbationPeriod.builder()
                        .startDate(LocalDate.parse("2021-10-01"))
                        .endDate(LocalDate.parse("2021-11-28"))
                        .build())
                    .tags(List.of(
                        "New"))
                    .rowVersion("1-12345")
                    .deleted(true)
                    .passThrough(List.of(
                        PassThroughBody.builder()
                            .serviceId("<id>")
                            .extendPaths(List.of(
                                ExtendPaths.builder()
                                    .path("$.nested.property")
                                    .value(Map.ofEntries(\n    Map.entry("TaxClassificationRef", Map.ofEntries(\n    Map.entry("value", "EUC-99990201-V1-00020000")))))
                                    .build()))
                            .build()))
                    .build())
                .serviceId("salesforce")
                .build();

        HrisEmployeesUpdateResponse res = sdk.hris().employees().update()
                .request(req)
                .call();

        if (res.updateEmployeeResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request HrisEmployeesUpdateRequest ✔️ The request object to use for the request.

Response

HrisEmployeesUpdateResponse

Errors

Error Type Status Code Content Type
models/errors/BadRequestResponse 400 application/json
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/UnprocessableResponse 422 application/json
models/errors/APIException 4XX, 5XX */*

delete

Delete Employee

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.HrisEmployeesDeleteRequest;
import com.apideck.unify.models.operations.HrisEmployeesDeleteResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {

        Apideck sdk = Apideck.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
            .build();

        HrisEmployeesDeleteRequest req = HrisEmployeesDeleteRequest.builder()
                .id("<id>")
                .serviceId("salesforce")
                .build();

        HrisEmployeesDeleteResponse res = sdk.hris().employees().delete()
                .request(req)
                .call();

        if (res.deleteEmployeeResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request HrisEmployeesDeleteRequest ✔️ The request object to use for the request.

Response

HrisEmployeesDeleteResponse

Errors

Error Type Status Code Content Type
models/errors/BadRequestResponse 400 application/json
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/UnprocessableResponse 422 application/json
models/errors/APIException 4XX, 5XX */*