Skip to content

Instantly share code, notes, and snippets.

@micha
Created February 7, 2019 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micha/7720f09b745eae458f0365bd6d87758d to your computer and use it in GitHub Desktop.
Save micha/7720f09b745eae458f0365bd6d87758d to your computer and use it in GitHub Desktop.
class BalanceNotification
# @property [Number] The id of the ad
adId: undefined
# @property [Date] The time of the balance the notification correspnds to
time: undefined
# @property [Number] the number of impressions projected to be available for the remainder of the ad
projectedImpressions: undefined
# @property [String] a description of the current status
status: undefined
# @property [Number] the number of impression served so far
servedImpressions: undefined
# @property [Number] the number of clicks served so far
servedClicks: undefined
# @property [Number] the number of conversions served so far
servedConversions: undefined
# @property [Number] the number of impressions needed to complete goal
remainingImpressions: undefined
# @property [Number] the projected eCPM for the ad
ecpm: undefined
# @property [Boolean] indicates whether this notification should not be sent to Var
suppress: undefined
toJSON: ->
{
@adId
time: @time.toUTCString()
@projectedImpressions
@status
@servedImpressions
@servedClicks
@servedConversions
@remainingImpressions
@ecpm
}
module.exports = BalanceNotification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment