(accounting().subsidiaries())
- list - List Subsidiaries
- create - Create Subsidiary
- get - Get Subsidiary
- update - Update Subsidiary
- delete - Delete Subsidiary
List Subsidiaries
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.AccountingSubsidiariesAllRequest;
import com.apideck.unify.models.operations.AccountingSubsidiariesAllResponse;
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();
AccountingSubsidiariesAllRequest req = AccountingSubsidiariesAllRequest.builder()
.serviceId("salesforce")
.fields("id,updated_at")
.build();
AccountingSubsidiariesAllResponse res = sdk.accounting().subsidiaries().list()
.request(req)
.call();
if (res.getSubsidiariesResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingSubsidiariesAllRequest | ✔️ | The request object to use for the request. |
AccountingSubsidiariesAllResponse
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 Subsidiary
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.ExtendPaths;
import com.apideck.unify.models.components.PassThroughBody;
import com.apideck.unify.models.components.SubsidiaryInput;
import com.apideck.unify.models.components.SubsidiaryStatus;
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.AccountingSubsidiariesAddRequest;
import com.apideck.unify.models.operations.AccountingSubsidiariesAddResponse;
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_API_KEY_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
AccountingSubsidiariesAddRequest req = AccountingSubsidiariesAddRequest.builder()
.subsidiary(SubsidiaryInput.builder()
.parentId("12345")
.name("SpaceX")
.status(SubsidiaryStatus.ACTIVE)
.rowVersion("1-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();
AccountingSubsidiariesAddResponse res = sdk.accounting().subsidiaries().create()
.request(req)
.call();
if (res.createSubsidiaryResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingSubsidiariesAddRequest | ✔️ | The request object to use for the request. |
AccountingSubsidiariesAddResponse
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 Subsidiary
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.AccountingSubsidiariesOneRequest;
import com.apideck.unify.models.operations.AccountingSubsidiariesOneResponse;
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();
AccountingSubsidiariesOneRequest req = AccountingSubsidiariesOneRequest.builder()
.id("<id>")
.serviceId("salesforce")
.fields("id,updated_at")
.build();
AccountingSubsidiariesOneResponse res = sdk.accounting().subsidiaries().get()
.request(req)
.call();
if (res.getSubsidiaryResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingSubsidiariesOneRequest | ✔️ | The request object to use for the request. |
AccountingSubsidiariesOneResponse
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 Subsidiary
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.ExtendPaths;
import com.apideck.unify.models.components.PassThroughBody;
import com.apideck.unify.models.components.SubsidiaryInput;
import com.apideck.unify.models.components.SubsidiaryStatus;
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.AccountingSubsidiariesUpdateRequest;
import com.apideck.unify.models.operations.AccountingSubsidiariesUpdateResponse;
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_API_KEY_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
AccountingSubsidiariesUpdateRequest req = AccountingSubsidiariesUpdateRequest.builder()
.id("<id>")
.subsidiary(SubsidiaryInput.builder()
.parentId("12345")
.name("SpaceX")
.status(SubsidiaryStatus.ACTIVE)
.rowVersion("1-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();
AccountingSubsidiariesUpdateResponse res = sdk.accounting().subsidiaries().update()
.request(req)
.call();
if (res.updateSubsidiaryResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingSubsidiariesUpdateRequest | ✔️ | The request object to use for the request. |
AccountingSubsidiariesUpdateResponse
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 Subsidiary
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.AccountingSubsidiariesDeleteRequest;
import com.apideck.unify.models.operations.AccountingSubsidiariesDeleteResponse;
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();
AccountingSubsidiariesDeleteRequest req = AccountingSubsidiariesDeleteRequest.builder()
.id("<id>")
.serviceId("salesforce")
.build();
AccountingSubsidiariesDeleteResponse res = sdk.accounting().subsidiaries().delete()
.request(req)
.call();
if (res.deleteSubsidiaryResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingSubsidiariesDeleteRequest | ✔️ | The request object to use for the request. |
AccountingSubsidiariesDeleteResponse
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 | */* |