diff --git a/src/v0/destinations/google_adwords_remarketing_lists/recordTransform.js b/src/v0/destinations/google_adwords_remarketing_lists/recordTransform.js index 18e7f96821..b05ddb07a2 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/recordTransform.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/recordTransform.js @@ -79,7 +79,7 @@ const processRecordEventArray = ( async function processRecordInputs(groupedRecordInputs) { const { destination, message, metadata } = groupedRecordInputs[0]; - const accessToken = getAccessToken(metadata, 'accessToken'); + const accessToken = getAccessToken(metadata, 'access_token'); const developerToken = getValueFromMessage(metadata, 'secret.developer_token'); const groupedRecordsByAction = lodash.groupBy(groupedRecordInputs, (record) => diff --git a/src/v0/destinations/google_adwords_remarketing_lists/transform.js b/src/v0/destinations/google_adwords_remarketing_lists/transform.js index d879a39c63..3deb9be775 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/transform.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/transform.js @@ -108,7 +108,7 @@ const processEvent = async (metadata, message, destination) => { ); } - const accessToken = getAccessToken(metadata, 'accessToken'); + const accessToken = getAccessToken(metadata, 'access_token'); const developerToken = getValueFromMessage(metadata, 'secret.developer_token'); Object.values(createdPayload).forEach((data) => { diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/processor/data.ts b/test/integrations/destinations/google_adwords_remarketing_lists/processor/data.ts index 639e28403c..83eae90aea 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/processor/data.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/processor/data.ts @@ -11,7 +11,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -120,7 +120,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -143,7 +143,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -239,7 +239,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -262,7 +262,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -358,7 +358,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -381,7 +381,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -456,7 +456,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -489,7 +489,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -546,7 +546,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -579,7 +579,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -635,7 +635,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -667,7 +667,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -711,7 +711,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -743,7 +743,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -807,7 +807,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -839,7 +839,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -2712,7 +2712,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -2735,7 +2735,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -2887,7 +2887,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -2967,7 +2967,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -2990,7 +2990,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -5400,7 +5400,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -6700,7 +6700,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -6723,7 +6723,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -6857,7 +6857,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -6880,7 +6880,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -6944,7 +6944,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -6977,7 +6977,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -9387,7 +9387,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -10687,7 +10687,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -10710,7 +10710,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -10862,7 +10862,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -10942,7 +10942,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -10965,7 +10965,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11115,7 +11115,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11190,7 +11190,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11213,7 +11213,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11316,7 +11316,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11419,7 +11419,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11523,7 +11523,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11546,7 +11546,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11661,7 +11661,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11684,7 +11684,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11799,7 +11799,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11822,7 +11822,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11942,7 +11942,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -11965,7 +11965,7 @@ export const data = [ { metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, @@ -12082,7 +12082,7 @@ export const data = [ }, metadata: { secret: { - accessToken: 'dummy-access', + access_token: 'dummy-access', refresh_token: 'dummy-refresh', developer_token: 'dummy-dev-token', }, diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts b/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts index 35da4daff5..a282b0a56c 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts @@ -79,7 +79,7 @@ export const data = [ destinationId: 'default-destinationId', dontBatch: false, secret: { - accessToken: 'default-accessToken', + access_token: 'default-accessToken', }, sourceId: 'default-sourceId', userId: 'default-userId', @@ -175,7 +175,7 @@ export const data = [ destinationId: 'default-destinationId', dontBatch: false, secret: { - accessToken: 'default-accessToken', + access_token: 'default-accessToken', }, sourceId: 'default-sourceId', userId: 'default-userId', @@ -322,7 +322,7 @@ export const data = [ destinationId: 'default-destinationId', dontBatch: false, secret: { - accessToken: 'default-accessToken', + access_token: 'default-accessToken', }, sourceId: 'default-sourceId', userId: 'default-userId', @@ -442,7 +442,7 @@ export const data = [ destinationId: 'default-destinationId', dontBatch: false, secret: { - accessToken: 'default-accessToken', + access_token: 'default-accessToken', }, sourceId: 'default-sourceId', userId: 'default-userId', @@ -558,7 +558,7 @@ export const data = [ destinationId: 'default-destinationId', dontBatch: false, secret: { - accessToken: 'default-accessToken', + access_token: 'default-accessToken', }, sourceId: 'default-sourceId', userId: 'default-userId', @@ -571,7 +571,7 @@ export const data = [ dontBatch: false, jobId: 3, secret: { - accessToken: 'default-accessToken', + access_token: 'default-accessToken', }, sourceId: 'default-sourceId', userId: 'default-userId', @@ -668,7 +668,7 @@ export const data = [ destinationId: 'default-destinationId', dontBatch: false, secret: { - accessToken: 'default-accessToken', + access_token: 'default-accessToken', }, sourceId: 'default-sourceId', userId: 'default-userId', @@ -711,7 +711,7 @@ export const data = [ destinationId: 'default-destinationId', dontBatch: false, secret: { - accessToken: 'default-accessToken', + access_token: 'default-accessToken', }, sourceId: 'default-sourceId', userId: 'default-userId', diff --git a/test/integrations/testUtils.ts b/test/integrations/testUtils.ts index a6f0720e37..833be04dec 100644 --- a/test/integrations/testUtils.ts +++ b/test/integrations/testUtils.ts @@ -573,6 +573,7 @@ export const generateMetadata = (jobId: number): any => { workspaceId: 'default-workspaceId', secret: { accessToken: 'default-accessToken', + access_token: 'default-accessToken', // applicable for google destinations }, dontBatch: false, };