{"action":"created","issue":{"url":"https://api.github.com/repos/guardian/content-authorisation-proxy/issues/33","labels_url":"https://api.github.com/repos/guardian/content-authorisation-proxy/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/guardian/content-authorisation-proxy/issues/33/comments","events_url":"https://api.github.com/repos/guardian/content-authorisation-proxy/issues/33/events","html_url":"https://github.com/guardian/content-authorisation-proxy/pull/33","id":104311510,"number":33,"title":"Refactor the Zuora service","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-01T16:59:56Z","updated_at":"2015-09-02T14:51:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/guardian/content-authorisation-proxy/pulls/33","html_url":"https://github.com/guardian/content-authorisation-proxy/pull/33","diff_url":"https://github.com/guardian/content-authorisation-proxy/pull/33.diff","patch_url":"https://github.com/guardian/content-authorisation-proxy/pull/33.patch"},"body":"This simplifies the `ZuoraService`. Previously, it contained\r\n\r\n- The `ZuoraSubscriptionService` class\r\n- The `ZuoraSubscriptionService` object\r\n- The `ZuoraClient` trait\r\n- The `ZuoraClient` object\r\n\r\nI kept:\r\n\r\n- The `ZuoraSubscriptionService` object\r\n- The `ZuoraClient` object\r\n\r\nThe superfluous structures where used to inject a fake `ZuoraClient` in order to test the service. However, only one simple behaviour was tested, so it created a lot of complexity for very little gain. I moved the only tested behaviour to the model package, using implicits to augment the `Contact` class.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/guardian/content-authorisation-proxy/issues/comments/137111189","html_url":"https://github.com/guardian/content-authorisation-proxy/pull/33#issuecomment-137111189","issue_url":"https://api.github.com/repos/guardian/content-authorisation-proxy/issues/33","id":137111189,"user":{"login":"tudorraul","id":1492162,"avatar_url":"https://avatars.githubusercontent.com/u/1492162?v=3","gravatar_id":"","url":"https://api.github.com/users/tudorraul","html_url":"https://github.com/tudorraul","followers_url":"https://api.github.com/users/tudorraul/followers","following_url":"https://api.github.com/users/tudorraul/following{/other_user}","gists_url":"https://api.github.com/users/tudorraul/gists{/gist_id}","starred_url":"https://api.github.com/users/tudorraul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tudorraul/subscriptions","organizations_url":"https://api.github.com/users/tudorraul/orgs","repos_url":"https://api.github.com/users/tudorraul/repos","events_url":"https://api.github.com/users/tudorraul/events{/privacy}","received_events_url":"https://api.github.com/users/tudorraul/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T14:51:59Z","updated_at":"2015-09-02T14:51:59Z","body":":+1: "}}