From c4b365ccc8fa54238046cbb3f735070a6a402b6e Mon Sep 17 00:00:00 2001 From: Subodh Kant Chaturvedi Date: Tue, 18 Jan 2022 17:38:38 +0530 Subject: [PATCH] fix master formatting (#9571) --- .../source-square/source_square/spec.json | 1 - .../airbyte/oauth/flows/SquareOAuthFlow.java | 42 +++++++++---------- .../oauth/flows/SquareOAuthFlowTest.java | 4 +- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/airbyte-integrations/connectors/source-square/source_square/spec.json b/airbyte-integrations/connectors/source-square/source_square/spec.json index 23c77b753f8f..f8719f27c062 100644 --- a/airbyte-integrations/connectors/source-square/source_square/spec.json +++ b/airbyte-integrations/connectors/source-square/source_square/spec.json @@ -145,5 +145,4 @@ } } } - } diff --git a/airbyte-oauth/src/main/java/io/airbyte/oauth/flows/SquareOAuthFlow.java b/airbyte-oauth/src/main/java/io/airbyte/oauth/flows/SquareOAuthFlow.java index 1e9d821a67a1..674efdd4d0f4 100644 --- a/airbyte-oauth/src/main/java/io/airbyte/oauth/flows/SquareOAuthFlow.java +++ b/airbyte-oauth/src/main/java/io/airbyte/oauth/flows/SquareOAuthFlow.java @@ -25,25 +25,25 @@ public class SquareOAuthFlow extends BaseOAuth2Flow { private static final List 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"; @@ -89,8 +89,8 @@ protected Map 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.builder() diff --git a/airbyte-oauth/src/test/java/io/airbyte/oauth/flows/SquareOAuthFlowTest.java b/airbyte-oauth/src/test/java/io/airbyte/oauth/flows/SquareOAuthFlowTest.java index 5c54891086a5..54f981a30371 100644 --- a/airbyte-oauth/src/test/java/io/airbyte/oauth/flows/SquareOAuthFlowTest.java +++ b/airbyte-oauth/src/test/java/io/airbyte/oauth/flows/SquareOAuthFlowTest.java @@ -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"; } }