Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 3.71 KB

File metadata and controls

71 lines (51 loc) · 3.71 KB

Accounting.CompanyInfo

Overview

Available Operations

  • get - Get company info

get

Get company info

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.*;
import com.apideck.unify.models.operations.AccountingCompanyInfoOneRequest;
import com.apideck.unify.models.operations.AccountingCompanyInfoOneResponse;
import java.lang.Exception;

public class Application {

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

        Apideck sdk = Apideck.builder()
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
                .apiKey(System.getenv().getOrDefault("API_KEY", ""))
            .build();

        AccountingCompanyInfoOneRequest req = AccountingCompanyInfoOneRequest.builder()
                .serviceId("salesforce")
                .companyId("12345")
                .fields("id,updated_at")
                .build();

        AccountingCompanyInfoOneResponse res = sdk.accounting().companyInfo().get()
                .request(req)
                .call();

        if (res.getCompanyInfoResponse().isPresent()) {
            System.out.println(res.getCompanyInfoResponse().get());
        }
    }
}

Parameters

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

Response

AccountingCompanyInfoOneResponse

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