|
61 | 61 | import one.talon.api.model.NewInviteEmail; |
62 | 62 | import one.talon.api.model.NewRuleset; |
63 | 63 | import org.threeten.bp.OffsetDateTime; |
| 64 | +import one.talon.api.model.Body18; |
64 | 65 | import one.talon.api.model.Ruleset; |
65 | 66 | import one.talon.api.model.Session; |
66 | 67 | import one.talon.api.model.UpdateAccount; |
67 | 68 | import one.talon.api.model.UpdateCoupon; |
68 | 69 | import one.talon.api.model.UpdateUser; |
69 | 70 | import one.talon.api.model.User; |
| 71 | +import one.talon.api.model.InlineResponseCustomerSearch; |
70 | 72 |
|
71 | 73 | import java.lang.reflect.Type; |
72 | 74 | import java.util.ArrayList; |
@@ -5498,6 +5500,135 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
5498 | 5500 | apiClient.executeAsync(call, localVarReturnType, callback); |
5499 | 5501 | return call; |
5500 | 5502 | } |
| 5503 | + /** |
| 5504 | + * Build call for getCustomersByAttributes |
| 5505 | + * @param pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) |
| 5506 | + * @param skip Skips the given number of items when paging through large result sets. (optional) |
| 5507 | + * @param body (optional) |
| 5508 | + * @param progressListener Progress listener |
| 5509 | + * @param progressRequestListener Progress request listener |
| 5510 | + * @return Call to execute |
| 5511 | + * @throws ApiException If fail to serialize the request body object |
| 5512 | + */ |
| 5513 | + public com.squareup.okhttp.Call getCustomersByAttributesCall(Integer pageSize, Integer skip, Body18 body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 5514 | + Object localVarPostBody = body; |
| 5515 | + |
| 5516 | + // create path and map variables |
| 5517 | + String localVarPath = "/v1/customer_search/no_total"; |
| 5518 | + |
| 5519 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 5520 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 5521 | + if (pageSize != null) |
| 5522 | + localVarQueryParams.addAll(apiClient.parameterToPair("pageSize", pageSize)); |
| 5523 | + if (skip != null) |
| 5524 | + localVarQueryParams.addAll(apiClient.parameterToPair("skip", skip)); |
| 5525 | + |
| 5526 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 5527 | + |
| 5528 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 5529 | + |
| 5530 | + final String[] localVarAccepts = { |
| 5531 | + "application/json" |
| 5532 | + }; |
| 5533 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 5534 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 5535 | + |
| 5536 | + final String[] localVarContentTypes = { |
| 5537 | + "application/json" |
| 5538 | + }; |
| 5539 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 5540 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 5541 | + |
| 5542 | + if(progressListener != null) { |
| 5543 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 5544 | + @Override |
| 5545 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 5546 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 5547 | + return originalResponse.newBuilder() |
| 5548 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 5549 | + .build(); |
| 5550 | + } |
| 5551 | + }); |
| 5552 | + } |
| 5553 | + |
| 5554 | + String[] localVarAuthNames = new String[] { "manager_auth" }; |
| 5555 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 5556 | + } |
| 5557 | + |
| 5558 | + @SuppressWarnings("rawtypes") |
| 5559 | + private com.squareup.okhttp.Call getCustomersByAttributesValidateBeforeCall(Integer pageSize, Integer skip, Body18 body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 5560 | + |
| 5561 | + |
| 5562 | + com.squareup.okhttp.Call call = getCustomersByAttributesCall(pageSize, skip, body, progressListener, progressRequestListener); |
| 5563 | + return call; |
| 5564 | + |
| 5565 | + } |
| 5566 | + |
| 5567 | + /** |
| 5568 | + * Get a list of the customer profiles that match the given attributes |
| 5569 | + * Gets a list of all the cusomer profiles for the account that exactly match a set of attributes. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. [Customer Profile]: http://help.talon.one/customer/en/portal/articles/2525263-data-model?b_id=14115#customer-profile |
| 5570 | + * @param pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) |
| 5571 | + * @param skip Skips the given number of items when paging through large result sets. (optional) |
| 5572 | + * @param body (optional) |
| 5573 | + * @return InlineResponse20015 |
| 5574 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 5575 | + */ |
| 5576 | + public InlineResponseCustomerSearch getCustomersByAttributes(Integer pageSize, Integer skip, Body18 body) throws ApiException { |
| 5577 | + ApiResponse<InlineResponseCustomerSearch> resp = getCustomersByAttributesWithHttpInfo(pageSize, skip, body); |
| 5578 | + return resp.getData(); |
| 5579 | + } |
| 5580 | + |
| 5581 | + /** |
| 5582 | + * Get a list of the customer profiles that match the given attributes |
| 5583 | + * Gets a list of all the cusomer profiles for the account that exactly match a set of attributes. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. [Customer Profile]: http://help.talon.one/customer/en/portal/articles/2525263-data-model?b_id=14115#customer-profile |
| 5584 | + * @param pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) |
| 5585 | + * @param skip Skips the given number of items when paging through large result sets. (optional) |
| 5586 | + * @param body (optional) |
| 5587 | + * @return ApiResponse<InlineResponse20015> |
| 5588 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 5589 | + */ |
| 5590 | + public ApiResponse<InlineResponseCustomerSearch> getCustomersByAttributesWithHttpInfo(Integer pageSize, Integer skip, Body18 body) throws ApiException { |
| 5591 | + com.squareup.okhttp.Call call = getCustomersByAttributesValidateBeforeCall(pageSize, skip, body, null, null); |
| 5592 | + Type localVarReturnType = new TypeToken<InlineResponseCustomerSearch>(){}.getType(); |
| 5593 | + return apiClient.execute(call, localVarReturnType); |
| 5594 | + } |
| 5595 | + |
| 5596 | + /** |
| 5597 | + * Get a list of the customer profiles that match the given attributes (asynchronously) |
| 5598 | + * Gets a list of all the cusomer profiles for the account that exactly match a set of attributes. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. [Customer Profile]: http://help.talon.one/customer/en/portal/articles/2525263-data-model?b_id=14115#customer-profile |
| 5599 | + * @param pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) |
| 5600 | + * @param skip Skips the given number of items when paging through large result sets. (optional) |
| 5601 | + * @param body (optional) |
| 5602 | + * @param callback The callback to be executed when the API call finishes |
| 5603 | + * @return The request call |
| 5604 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 5605 | + */ |
| 5606 | + public com.squareup.okhttp.Call getCustomersByAttributesAsync(Integer pageSize, Integer skip, Body18 body, final ApiCallback<InlineResponse20015> callback) throws ApiException { |
| 5607 | + |
| 5608 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 5609 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 5610 | + |
| 5611 | + if (callback != null) { |
| 5612 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 5613 | + @Override |
| 5614 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 5615 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 5616 | + } |
| 5617 | + }; |
| 5618 | + |
| 5619 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 5620 | + @Override |
| 5621 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 5622 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 5623 | + } |
| 5624 | + }; |
| 5625 | + } |
| 5626 | + |
| 5627 | + com.squareup.okhttp.Call call = getCustomersByAttributesValidateBeforeCall(pageSize, skip, body, progressListener, progressRequestListener); |
| 5628 | + Type localVarReturnType = new TypeToken<InlineResponse20015>(){}.getType(); |
| 5629 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 5630 | + return call; |
| 5631 | + } |
5501 | 5632 | /** |
5502 | 5633 | * Build call for getExports |
5503 | 5634 | * @param progressListener Progress listener |
|
0 commit comments