11package com .squareup .square .models ;
22
3- import java .util .List ;
43import java .util .Objects ;
54import com .fasterxml .jackson .annotation .JsonCreator ;
65import 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