{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/comments/33361370","id":33361370,"diff_hunk":"@@ -0,0 +1,40 @@\n+package touchpoint\n+\n+import com.gu.membership.salesforce.SalesforceConfig\n+import com.gu.membership.zuora.ZuoraApiConfig\n+import com.typesafe.scalalogging.LazyLogging\n+\n+case class TouchpointBackendConfig(salesforce: SalesforceConfig, zuora: ZuoraApiConfig)\n+\n+object TouchpointBackendConfig extends LazyLogging {\n+\n+  sealed abstract class BackendType(val name: String)\n+\n+  object BackendType {\n+\n+    object Default extends BackendType(\"default\")\n+\n+    object Testing extends BackendType(\"test\")\n+\n+  }\n+\n+  def byType(typ: BackendType = BackendType.Default, config: com.typesafe.config.Config) = {","path":"app/touchpoint/TouchpointBackendConfig.scala","position":null,"original_position":21,"commit_id":"fd76a0bc7c41c211dddadb98e6d71cea574722a1","original_commit_id":"6a03545eb632cf39ceb50921076103edf96e44f2","user":{"login":"jennysivapalan","id":944375,"avatar_url":"https://avatars.githubusercontent.com/u/944375?v=3","gravatar_id":"","url":"https://api.github.com/users/jennysivapalan","html_url":"https://github.com/jennysivapalan","followers_url":"https://api.github.com/users/jennysivapalan/followers","following_url":"https://api.github.com/users/jennysivapalan/following{/other_user}","gists_url":"https://api.github.com/users/jennysivapalan/gists{/gist_id}","starred_url":"https://api.github.com/users/jennysivapalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennysivapalan/subscriptions","organizations_url":"https://api.github.com/users/jennysivapalan/orgs","repos_url":"https://api.github.com/users/jennysivapalan/repos","events_url":"https://api.github.com/users/jennysivapalan/events{/privacy}","received_events_url":"https://api.github.com/users/jennysivapalan/received_events","type":"User","site_admin":false},"body":":+1: Done","created_at":"2015-06-26T14:39:35Z","updated_at":"2015-06-26T14:39:35Z","html_url":"https://github.com/guardian/subscriptions-frontend/pull/50#discussion_r33361370","pull_request_url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/comments/33361370"},"html":{"href":"https://github.com/guardian/subscriptions-frontend/pull/50#discussion_r33361370"},"pull_request":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/50","id":38456053,"html_url":"https://github.com/guardian/subscriptions-frontend/pull/50","diff_url":"https://github.com/guardian/subscriptions-frontend/pull/50.diff","patch_url":"https://github.com/guardian/subscriptions-frontend/pull/50.patch","issue_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/50","number":50,"state":"open","locked":false,"title":"Configuration for Touchpoint services - Salesforce and Zuora.","user":{"login":"jennysivapalan","id":944375,"avatar_url":"https://avatars.githubusercontent.com/u/944375?v=3","gravatar_id":"","url":"https://api.github.com/users/jennysivapalan","html_url":"https://github.com/jennysivapalan","followers_url":"https://api.github.com/users/jennysivapalan/followers","following_url":"https://api.github.com/users/jennysivapalan/following{/other_user}","gists_url":"https://api.github.com/users/jennysivapalan/gists{/gist_id}","starred_url":"https://api.github.com/users/jennysivapalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennysivapalan/subscriptions","organizations_url":"https://api.github.com/users/jennysivapalan/orgs","repos_url":"https://api.github.com/users/jennysivapalan/repos","events_url":"https://api.github.com/users/jennysivapalan/events{/privacy}","received_events_url":"https://api.github.com/users/jennysivapalan/received_events","type":"User","site_admin":false},"body":"This PR creates a TouchpointBackend class that we can use to encapsulate the Zuora and Salesforce services. I haven't included it as part of this PR but from here we can add test users quite simply and switch between DEV and UAT (or PROD and UAT).\r\n\r\nI've done this now as it will make it easier to implement the Zuora code. I tried to make use of classes in Membership common, specifically: https://github.com/guardian/membership-common/blob/master/src/main/scala/com/gu/membership/touchpoint/TouchpointBackendConfig.scala and https://github.com/guardian/membership-common/blob/master/src/main/scala/com/gu/membership/zuora/ZuoraApiConfig.scala however these are very coupled to Membership. So for now I've duplicated these and removed the elements we do not need.\r\n\r\n ZuoraService, it currently just pings an empty auth request. My next PR will address this.\r\n\r\nBefore merging I will need to update the PROD private properties (I'll keep PROD pointing to DEV until I have the correct credentials in place).","created_at":"2015-06-24T15:42:08Z","updated_at":"2015-06-26T14:39:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24a2d58ae5de3cde349ac4043ebe8bf1614cc68c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/50/commits","review_comments_url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/50/comments","review_comment_url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/50/comments","statuses_url":"https://api.github.com/repos/guardian/subscriptions-frontend/statuses/fd76a0bc7c41c211dddadb98e6d71cea574722a1","head":{"label":"guardian:touchpoint-config","ref":"touchpoint-config","sha":"fd76a0bc7c41c211dddadb98e6d71cea574722a1","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":34392023,"name":"subscriptions-frontend","full_name":"guardian/subscriptions-frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/subscriptions-frontend","description":"","fork":false,"url":"https://api.github.com/repos/guardian/subscriptions-frontend","forks_url":"https://api.github.com/repos/guardian/subscriptions-frontend/forks","keys_url":"https://api.github.com/repos/guardian/subscriptions-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/subscriptions-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/subscriptions-frontend/teams","hooks_url":"https://api.github.com/repos/guardian/subscriptions-frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/subscriptions-frontend/events","assignees_url":"https://api.github.com/repos/guardian/subscriptions-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/subscriptions-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/subscriptions-frontend/tags","blobs_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/subscriptions-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/subscriptions-frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/subscriptions-frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/subscriptions-frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/subscriptions-frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/subscriptions-frontend/subscription","commits_url":"https://api.github.com/repos/guardian/subscriptions-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/subscriptions-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/subscriptions-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/subscriptions-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/subscriptions-frontend/merges","archive_url":"https://api.github.com/repos/guardian/subscriptions-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/subscriptions-frontend/downloads","issues_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/subscriptions-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/subscriptions-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/subscriptions-frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/subscriptions-frontend/releases{/id}","created_at":"2015-04-22T13:30:13Z","updated_at":"2015-06-08T09:08:52Z","pushed_at":"2015-06-26T14:39:04Z","git_url":"git://github.com/guardian/subscriptions-frontend.git","ssh_url":"git@github.com:guardian/subscriptions-frontend.git","clone_url":"https://github.com/guardian/subscriptions-frontend.git","svn_url":"https://github.com/guardian/subscriptions-frontend","homepage":"https://sites.google.com/a/guardian.co.uk/guardian-subscriptions/","size":3128,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"71178e62fc7e6a54fa66d9d9db8dd6e121295afa","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":34392023,"name":"subscriptions-frontend","full_name":"guardian/subscriptions-frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/subscriptions-frontend","description":"","fork":false,"url":"https://api.github.com/repos/guardian/subscriptions-frontend","forks_url":"https://api.github.com/repos/guardian/subscriptions-frontend/forks","keys_url":"https://api.github.com/repos/guardian/subscriptions-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/subscriptions-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/subscriptions-frontend/teams","hooks_url":"https://api.github.com/repos/guardian/subscriptions-frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/subscriptions-frontend/events","assignees_url":"https://api.github.com/repos/guardian/subscriptions-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/subscriptions-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/subscriptions-frontend/tags","blobs_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/subscriptions-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/subscriptions-frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/subscriptions-frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/subscriptions-frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/subscriptions-frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/subscriptions-frontend/subscription","commits_url":"https://api.github.com/repos/guardian/subscriptions-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/subscriptions-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/subscriptions-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/subscriptions-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/subscriptions-frontend/merges","archive_url":"https://api.github.com/repos/guardian/subscriptions-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/subscriptions-frontend/downloads","issues_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/subscriptions-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/subscriptions-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/subscriptions-frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/subscriptions-frontend/releases{/id}","created_at":"2015-04-22T13:30:13Z","updated_at":"2015-06-08T09:08:52Z","pushed_at":"2015-06-26T14:39:04Z","git_url":"git://github.com/guardian/subscriptions-frontend.git","ssh_url":"git@github.com:guardian/subscriptions-frontend.git","clone_url":"https://github.com/guardian/subscriptions-frontend.git","svn_url":"https://github.com/guardian/subscriptions-frontend","homepage":"https://sites.google.com/a/guardian.co.uk/guardian-subscriptions/","size":3128,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/50"},"html":{"href":"https://github.com/guardian/subscriptions-frontend/pull/50"},"issue":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/50"},"comments":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/statuses/fd76a0bc7c41c211dddadb98e6d71cea574722a1"}}}}