Skip to content

Commit 8c0ac78

Browse files
authored
Merge pull request #12 from square/release/5.2.2.20200422
5.2.2.20200422 release
2 parents 2086973 + 71c8787 commit 8c0ac78

File tree

7 files changed

+13
-45
lines changed

7 files changed

+13
-45
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.squareup</groupId>
66
<artifactId>square</artifactId>
7-
<version>5.2.1.20200422</version>
7+
<version>5.2.2.20200422</version>
88
<packaging>jar</packaging>
99

1010
<name>Square</name>
@@ -214,4 +214,4 @@
214214
<scope>test</scope>
215215
</dependency>
216216
</dependencies>
217-
</project>
217+
</project>

src/main/java/com/squareup/square/SquareClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ public Headers getAdditionalHeaders() {
435435
* @return sdkVersion
436436
*/
437437
public String getSdkVersion() {
438-
return "5.2.1.20200422";
438+
return "5.2.2.20200422";
439439
}
440440

441441
/**
@@ -586,4 +586,4 @@ public SquareClient build() {
586586
authManagers, httpCallback);
587587
}
588588
}
589-
}
589+
}

src/main/java/com/squareup/square/api/BaseApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public abstract class BaseApi {
2323
* Protected variables to hold an instance of Configuration
2424
*/
2525
protected final Configuration config;
26-
protected static final String userAgent = "Square-Java-SDK/5.2.1.20200422";
26+
protected static final String userAgent = "Square-Java-SDK/5.2.2.20200422";
2727

2828
/**
2929
* Protected variable to hold an instance of HttpCallback if the user provides it

src/main/java/com/squareup/square/api/CustomerGroupsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,4 +506,4 @@ private UpdateCustomerGroupResponse handleUpdateCustomerGroupResponse(HttpContex
506506
return result;
507507
}
508508

509-
}
509+
}

src/main/java/com/squareup/square/api/CustomerSegmentsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,4 +225,4 @@ private RetrieveCustomerSegmentResponse handleRetrieveCustomerSegmentResponse(Ht
225225
return result;
226226
}
227227

228-
}
228+
}

src/main/java/com/squareup/square/api/CustomersApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,4 +1045,4 @@ private AddGroupToCustomerResponse handleAddGroupToCustomerResponse(HttpContext
10451045
return result;
10461046
}
10471047

1048-
}
1048+
}

src/main/java/com/squareup/square/models/ObtainTokenRequest.java

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.squareup.square.models;
22

3-
import java.util.List;
43
import java.util.Objects;
54
import com.fasterxml.jackson.annotation.JsonCreator;
65
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -21,7 +20,6 @@ public class ObtainTokenRequest {
2120
* @param redirectUri
2221
* @param refreshToken
2322
* @param migrationToken
24-
* @param scopes
2523
*/
2624
@JsonCreator
2725
public ObtainTokenRequest(
@@ -31,16 +29,14 @@ public ObtainTokenRequest(
3129
@JsonProperty("code") String code,
3230
@JsonProperty("redirect_uri") String redirectUri,
3331
@JsonProperty("refresh_token") String refreshToken,
34-
@JsonProperty("migration_token") String migrationToken,
35-
@JsonProperty("scopes") List<String> scopes) {
32+
@JsonProperty("migration_token") String migrationToken) {
3633
this.clientId = clientId;
3734
this.clientSecret = clientSecret;
3835
this.code = code;
3936
this.redirectUri = redirectUri;
4037
this.grantType = grantType;
4138
this.refreshToken = refreshToken;
4239
this.migrationToken = migrationToken;
43-
this.scopes = scopes;
4440
}
4541

4642
private final String clientId;
@@ -50,7 +46,6 @@ public ObtainTokenRequest(
5046
private final String grantType;
5147
private final String refreshToken;
5248
private final String migrationToken;
53-
private final List<String> scopes;
5449
/**
5550
* Getter for ClientId.
5651
* The Square-issued ID of your application, available from the
@@ -125,25 +120,11 @@ public String getMigrationToken() {
125120
return this.migrationToken;
126121
}
127122

128-
/**
129-
* Getter for Scopes.
130-
* __OPTIONAL__
131-
* A JSON list of strings that are the permissions the application is requesting.
132-
* For example: "`["MERCHANT_PROFILE_READ","PAYMENTS_READ","BANK_ACCOUNTS_READ"]`"
133-
* The access token returned in the response will be granted the permissions
134-
* that comprise the intersection between the given list of permissions, and those
135-
* that belong to the provided refresh token.
136-
*/
137-
@JsonGetter("scopes")
138-
public List<String> getScopes() {
139-
return this.scopes;
140-
}
141-
142123

143124
@Override
144125
public int hashCode() {
145126
return Objects.hash(clientId, clientSecret, code, redirectUri, grantType, refreshToken,
146-
migrationToken, scopes);
127+
migrationToken);
147128
}
148129

149130
@Override
@@ -161,8 +142,7 @@ public boolean equals(Object obj) {
161142
Objects.equals(redirectUri, obtainTokenRequest.redirectUri) &&
162143
Objects.equals(grantType, obtainTokenRequest.grantType) &&
163144
Objects.equals(refreshToken, obtainTokenRequest.refreshToken) &&
164-
Objects.equals(migrationToken, obtainTokenRequest.migrationToken) &&
165-
Objects.equals(scopes, obtainTokenRequest.scopes);
145+
Objects.equals(migrationToken, obtainTokenRequest.migrationToken);
166146
}
167147

168148
/**
@@ -177,8 +157,7 @@ public Builder toBuilder() {
177157
.code(getCode())
178158
.redirectUri(getRedirectUri())
179159
.refreshToken(getRefreshToken())
180-
.migrationToken(getMigrationToken())
181-
.scopes(getScopes());
160+
.migrationToken(getMigrationToken());
182161
return builder;
183162
}
184163

@@ -193,7 +172,6 @@ public static class Builder {
193172
private String redirectUri;
194173
private String refreshToken;
195174
private String migrationToken;
196-
private List<String> scopes;
197175

198176
/**
199177
* Initialization constructor
@@ -269,15 +247,6 @@ public Builder migrationToken(String migrationToken) {
269247
this.migrationToken = migrationToken;
270248
return this;
271249
}
272-
/**
273-
* Setter for scopes
274-
* @param scopes
275-
* @return Builder
276-
*/
277-
public Builder scopes(List<String> scopes) {
278-
this.scopes = scopes;
279-
return this;
280-
}
281250

282251
/**
283252
* Builds a new {@link ObtainTokenRequest} object using the set fields.
@@ -290,8 +259,7 @@ public ObtainTokenRequest build() {
290259
code,
291260
redirectUri,
292261
refreshToken,
293-
migrationToken,
294-
scopes);
262+
migrationToken);
295263
}
296264
}
297265
}

0 commit comments

Comments
 (0)