如何在square pos中查看创建的订单

时间:2017-12-28 07:55:26

标签: java square

我可以使用square(v2 / locations / location_id / orders)api创建订单并获取订单ID。但我无法获得此订单详情以及如何在方形仪表板上看到此创建的订单?请帮帮我。

我使用以下方法执行此操作:

public CreateOrderResponse createOrder(String locationId, CreateOrderRequest body) throws ApiException {
    Object localVarPostBody = body;

    // verify the required parameter 'locationId' is set
    if (locationId == null) {
        throw new ApiException(400, "Missing the required parameter 'locationId' when calling createOrder");
    }

    // verify the required parameter 'body' is set
    if (body == null) {
        throw new ApiException(400, "Missing the required parameter 'body' when calling createOrder");
    }

    // create path and map variables
    String localVarPath = "/v2/locations/{location_id}/orders".replaceAll("\\{" + "location_id" + "\\}",
                    apiClient.escapeString(locationId.toString()));

    // query params
    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);

    final String[] localVarContentTypes = { "application/json" };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

    String[] localVarAuthNames = new String[] { "oauth2" };

    GenericType<CreateOrderResponse> localVarReturnType = new GenericType<CreateOrderResponse>() {
    };
    CompleteResponse<CreateOrderResponse> completeResponse = (CompleteResponse<CreateOrderResponse>) apiClient
                    .invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                                    localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames,
                                    localVarReturnType);
    return completeResponse.getData();
}

由于

1 个答案:

答案 0 :(得分:1)

订单端点仅用于创建电子商务交易的逐项订单。在您收取费用之前,您不会在任何地方看到它们,然后您会在交易中看到仪表板中订单的分项。