GitHub PullRequestReviewCommentEvent at 2014-06-24 15:18:34
Repository: django-oscar
Actor: codeinthehole
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/tangentlabs/django-oscar/pulls/comments/14135030","id":14135030,"diff_hunk":"@@ -123,10 +123,10 @@ <h2 class=\"price_color\">{% include \"catalogue/partials/stock_record.html\" %}</h2\n                 </tr>\n                 {% if session.availability.is_available_to_buy %}\n                 <tr>\n-                    <th>{% trans \"Price (excl. tax)\" %}</th><td>{{ session.price.excl_tax|currency }}</td>\n+                    <th>{% trans \"Price (excl. tax)\" %}</th><td>{{ session.price.get_unit_price.excl_tax|currency }}</td>","path":"sites/demo/templates/catalogue/detail.html","position":5,"original_position":5,"commit_id":"f59b5c4c7d76f9c6d6e4f15cd6ebc3700dc7bc24","original_commit_id":"f59b5c4c7d76f9c6d6e4f15cd6ebc3700dc7bc24","user":{"login":"codeinthehole","id":80975,"avatar_url":"https://avatars.githubusercontent.com/u/80975?","gravatar_id":"52d39c7b27386ca98bc016119d95b8b8","url":"https://api.github.com/users/codeinthehole","html_url":"https://github.com/codeinthehole","followers_url":"https://api.github.com/users/codeinthehole/followers","following_url":"https://api.github.com/users/codeinthehole/following{/other_user}","gists_url":"https://api.github.com/users/codeinthehole/gists{/gist_id}","starred_url":"https://api.github.com/users/codeinthehole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeinthehole/subscriptions","organizations_url":"https://api.github.com/users/codeinthehole/orgs","repos_url":"https://api.github.com/users/codeinthehole/repos","events_url":"https://api.github.com/users/codeinthehole/events{/privacy}","received_events_url":"https://api.github.com/users/codeinthehole/received_events","type":"User","site_admin":false},"body":"This API is getting quite unwieldy. It should be something more like `session.unit_price.excl_tax` rather than `session.price.get_unit_price.excl_tax`. Hence, I think it's time to extend the `PurchaseInfo` class to have methods and properties that provide a simpler API without all the dots.","created_at":"2014-06-24T15:18:34Z","updated_at":"2014-06-24T15:18:34Z","html_url":"https://github.com/tangentlabs/django-oscar/pull/1298#discussion_r14135030","pull_request_url":"https://api.github.com/repos/tangentlabs/django-oscar/pulls/1298","_links":{"self":{"href":"https://api.github.com/repos/tangentlabs/django-oscar/pulls/comments/14135030"},"html":{"href":"https://github.com/tangentlabs/django-oscar/pull/1298#discussion_r14135030"},"pull_request":{"href":"https://api.github.com/repos/tangentlabs/django-oscar/pulls/1298"}}},"pull_request":{"url":"https://api.github.com/repos/tangentlabs/django-oscar/pulls/1298","id":17057990,"html_url":"https://github.com/tangentlabs/django-oscar/pull/1298","diff_url":"https://github.com/tangentlabs/django-oscar/pull/1298.diff","patch_url":"https://github.com/tangentlabs/django-oscar/pull/1298.patch","issue_url":"https://api.github.com/repos/tangentlabs/django-oscar/issues/1298","number":1298,"state":"open","title":"Allow non-linear prices","user":{"login":"maikhoepfel","id":509427,"avatar_url":"https://avatars.githubusercontent.com/u/509427?","gravatar_id":"9a313a0126d7f38f6e5bf0a337e9fbf4","url":"https://api.github.com/users/maikhoepfel","html_url":"https://github.com/maikhoepfel","followers_url":"https://api.github.com/users/maikhoepfel/followers","following_url":"https://api.github.com/users/maikhoepfel/following{/other_user}","gists_url":"https://api.github.com/users/maikhoepfel/gists{/gist_id}","starred_url":"https://api.github.com/users/maikhoepfel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maikhoepfel/subscriptions","organizations_url":"https://api.github.com/users/maikhoepfel/orgs","repos_url":"https://api.github.com/users/maikhoepfel/repos","events_url":"https://api.github.com/users/maikhoepfel/events{/privacy}","received_events_url":"https://api.github.com/users/maikhoepfel/received_events","type":"User","site_admin":false},"body":"Oscar defaults implementation makes assumption that the price is computed as:\r\n\r\n```\r\nline_price = quantity * unit price\r\n```\r\n\r\nThat is not always a case. For example, you might want to implement bulk prices:\r\n\r\n * 1-99 items... unit price of X\r\n * 100-999 items... unit price of Y\r\n\r\nThis could be easily implemented by adding additional methods to Price object:\r\n\r\n - `price_for_quantity(quantity)` (effective one)\r\n - `price_excl_tax_for_quantity(quantity)`\r\n - `price_incl_tax_for_quantity(quantity)`\r\n\r\nDefault implementation could reflect the current one, so it is backwards compatible.","created_at":"2014-06-12T14:31:55Z","updated_at":"2014-06-24T15:18:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bbe76f99f52e4af2a3ec17320dd25b5d9e2b522","assignee":{"login":"maikhoepfel","id":509427,"avatar_url":"https://avatars.githubusercontent.com/u/509427?","gravatar_id":"9a313a0126d7f38f6e5bf0a337e9fbf4","url":"https://api.github.com/users/maikhoepfel","html_url":"https://github.com/maikhoepfel","followers_url":"https://api.github.com/users/maikhoepfel/followers","following_url":"https://api.github.com/users/maikhoepfel/following{/other_user}","gists_url":"https://api.github.com/users/maikhoepfel/gists{/gist_id}","starred_url":"https://api.github.com/users/maikhoepfel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maikhoepfel/subscriptions","organizations_url":"https://api.github.com/users/maikhoepfel/orgs","repos_url":"https://api.github.com/users/maikhoepfel/repos","events_url":"https://api.github.com/users/maikhoepfel/events{/privacy}","received_events_url":"https://api.github.com/users/maikhoepfel/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/tangentlabs/django-oscar/milestones/7","labels_url":"https://api.github.com/repos/tangentlabs/django-oscar/milestones/7/labels","id":516592,"number":7,"title":"0.8","description":"","creator":{"login":"codeinthehole","id":80975,"avatar_url":"https://avatars.githubusercontent.com/u/80975?","gravatar_id":"52d39c7b27386ca98bc016119d95b8b8","url":"https://api.github.com/users/codeinthehole","html_url":"https://github.com/codeinthehole","followers_url":"https://api.github.com/users/codeinthehole/followers","following_url":"https://api.github.com/users/codeinthehole/following{/other_user}","gists_url":"https://api.github.com/users/codeinthehole/gists{/gist_id}","starred_url":"https://api.github.com/users/codeinthehole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeinthehole/subscriptions","organizations_url":"https://api.github.com/users/codeinthehole/orgs","repos_url":"https://api.github.com/users/codeinthehole/repos","events_url":"https://api.github.com/users/codeinthehole/events{/privacy}","received_events_url":"https://api.github.com/users/codeinthehole/received_events","type":"User","site_admin":false},"open_issues":60,"closed_issues":17,"state":"open","created_at":"2013-12-18T12:09:49Z","updated_at":"2014-06-20T15:16:03Z","due_on":null},"commits_url":"https://api.github.com/repos/tangentlabs/django-oscar/pulls/1298/commits","review_comments_url":"https://api.github.com/repos/tangentlabs/django-oscar/pulls/1298/comments","review_comment_url":"https://api.github.com/repos/tangentlabs/django-oscar/pulls/comments/{number}","comments_url":"https://api.github.com/repos/tangentlabs/django-oscar/issues/1298/comments","statuses_url":"https://api.github.com/repos/tangentlabs/django-oscar/statuses/f59b5c4c7d76f9c6d6e4f15cd6ebc3700dc7bc24","head":{"label":"tangentlabs:issue/1298/nonlinearprices","ref":"issue/1298/nonlinearprices","sha":"f59b5c4c7d76f9c6d6e4f15cd6ebc3700dc7bc24","user":{"login":"tangentlabs","id":564970,"avatar_url":"https://avatars.githubusercontent.com/u/564970?","gravatar_id":"b2e2cdf25b74872bedb5ad1c4223cfa9","url":"https://api.github.com/users/tangentlabs","html_url":"https://github.com/tangentlabs","followers_url":"https://api.github.com/users/tangentlabs/followers","following_url":"https://api.github.com/users/tangentlabs/following{/other_user}","gists_url":"https://api.github.com/users/tangentlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/tangentlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangentlabs/subscriptions","organizations_url":"https://api.github.com/users/tangentlabs/orgs","repos_url":"https://api.github.com/users/tangentlabs/repos","events_url":"https://api.github.com/users/tangentlabs/events{/privacy}","received_events_url":"https://api.github.com/users/tangentlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":1151051,"name":"django-oscar","full_name":"tangentlabs/django-oscar","owner":{"login":"tangentlabs","id":564970,"avatar_url":"https://avatars.githubusercontent.com/u/564970?","gravatar_id":"b2e2cdf25b74872bedb5ad1c4223cfa9","url":"https://api.github.com/users/tangentlabs","html_url":"https://github.com/tangentlabs","followers_url":"https://api.github.com/users/tangentlabs/followers","following_url":"https://api.github.com/users/tangentlabs/following{/other_user}","gists_url":"https://api.github.com/users/tangentlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/tangentlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangentlabs/subscriptions","organizations_url":"https://api.github.com/users/tangentlabs/orgs","repos_url":"https://api.github.com/users/tangentlabs/repos","events_url":"https://api.github.com/users/tangentlabs/events{/privacy}","received_events_url":"https://api.github.com/users/tangentlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangentlabs/django-oscar","description":"Domain-driven e-commerce for Django","fork":false,"url":"https://api.github.com/repos/tangentlabs/django-oscar","forks_url":"https://api.github.com/repos/tangentlabs/django-oscar/forks","keys_url":"https://api.github.com/repos/tangentlabs/django-oscar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangentlabs/django-oscar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangentlabs/django-oscar/teams","hooks_url":"https://api.github.com/repos/tangentlabs/django-oscar/hooks","issue_events_url":"https://api.github.com/repos/tangentlabs/django-oscar/issues/events{/number}","events_url":"https://api.github.com/repos/tangentlabs/django-oscar/events","assignees_url":"https://api.github.com/repos/tangentlabs/django-oscar/assignees{/user}","branches_url":"https://api.github.com/repos/tangentlabs/django-oscar/branches{/branch}","tags_url":"https://api.github.com/repos/tangentlabs/django-oscar/tags","blobs_url":"https://api.github.com/repos/tangentlabs/django-oscar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangentlabs/django-oscar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangentlabs/django-oscar/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangentlabs/django-oscar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangentlabs/django-oscar/statuses/{sha}","languages_url":"https://api.github.com/repos/tangentlabs/django-oscar/languages","stargazers_url":"https://api.github.com/repos/tangentlabs/django-oscar/stargazers","contributors_url":"https://api.github.com/repos/tangentlabs/django-oscar/contributors","subscribers_url":"https://api.github.com/repos/tangentlabs/django-oscar/subscribers","subscription_url":"https://api.github.com/repos/tangentlabs/django-oscar/subscription","commits_url":"https://api.github.com/repos/tangentlabs/django-oscar/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangentlabs/django-oscar/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangentlabs/django-oscar/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangentlabs/django-oscar/issues/comments/{number}","contents_url":"https://api.github.com/repos/tangentlabs/django-oscar/contents/{+path}","compare_url":"https://api.github.com/repos/tangentlabs/django-oscar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangentlabs/django-oscar/merges","archive_url":"https://api.github.com/repos/tangentlabs/django-oscar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangentlabs/django-oscar/downloads","issues_url":"https://api.github.com/repos/tangentlabs/django-oscar/issues{/number}","pulls_url":"https://api.github.com/repos/tangentlabs/django-oscar/pulls{/number}","milestones_url":"https://api.github.com/repos/tangentlabs/django-oscar/milestones{/number}","notifications_url":"https://api.github.com/repos/tangentlabs/django-oscar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangentlabs/django-oscar/labels{/name}","releases_url":"https://api.github.com/repos/tangentlabs/django-oscar/releases{/id}","created_at":"2010-12-08T21:30:32Z","updated_at":"2014-06-24T11:10:26Z","pushed_at":"2014-06-23T09:24:47Z","git_url":"git://github.com/tangentlabs/django-oscar.git","ssh_url":"git@github.com:tangentlabs/django-oscar.git","clone_url":"https://github.com/tangentlabs/django-oscar.git","svn_url":"https://github.com/tangentlabs/django-oscar","homepage":"http://oscarcommerce.com","size":111216,"stargazers_count":1007,"watchers_count":1007,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":412,"mirror_url":null,"open_issues_count":138,"forks":412,"open_issues":138,"watchers":1007,"default_branch":"master"}},"base":{"label":"tangentlabs:master","ref":"master","sha":"0ea42443eca4412c6ad9526ecd3756bba3b2dc7d","user":{"login":"tangentlabs","id":564970,"avatar_url":"https://avatars.githubusercontent.com/u/564970?","gravatar_id":"b2e2cdf25b74872bedb5ad1c4223cfa9","url":"https://api.github.com/users/tangentlabs","html_url":"https://github.com/tangentlabs","followers_url":"https://api.github.com/users/tangentlabs/followers","following_url":"https://api.github.com/users/tangentlabs/following{/other_user}","gists_url":"https://api.github.com/users/tangentlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/tangentlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangentlabs/subscriptions","organizations_url":"https://api.github.com/users/tangentlabs/orgs","repos_url":"https://api.github.com/users/tangentlabs/repos","events_url":"https://api.github.com/users/tangentlabs/events{/privacy}","received_events_url":"https://api.github.com/users/tangentlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":1151051,"name":"django-oscar","full_name":"tangentlabs/django-oscar","owner":{"login":"tangentlabs","id":564970,"avatar_url":"https://avatars.githubusercontent.com/u/564970?","gravatar_id":"b2e2cdf25b74872bedb5ad1c4223cfa9","url":"https://api.github.com/users/tangentlabs","html_url":"https://github.com/tangentlabs","followers_url":"https://api.github.com/users/tangentlabs/followers","following_url":"https://api.github.com/users/tangentlabs/following{/other_user}","gists_url":"https://api.github.com/users/tangentlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/tangentlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangentlabs/subscriptions","organizations_url":"https://api.github.com/users/tangentlabs/orgs","repos_url":"https://api.github.com/users/tangentlabs/repos","events_url":"https://api.github.com/users/tangentlabs/events{/privacy}","received_events_url":"https://api.github.com/users/tangentlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangentlabs/django-oscar","description":"Domain-driven e-commerce for Django","fork":false,"url":"https://api.github.com/repos/tangentlabs/django-oscar","forks_url":"https://api.github.com/repos/tangentlabs/django-oscar/forks","keys_url":"https://api.github.com/repos/tangentlabs/django-oscar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangentlabs/django-oscar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangentlabs/django-oscar/teams","hooks_url":"https://api.github.com/repos/tangentlabs/django-oscar/hooks","issue_events_url":"https://api.github.com/repos/tangentlabs/django-oscar/issues/events{/number}","events_url":"https://api.github.com/repos/tangentlabs/django-oscar/events","assignees_url":"https://api.github.com/repos/tangentlabs/django-oscar/assignees{/user}","branches_url":"https://api.github.com/repos/tangentlabs/django-oscar/branches{/branch}","tags_url":"https://api.github.com/repos/tangentlabs/django-oscar/tags","blobs_url":"https://api.github.com/repos/tangentlabs/django-oscar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangentlabs/django-oscar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangentlabs/django-oscar/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangentlabs/django-oscar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangentlabs/django-oscar/statuses/{sha}","languages_url":"https://api.github.com/repos/tangentlabs/django-oscar/languages","stargazers_url":"https://api.github.com/repos/tangentlabs/django-oscar/stargazers","contributors_url":"https://api.github.com/repos/tangentlabs/django-oscar/contributors","subscribers_url":"https://api.github.com/repos/tangentlabs/django-oscar/subscribers","subscription_url":"https://api.github.com/repos/tangentlabs/django-oscar/subscription","commits_url":"https://api.github.com/repos/tangentlabs/django-oscar/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangentlabs/django-oscar/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangentlabs/django-oscar/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangentlabs/django-oscar/issues/comments/{number}","contents_url":"https://api.github.com/repos/tangentlabs/django-oscar/contents/{+path}","compare_url":"https://api.github.com/repos/tangentlabs/django-oscar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangentlabs/django-oscar/merges","archive_url":"https://api.github.com/repos/tangentlabs/django-oscar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangentlabs/django-oscar/downloads","issues_url":"https://api.github.com/repos/tangentlabs/django-oscar/issues{/number}","pulls_url":"https://api.github.com/repos/tangentlabs/django-oscar/pulls{/number}","milestones_url":"https://api.github.com/repos/tangentlabs/django-oscar/milestones{/number}","notifications_url":"https://api.github.com/repos/tangentlabs/django-oscar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangentlabs/django-oscar/labels{/name}","releases_url":"https://api.github.com/repos/tangentlabs/django-oscar/releases{/id}","created_at":"2010-12-08T21:30:32Z","updated_at":"2014-06-24T11:10:26Z","pushed_at":"2014-06-23T09:24:47Z","git_url":"git://github.com/tangentlabs/django-oscar.git","ssh_url":"git@github.com:tangentlabs/django-oscar.git","clone_url":"https://github.com/tangentlabs/django-oscar.git","svn_url":"https://github.com/tangentlabs/django-oscar","homepage":"http://oscarcommerce.com","size":111216,"stargazers_count":1007,"watchers_count":1007,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":412,"mirror_url":null,"open_issues_count":138,"forks":412,"open_issues":138,"watchers":1007,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tangentlabs/django-oscar/pulls/1298"},"html":{"href":"https://github.com/tangentlabs/django-oscar/pull/1298"},"issue":{"href":"https://api.github.com/repos/tangentlabs/django-oscar/issues/1298"},"comments":{"href":"https://api.github.com/repos/tangentlabs/django-oscar/issues/1298/comments"},"review_comments":{"href":"https://api.github.com/repos/tangentlabs/django-oscar/pulls/1298/comments"},"review_comment":{"href":"https://api.github.com/repos/tangentlabs/django-oscar/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/tangentlabs/django-oscar/pulls/1298/commits"},"statuses":{"href":"https://api.github.com/repos/tangentlabs/django-oscar/statuses/f59b5c4c7d76f9c6d6e4f15cd6ebc3700dc7bc24"}}}}