{"action":"created","comment":{"url":"https://api.github.com/repos/praekelt/vumi-go/pulls/comments/24316905","id":24316905,"diff_hunk":"@@ -228,34 +244,49 @@ def create_transaction_interaction(self, cursor, account_number,\n         session_credits = MessageCost.calculate_session_credit_cost(\n             session_cost, markup_percent)\n \n+        session_unit_credits = MessageCost.calculate_session_unit_credit_cost(\n+            session_unit_cost, markup_percent)","path":"go/billing/api.py","position":136,"original_position":136,"commit_id":"bf4a58f18a31e826adde72f0652ab5f0d9249aa5","original_commit_id":"bf4a58f18a31e826adde72f0652ab5f0d9249aa5","user":{"login":"justinvdm","id":1731223,"avatar_url":"https://avatars.githubusercontent.com/u/1731223?v=3","gravatar_id":"","url":"https://api.github.com/users/justinvdm","html_url":"https://github.com/justinvdm","followers_url":"https://api.github.com/users/justinvdm/followers","following_url":"https://api.github.com/users/justinvdm/following{/other_user}","gists_url":"https://api.github.com/users/justinvdm/gists{/gist_id}","starred_url":"https://api.github.com/users/justinvdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinvdm/subscriptions","organizations_url":"https://api.github.com/users/justinvdm/orgs","repos_url":"https://api.github.com/users/justinvdm/repos","events_url":"https://api.github.com/users/justinvdm/events{/privacy}","received_events_url":"https://api.github.com/users/justinvdm/received_events","type":"User","site_admin":false},"body":"Ya, their isn't any transaction cost associated to it, since the unit cost is a preliminary step for working out the session length cost. We have a corresponding credit field for every other cost field, so I added it for the sake of completeness. It might also be useful for auditing purposes, though that's a bit of a guess. Not really against removing it, but wondering if there is any reason to remove it. I guess we'd be storing slightly less things, not sure if that's important. Any other reasons?","created_at":"2015-02-09T09:41:34Z","updated_at":"2015-02-09T09:41:34Z","html_url":"https://github.com/praekelt/vumi-go/pull/1177#discussion_r24316905","pull_request_url":"https://api.github.com/repos/praekelt/vumi-go/pulls/1177","_links":{"self":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/comments/24316905"},"html":{"href":"https://github.com/praekelt/vumi-go/pull/1177#discussion_r24316905"},"pull_request":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/1177"}}},"pull_request":{"url":"https://api.github.com/repos/praekelt/vumi-go/pulls/1177","id":28815608,"html_url":"https://github.com/praekelt/vumi-go/pull/1177","diff_url":"https://github.com/praekelt/vumi-go/pull/1177.diff","patch_url":"https://github.com/praekelt/vumi-go/pull/1177.patch","issue_url":"https://api.github.com/repos/praekelt/vumi-go/issues/1177","number":1177,"state":"open","locked":false,"title":"Support session length cost in billing api","user":{"login":"justinvdm","id":1731223,"avatar_url":"https://avatars.githubusercontent.com/u/1731223?v=3","gravatar_id":"","url":"https://api.github.com/users/justinvdm","html_url":"https://github.com/justinvdm","followers_url":"https://api.github.com/users/justinvdm/followers","following_url":"https://api.github.com/users/justinvdm/following{/other_user}","gists_url":"https://api.github.com/users/justinvdm/gists{/gist_id}","starred_url":"https://api.github.com/users/justinvdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinvdm/subscriptions","organizations_url":"https://api.github.com/users/justinvdm/orgs","repos_url":"https://api.github.com/users/justinvdm/repos","events_url":"https://api.github.com/users/justinvdm/events{/privacy}","received_events_url":"https://api.github.com/users/justinvdm/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-06T15:17:22Z","updated_at":"2015-02-09T09:41:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ade6411c1ca15ffd833f6ff496b6863a13a6e5a4","assignee":{"login":"justinvdm","id":1731223,"avatar_url":"https://avatars.githubusercontent.com/u/1731223?v=3","gravatar_id":"","url":"https://api.github.com/users/justinvdm","html_url":"https://github.com/justinvdm","followers_url":"https://api.github.com/users/justinvdm/followers","following_url":"https://api.github.com/users/justinvdm/following{/other_user}","gists_url":"https://api.github.com/users/justinvdm/gists{/gist_id}","starred_url":"https://api.github.com/users/justinvdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinvdm/subscriptions","organizations_url":"https://api.github.com/users/justinvdm/orgs","repos_url":"https://api.github.com/users/justinvdm/repos","events_url":"https://api.github.com/users/justinvdm/events{/privacy}","received_events_url":"https://api.github.com/users/justinvdm/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/praekelt/vumi-go/pulls/1177/commits","review_comments_url":"https://api.github.com/repos/praekelt/vumi-go/pulls/1177/comments","review_comment_url":"https://api.github.com/repos/praekelt/vumi-go/pulls/comments/{number}","comments_url":"https://api.github.com/repos/praekelt/vumi-go/issues/1177/comments","statuses_url":"https://api.github.com/repos/praekelt/vumi-go/statuses/bf4a58f18a31e826adde72f0652ab5f0d9249aa5","head":{"label":"praekelt:feature/issue-1177-support-session-length-cost-in-billing-api","ref":"feature/issue-1177-support-session-length-cost-in-billing-api","sha":"bf4a58f18a31e826adde72f0652ab5f0d9249aa5","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":1946622,"name":"vumi-go","full_name":"praekelt/vumi-go","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/vumi-go","description":"","fork":false,"url":"https://api.github.com/repos/praekelt/vumi-go","forks_url":"https://api.github.com/repos/praekelt/vumi-go/forks","keys_url":"https://api.github.com/repos/praekelt/vumi-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/vumi-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/vumi-go/teams","hooks_url":"https://api.github.com/repos/praekelt/vumi-go/hooks","issue_events_url":"https://api.github.com/repos/praekelt/vumi-go/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/vumi-go/events","assignees_url":"https://api.github.com/repos/praekelt/vumi-go/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/vumi-go/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/vumi-go/tags","blobs_url":"https://api.github.com/repos/praekelt/vumi-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/vumi-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/vumi-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/vumi-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/vumi-go/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/vumi-go/languages","stargazers_url":"https://api.github.com/repos/praekelt/vumi-go/stargazers","contributors_url":"https://api.github.com/repos/praekelt/vumi-go/contributors","subscribers_url":"https://api.github.com/repos/praekelt/vumi-go/subscribers","subscription_url":"https://api.github.com/repos/praekelt/vumi-go/subscription","commits_url":"https://api.github.com/repos/praekelt/vumi-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/vumi-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/vumi-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/vumi-go/issues/comments/{number}","contents_url":"https://api.github.com/repos/praekelt/vumi-go/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/vumi-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/vumi-go/merges","archive_url":"https://api.github.com/repos/praekelt/vumi-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/vumi-go/downloads","issues_url":"https://api.github.com/repos/praekelt/vumi-go/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/vumi-go/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/vumi-go/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/vumi-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/vumi-go/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/vumi-go/releases{/id}","created_at":"2011-06-24T08:46:21Z","updated_at":"2015-02-06T12:50:29Z","pushed_at":"2015-02-09T07:27:41Z","git_url":"git://github.com/praekelt/vumi-go.git","ssh_url":"git@github.com:praekelt/vumi-go.git","clone_url":"https://github.com/praekelt/vumi-go.git","svn_url":"https://github.com/praekelt/vumi-go","homepage":"","size":41004,"stargazers_count":16,"watchers_count":16,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":109,"forks":13,"open_issues":109,"watchers":16,"default_branch":"develop"}},"base":{"label":"praekelt:develop","ref":"develop","sha":"e62e31dc1ac09671494475d888bdd22bcd1f463a","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":1946622,"name":"vumi-go","full_name":"praekelt/vumi-go","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/vumi-go","description":"","fork":false,"url":"https://api.github.com/repos/praekelt/vumi-go","forks_url":"https://api.github.com/repos/praekelt/vumi-go/forks","keys_url":"https://api.github.com/repos/praekelt/vumi-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/vumi-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/vumi-go/teams","hooks_url":"https://api.github.com/repos/praekelt/vumi-go/hooks","issue_events_url":"https://api.github.com/repos/praekelt/vumi-go/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/vumi-go/events","assignees_url":"https://api.github.com/repos/praekelt/vumi-go/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/vumi-go/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/vumi-go/tags","blobs_url":"https://api.github.com/repos/praekelt/vumi-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/vumi-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/vumi-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/vumi-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/vumi-go/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/vumi-go/languages","stargazers_url":"https://api.github.com/repos/praekelt/vumi-go/stargazers","contributors_url":"https://api.github.com/repos/praekelt/vumi-go/contributors","subscribers_url":"https://api.github.com/repos/praekelt/vumi-go/subscribers","subscription_url":"https://api.github.com/repos/praekelt/vumi-go/subscription","commits_url":"https://api.github.com/repos/praekelt/vumi-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/vumi-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/vumi-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/vumi-go/issues/comments/{number}","contents_url":"https://api.github.com/repos/praekelt/vumi-go/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/vumi-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/vumi-go/merges","archive_url":"https://api.github.com/repos/praekelt/vumi-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/vumi-go/downloads","issues_url":"https://api.github.com/repos/praekelt/vumi-go/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/vumi-go/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/vumi-go/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/vumi-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/vumi-go/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/vumi-go/releases{/id}","created_at":"2011-06-24T08:46:21Z","updated_at":"2015-02-06T12:50:29Z","pushed_at":"2015-02-09T07:27:41Z","git_url":"git://github.com/praekelt/vumi-go.git","ssh_url":"git@github.com:praekelt/vumi-go.git","clone_url":"https://github.com/praekelt/vumi-go.git","svn_url":"https://github.com/praekelt/vumi-go","homepage":"","size":41004,"stargazers_count":16,"watchers_count":16,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":109,"forks":13,"open_issues":109,"watchers":16,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/1177"},"html":{"href":"https://github.com/praekelt/vumi-go/pull/1177"},"issue":{"href":"https://api.github.com/repos/praekelt/vumi-go/issues/1177"},"comments":{"href":"https://api.github.com/repos/praekelt/vumi-go/issues/1177/comments"},"review_comments":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/1177/comments"},"review_comment":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/1177/commits"},"statuses":{"href":"https://api.github.com/repos/praekelt/vumi-go/statuses/bf4a58f18a31e826adde72f0652ab5f0d9249aa5"}}}}