Skip to content

Latest commit

 

History

History
445 lines (357 loc) · 22.7 KB

README.md

File metadata and controls

445 lines (357 loc) · 22.7 KB

Pipelines

(crm().pipelines())

Overview

Available Operations

list

List pipelines

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.CrmPipelinesAllRequest;
import com.apideck.unify.models.operations.CrmPipelinesAllResponse;
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();

        CrmPipelinesAllRequest req = CrmPipelinesAllRequest.builder()
                .serviceId("salesforce")
                .passThrough(Map.ofEntries(
                    Map.entry("search", "San Francisco")))
                .fields("id,updated_at")
                .build();

        CrmPipelinesAllResponse res = sdk.crm().pipelines().list()
                .request(req)
                .call();

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

Parameters

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

Response

CrmPipelinesAllResponse

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 pipeline

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.Currency;
import com.apideck.unify.models.components.ExtendPaths;
import com.apideck.unify.models.components.PassThroughBody;
import com.apideck.unify.models.components.PipelineInput;
import com.apideck.unify.models.components.PipelineStages;
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.CrmPipelinesAddRequest;
import com.apideck.unify.models.operations.CrmPipelinesAddResponse;
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();

        CrmPipelinesAddRequest req = CrmPipelinesAddRequest.builder()
                .pipeline(PipelineInput.builder()
                    .name("Sales Pipeline")
                    .id("default")
                    .currency(Currency.USD)
                    .archived(false)
                    .active(false)
                    .displayOrder(1L)
                    .winProbabilityEnabled(true)
                    .stages(List.of(
                        PipelineStages.builder()
                            .name("Contract Sent")
                            .value("CONTRACT_SENT")
                            .winProbability(50L)
                            .displayOrder(1L)
                            .build()))
                    .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()))
                            .build()))
                    .build())
                .serviceId("salesforce")
                .build();

        CrmPipelinesAddResponse res = sdk.crm().pipelines().create()
                .request(req)
                .call();

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

Parameters

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

Response

CrmPipelinesAddResponse

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 pipeline

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.CrmPipelinesOneRequest;
import com.apideck.unify.models.operations.CrmPipelinesOneResponse;
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();

        CrmPipelinesOneRequest req = CrmPipelinesOneRequest.builder()
                .id("<id>")
                .serviceId("salesforce")
                .fields("id,updated_at")
                .build();

        CrmPipelinesOneResponse res = sdk.crm().pipelines().get()
                .request(req)
                .call();

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

Parameters

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

Response

CrmPipelinesOneResponse

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 pipeline

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.Currency;
import com.apideck.unify.models.components.ExtendPaths;
import com.apideck.unify.models.components.PassThroughBody;
import com.apideck.unify.models.components.PipelineInput;
import com.apideck.unify.models.components.PipelineStages;
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.CrmPipelinesUpdateRequest;
import com.apideck.unify.models.operations.CrmPipelinesUpdateResponse;
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();

        CrmPipelinesUpdateRequest req = CrmPipelinesUpdateRequest.builder()
                .id("<id>")
                .pipeline(PipelineInput.builder()
                    .name("Sales Pipeline")
                    .id("default")
                    .currency(Currency.USD)
                    .archived(false)
                    .active(false)
                    .displayOrder(1L)
                    .winProbabilityEnabled(true)
                    .stages(List.of(
                        PipelineStages.builder()
                            .name("Contract Sent")
                            .value("CONTRACT_SENT")
                            .winProbability(50L)
                            .displayOrder(1L)
                            .build(),
                        PipelineStages.builder()
                            .name("Contract Sent")
                            .value("CONTRACT_SENT")
                            .winProbability(50L)
                            .displayOrder(1L)
                            .build(),
                        PipelineStages.builder()
                            .name("Contract Sent")
                            .value("CONTRACT_SENT")
                            .winProbability(50L)
                            .displayOrder(1L)
                            .build()))
                    .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();

        CrmPipelinesUpdateResponse res = sdk.crm().pipelines().update()
                .request(req)
                .call();

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

Parameters

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

Response

CrmPipelinesUpdateResponse

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 pipeline

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.CrmPipelinesDeleteRequest;
import com.apideck.unify.models.operations.CrmPipelinesDeleteResponse;
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();

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

        CrmPipelinesDeleteResponse res = sdk.crm().pipelines().delete()
                .request(req)
                .call();

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

Parameters

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

Response

CrmPipelinesDeleteResponse

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 */*