Skip to content

Commit a6e6d43

Browse files
committed
added customer_search/no_total endpoint
1 parent d414e34 commit a6e6d43

File tree

6 files changed

+818
-1
lines changed

6 files changed

+818
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>talon-one-client</artifactId>
66
<packaging>jar</packaging>
77
<name>talon-one-client</name>
8-
<version>1.2.4</version>
8+
<version>1.2.5</version>
99
<url>https://github.com/swagger-api/swagger-codegen</url>
1010
<description>Talon.one Java API client</description>
1111
<scm>

src/main/java/one/talon/api/ManagementApi.java

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,14 @@
6161
import one.talon.api.model.NewInviteEmail;
6262
import one.talon.api.model.NewRuleset;
6363
import org.threeten.bp.OffsetDateTime;
64+
import one.talon.api.model.Body18;
6465
import one.talon.api.model.Ruleset;
6566
import one.talon.api.model.Session;
6667
import one.talon.api.model.UpdateAccount;
6768
import one.talon.api.model.UpdateCoupon;
6869
import one.talon.api.model.UpdateUser;
6970
import one.talon.api.model.User;
71+
import one.talon.api.model.InlineResponseCustomerSearch;
7072

7173
import java.lang.reflect.Type;
7274
import java.util.ArrayList;
@@ -5498,6 +5500,135 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
54985500
apiClient.executeAsync(call, localVarReturnType, callback);
54995501
return call;
55005502
}
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&#x3D;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&#x3D;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&lt;InlineResponse20015&gt;
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&#x3D;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+
}
55015632
/**
55025633
* Build call for getExports
55035634
* @param progressListener Progress listener
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
/*
2+
* Talon.One API
3+
* The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id` [updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put
4+
*
5+
* OpenAPI spec version: 1.0.0
6+
*
7+
*
8+
* NOTE: This class is auto generated by the swagger code generator program.
9+
* https://github.com/swagger-api/swagger-codegen.git
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
package one.talon.api.model;
15+
16+
import java.util.Objects;
17+
import com.google.gson.TypeAdapter;
18+
import com.google.gson.annotations.JsonAdapter;
19+
import com.google.gson.annotations.SerializedName;
20+
import com.google.gson.stream.JsonReader;
21+
import com.google.gson.stream.JsonWriter;
22+
import io.swagger.annotations.ApiModel;
23+
import io.swagger.annotations.ApiModelProperty;
24+
import java.io.IOException;
25+
import java.util.ArrayList;
26+
import java.util.List;
27+
28+
/**
29+
* Body18
30+
*/
31+
32+
public class Body18 {
33+
@SerializedName("attributes")
34+
private Object attributes = null;
35+
36+
@SerializedName("integrationIDs")
37+
private List<String> integrationIDs = null;
38+
39+
@SerializedName("profileIDs")
40+
private List<Integer> profileIDs = null;
41+
42+
public Body18 attributes(Object attributes) {
43+
this.attributes = attributes;
44+
return this;
45+
}
46+
47+
/**
48+
* Properties to match against a customer profile. All provided attributes will be exactly matched against profile attributes
49+
* @return attributes
50+
**/
51+
@ApiModelProperty(value = "Properties to match against a customer profile. All provided attributes will be exactly matched against profile attributes")
52+
public Object getAttributes() {
53+
return attributes;
54+
}
55+
56+
public void setAttributes(Object attributes) {
57+
this.attributes = attributes;
58+
}
59+
60+
public Body18 integrationIDs(List<String> integrationIDs) {
61+
this.integrationIDs = integrationIDs;
62+
return this;
63+
}
64+
65+
public Body18 addIntegrationIDsItem(String integrationIDsItem) {
66+
if (this.integrationIDs == null) {
67+
this.integrationIDs = new ArrayList<String>();
68+
}
69+
this.integrationIDs.add(integrationIDsItem);
70+
return this;
71+
}
72+
73+
/**
74+
* Get integrationIDs
75+
* @return integrationIDs
76+
**/
77+
@ApiModelProperty(value = "")
78+
public List<String> getIntegrationIDs() {
79+
return integrationIDs;
80+
}
81+
82+
public void setIntegrationIDs(List<String> integrationIDs) {
83+
this.integrationIDs = integrationIDs;
84+
}
85+
86+
public Body18 profileIDs(List<Integer> profileIDs) {
87+
this.profileIDs = profileIDs;
88+
return this;
89+
}
90+
91+
public Body18 addProfileIDsItem(Integer profileIDsItem) {
92+
if (this.profileIDs == null) {
93+
this.profileIDs = new ArrayList<Integer>();
94+
}
95+
this.profileIDs.add(profileIDsItem);
96+
return this;
97+
}
98+
99+
/**
100+
* Get profileIDs
101+
* @return profileIDs
102+
**/
103+
@ApiModelProperty(value = "")
104+
public List<Integer> getProfileIDs() {
105+
return profileIDs;
106+
}
107+
108+
public void setProfileIDs(List<Integer> profileIDs) {
109+
this.profileIDs = profileIDs;
110+
}
111+
112+
113+
@Override
114+
public boolean equals(java.lang.Object o) {
115+
if (this == o) {
116+
return true;
117+
}
118+
if (o == null || getClass() != o.getClass()) {
119+
return false;
120+
}
121+
Body18 body18 = (Body18) o;
122+
return Objects.equals(this.attributes, body18.attributes) &&
123+
Objects.equals(this.integrationIDs, body18.integrationIDs) &&
124+
Objects.equals(this.profileIDs, body18.profileIDs);
125+
}
126+
127+
@Override
128+
public int hashCode() {
129+
return Objects.hash(attributes, integrationIDs, profileIDs);
130+
}
131+
132+
133+
@Override
134+
public String toString() {
135+
StringBuilder sb = new StringBuilder();
136+
sb.append("class Body18 {\n");
137+
138+
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
139+
sb.append(" integrationIDs: ").append(toIndentedString(integrationIDs)).append("\n");
140+
sb.append(" profileIDs: ").append(toIndentedString(profileIDs)).append("\n");
141+
sb.append("}");
142+
return sb.toString();
143+
}
144+
145+
/**
146+
* Convert the given object to string with each line indented by 4 spaces
147+
* (except the first line).
148+
*/
149+
private String toIndentedString(java.lang.Object o) {
150+
if (o == null) {
151+
return "null";
152+
}
153+
return o.toString().replace("\n", "\n ");
154+
}
155+
156+
}
157+

0 commit comments

Comments
 (0)