本文整理汇总了Java中io.swagger.client.ProgressResponseBody类的典型用法代码示例。如果您正苦于以下问题:Java ProgressResponseBody类的具体用法?Java ProgressResponseBody怎么用?Java ProgressResponseBody使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProgressResponseBody类属于io.swagger.client包,在下文中一共展示了ProgressResponseBody类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: orderUpdateAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* (asynchronously)
* Recurso responsável por efetuar o cancelamento de um pedido.
* @param clientId Token da aplicação (APP Token) gerado durante o processo de cadastro. (required)
* @param accessToken Token de acesso (Access Token) gerado durante o processo de cadastro. (required)
* @param merchantId Identificador do estabelecimento comercial gerado durante o processo de cadastro. (required)
* @param id Identificador do pedido. (required)
* @param operation Operação que deve ser executada. As possíveis operações são: cancel (cancelamento de um pedido), close (fechamento de um pedido), place (liberação de um pedido para pagamento). (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call orderUpdateAsync(String clientId, String accessToken, String merchantId, String id, String operation, final ApiCallback<Void> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = orderUpdateValidateBeforeCall(clientId, accessToken, merchantId, id, operation, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
开发者ID:DeveloperCielo,项目名称:LIO-SDK-API-Integracao-Remota-v1-Java,代码行数:38,代码来源:OrderManagementApi.java
示例2: removeProcessGroupAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* Deletes a process group (asynchronously)
*
* @param id The process group id. (required)
* @param version The revision is used to verify the client is working with the latest version of the flow. (optional)
* @param clientId If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call removeProcessGroupAsync(String id, String version, String clientId, final ApiCallback<ProcessGroupEntity> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = removeProcessGroupCall(id, version, clientId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ProcessGroupEntity>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:simplesteph,项目名称:nifi-api-client-java,代码行数:37,代码来源:ProcessgroupsApi.java
示例3: deleteTaskAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* Delete an Existing Task (asynchronously)
*
* @param taskId (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call deleteTaskAsync(String taskId, final ApiCallback<ExternalTaskDTO> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = deleteTaskCall(taskId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ExternalTaskDTO>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:Tradeshift,项目名称:tradeshift-app-samples,代码行数:35,代码来源:DefaultApi.java
示例4: getCurrentUserCall
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
private com.squareup.okhttp.Call getCurrentUserCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/flow/current-user".replaceAll("\\{format\\}","json");
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"*_/_*"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
开发者ID:simplesteph,项目名称:nifi-api-client-java,代码行数:41,代码来源:FlowApi.java
示例5: updateAccessPolicyAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* Updates a access policy (asynchronously)
*
* @param id The access policy id. (required)
* @param body The access policy configuration details. (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call updateAccessPolicyAsync(String id, AccessPolicyEntity body, final ApiCallback<AccessPolicyEntity> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = updateAccessPolicyCall(id, body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<AccessPolicyEntity>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:simplesteph,项目名称:nifi-api-client-java,代码行数:36,代码来源:PoliciesApi.java
示例6: getProvenanceEventAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* Gets a provenance event (asynchronously)
*
* @param id The provenance event id. (required)
* @param clusterNodeId The id of the node where this event exists if clustered. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getProvenanceEventAsync(String id, String clusterNodeId, final ApiCallback<ProvenanceEventEntity> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getProvenanceEventCall(id, clusterNodeId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ProvenanceEventEntity>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:simplesteph,项目名称:nifi-api-client-java,代码行数:36,代码来源:ProvenanceeventsApi.java
示例7: proxyPUTAccountAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* CRUD: Update Account (asynchronously)
*
* @param id Object id (required)
* @param modifyRequest (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call proxyPUTAccountAsync(String id, ProxyModifyAccount modifyRequest, final ApiCallback<ProxyCreateOrModifyResponse> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = proxyPUTAccountCall(id, modifyRequest, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ProxyCreateOrModifyResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:zuora,项目名称:codelibrary-java,代码行数:36,代码来源:AccountsApi.java
示例8: proxyPUTProductRatePlanAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* CRUD: Update ProductRatePlan (asynchronously)
*
* @param id Object id (required)
* @param modifyRequest (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call proxyPUTProductRatePlanAsync(String id, ProxyModifyProductRatePlan modifyRequest, final ApiCallback<ProxyCreateOrModifyResponse> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = proxyPUTProductRatePlanCall(id, modifyRequest, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ProxyCreateOrModifyResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:zuora,项目名称:codelibrary-java,代码行数:36,代码来源:ProductRatePlansApi.java
示例9: pUTPaymentMethodsAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* Update payment method (asynchronously)
* Updates an existing credit card payment method for the specified customer account.
* @param paymentMethodId Unique ID of the payment method to update. (required)
* @param request (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call pUTPaymentMethodsAsync(String paymentMethodId, PUTPaymentMethodType request, final ApiCallback<PUTPaymentMethodResponseType> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = pUTPaymentMethodsCall(paymentMethodId, request, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<PUTPaymentMethodResponseType>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:zuora,项目名称:codelibrary-java,代码行数:36,代码来源:PaymentMethodsApi.java
示例10: clearStateAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* Clears the state for a reporting task (asynchronously)
*
* @param id The reporting task id. (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call clearStateAsync(String id, final ApiCallback<ComponentStateDTO> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = clearStateCall(id, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ComponentStateDTO>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:simplesteph,项目名称:nifi-api-client-java,代码行数:35,代码来源:ReportingtasksApi.java
示例11: pOSTSubscriptionAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* Create subscription (asynchronously)
* This REST API reference describes how to create a new subscription for an existing customer account. ## Notes If invoiceCollect is `true`, the call will not return success = `true` unless the subscription, invoice, and payment are all successful. Default values for **customerAcceptanceDate** and **serviceActivationDate** are set as follows. | | serviceActivationDate(SA) specified | serviceActivationDate (SA) NOT specified | | ------------- |:-------------:| -----:| | customerAcceptanceDate (CA) specified| SA uses value in the request call; CA uses value in the request call| CA uses value in the request call;SA uses CE as default | | customerAcceptanceDate (CA) NOT specified | SA uses value in the request call; CA uses SA as default | SA and CA use CE as default |
* @param request (required)
* @param zuoraVersion The minor version of the Zuora REST API. You only need to set this parameter if you use the __collect__ or __invoice__ field. See [REST API Basics](https://knowledgecenter.zuora.com/DC_Developers/REST_API/A_REST_basics) for more information. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call pOSTSubscriptionAsync(POSTSubscriptionType request, String zuoraVersion, final ApiCallback<POSTSubscriptionResponseType> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = pOSTSubscriptionCall(request, zuoraVersion, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<POSTSubscriptionResponseType>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:zuora,项目名称:codelibrary-java,代码行数:36,代码来源:SubscriptionsApi.java
示例12: proxyPOSTInvoiceAdjustmentAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* CRUD: Create InvoiceAdjustment (asynchronously)
*
* @param createRequest (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call proxyPOSTInvoiceAdjustmentAsync(ProxyCreateInvoiceAdjustment createRequest, final ApiCallback<ProxyCreateOrModifyResponse> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = proxyPOSTInvoiceAdjustmentCall(createRequest, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ProxyCreateOrModifyResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:zuora,项目名称:codelibrary-java,代码行数:35,代码来源:InvoiceAdjustmentsApi.java
示例13: updateRemoteProcessGroupOutputPortAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* Updates a remote port (asynchronously)
* Note: This endpoint is subject to change as NiFi and it's REST API evolve.
* @param id The remote process group id. (required)
* @param portId The remote process group port id. (required)
* @param body The remote process group port. (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call updateRemoteProcessGroupOutputPortAsync(String id, String portId, RemoteProcessGroupPortEntity body, final ApiCallback<RemoteProcessGroupPortEntity> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = updateRemoteProcessGroupOutputPortCall(id, portId, body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<RemoteProcessGroupPortEntity>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:simplesteph,项目名称:nifi-api-client-java,代码行数:37,代码来源:RemoteprocessgroupsApi.java
示例14: createRemoteProcessGroupAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* Creates a new process group (asynchronously)
*
* @param id The process group id. (required)
* @param body The remote process group configuration details. (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call createRemoteProcessGroupAsync(String id, RemoteProcessGroupEntity body, final ApiCallback<RemoteProcessGroupEntity> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = createRemoteProcessGroupCall(id, body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<RemoteProcessGroupEntity>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:simplesteph,项目名称:nifi-api-client-java,代码行数:36,代码来源:ProcessgroupsApi.java
示例15: getSiteToSiteDetailsCall
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
private com.squareup.okhttp.Call getSiteToSiteDetailsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/site-to-site".replaceAll("\\{format\\}","json");
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"*_/_*"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
开发者ID:simplesteph,项目名称:nifi-api-client-java,代码行数:41,代码来源:SitetositeApi.java
示例16: proxyPOSTRefundAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* CRUD: Create Refund (asynchronously)
*
* @param createRequest (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call proxyPOSTRefundAsync(ProxyCreateRefund createRequest, final ApiCallback<ProxyCreateOrModifyResponse> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = proxyPOSTRefundCall(createRequest, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ProxyCreateOrModifyResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:zuora,项目名称:codelibrary-java,代码行数:35,代码来源:RefundsApi.java
示例17: removeInputPortAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* Deletes an input port (asynchronously)
*
* @param id The input port id. (required)
* @param version The revision is used to verify the client is working with the latest version of the flow. (optional)
* @param clientId If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call removeInputPortAsync(String id, String version, String clientId, final ApiCallback<PortEntity> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = removeInputPortCall(id, version, clientId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<PortEntity>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:simplesteph,项目名称:nifi-api-client-java,代码行数:37,代码来源:InputportsApi.java
示例18: pOSTAccountingPeriodAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* Create accounting period (asynchronously)
* Creates an accounting period. Prerequisites ------------- * You must have Zuora Finance enabled on your tenant. * You must have the Create Accounting Period user permission. See [Finance Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/Z-Finance_Roles). Limitations ----------- * When creating the first accounting period on your tenant, the start date must be equal to or earlier than the date of the earliest transaction on the tenant. * Start and end dates of accounting periods must be contiguous. For example, if one accounting period ends on January 31, the next period must start on February 1. * If you have the Revenue Recognition Package and have enabled the \"Monthly recognition over time\" revenue recognition model, the accounting period start date and end date must be on the first day and last day of the month, respectively. Note that the start and end dates do not necessarily have to be in the same month.
* @param request (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call pOSTAccountingPeriodAsync(POSTAccountingPeriodType request, final ApiCallback<POSTAccountingPeriodResponseType> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = pOSTAccountingPeriodCall(request, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<POSTAccountingPeriodResponseType>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:zuora,项目名称:codelibrary-java,代码行数:35,代码来源:AccountingPeriodsApi.java
示例19: proxyDELETERefundInvoicePaymentAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* CRUD: Delete RefundInvoicePayment (asynchronously)
*
* @param id Object id (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call proxyDELETERefundInvoicePaymentAsync(String id, final ApiCallback<ProxyDeleteResponse> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = proxyDELETERefundInvoicePaymentCall(id, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ProxyDeleteResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
开发者ID:zuora,项目名称:codelibrary-java,代码行数:35,代码来源:RefundInvoicePaymentsApi.java
示例20: pUTAccountAsync
import io.swagger.client.ProgressResponseBody; //导入依赖的package包/类
/**
* Update account (asynchronously)
* This REST API reference describes how to update a customer account by specifying the account-key. ## Notes 1. Only the fields to be changed should be specified. Any field that's not included in the request body will not be changed. 2. If an empty field is submitted with this call, the corresponding field in the account is emptied. 3. Email addresses: If no email addresses are specified, no change is made to the email addresses on file or to the email delivery preference. If either the **personalEmail** or **workEmail** is specified (or both), the system
|
请发表评论