{"action":"created","comment":{"url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls/comments/23100097","id":23100097,"diff_hunk":"@@ -73,19 +73,27 @@ def apply_taxes(user, basket, shipping_address, shipping_method, shipping_charge\n     shipping_charge.tax = line_taxes['SHIPPING']\n \n \n-def submit(order):\n+def submit(order, lines=None, line_quantities=None):\n     \"\"\"\n     Submit tax information from an order\n+    If lines isn't set, all lines in the order will be submitted\n+    If line_quantities isn't set, the total quantity for each line will be submitted\n     \"\"\"\n+    lines = lines or order.lines.all()\n+    line_quantities = line_quantities or [l.quantity for l in lines]\n+    for line, qty_to_consume in zip(lines, line_quantities):\n+        line.quantity = qty_to_consume","path":"avalara/facade.py","position":30,"original_position":30,"commit_id":"04bf5aca757ab6e3eb7d5bfae69cbd7a145d5710","original_commit_id":"04bf5aca757ab6e3eb7d5bfae69cbd7a145d5710","user":{"login":"Thanavath","id":765961,"avatar_url":"https://avatars.githubusercontent.com/u/765961?v=3","gravatar_id":"","url":"https://api.github.com/users/Thanavath","html_url":"https://github.com/Thanavath","followers_url":"https://api.github.com/users/Thanavath/followers","following_url":"https://api.github.com/users/Thanavath/following{/other_user}","gists_url":"https://api.github.com/users/Thanavath/gists{/gist_id}","starred_url":"https://api.github.com/users/Thanavath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thanavath/subscriptions","organizations_url":"https://api.github.com/users/Thanavath/orgs","repos_url":"https://api.github.com/users/Thanavath/repos","events_url":"https://api.github.com/users/Thanavath/events{/privacy}","received_events_url":"https://api.github.com/users/Thanavath/received_events","type":"User","site_admin":false},"body":"Partial shipment. This is how the `EventHandler.handle_shipping_event` deals with partial shipment, and we're taking payment on items being shipped -> `def take_payment_for_lines(self, order, lines, line_quantities)`","created_at":"2015-01-16T18:43:35Z","updated_at":"2015-01-16T18:43:35Z","html_url":"https://github.com/simpleenergy/django-oscar-avalara/pull/1#discussion_r23100097","pull_request_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls/comments/23100097"},"html":{"href":"https://github.com/simpleenergy/django-oscar-avalara/pull/1#discussion_r23100097"},"pull_request":{"href":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls/1","id":27524309,"html_url":"https://github.com/simpleenergy/django-oscar-avalara/pull/1","diff_url":"https://github.com/simpleenergy/django-oscar-avalara/pull/1.diff","patch_url":"https://github.com/simpleenergy/django-oscar-avalara/pull/1.patch","issue_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/issues/1","number":1,"state":"open","locked":false,"title":"MP-96 - Tell Avalara we collected tax","user":{"login":"Thanavath","id":765961,"avatar_url":"https://avatars.githubusercontent.com/u/765961?v=3","gravatar_id":"","url":"https://api.github.com/users/Thanavath","html_url":"https://github.com/Thanavath","followers_url":"https://api.github.com/users/Thanavath/followers","following_url":"https://api.github.com/users/Thanavath/following{/other_user}","gists_url":"https://api.github.com/users/Thanavath/gists{/gist_id}","starred_url":"https://api.github.com/users/Thanavath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thanavath/subscriptions","organizations_url":"https://api.github.com/users/Thanavath/orgs","repos_url":"https://api.github.com/users/Thanavath/repos","events_url":"https://api.github.com/users/Thanavath/events{/privacy}","received_events_url":"https://api.github.com/users/Thanavath/received_events","type":"User","site_admin":false},"body":"### What is the problem / feature ?\r\n\r\nTaxes need to be posted when the payment has been taken which happens when the order is shipped.\r\nThe current `submit(order)` method does not allow us to submit a partial amount of the order to Avalara.\r\n\r\n### How did it get fixed / implemented ?\r\n\r\n - Change the signature of `submit` method to accept `lines` and `line_quantities`\r\n - Calculate the `Amount` for a line based on unit price and quantity\r\n\r\n*Here is a cute animal picture for your troubles...*\r\n\r\n![image](http://www.lovethispic.com/uploaded_images/55468-Roaring-Kitten-.gif?1)","created_at":"2015-01-16T18:05:00Z","updated_at":"2015-01-16T18:43:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14dc1f1a4fcee91fdee382f53f508542a7a606f6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls/1/commits","review_comments_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls/1/comments","review_comment_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls/comments/{number}","comments_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/issues/1/comments","statuses_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/statuses/04bf5aca757ab6e3eb7d5bfae69cbd7a145d5710","head":{"label":"Thanavath:rc/0.2","ref":"rc/0.2","sha":"04bf5aca757ab6e3eb7d5bfae69cbd7a145d5710","user":{"login":"Thanavath","id":765961,"avatar_url":"https://avatars.githubusercontent.com/u/765961?v=3","gravatar_id":"","url":"https://api.github.com/users/Thanavath","html_url":"https://github.com/Thanavath","followers_url":"https://api.github.com/users/Thanavath/followers","following_url":"https://api.github.com/users/Thanavath/following{/other_user}","gists_url":"https://api.github.com/users/Thanavath/gists{/gist_id}","starred_url":"https://api.github.com/users/Thanavath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thanavath/subscriptions","organizations_url":"https://api.github.com/users/Thanavath/orgs","repos_url":"https://api.github.com/users/Thanavath/repos","events_url":"https://api.github.com/users/Thanavath/events{/privacy}","received_events_url":"https://api.github.com/users/Thanavath/received_events","type":"User","site_admin":false},"repo":{"id":27563048,"name":"django-oscar-avalara","full_name":"Thanavath/django-oscar-avalara","owner":{"login":"Thanavath","id":765961,"avatar_url":"https://avatars.githubusercontent.com/u/765961?v=3","gravatar_id":"","url":"https://api.github.com/users/Thanavath","html_url":"https://github.com/Thanavath","followers_url":"https://api.github.com/users/Thanavath/followers","following_url":"https://api.github.com/users/Thanavath/following{/other_user}","gists_url":"https://api.github.com/users/Thanavath/gists{/gist_id}","starred_url":"https://api.github.com/users/Thanavath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thanavath/subscriptions","organizations_url":"https://api.github.com/users/Thanavath/orgs","repos_url":"https://api.github.com/users/Thanavath/repos","events_url":"https://api.github.com/users/Thanavath/events{/privacy}","received_events_url":"https://api.github.com/users/Thanavath/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Thanavath/django-oscar-avalara","description":"Integration with the Avalara tax service for django-oscar","fork":true,"url":"https://api.github.com/repos/Thanavath/django-oscar-avalara","forks_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/forks","keys_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/teams","hooks_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/hooks","issue_events_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/issues/events{/number}","events_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/events","assignees_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/assignees{/user}","branches_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/branches{/branch}","tags_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/tags","blobs_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/git/refs{/sha}","trees_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/statuses/{sha}","languages_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/languages","stargazers_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/stargazers","contributors_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/contributors","subscribers_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/subscribers","subscription_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/subscription","commits_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/commits{/sha}","git_commits_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/git/commits{/sha}","comments_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/comments{/number}","issue_comment_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/issues/comments/{number}","contents_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/contents/{+path}","compare_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/merges","archive_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/downloads","issues_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/issues{/number}","pulls_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/pulls{/number}","milestones_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/milestones{/number}","notifications_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/labels{/name}","releases_url":"https://api.github.com/repos/Thanavath/django-oscar-avalara/releases{/id}","created_at":"2014-12-04T22:29:07Z","updated_at":"2014-12-23T23:02:10Z","pushed_at":"2015-01-16T17:56:11Z","git_url":"git://github.com/Thanavath/django-oscar-avalara.git","ssh_url":"git@github.com:Thanavath/django-oscar-avalara.git","clone_url":"https://github.com/Thanavath/django-oscar-avalara.git","svn_url":"https://github.com/Thanavath/django-oscar-avalara","homepage":null,"size":297,"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":"simpleenergy:master","ref":"master","sha":"b92adfa8aa5bdeda83a50c80ade08eebc7112b8a","user":{"login":"simpleenergy","id":522113,"avatar_url":"https://avatars.githubusercontent.com/u/522113?v=3","gravatar_id":"","url":"https://api.github.com/users/simpleenergy","html_url":"https://github.com/simpleenergy","followers_url":"https://api.github.com/users/simpleenergy/followers","following_url":"https://api.github.com/users/simpleenergy/following{/other_user}","gists_url":"https://api.github.com/users/simpleenergy/gists{/gist_id}","starred_url":"https://api.github.com/users/simpleenergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simpleenergy/subscriptions","organizations_url":"https://api.github.com/users/simpleenergy/orgs","repos_url":"https://api.github.com/users/simpleenergy/repos","events_url":"https://api.github.com/users/simpleenergy/events{/privacy}","received_events_url":"https://api.github.com/users/simpleenergy/received_events","type":"Organization","site_admin":false},"repo":{"id":29357741,"name":"django-oscar-avalara","full_name":"simpleenergy/django-oscar-avalara","owner":{"login":"simpleenergy","id":522113,"avatar_url":"https://avatars.githubusercontent.com/u/522113?v=3","gravatar_id":"","url":"https://api.github.com/users/simpleenergy","html_url":"https://github.com/simpleenergy","followers_url":"https://api.github.com/users/simpleenergy/followers","following_url":"https://api.github.com/users/simpleenergy/following{/other_user}","gists_url":"https://api.github.com/users/simpleenergy/gists{/gist_id}","starred_url":"https://api.github.com/users/simpleenergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simpleenergy/subscriptions","organizations_url":"https://api.github.com/users/simpleenergy/orgs","repos_url":"https://api.github.com/users/simpleenergy/repos","events_url":"https://api.github.com/users/simpleenergy/events{/privacy}","received_events_url":"https://api.github.com/users/simpleenergy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simpleenergy/django-oscar-avalara","description":"Integration with the Avalara tax service for django-oscar","fork":true,"url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara","forks_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/forks","keys_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/teams","hooks_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/hooks","issue_events_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/issues/events{/number}","events_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/events","assignees_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/assignees{/user}","branches_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/branches{/branch}","tags_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/tags","blobs_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/git/refs{/sha}","trees_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/statuses/{sha}","languages_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/languages","stargazers_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/stargazers","contributors_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/contributors","subscribers_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/subscribers","subscription_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/subscription","commits_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/commits{/sha}","git_commits_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/git/commits{/sha}","comments_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/comments{/number}","issue_comment_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/issues/comments/{number}","contents_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/contents/{+path}","compare_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/merges","archive_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/downloads","issues_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/issues{/number}","pulls_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls{/number}","milestones_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/milestones{/number}","notifications_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/labels{/name}","releases_url":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/releases{/id}","created_at":"2015-01-16T16:47:46Z","updated_at":"2015-01-16T16:47:48Z","pushed_at":"2014-12-23T22:34:34Z","git_url":"git://github.com/simpleenergy/django-oscar-avalara.git","ssh_url":"git@github.com:simpleenergy/django-oscar-avalara.git","clone_url":"https://github.com/simpleenergy/django-oscar-avalara.git","svn_url":"https://github.com/simpleenergy/django-oscar-avalara","homepage":null,"size":364,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls/1"},"html":{"href":"https://github.com/simpleenergy/django-oscar-avalara/pull/1"},"issue":{"href":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/issues/1"},"comments":{"href":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/simpleenergy/django-oscar-avalara/statuses/04bf5aca757ab6e3eb7d5bfae69cbd7a145d5710"}}}}