Skip to content

Commit

Permalink
fix master formatting (#9571)
Browse files Browse the repository at this point in the history
  • Loading branch information
subodh1810 authored Jan 18, 2022
1 parent 6b502d8 commit c4b365c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,4 @@
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@
public class SquareOAuthFlow extends BaseOAuth2Flow {

private static final List<String> SCOPES = Arrays.asList(
"CUSTOMERS_READ",
"EMPLOYEES_READ",
"ITEMS_READ",
"MERCHANT_PROFILE_READ",
"ORDERS_READ",
"PAYMENTS_READ",
"TIMECARDS_READ"
// OAuth Permissions:
// https://developer.squareup.com/docs/oauth-api/square-permissions
// https://developer.squareup.com/reference/square/enums/OAuthPermission
// "DISPUTES_READ",
// "GIFTCARDS_READ",
// "INVENTORY_READ",
// "INVOICES_READ",
// "TIMECARDS_SETTINGS_READ",
// "LOYALTY_READ",
// "ONLINE_STORE_SITE_READ",
// "ONLINE_STORE_SNIPPETS_READ",
// "SUBSCRIPTIONS_READ",
"CUSTOMERS_READ",
"EMPLOYEES_READ",
"ITEMS_READ",
"MERCHANT_PROFILE_READ",
"ORDERS_READ",
"PAYMENTS_READ",
"TIMECARDS_READ"
// OAuth Permissions:
// https://developer.squareup.com/docs/oauth-api/square-permissions
// https://developer.squareup.com/reference/square/enums/OAuthPermission
// "DISPUTES_READ",
// "GIFTCARDS_READ",
// "INVENTORY_READ",
// "INVOICES_READ",
// "TIMECARDS_SETTINGS_READ",
// "LOYALTY_READ",
// "ONLINE_STORE_SITE_READ",
// "ONLINE_STORE_SNIPPETS_READ",
// "SUBSCRIPTIONS_READ",
);
private static final String AUTHORIZE_URL = "https://connect.squareup.com/oauth2/authorize";
private static final String ACCESS_TOKEN_URL = "https://connect.squareup.com/oauth2/token";
Expand Down Expand Up @@ -89,8 +89,8 @@ protected Map<String, String> getAccessTokenQueryParameters(String clientId,
String authCode,
String redirectUrl) {
String scopes = SCOPES.stream()
.map(name -> ('"' + name + '"'))
.collect(Collectors.joining(","));
.map(name -> ('"' + name + '"'))
.collect(Collectors.joining(","));
scopes = '[' + scopes + ']';

return ImmutableMap.<String, String>builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ protected BaseOAuthFlow getOAuthFlow() {
@Override
protected String getExpectedConsentUrl() {
return "https://connect.squareup.com/oauth2/authorize?client_id=test_client_id" +
"&scope=CUSTOMERS_READ+EMPLOYEES_READ+ITEMS_READ+MERCHANT_PROFILE_READ+ORDERS_READ+PAYMENTS_READ+TIMECARDS_READ" +
"&session=False&state=state";
"&scope=CUSTOMERS_READ+EMPLOYEES_READ+ITEMS_READ+MERCHANT_PROFILE_READ+ORDERS_READ+PAYMENTS_READ+TIMECARDS_READ" +
"&session=False&state=state";
}

}

0 comments on commit c4b365c

Please sign in to comment.