{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/membership-frontend/pulls/comments/44953156","id":44953156,"diff_hunk":"@@ -108,11 +108,15 @@ class SubscriptionService(val zuoraSoapClient: soap.ClientWithFeatureSupplier,\n   implicit private val _bt = bt\n \n   val membershipCatalog: FutureSupplier[MembershipCatalog] = new FutureSupplier[MembershipCatalog](\n-    for {\n-      zuoraCatalog <- zuoraRestClient.productCatalog\n-    } yield MembershipCatalog.unsafeFromZuora(ratePlanIds)(zuoraCatalog.products.flatMap(_.productRatePlans))\n+    productRatePlans.map(MembershipCatalog.unsafeFromZuora(ratePlanIds))\n   )\n \n+  def productRatePlans: Future[Seq[rest.ProductRatePlan]] =\n+     zuoraRestClient.productCatalog.map(_.products.flatMap(_.productRatePlans))\n+\n+  def makeMembershipCatalog(): Future[MembershipCatalog.Val[MembershipCatalog]] =","path":"frontend/app/services/SubscriptionService.scala","position":22,"original_position":22,"commit_id":"65ef722e5a89dd314a9653d2a2107d314b95e394","original_commit_id":"65ef722e5a89dd314a9653d2a2107d314b95e394","user":{"login":"afiore","id":63361,"avatar_url":"https://avatars.githubusercontent.com/u/63361?v=3","gravatar_id":"","url":"https://api.github.com/users/afiore","html_url":"https://github.com/afiore","followers_url":"https://api.github.com/users/afiore/followers","following_url":"https://api.github.com/users/afiore/following{/other_user}","gists_url":"https://api.github.com/users/afiore/gists{/gist_id}","starred_url":"https://api.github.com/users/afiore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afiore/subscriptions","organizations_url":"https://api.github.com/users/afiore/orgs","repos_url":"https://api.github.com/users/afiore/repos","events_url":"https://api.github.com/users/afiore/events{/privacy}","received_events_url":"https://api.github.com/users/afiore/received_events","type":"User","site_admin":false},"body":"Not sure about this name. `makeMembershipCatalog` suggest some side effects, like persisting a record or similar...","created_at":"2015-11-16T17:22:46Z","updated_at":"2015-11-16T17:22:46Z","html_url":"https://github.com/guardian/membership-frontend/pull/861#discussion_r44953156","pull_request_url":"https://api.github.com/repos/guardian/membership-frontend/pulls/861","_links":{"self":{"href":"https://api.github.com/repos/guardian/membership-frontend/pulls/comments/44953156"},"html":{"href":"https://github.com/guardian/membership-frontend/pull/861#discussion_r44953156"},"pull_request":{"href":"https://api.github.com/repos/guardian/membership-frontend/pulls/861"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/membership-frontend/pulls/861","id":50839100,"html_url":"https://github.com/guardian/membership-frontend/pull/861","diff_url":"https://github.com/guardian/membership-frontend/pull/861.diff","patch_url":"https://github.com/guardian/membership-frontend/pull/861.patch","issue_url":"https://api.github.com/repos/guardian/membership-frontend/issues/861","number":861,"state":"open","locked":false,"title":"Add diagnostic endpoint","user":{"login":"ostapneko","id":1781471,"avatar_url":"https://avatars.githubusercontent.com/u/1781471?v=3","gravatar_id":"","url":"https://api.github.com/users/ostapneko","html_url":"https://github.com/ostapneko","followers_url":"https://api.github.com/users/ostapneko/followers","following_url":"https://api.github.com/users/ostapneko/following{/other_user}","gists_url":"https://api.github.com/users/ostapneko/gists{/gist_id}","starred_url":"https://api.github.com/users/ostapneko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ostapneko/subscriptions","organizations_url":"https://api.github.com/users/ostapneko/orgs","repos_url":"https://api.github.com/users/ostapneko/repos","events_url":"https://api.github.com/users/ostapneko/events{/privacy}","received_events_url":"https://api.github.com/users/ostapneko/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-16T17:20:40Z","updated_at":"2015-11-16T17:22:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a9c9783142bbf8b7a9e917fe8728fc18d167a50","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/membership-frontend/pulls/861/commits","review_comments_url":"https://api.github.com/repos/guardian/membership-frontend/pulls/861/comments","review_comment_url":"https://api.github.com/repos/guardian/membership-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/membership-frontend/issues/861/comments","statuses_url":"https://api.github.com/repos/guardian/membership-frontend/statuses/65ef722e5a89dd314a9653d2a2107d314b95e394","head":{"label":"guardian:refactor-catalog-diagnostics","ref":"refactor-catalog-diagnostics","sha":"65ef722e5a89dd314a9653d2a2107d314b95e394","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":28401521,"name":"membership-frontend","full_name":"guardian/membership-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/membership-frontend","description":"Bringing the Guardian to life through live events and meet-ups","fork":false,"url":"https://api.github.com/repos/guardian/membership-frontend","forks_url":"https://api.github.com/repos/guardian/membership-frontend/forks","keys_url":"https://api.github.com/repos/guardian/membership-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/membership-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/membership-frontend/teams","hooks_url":"https://api.github.com/repos/guardian/membership-frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/membership-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/membership-frontend/events","assignees_url":"https://api.github.com/repos/guardian/membership-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/membership-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/membership-frontend/tags","blobs_url":"https://api.github.com/repos/guardian/membership-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/membership-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/membership-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/membership-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/membership-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/membership-frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/membership-frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/membership-frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/membership-frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/membership-frontend/subscription","commits_url":"https://api.github.com/repos/guardian/membership-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/membership-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/membership-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/membership-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/membership-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/membership-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/membership-frontend/merges","archive_url":"https://api.github.com/repos/guardian/membership-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/membership-frontend/downloads","issues_url":"https://api.github.com/repos/guardian/membership-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/membership-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/membership-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/membership-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/membership-frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/membership-frontend/releases{/id}","created_at":"2014-12-23T14:14:38Z","updated_at":"2015-11-12T11:35:55Z","pushed_at":"2015-11-16T17:20:40Z","git_url":"git://github.com/guardian/membership-frontend.git","ssh_url":"git@github.com:guardian/membership-frontend.git","clone_url":"https://github.com/guardian/membership-frontend.git","svn_url":"https://github.com/guardian/membership-frontend","homepage":"https://membership.theguardian.com/","size":46388,"stargazers_count":17,"watchers_count":17,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":7,"forks":8,"open_issues":7,"watchers":17,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"ab4c718e8b610dc6b7f24aff481d36d06fb5480d","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":28401521,"name":"membership-frontend","full_name":"guardian/membership-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/membership-frontend","description":"Bringing the Guardian to life through live events and meet-ups","fork":false,"url":"https://api.github.com/repos/guardian/membership-frontend","forks_url":"https://api.github.com/repos/guardian/membership-frontend/forks","keys_url":"https://api.github.com/repos/guardian/membership-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/membership-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/membership-frontend/teams","hooks_url":"https://api.github.com/repos/guardian/membership-frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/membership-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/membership-frontend/events","assignees_url":"https://api.github.com/repos/guardian/membership-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/membership-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/membership-frontend/tags","blobs_url":"https://api.github.com/repos/guardian/membership-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/membership-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/membership-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/membership-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/membership-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/membership-frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/membership-frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/membership-frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/membership-frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/membership-frontend/subscription","commits_url":"https://api.github.com/repos/guardian/membership-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/membership-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/membership-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/membership-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/membership-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/membership-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/membership-frontend/merges","archive_url":"https://api.github.com/repos/guardian/membership-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/membership-frontend/downloads","issues_url":"https://api.github.com/repos/guardian/membership-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/membership-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/membership-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/membership-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/membership-frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/membership-frontend/releases{/id}","created_at":"2014-12-23T14:14:38Z","updated_at":"2015-11-12T11:35:55Z","pushed_at":"2015-11-16T17:20:40Z","git_url":"git://github.com/guardian/membership-frontend.git","ssh_url":"git@github.com:guardian/membership-frontend.git","clone_url":"https://github.com/guardian/membership-frontend.git","svn_url":"https://github.com/guardian/membership-frontend","homepage":"https://membership.theguardian.com/","size":46388,"stargazers_count":17,"watchers_count":17,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":7,"forks":8,"open_issues":7,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/membership-frontend/pulls/861"},"html":{"href":"https://github.com/guardian/membership-frontend/pull/861"},"issue":{"href":"https://api.github.com/repos/guardian/membership-frontend/issues/861"},"comments":{"href":"https://api.github.com/repos/guardian/membership-frontend/issues/861/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/membership-frontend/pulls/861/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/membership-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/membership-frontend/pulls/861/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/membership-frontend/statuses/65ef722e5a89dd314a9653d2a2107d314b95e394"}}}}