{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/payments-service/pulls/comments/31076487","id":31076487,"diff_hunk":"@@ -0,0 +1,73 @@\n+import logging\n+\n+from payments_service import solitude\n+from payments_service.solitude import constants\n+\n+log = logging.getLogger(__name__)\n+\n+\n+class Transaction(object):\n+    key = 'transaction_pk'\n+\n+    def __init__(self, session):\n+        self.session = session\n+        self.id = self.session.get(self.key, None)\n+        self.api = solitude.api()\n+\n+    def create(self, user, plan_id, **kwargs):\n+        \"\"\"\n+        Creates the session in solitude and stores the id in the session.\n+        \"\"\"\n+        # For the moment, force a reset.","path":"payments_service/solitude/transaction.py","position":21,"original_position":21,"commit_id":"2e71e7005b44a5ce35f94dc0e440afbb0e79f600","original_commit_id":"2e71e7005b44a5ce35f94dc0e440afbb0e79f600","user":{"login":"kumar303","id":55398,"avatar_url":"https://avatars.githubusercontent.com/u/55398?v=3","gravatar_id":"","url":"https://api.github.com/users/kumar303","html_url":"https://github.com/kumar303","followers_url":"https://api.github.com/users/kumar303/followers","following_url":"https://api.github.com/users/kumar303/following{/other_user}","gists_url":"https://api.github.com/users/kumar303/gists{/gist_id}","starred_url":"https://api.github.com/users/kumar303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumar303/subscriptions","organizations_url":"https://api.github.com/users/kumar303/orgs","repos_url":"https://api.github.com/users/kumar303/repos","events_url":"https://api.github.com/users/kumar303/events{/privacy}","received_events_url":"https://api.github.com/users/kumar303/received_events","type":"User","site_admin":false},"body":"could this comment be more specific? It doesn't make sense to me that you'd need to clear the session before creation.","created_at":"2015-05-26T20:32:00Z","updated_at":"2015-05-26T20:32:00Z","html_url":"https://github.com/mozilla/payments-service/pull/30#discussion_r31076487","pull_request_url":"https://api.github.com/repos/mozilla/payments-service/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/mozilla/payments-service/pulls/comments/31076487"},"html":{"href":"https://github.com/mozilla/payments-service/pull/30#discussion_r31076487"},"pull_request":{"href":"https://api.github.com/repos/mozilla/payments-service/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/payments-service/pulls/30","id":36076432,"html_url":"https://github.com/mozilla/payments-service/pull/30","diff_url":"https://github.com/mozilla/payments-service/pull/30.diff","patch_url":"https://github.com/mozilla/payments-service/pull/30.patch","issue_url":"https://api.github.com/repos/mozilla/payments-service/issues/30","number":30,"state":"open","locked":false,"title":"remove uuid to pk lookup","user":{"login":"andymckay","id":74699,"avatar_url":"https://avatars.githubusercontent.com/u/74699?v=3","gravatar_id":"","url":"https://api.github.com/users/andymckay","html_url":"https://github.com/andymckay","followers_url":"https://api.github.com/users/andymckay/followers","following_url":"https://api.github.com/users/andymckay/following{/other_user}","gists_url":"https://api.github.com/users/andymckay/gists{/gist_id}","starred_url":"https://api.github.com/users/andymckay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andymckay/subscriptions","organizations_url":"https://api.github.com/users/andymckay/orgs","repos_url":"https://api.github.com/users/andymckay/repos","events_url":"https://api.github.com/users/andymckay/events{/privacy}","received_events_url":"https://api.github.com/users/andymckay/received_events","type":"User","site_admin":false},"body":"follow up to previous patch for #22, remove one get","created_at":"2015-05-22T23:22:19Z","updated_at":"2015-05-26T20:32:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f78f9bed1a1237c71dac5c42a75d6ebd4b5c1a15","assignee":{"login":"andymckay","id":74699,"avatar_url":"https://avatars.githubusercontent.com/u/74699?v=3","gravatar_id":"","url":"https://api.github.com/users/andymckay","html_url":"https://github.com/andymckay","followers_url":"https://api.github.com/users/andymckay/followers","following_url":"https://api.github.com/users/andymckay/following{/other_user}","gists_url":"https://api.github.com/users/andymckay/gists{/gist_id}","starred_url":"https://api.github.com/users/andymckay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andymckay/subscriptions","organizations_url":"https://api.github.com/users/andymckay/orgs","repos_url":"https://api.github.com/users/andymckay/repos","events_url":"https://api.github.com/users/andymckay/events{/privacy}","received_events_url":"https://api.github.com/users/andymckay/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/payments-service/pulls/30/commits","review_comments_url":"https://api.github.com/repos/mozilla/payments-service/pulls/30/comments","review_comment_url":"https://api.github.com/repos/mozilla/payments-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/payments-service/issues/30/comments","statuses_url":"https://api.github.com/repos/mozilla/payments-service/statuses/2e71e7005b44a5ce35f94dc0e440afbb0e79f600","head":{"label":"andymckay:add-transaction","ref":"add-transaction","sha":"2e71e7005b44a5ce35f94dc0e440afbb0e79f600","user":{"login":"andymckay","id":74699,"avatar_url":"https://avatars.githubusercontent.com/u/74699?v=3","gravatar_id":"","url":"https://api.github.com/users/andymckay","html_url":"https://github.com/andymckay","followers_url":"https://api.github.com/users/andymckay/followers","following_url":"https://api.github.com/users/andymckay/following{/other_user}","gists_url":"https://api.github.com/users/andymckay/gists{/gist_id}","starred_url":"https://api.github.com/users/andymckay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andymckay/subscriptions","organizations_url":"https://api.github.com/users/andymckay/orgs","repos_url":"https://api.github.com/users/andymckay/repos","events_url":"https://api.github.com/users/andymckay/events{/privacy}","received_events_url":"https://api.github.com/users/andymckay/received_events","type":"User","site_admin":false},"repo":{"id":35059753,"name":"payments-service","full_name":"andymckay/payments-service","owner":{"login":"andymckay","id":74699,"avatar_url":"https://avatars.githubusercontent.com/u/74699?v=3","gravatar_id":"","url":"https://api.github.com/users/andymckay","html_url":"https://github.com/andymckay","followers_url":"https://api.github.com/users/andymckay/followers","following_url":"https://api.github.com/users/andymckay/following{/other_user}","gists_url":"https://api.github.com/users/andymckay/gists{/gist_id}","starred_url":"https://api.github.com/users/andymckay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andymckay/subscriptions","organizations_url":"https://api.github.com/users/andymckay/orgs","repos_url":"https://api.github.com/users/andymckay/repos","events_url":"https://api.github.com/users/andymckay/events{/privacy}","received_events_url":"https://api.github.com/users/andymckay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andymckay/payments-service","description":"This is a web service to support the Mozilla Payments web UI.","fork":true,"url":"https://api.github.com/repos/andymckay/payments-service","forks_url":"https://api.github.com/repos/andymckay/payments-service/forks","keys_url":"https://api.github.com/repos/andymckay/payments-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andymckay/payments-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andymckay/payments-service/teams","hooks_url":"https://api.github.com/repos/andymckay/payments-service/hooks","issue_events_url":"https://api.github.com/repos/andymckay/payments-service/issues/events{/number}","events_url":"https://api.github.com/repos/andymckay/payments-service/events","assignees_url":"https://api.github.com/repos/andymckay/payments-service/assignees{/user}","branches_url":"https://api.github.com/repos/andymckay/payments-service/branches{/branch}","tags_url":"https://api.github.com/repos/andymckay/payments-service/tags","blobs_url":"https://api.github.com/repos/andymckay/payments-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andymckay/payments-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andymckay/payments-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/andymckay/payments-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andymckay/payments-service/statuses/{sha}","languages_url":"https://api.github.com/repos/andymckay/payments-service/languages","stargazers_url":"https://api.github.com/repos/andymckay/payments-service/stargazers","contributors_url":"https://api.github.com/repos/andymckay/payments-service/contributors","subscribers_url":"https://api.github.com/repos/andymckay/payments-service/subscribers","subscription_url":"https://api.github.com/repos/andymckay/payments-service/subscription","commits_url":"https://api.github.com/repos/andymckay/payments-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/andymckay/payments-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/andymckay/payments-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/andymckay/payments-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/andymckay/payments-service/contents/{+path}","compare_url":"https://api.github.com/repos/andymckay/payments-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andymckay/payments-service/merges","archive_url":"https://api.github.com/repos/andymckay/payments-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andymckay/payments-service/downloads","issues_url":"https://api.github.com/repos/andymckay/payments-service/issues{/number}","pulls_url":"https://api.github.com/repos/andymckay/payments-service/pulls{/number}","milestones_url":"https://api.github.com/repos/andymckay/payments-service/milestones{/number}","notifications_url":"https://api.github.com/repos/andymckay/payments-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andymckay/payments-service/labels{/name}","releases_url":"https://api.github.com/repos/andymckay/payments-service/releases{/id}","created_at":"2015-05-04T21:06:43Z","updated_at":"2015-05-04T21:06:44Z","pushed_at":"2015-05-26T20:24:21Z","git_url":"git://github.com/andymckay/payments-service.git","ssh_url":"git@github.com:andymckay/payments-service.git","clone_url":"https://github.com/andymckay/payments-service.git","svn_url":"https://github.com/andymckay/payments-service","homepage":null,"size":165,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"4877a3aae9c94e36fc7387a57c9584d0a8635f94","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":34482448,"name":"payments-service","full_name":"mozilla/payments-service","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/payments-service","description":"This is a web service to support the Mozilla Payments web UI.","fork":false,"url":"https://api.github.com/repos/mozilla/payments-service","forks_url":"https://api.github.com/repos/mozilla/payments-service/forks","keys_url":"https://api.github.com/repos/mozilla/payments-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/payments-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/payments-service/teams","hooks_url":"https://api.github.com/repos/mozilla/payments-service/hooks","issue_events_url":"https://api.github.com/repos/mozilla/payments-service/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/payments-service/events","assignees_url":"https://api.github.com/repos/mozilla/payments-service/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/payments-service/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/payments-service/tags","blobs_url":"https://api.github.com/repos/mozilla/payments-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/payments-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/payments-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/payments-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/payments-service/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/payments-service/languages","stargazers_url":"https://api.github.com/repos/mozilla/payments-service/stargazers","contributors_url":"https://api.github.com/repos/mozilla/payments-service/contributors","subscribers_url":"https://api.github.com/repos/mozilla/payments-service/subscribers","subscription_url":"https://api.github.com/repos/mozilla/payments-service/subscription","commits_url":"https://api.github.com/repos/mozilla/payments-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/payments-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/payments-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/payments-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/payments-service/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/payments-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/payments-service/merges","archive_url":"https://api.github.com/repos/mozilla/payments-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/payments-service/downloads","issues_url":"https://api.github.com/repos/mozilla/payments-service/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/payments-service/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/payments-service/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/payments-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/payments-service/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/payments-service/releases{/id}","created_at":"2015-04-23T21:26:30Z","updated_at":"2015-05-21T15:02:17Z","pushed_at":"2015-05-26T20:24:21Z","git_url":"git://github.com/mozilla/payments-service.git","ssh_url":"git@github.com:mozilla/payments-service.git","clone_url":"https://github.com/mozilla/payments-service.git","svn_url":"https://github.com/mozilla/payments-service","homepage":null,"size":530,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/payments-service/pulls/30"},"html":{"href":"https://github.com/mozilla/payments-service/pull/30"},"issue":{"href":"https://api.github.com/repos/mozilla/payments-service/issues/30"},"comments":{"href":"https://api.github.com/repos/mozilla/payments-service/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/payments-service/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/payments-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/payments-service/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/payments-service/statuses/2e71e7005b44a5ce35f94dc0e440afbb0e79f600"}}}}