|
47 | 47 | import com.volcengine.billing.model.HandleInvitationResponse; |
48 | 48 | import com.volcengine.billing.model.ListAmortizedCostBillDailyRequest; |
49 | 49 | import com.volcengine.billing.model.ListAmortizedCostBillDailyResponse; |
| 50 | +import com.volcengine.billing.model.ListAmortizedCostBillDetailRequest; |
| 51 | +import com.volcengine.billing.model.ListAmortizedCostBillDetailResponse; |
50 | 52 | import com.volcengine.billing.model.ListAmortizedCostBillMonthlyRequest; |
51 | 53 | import com.volcengine.billing.model.ListAmortizedCostBillMonthlyResponse; |
52 | 54 | import com.volcengine.billing.model.ListAvailableInstancesRequest; |
@@ -1391,6 +1393,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
1391 | 1393 | apiClient.executeAsync(call, localVarReturnType, callback); |
1392 | 1394 | return call; |
1393 | 1395 | } |
| 1396 | + /** |
| 1397 | + * Build call for listAmortizedCostBillDetail |
| 1398 | + * @param body (required) |
| 1399 | + * @param progressListener Progress listener |
| 1400 | + * @param progressRequestListener Progress request listener |
| 1401 | + * @return Call to execute |
| 1402 | + * @throws ApiException If fail to serialize the request body object |
| 1403 | + */ |
| 1404 | + public com.squareup.okhttp.Call listAmortizedCostBillDetailCall(ListAmortizedCostBillDetailRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 1405 | + Object localVarPostBody = body; |
| 1406 | + |
| 1407 | + // create path and map variables |
| 1408 | + String localVarPath = "/ListAmortizedCostBillDetail/2022-01-01/billing/post/application_json/"; |
| 1409 | + |
| 1410 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 1411 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 1412 | + |
| 1413 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 1414 | + |
| 1415 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 1416 | + |
| 1417 | + final String[] localVarAccepts = { |
| 1418 | + "application/json" |
| 1419 | + }; |
| 1420 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 1421 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 1422 | + |
| 1423 | + final String[] localVarContentTypes = { |
| 1424 | + "text/plain" |
| 1425 | + }; |
| 1426 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 1427 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 1428 | + |
| 1429 | + if(progressListener != null) { |
| 1430 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 1431 | + @Override |
| 1432 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 1433 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 1434 | + return originalResponse.newBuilder() |
| 1435 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 1436 | + .build(); |
| 1437 | + } |
| 1438 | + }); |
| 1439 | + } |
| 1440 | + |
| 1441 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 1442 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 1443 | + } |
| 1444 | + |
| 1445 | + @SuppressWarnings("rawtypes") |
| 1446 | + private com.squareup.okhttp.Call listAmortizedCostBillDetailValidateBeforeCall(ListAmortizedCostBillDetailRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 1447 | + // verify the required parameter 'body' is set |
| 1448 | + if (body == null) { |
| 1449 | + throw new ApiException("Missing the required parameter 'body' when calling listAmortizedCostBillDetail(Async)"); |
| 1450 | + } |
| 1451 | + |
| 1452 | + com.squareup.okhttp.Call call = listAmortizedCostBillDetailCall(body, progressListener, progressRequestListener); |
| 1453 | + return call; |
| 1454 | + |
| 1455 | + |
| 1456 | + |
| 1457 | + |
| 1458 | + |
| 1459 | + } |
| 1460 | + |
| 1461 | + /** |
| 1462 | + * |
| 1463 | + * |
| 1464 | + * @param body (required) |
| 1465 | + * @return ListAmortizedCostBillDetailResponse |
| 1466 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 1467 | + */ |
| 1468 | + public ListAmortizedCostBillDetailResponse listAmortizedCostBillDetail(ListAmortizedCostBillDetailRequest body) throws ApiException { |
| 1469 | + ApiResponse<ListAmortizedCostBillDetailResponse> resp = listAmortizedCostBillDetailWithHttpInfo(body); |
| 1470 | + return resp.getData(); |
| 1471 | + } |
| 1472 | + |
| 1473 | + /** |
| 1474 | + * |
| 1475 | + * |
| 1476 | + * @param body (required) |
| 1477 | + * @return ApiResponse<ListAmortizedCostBillDetailResponse> |
| 1478 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 1479 | + */ |
| 1480 | + public ApiResponse<ListAmortizedCostBillDetailResponse> listAmortizedCostBillDetailWithHttpInfo( @NotNull ListAmortizedCostBillDetailRequest body) throws ApiException { |
| 1481 | + com.squareup.okhttp.Call call = listAmortizedCostBillDetailValidateBeforeCall(body, null, null); |
| 1482 | + Type localVarReturnType = new TypeToken<ListAmortizedCostBillDetailResponse>(){}.getType(); |
| 1483 | + return apiClient.execute(call, localVarReturnType); |
| 1484 | + } |
| 1485 | + |
| 1486 | + /** |
| 1487 | + * (asynchronously) |
| 1488 | + * |
| 1489 | + * @param body (required) |
| 1490 | + * @param callback The callback to be executed when the API call finishes |
| 1491 | + * @return The request call |
| 1492 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 1493 | + */ |
| 1494 | + public com.squareup.okhttp.Call listAmortizedCostBillDetailAsync(ListAmortizedCostBillDetailRequest body, final ApiCallback<ListAmortizedCostBillDetailResponse> callback) throws ApiException { |
| 1495 | + |
| 1496 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 1497 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 1498 | + |
| 1499 | + if (callback != null) { |
| 1500 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 1501 | + @Override |
| 1502 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 1503 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 1504 | + } |
| 1505 | + }; |
| 1506 | + |
| 1507 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 1508 | + @Override |
| 1509 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 1510 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 1511 | + } |
| 1512 | + }; |
| 1513 | + } |
| 1514 | + |
| 1515 | + com.squareup.okhttp.Call call = listAmortizedCostBillDetailValidateBeforeCall(body, progressListener, progressRequestListener); |
| 1516 | + Type localVarReturnType = new TypeToken<ListAmortizedCostBillDetailResponse>(){}.getType(); |
| 1517 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 1518 | + return call; |
| 1519 | + } |
1394 | 1520 | /** |
1395 | 1521 | * Build call for listAmortizedCostBillMonthly |
1396 | 1522 | * @param body (required) |
|
0 commit comments