{"action":"opened","number":132,"pull_request":{"url":"https://api.github.com/repos/andela/troupon/pulls/132","id":66764037,"html_url":"https://github.com/andela/troupon/pull/132","diff_url":"https://github.com/andela/troupon/pull/132.diff","patch_url":"https://github.com/andela/troupon/pull/132.patch","issue_url":"https://api.github.com/repos/andela/troupon/issues/132","number":132,"state":"open","locked":false,"title":"#113821743 Deal Management API enabling CRUD actions on Deals","user":{"login":"andela-aomondi","id":16223682,"avatar_url":"https://avatars.githubusercontent.com/u/16223682?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-aomondi","html_url":"https://github.com/andela-aomondi","followers_url":"https://api.github.com/users/andela-aomondi/followers","following_url":"https://api.github.com/users/andela-aomondi/following{/other_user}","gists_url":"https://api.github.com/users/andela-aomondi/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-aomondi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-aomondi/subscriptions","organizations_url":"https://api.github.com/users/andela-aomondi/orgs","repos_url":"https://api.github.com/users/andela-aomondi/repos","events_url":"https://api.github.com/users/andela-aomondi/events{/privacy}","received_events_url":"https://api.github.com/users/andela-aomondi/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n\r\nThis PR introduces API endpoints which allow registered merchants to work with deals.\r\n\r\nActions supported include:\r\n\r\n- Creating a deal: `POST /api/deals/`\r\n- Listing all deals: `GET /api/deals/`\r\n- Getting details of an individual deal: `GET /api/deals/<deal_id>`\r\n- Updating a deal: `PUT /api/deals/<deal_id>` and `PATCH /api/deals/<deal_id>`\r\n- Deleting a deal: `DELETE /api/deals/<deal_id>`\r\n\r\n#### Description of Task to be completed\r\n\r\nThe task required the creation of API endpoints using `django-rest-framework` which would enable a merchant to perform CRUD operations on Deals.\r\n\r\n#### How should this be manually tested?\r\n\r\nUsing a registered merchant's account, you can send requests to the API endpoints using:\r\n\r\n- `POSTMAN`\r\n- Inbuilt browsable API - This can be accessed by going to the API endpoints on any browser starting with endpoint `/api/deals/`.\r\n\r\n#### Documentation\r\n\r\nThe API documentation is available on [Apiary](http://docs.troupon.apiary.io/)\r\n\r\n#### Relevant pivotal tracker stories \r\n #113821743","created_at":"2016-04-17T10:15:17Z","updated_at":"2016-04-17T10:15:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andela/troupon/pulls/132/commits","review_comments_url":"https://api.github.com/repos/andela/troupon/pulls/132/comments","review_comment_url":"https://api.github.com/repos/andela/troupon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/troupon/issues/132/comments","statuses_url":"https://api.github.com/repos/andela/troupon/statuses/c0289ed800b042c812e704f8f0953f5421557721","head":{"label":"andela:ft-deal-management-api-113821743","ref":"ft-deal-management-api-113821743","sha":"c0289ed800b042c812e704f8f0953f5421557721","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":40593599,"name":"troupon","full_name":"andela/troupon","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/troupon","description":"Groupon Clone","fork":false,"url":"https://api.github.com/repos/andela/troupon","forks_url":"https://api.github.com/repos/andela/troupon/forks","keys_url":"https://api.github.com/repos/andela/troupon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/troupon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/troupon/teams","hooks_url":"https://api.github.com/repos/andela/troupon/hooks","issue_events_url":"https://api.github.com/repos/andela/troupon/issues/events{/number}","events_url":"https://api.github.com/repos/andela/troupon/events","assignees_url":"https://api.github.com/repos/andela/troupon/assignees{/user}","branches_url":"https://api.github.com/repos/andela/troupon/branches{/branch}","tags_url":"https://api.github.com/repos/andela/troupon/tags","blobs_url":"https://api.github.com/repos/andela/troupon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/troupon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/troupon/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/troupon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/troupon/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/troupon/languages","stargazers_url":"https://api.github.com/repos/andela/troupon/stargazers","contributors_url":"https://api.github.com/repos/andela/troupon/contributors","subscribers_url":"https://api.github.com/repos/andela/troupon/subscribers","subscription_url":"https://api.github.com/repos/andela/troupon/subscription","commits_url":"https://api.github.com/repos/andela/troupon/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/troupon/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/troupon/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/troupon/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/troupon/contents/{+path}","compare_url":"https://api.github.com/repos/andela/troupon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/troupon/merges","archive_url":"https://api.github.com/repos/andela/troupon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/troupon/downloads","issues_url":"https://api.github.com/repos/andela/troupon/issues{/number}","pulls_url":"https://api.github.com/repos/andela/troupon/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/troupon/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/troupon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/troupon/labels{/name}","releases_url":"https://api.github.com/repos/andela/troupon/releases{/id}","deployments_url":"https://api.github.com/repos/andela/troupon/deployments","created_at":"2015-08-12T09:56:57Z","updated_at":"2016-02-22T10:15:05Z","pushed_at":"2016-04-17T09:46:44Z","git_url":"git://github.com/andela/troupon.git","ssh_url":"git@github.com:andela/troupon.git","clone_url":"https://github.com/andela/troupon.git","svn_url":"https://github.com/andela/troupon","homepage":"http://troupon-staging.herokuapp.com/","size":5967,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"andela:develop","ref":"develop","sha":"abe59179310ed435acf543a256a251e6457d5c0e","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":40593599,"name":"troupon","full_name":"andela/troupon","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/troupon","description":"Groupon Clone","fork":false,"url":"https://api.github.com/repos/andela/troupon","forks_url":"https://api.github.com/repos/andela/troupon/forks","keys_url":"https://api.github.com/repos/andela/troupon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/troupon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/troupon/teams","hooks_url":"https://api.github.com/repos/andela/troupon/hooks","issue_events_url":"https://api.github.com/repos/andela/troupon/issues/events{/number}","events_url":"https://api.github.com/repos/andela/troupon/events","assignees_url":"https://api.github.com/repos/andela/troupon/assignees{/user}","branches_url":"https://api.github.com/repos/andela/troupon/branches{/branch}","tags_url":"https://api.github.com/repos/andela/troupon/tags","blobs_url":"https://api.github.com/repos/andela/troupon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/troupon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/troupon/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/troupon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/troupon/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/troupon/languages","stargazers_url":"https://api.github.com/repos/andela/troupon/stargazers","contributors_url":"https://api.github.com/repos/andela/troupon/contributors","subscribers_url":"https://api.github.com/repos/andela/troupon/subscribers","subscription_url":"https://api.github.com/repos/andela/troupon/subscription","commits_url":"https://api.github.com/repos/andela/troupon/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/troupon/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/troupon/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/troupon/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/troupon/contents/{+path}","compare_url":"https://api.github.com/repos/andela/troupon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/troupon/merges","archive_url":"https://api.github.com/repos/andela/troupon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/troupon/downloads","issues_url":"https://api.github.com/repos/andela/troupon/issues{/number}","pulls_url":"https://api.github.com/repos/andela/troupon/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/troupon/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/troupon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/troupon/labels{/name}","releases_url":"https://api.github.com/repos/andela/troupon/releases{/id}","deployments_url":"https://api.github.com/repos/andela/troupon/deployments","created_at":"2015-08-12T09:56:57Z","updated_at":"2016-02-22T10:15:05Z","pushed_at":"2016-04-17T09:46:44Z","git_url":"git://github.com/andela/troupon.git","ssh_url":"git@github.com:andela/troupon.git","clone_url":"https://github.com/andela/troupon.git","svn_url":"https://github.com/andela/troupon","homepage":"http://troupon-staging.herokuapp.com/","size":5967,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/troupon/pulls/132"},"html":{"href":"https://github.com/andela/troupon/pull/132"},"issue":{"href":"https://api.github.com/repos/andela/troupon/issues/132"},"comments":{"href":"https://api.github.com/repos/andela/troupon/issues/132/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/troupon/pulls/132/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/troupon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/troupon/pulls/132/commits"},"statuses":{"href":"https://api.github.com/repos/andela/troupon/statuses/c0289ed800b042c812e704f8f0953f5421557721"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":21,"additions":320,"deletions":30,"changed_files":14}}