(hris().companies())
List Companies
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.HrisCompaniesAllRequest;
import com.apideck.unify.models.operations.HrisCompaniesAllResponse;
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_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
HrisCompaniesAllRequest req = HrisCompaniesAllRequest.builder()
.serviceId("salesforce")
.passThrough(Map.ofEntries(
Map.entry("search", "San Francisco")))
.fields("id,updated_at")
.build();
HrisCompaniesAllResponse res = sdk.hris().companies().list()
.request(req)
.call();
if (res.getHrisCompaniesResponse().isPresent()) {
// handle response
}
}
}
HrisCompaniesAllResponse
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 Company
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.Address;
import com.apideck.unify.models.components.Currency;
import com.apideck.unify.models.components.Email;
import com.apideck.unify.models.components.EmailType;
import com.apideck.unify.models.components.ExtendPaths;
import com.apideck.unify.models.components.HrisCompanyInput;
import com.apideck.unify.models.components.HrisCompanyStatus;
import com.apideck.unify.models.components.PassThroughBody;
import com.apideck.unify.models.components.PhoneNumber;
import com.apideck.unify.models.components.PhoneNumberType;
import com.apideck.unify.models.components.Type;
import com.apideck.unify.models.components.Website;
import com.apideck.unify.models.components.WebsiteType;
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.HrisCompaniesAddRequest;
import com.apideck.unify.models.operations.HrisCompaniesAddResponse;
import java.lang.Exception;
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_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
HrisCompaniesAddRequest req = HrisCompaniesAddRequest.builder()
.hrisCompany(HrisCompanyInput.builder()
.legalName("SpaceX")
.displayName("SpaceX")
.subdomain("company")
.status(HrisCompanyStatus.ACTIVE)
.companyNumber("123456-AB")
.currency(Currency.USD)
.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(),
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()))
.websites(List.of(
Website.builder()
.url("http://example.com")
.id("12345")
.type(WebsiteType.PRIMARY)
.build()))
.debtorId("12345")
.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();
HrisCompaniesAddResponse res = sdk.hris().companies().create()
.request(req)
.call();
if (res.createHrisCompanyResponse().isPresent()) {
// handle response
}
}
}
HrisCompaniesAddResponse
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 Company
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.HrisCompaniesOneRequest;
import com.apideck.unify.models.operations.HrisCompaniesOneResponse;
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_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
HrisCompaniesOneRequest req = HrisCompaniesOneRequest.builder()
.id("<id>")
.serviceId("salesforce")
.fields("id,updated_at")
.build();
HrisCompaniesOneResponse res = sdk.hris().companies().get()
.request(req)
.call();
if (res.getHrisCompanyResponse().isPresent()) {
// handle response
}
}
}
HrisCompaniesOneResponse
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 Company
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.Address;
import com.apideck.unify.models.components.Currency;
import com.apideck.unify.models.components.Email;
import com.apideck.unify.models.components.EmailType;
import com.apideck.unify.models.components.ExtendPaths;
import com.apideck.unify.models.components.HrisCompanyInput;
import com.apideck.unify.models.components.HrisCompanyStatus;
import com.apideck.unify.models.components.PassThroughBody;
import com.apideck.unify.models.components.PhoneNumber;
import com.apideck.unify.models.components.PhoneNumberType;
import com.apideck.unify.models.components.Type;
import com.apideck.unify.models.components.Website;
import com.apideck.unify.models.components.WebsiteType;
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.HrisCompaniesUpdateRequest;
import com.apideck.unify.models.operations.HrisCompaniesUpdateResponse;
import java.lang.Exception;
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_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
HrisCompaniesUpdateRequest req = HrisCompaniesUpdateRequest.builder()
.id("<id>")
.hrisCompany(HrisCompanyInput.builder()
.legalName("SpaceX")
.displayName("SpaceX")
.subdomain("company")
.status(HrisCompanyStatus.ACTIVE)
.companyNumber("123456-AB")
.currency(Currency.USD)
.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(),
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(),
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(),
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()))
.websites(List.of(
Website.builder()
.url("http://example.com")
.id("12345")
.type(WebsiteType.PRIMARY)
.build(),
Website.builder()
.url("http://example.com")
.id("12345")
.type(WebsiteType.PRIMARY)
.build(),
Website.builder()
.url("http://example.com")
.id("12345")
.type(WebsiteType.PRIMARY)
.build()))
.debtorId("12345")
.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(),
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(),
ExtendPaths.builder()
.path("$.nested.property")
.value(Map.ofEntries(\n Map.entry("TaxClassificationRef", Map.ofEntries(\n Map.entry("value", "EUC-99990201-V1-00020000")))))
.build(),
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();
HrisCompaniesUpdateResponse res = sdk.hris().companies().update()
.request(req)
.call();
if (res.updateHrisCompanyResponse().isPresent()) {
// handle response
}
}
}
HrisCompaniesUpdateResponse
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 Company
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.HrisCompaniesDeleteRequest;
import com.apideck.unify.models.operations.HrisCompaniesDeleteResponse;
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_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
HrisCompaniesDeleteRequest req = HrisCompaniesDeleteRequest.builder()
.id("<id>")
.serviceId("salesforce")
.build();
HrisCompaniesDeleteResponse res = sdk.hris().companies().delete()
.request(req)
.call();
if (res.deleteHrisCompanyResponse().isPresent()) {
// handle response
}
}
}
HrisCompaniesDeleteResponse
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 |
*/* |