facebook / facebook-nodejs-business-sdk

Node.js SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
489 stars 226 forks source link

feat: add advertiser_tracking_enabled to server-event #249

Closed willgardner9 closed 1 year ago

willgardner9 commented 1 year ago

Fixes #233. This PR adds the setAdvertiserTrackingEnabled(advertiser_tracking_enabled: boolean) method to the ServerEvent class.

I have not added any new tests, following the style of code/test in other methods of the ServerEvent class. If you would like tests to be added, please let me know!

There is a pre-existing failing test in unchanged code:

 FAIL  __tests__/signal.test.js
  ● Signal Data › Event › Event creation

    ReferenceError: data_processing_options_state is not defined

      at ServerEvent.data_processing_options_state (dist/objects/serverside/server-event.js:381:41)
      at Event.setDataProcessingOptionsState (dist/objects/signal/event.js:348:9)
      at Object.setDataProcessingOptionsState (__tests__/signal.test.js:394:18)

I attempted to run the semistandard linter, but it ended up with changes to every single src file -- not sure if there is a config error in the repo somewhere?

Thanks! 😄

facebook-github-bot commented 1 year ago

@stcheng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 year ago

@stcheng merged this pull request in facebook/facebook-nodejs-business-sdk@0aabff622904d0b8f54679083f72f2194f700b50.

stcheng commented 1 year ago

@willgardner9 the test failure is addressed in https://github.com/facebook/facebook-nodejs-business-sdk/commit/ca9f6f7f94e4d48908948db906543cdbebdc3290