Skip to content

Commit

Permalink
feat: google ads v14 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
aashishmalik committed Sep 10, 2023
1 parent b3c328e commit f5c3a16
Show file tree
Hide file tree
Showing 17 changed files with 96 additions and 96 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { getMappingConfig } = require('../../util');

const BASE_ENDPOINT = 'https://googleads.googleapis.com/v13/customers';
const BASE_ENDPOINT = 'https://googleads.googleapis.com/v14/customers';

const CONFIG_CATEGORIES = {
TRACK_CONFIG: { type: 'track', name: 'trackConfig' },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { getMappingConfig } = require('../../util');

const API_VERSION = 'v13';
const API_VERSION = 'v14';

const BASE_ENDPOINT = `https://googleads.googleapis.com/${API_VERSION}/customers/:customerId`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe('getExisitingUserIdentifier util tests', () => {
describe('getClickConversionPayloadAndEndpoint util tests', () => {
it('getClickConversionPayloadAndEndpoint flow check when default field identifier is present', () => {
let expectedOutput = {
endpoint: 'https://googleads.googleapis.com/v13/customers/9625812972:uploadClickConversions',
endpoint: 'https://googleads.googleapis.com/v14/customers/9625812972:uploadClickConversions',
payload: {
conversions: [
{
Expand All @@ -187,7 +187,7 @@ describe('getClickConversionPayloadAndEndpoint util tests', () => {
delete fittingPayload.traits.email;
delete fittingPayload.properties.email;
let expectedOutput = {
endpoint: 'https://googleads.googleapis.com/v13/customers/9625812972:uploadClickConversions',
endpoint: 'https://googleads.googleapis.com/v14/customers/9625812972:uploadClickConversions',
payload: {
conversions: [
{
Expand Down Expand Up @@ -215,7 +215,7 @@ describe('getClickConversionPayloadAndEndpoint util tests', () => {
delete fittingPayload.traits.phone;
delete fittingPayload.properties.email;
let expectedOutput = {
endpoint: 'https://googleads.googleapis.com/v13/customers/9625812972:uploadClickConversions',
endpoint: 'https://googleads.googleapis.com/v14/customers/9625812972:uploadClickConversions',
payload: {
conversions: [
{
Expand Down Expand Up @@ -251,7 +251,7 @@ describe('getClickConversionPayloadAndEndpoint util tests', () => {
},
];
let expectedOutput = {
endpoint: 'https://googleads.googleapis.com/v13/customers/9625812972:uploadClickConversions',
endpoint: 'https://googleads.googleapis.com/v14/customers/9625812972:uploadClickConversions',
payload: {
conversions: [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { getMappingConfig } = require('../../util');

const BASE_ENDPOINT = 'https://googleads.googleapis.com/v13/customers';
const BASE_ENDPOINT = 'https://googleads.googleapis.com/v14/customers';
const CONFIG_CATEGORIES = {
AUDIENCE_LIST: { type: 'audienceList', name: 'offlineDataJobs' },
ADDRESSINFO: { type: 'addressInfo', name: 'addressInfo' },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"https://googleads.googleapis.com/v13/customers/11122233331/offlineUserDataJobs:create": {
"https://googleads.googleapis.com/v14/customers/11122233331/offlineUserDataJobs:create": {
"data": {
"resourceName": "customers/111-222-3333/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID_FOR_ADD_FAILURE"
},
"status": 200
},
"https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs:create": {
"https://googleads.googleapis.com/v14/customers/1112223333/offlineUserDataJobs:create": {
"data": {
"resourceName": "customers/111-222-3333/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID"
},
"status": 200
},
"https://googleads.googleapis.com/v13/customers/customerid/offlineUserDataJobs:create": {
"https://googleads.googleapis.com/v14/customers/customerid/offlineUserDataJobs:create": {
"status": 401,
"data": {
"error": {
Expand All @@ -21,11 +21,11 @@
}
}
},
"https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID:addOperations": {
"https://googleads.googleapis.com/v14/customers/1112223333/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID:addOperations": {
"status": 200,
"data": {}
},
"https://googleads.googleapis.com/v13/customers/11122233331/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID_FOR_ADD_FAILURE:addOperations": {
"https://googleads.googleapis.com/v14/customers/11122233331/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID_FOR_ADD_FAILURE:addOperations": {
"status": 400,
"data": {
"error": {
Expand All @@ -34,7 +34,7 @@
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.ads.googleads.v13.errors.GoogleAdsFailure",
"@type": "type.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
Expand Down Expand Up @@ -67,13 +67,13 @@
}
}
},
"https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID:run": {
"https://googleads.googleapis.com/v14/customers/1112223333/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID:run": {
"status": 200,
"data": {
"name": "customers/111-222-3333/operations/abcd="
}
},
"https://googleads.googleapis.com/v13/customers/customerid/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID_ADD_FAILURE:addOperations": {
"https://googleads.googleapis.com/v14/customers/customerid/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID_ADD_FAILURE:addOperations": {
"status": 400,
"data": {
"error": {
Expand All @@ -82,7 +82,7 @@
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.ads.googleads.v13.errors.GoogleAdsFailure",
"@type": "type.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"https://googleads.googleapis.com/v13/customers/7693729833/offlineUserDataJobs:create": {
"https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs:create": {
"status": 200,
"data": {
"resourceName": "customers/9249589672/offlineUserDataJobs/18025019461"
}
},
"https://googleads.googleapis.com/v13/customers/7693729833/offlineUserDataJobs/18025019461:addOperations": {
"https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs/18025019461:addOperations": {
"status": 200
},
"https://googleads.googleapis.com/v13/customers/7693729833/offlineUserDataJobs/18025019461:run": {
"https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs/18025019461:run": {
"status": 200
},
"https://googleads.googleapis.com/v13/customers/7693729834/offlineUserDataJobs:create": {
"https://googleads.googleapis.com/v14/customers/7693729834/offlineUserDataJobs:create": {
"status": 200,
"data": {
"resourceName": "customers/9249589672/offlineUserDataJobs/18025019462"
}
},
"https://googleads.googleapis.com/v13/customers/7693729834/offlineUserDataJobs/18025019462:addOperations": {
"https://googleads.googleapis.com/v14/customers/7693729834/offlineUserDataJobs/18025019462:addOperations": {
"response": {
"data": {
"error": {
Expand Down Expand Up @@ -60,7 +60,7 @@
"status": 400
}
},
"https://googleads.googleapis.com/v13/customers/1234567890/googleAds:searchStream": {
"https://googleads.googleapis.com/v14/customers/1234567890/googleAds:searchStream": {
"response": {
"data": [
{
Expand All @@ -74,11 +74,11 @@
"status": 401
}
},
"https://googleads.googleapis.com/v13/customers/1234567899/googleAds:searchStream": {
"https://googleads.googleapis.com/v14/customers/1234567899/googleAds:searchStream": {
"response": "",
"code": "ECONNREFUSED"
},
"https://googleads.googleapis.com/v13/customers/1234567891/googleAds:searchStream": {
"https://googleads.googleapis.com/v14/customers/1234567891/googleAds:searchStream": {
"data": [
{
"results": [
Expand All @@ -95,7 +95,7 @@
],
"status": 200
},
"https://googleads.googleapis.com/v13/customers/1234567891:uploadConversionAdjustments": {
"https://googleads.googleapis.com/v14/customers/1234567891:uploadConversionAdjustments": {
"data": [
{
"adjustmentType": "ENHANCEMENT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1",
"type": "REST",
"method": "POST",
"endpoint": "https://googleads.googleapis.com/v13/customers/1234567890:uploadConversionAdjustments",
"endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments",
"headers": {
"Authorization": "Bearer abcd1234",
"Content-Type": "application/json",
Expand Down Expand Up @@ -91,7 +91,7 @@
"version": "1",
"type": "REST",
"method": "POST",
"endpoint": "https://googleads.googleapis.com/v13/customers/1234567890:uploadConversionAdjustments",
"endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments",
"headers": {
"Authorization": "Bearer abcd1234",
"Content-Type": "application/json",
Expand Down Expand Up @@ -204,7 +204,7 @@
"version": "1",
"type": "REST",
"method": "POST",
"endpoint": "https://googleads.googleapis.com/v13/customers/1234567890:uploadConversionAdjustments",
"endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments",
"headers": {
"Authorization": "Bearer abcd1234",
"Content-Type": "application/json",
Expand Down Expand Up @@ -260,7 +260,7 @@
"version": "1",
"type": "REST",
"method": "POST",
"endpoint": "https://googleads.googleapis.com/v13/customers/1234567890:uploadConversionAdjustments",
"endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments",
"headers": {
"Authorization": "Bearer abcd1234",
"Content-Type": "application/json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1",
"type": "REST",
"method": "POST",
"endpoint": "https://googleads.googleapis.com/v13/customers/1234567890:uploadConversionAdjustments",
"endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments",
"headers": {
"Authorization": "Bearer abcd1234",
"Content-Type": "application/json",
Expand Down Expand Up @@ -56,7 +56,7 @@
"version": "1",
"type": "REST",
"method": "POST",
"endpoint": "https://googleads.googleapis.com/v13/customers/1234567899:uploadConversionAdjustments",
"endpoint": "https://googleads.googleapis.com/v14/customers/1234567899:uploadConversionAdjustments",
"headers": {
"Authorization": "Bearer abcd1234",
"Content-Type": "application/json",
Expand Down Expand Up @@ -109,7 +109,7 @@
"version": "1",
"type": "REST",
"method": "POST",
"endpoint": "https://googleads.googleapis.com/v13/customers/1234567891:uploadConversionAdjustments",
"endpoint": "https://googleads.googleapis.com/v14/customers/1234567891:uploadConversionAdjustments",
"headers": {
"Authorization": "Bearer abcd1234",
"Content-Type": "application/json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "1",
"type": "REST",
"method": "POST",
"endpoint": "https://googleads.googleapis.com/v13/customers/1234567890:uploadConversionAdjustments",
"endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments",
"headers": {
"Authorization": "Bearer abcd1234",
"Content-Type": "application/json",
Expand Down
Loading

0 comments on commit f5c3a16

Please sign in to comment.