Search in sources :

Example 1 with StatusDetail

use of com.netsuite.webservices.test.platform.core.StatusDetail in project components by Talend.

the class NetSuitePortTypeMockAdapterImpl method createErrorStatus.

public static Status createErrorStatus(StatusDetailCodeType code, String message) {
    Status status = new Status();
    status.setIsSuccess(false);
    StatusDetail statusDetail = new StatusDetail();
    statusDetail.setType(StatusDetailType.ERROR);
    statusDetail.setCode(code);
    statusDetail.setMessage(message);
    status.getStatusDetail().add(statusDetail);
    return status;
}
Also used : Status(com.netsuite.webservices.test.platform.core.Status) StatusDetail(com.netsuite.webservices.test.platform.core.StatusDetail)

Example 2 with StatusDetail

use of com.netsuite.webservices.test.platform.core.StatusDetail in project components by Talend.

the class TestNetSuiteClientService method toNsStatus.

public static NsStatus toNsStatus(Status status) {
    if (status == null) {
        return null;
    }
    NsStatus nsStatus = new NsStatus();
    nsStatus.setSuccess(status.getIsSuccess());
    for (StatusDetail detail : status.getStatusDetail()) {
        nsStatus.getDetails().add(toNsStatusDetail(detail));
    }
    return nsStatus;
}
Also used : StatusDetail(com.netsuite.webservices.test.platform.core.StatusDetail) NsStatus(org.talend.components.netsuite.client.NsStatus)

Aggregations

StatusDetail (com.netsuite.webservices.test.platform.core.StatusDetail)2 Status (com.netsuite.webservices.test.platform.core.Status)1 NsStatus (org.talend.components.netsuite.client.NsStatus)1