{"action":"closed","number":49,"pull_request":{"url":"https://api.github.com/repos/azurestandard/api-spec/pulls/49","id":49359256,"html_url":"https://github.com/azurestandard/api-spec/pull/49","diff_url":"https://github.com/azurestandard/api-spec/pull/49.diff","patch_url":"https://github.com/azurestandard/api-spec/pull/49.patch","issue_url":"https://api.github.com/repos/azurestandard/api-spec/issues/49","number":49,"state":"closed","locked":false,"title":"Logistics APIs for purchases and pickups","user":{"login":"wking","id":209920,"avatar_url":"https://avatars.githubusercontent.com/u/209920?v=3","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"body":"This reverts #45 and takes another pass at the purchase/pickup\nmodeling now that I understand it better.  See [here][1] for an\noverview of our current database representation.  The API I'm\nproposing makes the following adjustments to those database models:\n\n* Squashes `BackhaulPickup` and `Purchase` into the purchase API (like\n  `Order` and `OrderShipment` are squashed into `Order`).\n  `BackhaulPickup` is one-to-one with `Purchase`, so this squash can\n  be lossless.\n\n* Exposes `VendorContact` through the pickup API.  I expect there will\n  be the same sort of confusion here that we got from the `Product` →\n  packaged-product and `PieceMeta` → product renaming, but I think\n  ‘pickup’ is a clear echo of ‘drop’ and ‘vendor-contact’ doesn't\n  strike me as a physical location that could be shared by several\n  vendors.  This also shifts the route association\n\nFurther details in the commit messages.\n\nI'd *like* to have both route-drop and route-pickup associations\nmanaged via the route-stop API (which is why it's not the route-drop\nAPI ;), but that may be too much of a stretch for our current database\nmodels.  On the other hand (as I point out [here][1], the current\ndatabase models for pickup logistics don't make all that much sense,\nand we have more flexibility changing logistics modeling and UIs than\nwe do for changing customer-facing modeling and UIs.\n\n[1]: https://github.com/azurestandard/beehive/blob/tk/model-docs/docs/modeling/logistics.md","created_at":"2015-10-31T21:29:45Z","updated_at":"2015-11-07T05:19:31Z","closed_at":"2015-11-07T05:19:31Z","merged_at":null,"merge_commit_sha":"d12f891684731f061fad90471e9540de34c5468b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/azurestandard/api-spec/pulls/49/commits","review_comments_url":"https://api.github.com/repos/azurestandard/api-spec/pulls/49/comments","review_comment_url":"https://api.github.com/repos/azurestandard/api-spec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azurestandard/api-spec/issues/49/comments","statuses_url":"https://api.github.com/repos/azurestandard/api-spec/statuses/5904f48e2c2278b1f0c76e1284eb00157b94c27a","head":{"label":"azurestandard:tk/purchase-api","ref":"tk/purchase-api","sha":"5904f48e2c2278b1f0c76e1284eb00157b94c27a","user":{"login":"azurestandard","id":4581874,"avatar_url":"https://avatars.githubusercontent.com/u/4581874?v=3","gravatar_id":"","url":"https://api.github.com/users/azurestandard","html_url":"https://github.com/azurestandard","followers_url":"https://api.github.com/users/azurestandard/followers","following_url":"https://api.github.com/users/azurestandard/following{/other_user}","gists_url":"https://api.github.com/users/azurestandard/gists{/gist_id}","starred_url":"https://api.github.com/users/azurestandard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azurestandard/subscriptions","organizations_url":"https://api.github.com/users/azurestandard/orgs","repos_url":"https://api.github.com/users/azurestandard/repos","events_url":"https://api.github.com/users/azurestandard/events{/privacy}","received_events_url":"https://api.github.com/users/azurestandard/received_events","type":"Organization","site_admin":false},"repo":{"id":26563142,"name":"api-spec","full_name":"azurestandard/api-spec","owner":{"login":"azurestandard","id":4581874,"avatar_url":"https://avatars.githubusercontent.com/u/4581874?v=3","gravatar_id":"","url":"https://api.github.com/users/azurestandard","html_url":"https://github.com/azurestandard","followers_url":"https://api.github.com/users/azurestandard/followers","following_url":"https://api.github.com/users/azurestandard/following{/other_user}","gists_url":"https://api.github.com/users/azurestandard/gists{/gist_id}","starred_url":"https://api.github.com/users/azurestandard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azurestandard/subscriptions","organizations_url":"https://api.github.com/users/azurestandard/orgs","repos_url":"https://api.github.com/users/azurestandard/repos","events_url":"https://api.github.com/users/azurestandard/events{/privacy}","received_events_url":"https://api.github.com/users/azurestandard/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azurestandard/api-spec","description":"Swagger specs for Azure's API","fork":false,"url":"https://api.github.com/repos/azurestandard/api-spec","forks_url":"https://api.github.com/repos/azurestandard/api-spec/forks","keys_url":"https://api.github.com/repos/azurestandard/api-spec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azurestandard/api-spec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azurestandard/api-spec/teams","hooks_url":"https://api.github.com/repos/azurestandard/api-spec/hooks","issue_events_url":"https://api.github.com/repos/azurestandard/api-spec/issues/events{/number}","events_url":"https://api.github.com/repos/azurestandard/api-spec/events","assignees_url":"https://api.github.com/repos/azurestandard/api-spec/assignees{/user}","branches_url":"https://api.github.com/repos/azurestandard/api-spec/branches{/branch}","tags_url":"https://api.github.com/repos/azurestandard/api-spec/tags","blobs_url":"https://api.github.com/repos/azurestandard/api-spec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azurestandard/api-spec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azurestandard/api-spec/git/refs{/sha}","trees_url":"https://api.github.com/repos/azurestandard/api-spec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azurestandard/api-spec/statuses/{sha}","languages_url":"https://api.github.com/repos/azurestandard/api-spec/languages","stargazers_url":"https://api.github.com/repos/azurestandard/api-spec/stargazers","contributors_url":"https://api.github.com/repos/azurestandard/api-spec/contributors","subscribers_url":"https://api.github.com/repos/azurestandard/api-spec/subscribers","subscription_url":"https://api.github.com/repos/azurestandard/api-spec/subscription","commits_url":"https://api.github.com/repos/azurestandard/api-spec/commits{/sha}","git_commits_url":"https://api.github.com/repos/azurestandard/api-spec/git/commits{/sha}","comments_url":"https://api.github.com/repos/azurestandard/api-spec/comments{/number}","issue_comment_url":"https://api.github.com/repos/azurestandard/api-spec/issues/comments{/number}","contents_url":"https://api.github.com/repos/azurestandard/api-spec/contents/{+path}","compare_url":"https://api.github.com/repos/azurestandard/api-spec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azurestandard/api-spec/merges","archive_url":"https://api.github.com/repos/azurestandard/api-spec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azurestandard/api-spec/downloads","issues_url":"https://api.github.com/repos/azurestandard/api-spec/issues{/number}","pulls_url":"https://api.github.com/repos/azurestandard/api-spec/pulls{/number}","milestones_url":"https://api.github.com/repos/azurestandard/api-spec/milestones{/number}","notifications_url":"https://api.github.com/repos/azurestandard/api-spec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azurestandard/api-spec/labels{/name}","releases_url":"https://api.github.com/repos/azurestandard/api-spec/releases{/id}","created_at":"2014-11-13T00:35:58Z","updated_at":"2014-11-13T00:35:58Z","pushed_at":"2015-11-07T05:19:30Z","git_url":"git://github.com/azurestandard/api-spec.git","ssh_url":"git@github.com:azurestandard/api-spec.git","clone_url":"https://github.com/azurestandard/api-spec.git","svn_url":"https://github.com/azurestandard/api-spec","homepage":null,"size":1172,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"cmb-packaged-product-tag-category"}},"base":{"label":"azurestandard:master","ref":"master","sha":"01e7124f3957843a0429ff8974caf368b261cdc9","user":{"login":"azurestandard","id":4581874,"avatar_url":"https://avatars.githubusercontent.com/u/4581874?v=3","gravatar_id":"","url":"https://api.github.com/users/azurestandard","html_url":"https://github.com/azurestandard","followers_url":"https://api.github.com/users/azurestandard/followers","following_url":"https://api.github.com/users/azurestandard/following{/other_user}","gists_url":"https://api.github.com/users/azurestandard/gists{/gist_id}","starred_url":"https://api.github.com/users/azurestandard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azurestandard/subscriptions","organizations_url":"https://api.github.com/users/azurestandard/orgs","repos_url":"https://api.github.com/users/azurestandard/repos","events_url":"https://api.github.com/users/azurestandard/events{/privacy}","received_events_url":"https://api.github.com/users/azurestandard/received_events","type":"Organization","site_admin":false},"repo":{"id":26563142,"name":"api-spec","full_name":"azurestandard/api-spec","owner":{"login":"azurestandard","id":4581874,"avatar_url":"https://avatars.githubusercontent.com/u/4581874?v=3","gravatar_id":"","url":"https://api.github.com/users/azurestandard","html_url":"https://github.com/azurestandard","followers_url":"https://api.github.com/users/azurestandard/followers","following_url":"https://api.github.com/users/azurestandard/following{/other_user}","gists_url":"https://api.github.com/users/azurestandard/gists{/gist_id}","starred_url":"https://api.github.com/users/azurestandard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azurestandard/subscriptions","organizations_url":"https://api.github.com/users/azurestandard/orgs","repos_url":"https://api.github.com/users/azurestandard/repos","events_url":"https://api.github.com/users/azurestandard/events{/privacy}","received_events_url":"https://api.github.com/users/azurestandard/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azurestandard/api-spec","description":"Swagger specs for Azure's API","fork":false,"url":"https://api.github.com/repos/azurestandard/api-spec","forks_url":"https://api.github.com/repos/azurestandard/api-spec/forks","keys_url":"https://api.github.com/repos/azurestandard/api-spec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azurestandard/api-spec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azurestandard/api-spec/teams","hooks_url":"https://api.github.com/repos/azurestandard/api-spec/hooks","issue_events_url":"https://api.github.com/repos/azurestandard/api-spec/issues/events{/number}","events_url":"https://api.github.com/repos/azurestandard/api-spec/events","assignees_url":"https://api.github.com/repos/azurestandard/api-spec/assignees{/user}","branches_url":"https://api.github.com/repos/azurestandard/api-spec/branches{/branch}","tags_url":"https://api.github.com/repos/azurestandard/api-spec/tags","blobs_url":"https://api.github.com/repos/azurestandard/api-spec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azurestandard/api-spec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azurestandard/api-spec/git/refs{/sha}","trees_url":"https://api.github.com/repos/azurestandard/api-spec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azurestandard/api-spec/statuses/{sha}","languages_url":"https://api.github.com/repos/azurestandard/api-spec/languages","stargazers_url":"https://api.github.com/repos/azurestandard/api-spec/stargazers","contributors_url":"https://api.github.com/repos/azurestandard/api-spec/contributors","subscribers_url":"https://api.github.com/repos/azurestandard/api-spec/subscribers","subscription_url":"https://api.github.com/repos/azurestandard/api-spec/subscription","commits_url":"https://api.github.com/repos/azurestandard/api-spec/commits{/sha}","git_commits_url":"https://api.github.com/repos/azurestandard/api-spec/git/commits{/sha}","comments_url":"https://api.github.com/repos/azurestandard/api-spec/comments{/number}","issue_comment_url":"https://api.github.com/repos/azurestandard/api-spec/issues/comments{/number}","contents_url":"https://api.github.com/repos/azurestandard/api-spec/contents/{+path}","compare_url":"https://api.github.com/repos/azurestandard/api-spec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azurestandard/api-spec/merges","archive_url":"https://api.github.com/repos/azurestandard/api-spec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azurestandard/api-spec/downloads","issues_url":"https://api.github.com/repos/azurestandard/api-spec/issues{/number}","pulls_url":"https://api.github.com/repos/azurestandard/api-spec/pulls{/number}","milestones_url":"https://api.github.com/repos/azurestandard/api-spec/milestones{/number}","notifications_url":"https://api.github.com/repos/azurestandard/api-spec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azurestandard/api-spec/labels{/name}","releases_url":"https://api.github.com/repos/azurestandard/api-spec/releases{/id}","created_at":"2014-11-13T00:35:58Z","updated_at":"2014-11-13T00:35:58Z","pushed_at":"2015-11-07T05:19:30Z","git_url":"git://github.com/azurestandard/api-spec.git","ssh_url":"git@github.com:azurestandard/api-spec.git","clone_url":"https://github.com/azurestandard/api-spec.git","svn_url":"https://github.com/azurestandard/api-spec","homepage":null,"size":1172,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"cmb-packaged-product-tag-category"}},"_links":{"self":{"href":"https://api.github.com/repos/azurestandard/api-spec/pulls/49"},"html":{"href":"https://github.com/azurestandard/api-spec/pull/49"},"issue":{"href":"https://api.github.com/repos/azurestandard/api-spec/issues/49"},"comments":{"href":"https://api.github.com/repos/azurestandard/api-spec/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/azurestandard/api-spec/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/azurestandard/api-spec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azurestandard/api-spec/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/azurestandard/api-spec/statuses/5904f48e2c2278b1f0c76e1284eb00157b94c27a"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":1,"review_comments":0,"commits":3,"additions":529,"deletions":0,"changed_files":1}}