{"action":"created","comment":{"url":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls/comments/68498800","id":68498800,"diff_hunk":"@@ -1,22 +1,57 @@\n-var standardBrexitOfferId = 'bb776c53-abdd-280d-4279-cd9aeb0257ff';\n+var standardBrexitOfferIdL = 'bb776c53-abdd-280d-4279-cd9aeb0257ff';\n+var standardBrexitOfferIdM = 'bb776c53-abdd-280d-4279-cd9aeb0257ff'; // TODO hardcode the right offerId\n+var standardBrexitOfferIdS = 'bb776c53-abdd-280d-4279-cd9aeb0257ff'; // TODO hardcode the right offerId\n+var standardBrexitOfferIdXS = 'bb776c53-abdd-280d-4279-cd9aeb0257ff'; // TODO hardcode the right offerId\n+\n+// MAKE ANY DISCOUNT CHANGES HERE\n+var discountL = .50\n+var discountM = .30;\n+var discountS = .25;\n+var discountXS = .10;\n+\n+var percent;\n \n module.exports = {\n-\tapplyDiscountToBarrierModel: function (barrier) {\n+\tapplyDiscountToBarrierModel: function (barrier, flags) {\n \t\tif (barrier.packages.standard) {\n+\n+\t\t\tvar standardBrexitOfferId;\n+\n+\t\t\tswitch(flags.brexitDiscountType) {","path":"server/lib/brexit.js","position":22,"original_position":22,"commit_id":"de2d629e12f28a362eb0dc25601f2acb4135fa5c","original_commit_id":"de2d629e12f28a362eb0dc25601f2acb4135fa5c","user":{"login":"lc512k","id":3425322,"avatar_url":"https://avatars.githubusercontent.com/u/3425322?v=3","gravatar_id":"","url":"https://api.github.com/users/lc512k","html_url":"https://github.com/lc512k","followers_url":"https://api.github.com/users/lc512k/followers","following_url":"https://api.github.com/users/lc512k/following{/other_user}","gists_url":"https://api.github.com/users/lc512k/gists{/gist_id}","starred_url":"https://api.github.com/users/lc512k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lc512k/subscriptions","organizations_url":"https://api.github.com/users/lc512k/orgs","repos_url":"https://api.github.com/users/lc512k/repos","events_url":"https://api.github.com/users/lc512k/events{/privacy}","received_events_url":"https://api.github.com/users/lc512k/received_events","type":"User","site_admin":false},"body":"`brexitDiscountType` is an AB test with multiple variants (XS, S, M, L). Depending on the variant the user falls into, they would see one offer or another.","created_at":"2016-06-26T07:32:18Z","updated_at":"2016-06-26T07:32:18Z","html_url":"https://github.com/Financial-Times/next-product-selector/pull/117#discussion_r68498800","pull_request_url":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls/117","_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls/comments/68498800"},"html":{"href":"https://github.com/Financial-Times/next-product-selector/pull/117#discussion_r68498800"},"pull_request":{"href":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls/117"}}},"pull_request":{"url":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls/117","id":75222463,"html_url":"https://github.com/Financial-Times/next-product-selector/pull/117","diff_url":"https://github.com/Financial-Times/next-product-selector/pull/117.diff","patch_url":"https://github.com/Financial-Times/next-product-selector/pull/117.patch","issue_url":"https://api.github.com/repos/Financial-Times/next-product-selector/issues/117","number":117,"state":"open","locked":false,"title":"multiple brexit offers","user":{"login":"lc512k","id":3425322,"avatar_url":"https://avatars.githubusercontent.com/u/3425322?v=3","gravatar_id":"","url":"https://api.github.com/users/lc512k","html_url":"https://github.com/lc512k","followers_url":"https://api.github.com/users/lc512k/followers","following_url":"https://api.github.com/users/lc512k/following{/other_user}","gists_url":"https://api.github.com/users/lc512k/gists{/gist_id}","starred_url":"https://api.github.com/users/lc512k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lc512k/subscriptions","organizations_url":"https://api.github.com/users/lc512k/orgs","repos_url":"https://api.github.com/users/lc512k/repos","events_url":"https://api.github.com/users/lc512k/events{/privacy}","received_events_url":"https://api.github.com/users/lc512k/received_events","type":"User","site_admin":false},"body":"@ifyio @commuterjoy This allows for an AB test of multiple brexit offers\r\n\r\nPending: \r\n- [ ] Hardcode the offer ids for each discounted offer\r\n- [x] Add discount images to next-assets or ~~refactor discount bubble to be css/svg rather than png, whatever's faster~~ https://github.com/Financial-Times/next-assets/pull/88","created_at":"2016-06-26T06:10:31Z","updated_at":"2016-06-26T07:32:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6877ecbb5c8f2361ce1d1ad4f882a095ce1c3f92","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls/117/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls/117/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/next-product-selector/issues/117/comments","statuses_url":"https://api.github.com/repos/Financial-Times/next-product-selector/statuses/de2d629e12f28a362eb0dc25601f2acb4135fa5c","head":{"label":"Financial-Times:multipleBrexitOffers","ref":"multipleBrexitOffers","sha":"de2d629e12f28a362eb0dc25601f2acb4135fa5c","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":37585014,"name":"next-product-selector","full_name":"Financial-Times/next-product-selector","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-product-selector","description":"","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-product-selector","forks_url":"https://api.github.com/repos/Financial-Times/next-product-selector/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-product-selector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-product-selector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-product-selector/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-product-selector/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-product-selector/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-product-selector/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-product-selector/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-product-selector/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-product-selector/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-product-selector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-product-selector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-product-selector/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-product-selector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-product-selector/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-product-selector/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-product-selector/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-product-selector/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-product-selector/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-product-selector/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-product-selector/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-product-selector/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-product-selector/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-product-selector/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-product-selector/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-product-selector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-product-selector/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-product-selector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-product-selector/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-product-selector/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-product-selector/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-product-selector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-product-selector/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-product-selector/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/next-product-selector/deployments","created_at":"2015-06-17T09:14:25Z","updated_at":"2016-06-02T16:02:25Z","pushed_at":"2016-06-26T07:01:57Z","git_url":"git://github.com/Financial-Times/next-product-selector.git","ssh_url":"git@github.com:Financial-Times/next-product-selector.git","clone_url":"https://github.com/Financial-Times/next-product-selector.git","svn_url":"https://github.com/Financial-Times/next-product-selector","homepage":null,"size":289,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"15ee56a95c210b6ddf68a28483738f52b3967069","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":37585014,"name":"next-product-selector","full_name":"Financial-Times/next-product-selector","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-product-selector","description":"","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-product-selector","forks_url":"https://api.github.com/repos/Financial-Times/next-product-selector/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-product-selector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-product-selector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-product-selector/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-product-selector/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-product-selector/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-product-selector/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-product-selector/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-product-selector/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-product-selector/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-product-selector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-product-selector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-product-selector/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-product-selector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-product-selector/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-product-selector/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-product-selector/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-product-selector/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-product-selector/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-product-selector/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-product-selector/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-product-selector/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-product-selector/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-product-selector/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-product-selector/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-product-selector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-product-selector/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-product-selector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-product-selector/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-product-selector/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-product-selector/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-product-selector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-product-selector/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-product-selector/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/next-product-selector/deployments","created_at":"2015-06-17T09:14:25Z","updated_at":"2016-06-02T16:02:25Z","pushed_at":"2016-06-26T07:01:57Z","git_url":"git://github.com/Financial-Times/next-product-selector.git","ssh_url":"git@github.com:Financial-Times/next-product-selector.git","clone_url":"https://github.com/Financial-Times/next-product-selector.git","svn_url":"https://github.com/Financial-Times/next-product-selector","homepage":null,"size":289,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls/117"},"html":{"href":"https://github.com/Financial-Times/next-product-selector/pull/117"},"issue":{"href":"https://api.github.com/repos/Financial-Times/next-product-selector/issues/117"},"comments":{"href":"https://api.github.com/repos/Financial-Times/next-product-selector/issues/117/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls/117/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/next-product-selector/pulls/117/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/next-product-selector/statuses/de2d629e12f28a362eb0dc25601f2acb4135fa5c"}}}}
{"actor":{"display_login":"lc512k"}}