{"action":"created","comment":{"url":"https://api.github.com/repos/big-neon/bn-api/pulls/comments/222940186","pull_request_review_id":161950153,"id":222940186,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjk0MDE4Ng==","diff_hunk":"@@ -50,6 +52,8 @@ pub fn get_error_message(code: ErrorCode) -> (i32, String) {\n         // Logical/Business errors - 7000 range. These represent errors\n         // that arise from an invalid setup in the database\n         BusinessProcessError => (7000, \"Business Process error\"),\n+        TicketAlreadyRedeemedError => (7001, \"Ticket has already been redeemed\"),","path":"db/src/utils/errors.rs","position":13,"original_position":13,"commit_id":"715a1d97efbe7685d7f7221d95ff47cada6bf49d","original_commit_id":"715a1d97efbe7685d7f7221d95ff47cada6bf49d","user":{"login":"philipr-za","id":25514413,"node_id":"MDQ6VXNlcjI1NTE0NDEz","avatar_url":"https://avatars2.githubusercontent.com/u/25514413?v=4","gravatar_id":"","url":"https://api.github.com/users/philipr-za","html_url":"https://github.com/philipr-za","followers_url":"https://api.github.com/users/philipr-za/followers","following_url":"https://api.github.com/users/philipr-za/following{/other_user}","gists_url":"https://api.github.com/users/philipr-za/gists{/gist_id}","starred_url":"https://api.github.com/users/philipr-za/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipr-za/subscriptions","organizations_url":"https://api.github.com/users/philipr-za/orgs","repos_url":"https://api.github.com/users/philipr-za/repos","events_url":"https://api.github.com/users/philipr-za/events{/privacy}","received_events_url":"https://api.github.com/users/philipr-za/received_events","type":"User","site_admin":false},"body":"We decided this was not actually an error case and decided to communicate these as results from the redeem() function.","created_at":"2018-10-05T09:11:42Z","updated_at":"2018-10-05T09:11:42Z","html_url":"https://github.com/big-neon/bn-api/pull/364#discussion_r222940186","pull_request_url":"https://api.github.com/repos/big-neon/bn-api/pulls/364","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/big-neon/bn-api/pulls/comments/222940186"},"html":{"href":"https://github.com/big-neon/bn-api/pull/364#discussion_r222940186"},"pull_request":{"href":"https://api.github.com/repos/big-neon/bn-api/pulls/364"}},"in_reply_to_id":222921561},"pull_request":{"url":"https://api.github.com/repos/big-neon/bn-api/pulls/364","id":220433226,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwNDMzMjI2","html_url":"https://github.com/big-neon/bn-api/pull/364","diff_url":"https://github.com/big-neon/bn-api/pull/364.diff","patch_url":"https://github.com/big-neon/bn-api/pull/364.patch","issue_url":"https://api.github.com/repos/big-neon/bn-api/issues/364","number":364,"state":"open","locked":false,"title":"Endpoint to redeem a ticket using the ticket_id and redeem key","user":{"login":"philipr-za","id":25514413,"node_id":"MDQ6VXNlcjI1NTE0NDEz","avatar_url":"https://avatars2.githubusercontent.com/u/25514413?v=4","gravatar_id":"","url":"https://api.github.com/users/philipr-za","html_url":"https://github.com/philipr-za","followers_url":"https://api.github.com/users/philipr-za/followers","following_url":"https://api.github.com/users/philipr-za/following{/other_user}","gists_url":"https://api.github.com/users/philipr-za/gists{/gist_id}","starred_url":"https://api.github.com/users/philipr-za/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipr-za/subscriptions","organizations_url":"https://api.github.com/users/philipr-za/orgs","repos_url":"https://api.github.com/users/philipr-za/repos","events_url":"https://api.github.com/users/philipr-za/events{/privacy}","received_events_url":"https://api.github.com/users/philipr-za/received_events","type":"User","site_admin":false},"body":"Closes https://github.com/big-neon/bn-api/issues/183\r\n\r\nThe PR adds a redeem_key to ticket_instances which are generated on completion of payment. An endpoint was created that allows a user with the TicketAdmin scope to redeem a ticket using the ticket_id and redeem_key which will be the data that is stored in the QR Code.","created_at":"2018-10-04T16:03:26Z","updated_at":"2018-10-05T09:11:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00fe6ea2a8d7e4d7f8ab57e14bee38236560a259","assignee":{"login":"philipr-za","id":25514413,"node_id":"MDQ6VXNlcjI1NTE0NDEz","avatar_url":"https://avatars2.githubusercontent.com/u/25514413?v=4","gravatar_id":"","url":"https://api.github.com/users/philipr-za","html_url":"https://github.com/philipr-za","followers_url":"https://api.github.com/users/philipr-za/followers","following_url":"https://api.github.com/users/philipr-za/following{/other_user}","gists_url":"https://api.github.com/users/philipr-za/gists{/gist_id}","starred_url":"https://api.github.com/users/philipr-za/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipr-za/subscriptions","organizations_url":"https://api.github.com/users/philipr-za/orgs","repos_url":"https://api.github.com/users/philipr-za/repos","events_url":"https://api.github.com/users/philipr-za/events{/privacy}","received_events_url":"https://api.github.com/users/philipr-za/received_events","type":"User","site_admin":false},"assignees":[{"login":"philipr-za","id":25514413,"node_id":"MDQ6VXNlcjI1NTE0NDEz","avatar_url":"https://avatars2.githubusercontent.com/u/25514413?v=4","gravatar_id":"","url":"https://api.github.com/users/philipr-za","html_url":"https://github.com/philipr-za","followers_url":"https://api.github.com/users/philipr-za/followers","following_url":"https://api.github.com/users/philipr-za/following{/other_user}","gists_url":"https://api.github.com/users/philipr-za/gists{/gist_id}","starred_url":"https://api.github.com/users/philipr-za/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipr-za/subscriptions","organizations_url":"https://api.github.com/users/philipr-za/orgs","repos_url":"https://api.github.com/users/philipr-za/repos","events_url":"https://api.github.com/users/philipr-za/events{/privacy}","received_events_url":"https://api.github.com/users/philipr-za/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1024552726,"node_id":"MDU6TGFiZWwxMDI0NTUyNzI2","url":"https://api.github.com/repos/big-neon/bn-api/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/big-neon/bn-api/pulls/364/commits","review_comments_url":"https://api.github.com/repos/big-neon/bn-api/pulls/364/comments","review_comment_url":"https://api.github.com/repos/big-neon/bn-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/big-neon/bn-api/issues/364/comments","statuses_url":"https://api.github.com/repos/big-neon/bn-api/statuses/715a1d97efbe7685d7f7221d95ff47cada6bf49d","head":{"label":"big-neon:philip-183-redeem-ticket-by-QR-code","ref":"philip-183-redeem-ticket-by-QR-code","sha":"715a1d97efbe7685d7f7221d95ff47cada6bf49d","user":{"login":"big-neon","id":37087976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MDg3OTc2","avatar_url":"https://avatars1.githubusercontent.com/u/37087976?v=4","gravatar_id":"","url":"https://api.github.com/users/big-neon","html_url":"https://github.com/big-neon","followers_url":"https://api.github.com/users/big-neon/followers","following_url":"https://api.github.com/users/big-neon/following{/other_user}","gists_url":"https://api.github.com/users/big-neon/gists{/gist_id}","starred_url":"https://api.github.com/users/big-neon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/big-neon/subscriptions","organizations_url":"https://api.github.com/users/big-neon/orgs","repos_url":"https://api.github.com/users/big-neon/repos","events_url":"https://api.github.com/users/big-neon/events{/privacy}","received_events_url":"https://api.github.com/users/big-neon/received_events","type":"Organization","site_admin":false},"repo":{"id":136637129,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY2MzcxMjk=","name":"bn-api","full_name":"big-neon/bn-api","private":false,"owner":{"login":"big-neon","id":37087976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MDg3OTc2","avatar_url":"https://avatars1.githubusercontent.com/u/37087976?v=4","gravatar_id":"","url":"https://api.github.com/users/big-neon","html_url":"https://github.com/big-neon","followers_url":"https://api.github.com/users/big-neon/followers","following_url":"https://api.github.com/users/big-neon/following{/other_user}","gists_url":"https://api.github.com/users/big-neon/gists{/gist_id}","starred_url":"https://api.github.com/users/big-neon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/big-neon/subscriptions","organizations_url":"https://api.github.com/users/big-neon/orgs","repos_url":"https://api.github.com/users/big-neon/repos","events_url":"https://api.github.com/users/big-neon/events{/privacy}","received_events_url":"https://api.github.com/users/big-neon/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/big-neon/bn-api","description":"The unified Big Neon API","fork":false,"url":"https://api.github.com/repos/big-neon/bn-api","forks_url":"https://api.github.com/repos/big-neon/bn-api/forks","keys_url":"https://api.github.com/repos/big-neon/bn-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/big-neon/bn-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/big-neon/bn-api/teams","hooks_url":"https://api.github.com/repos/big-neon/bn-api/hooks","issue_events_url":"https://api.github.com/repos/big-neon/bn-api/issues/events{/number}","events_url":"https://api.github.com/repos/big-neon/bn-api/events","assignees_url":"https://api.github.com/repos/big-neon/bn-api/assignees{/user}","branches_url":"https://api.github.com/repos/big-neon/bn-api/branches{/branch}","tags_url":"https://api.github.com/repos/big-neon/bn-api/tags","blobs_url":"https://api.github.com/repos/big-neon/bn-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/big-neon/bn-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/big-neon/bn-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/big-neon/bn-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/big-neon/bn-api/statuses/{sha}","languages_url":"https://api.github.com/repos/big-neon/bn-api/languages","stargazers_url":"https://api.github.com/repos/big-neon/bn-api/stargazers","contributors_url":"https://api.github.com/repos/big-neon/bn-api/contributors","subscribers_url":"https://api.github.com/repos/big-neon/bn-api/subscribers","subscription_url":"https://api.github.com/repos/big-neon/bn-api/subscription","commits_url":"https://api.github.com/repos/big-neon/bn-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/big-neon/bn-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/big-neon/bn-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/big-neon/bn-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/big-neon/bn-api/contents/{+path}","compare_url":"https://api.github.com/repos/big-neon/bn-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/big-neon/bn-api/merges","archive_url":"https://api.github.com/repos/big-neon/bn-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/big-neon/bn-api/downloads","issues_url":"https://api.github.com/repos/big-neon/bn-api/issues{/number}","pulls_url":"https://api.github.com/repos/big-neon/bn-api/pulls{/number}","milestones_url":"https://api.github.com/repos/big-neon/bn-api/milestones{/number}","notifications_url":"https://api.github.com/repos/big-neon/bn-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/big-neon/bn-api/labels{/name}","releases_url":"https://api.github.com/repos/big-neon/bn-api/releases{/id}","deployments_url":"https://api.github.com/repos/big-neon/bn-api/deployments","created_at":"2018-06-08T15:35:14Z","updated_at":"2018-10-04T14:28:35Z","pushed_at":"2018-10-05T06:20:50Z","git_url":"git://github.com/big-neon/bn-api.git","ssh_url":"git@github.com:big-neon/bn-api.git","clone_url":"https://github.com/big-neon/bn-api.git","svn_url":"https://github.com/big-neon/bn-api","homepage":null,"size":792,"stargazers_count":3,"watchers_count":3,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":58,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":1,"open_issues":58,"watchers":3,"default_branch":"master"}},"base":{"label":"big-neon:master","ref":"master","sha":"f18bb913cfce0d5309477af335685736fa8744cc","user":{"login":"big-neon","id":37087976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MDg3OTc2","avatar_url":"https://avatars1.githubusercontent.com/u/37087976?v=4","gravatar_id":"","url":"https://api.github.com/users/big-neon","html_url":"https://github.com/big-neon","followers_url":"https://api.github.com/users/big-neon/followers","following_url":"https://api.github.com/users/big-neon/following{/other_user}","gists_url":"https://api.github.com/users/big-neon/gists{/gist_id}","starred_url":"https://api.github.com/users/big-neon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/big-neon/subscriptions","organizations_url":"https://api.github.com/users/big-neon/orgs","repos_url":"https://api.github.com/users/big-neon/repos","events_url":"https://api.github.com/users/big-neon/events{/privacy}","received_events_url":"https://api.github.com/users/big-neon/received_events","type":"Organization","site_admin":false},"repo":{"id":136637129,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY2MzcxMjk=","name":"bn-api","full_name":"big-neon/bn-api","private":false,"owner":{"login":"big-neon","id":37087976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MDg3OTc2","avatar_url":"https://avatars1.githubusercontent.com/u/37087976?v=4","gravatar_id":"","url":"https://api.github.com/users/big-neon","html_url":"https://github.com/big-neon","followers_url":"https://api.github.com/users/big-neon/followers","following_url":"https://api.github.com/users/big-neon/following{/other_user}","gists_url":"https://api.github.com/users/big-neon/gists{/gist_id}","starred_url":"https://api.github.com/users/big-neon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/big-neon/subscriptions","organizations_url":"https://api.github.com/users/big-neon/orgs","repos_url":"https://api.github.com/users/big-neon/repos","events_url":"https://api.github.com/users/big-neon/events{/privacy}","received_events_url":"https://api.github.com/users/big-neon/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/big-neon/bn-api","description":"The unified Big Neon API","fork":false,"url":"https://api.github.com/repos/big-neon/bn-api","forks_url":"https://api.github.com/repos/big-neon/bn-api/forks","keys_url":"https://api.github.com/repos/big-neon/bn-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/big-neon/bn-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/big-neon/bn-api/teams","hooks_url":"https://api.github.com/repos/big-neon/bn-api/hooks","issue_events_url":"https://api.github.com/repos/big-neon/bn-api/issues/events{/number}","events_url":"https://api.github.com/repos/big-neon/bn-api/events","assignees_url":"https://api.github.com/repos/big-neon/bn-api/assignees{/user}","branches_url":"https://api.github.com/repos/big-neon/bn-api/branches{/branch}","tags_url":"https://api.github.com/repos/big-neon/bn-api/tags","blobs_url":"https://api.github.com/repos/big-neon/bn-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/big-neon/bn-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/big-neon/bn-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/big-neon/bn-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/big-neon/bn-api/statuses/{sha}","languages_url":"https://api.github.com/repos/big-neon/bn-api/languages","stargazers_url":"https://api.github.com/repos/big-neon/bn-api/stargazers","contributors_url":"https://api.github.com/repos/big-neon/bn-api/contributors","subscribers_url":"https://api.github.com/repos/big-neon/bn-api/subscribers","subscription_url":"https://api.github.com/repos/big-neon/bn-api/subscription","commits_url":"https://api.github.com/repos/big-neon/bn-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/big-neon/bn-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/big-neon/bn-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/big-neon/bn-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/big-neon/bn-api/contents/{+path}","compare_url":"https://api.github.com/repos/big-neon/bn-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/big-neon/bn-api/merges","archive_url":"https://api.github.com/repos/big-neon/bn-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/big-neon/bn-api/downloads","issues_url":"https://api.github.com/repos/big-neon/bn-api/issues{/number}","pulls_url":"https://api.github.com/repos/big-neon/bn-api/pulls{/number}","milestones_url":"https://api.github.com/repos/big-neon/bn-api/milestones{/number}","notifications_url":"https://api.github.com/repos/big-neon/bn-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/big-neon/bn-api/labels{/name}","releases_url":"https://api.github.com/repos/big-neon/bn-api/releases{/id}","deployments_url":"https://api.github.com/repos/big-neon/bn-api/deployments","created_at":"2018-06-08T15:35:14Z","updated_at":"2018-10-04T14:28:35Z","pushed_at":"2018-10-05T06:20:50Z","git_url":"git://github.com/big-neon/bn-api.git","ssh_url":"git@github.com:big-neon/bn-api.git","clone_url":"https://github.com/big-neon/bn-api.git","svn_url":"https://github.com/big-neon/bn-api","homepage":null,"size":792,"stargazers_count":3,"watchers_count":3,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":58,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":1,"open_issues":58,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/big-neon/bn-api/pulls/364"},"html":{"href":"https://github.com/big-neon/bn-api/pull/364"},"issue":{"href":"https://api.github.com/repos/big-neon/bn-api/issues/364"},"comments":{"href":"https://api.github.com/repos/big-neon/bn-api/issues/364/comments"},"review_comments":{"href":"https://api.github.com/repos/big-neon/bn-api/pulls/364/comments"},"review_comment":{"href":"https://api.github.com/repos/big-neon/bn-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/big-neon/bn-api/pulls/364/commits"},"statuses":{"href":"https://api.github.com/repos/big-neon/bn-api/statuses/715a1d97efbe7685d7f7221d95ff47cada6bf49d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"philipr-za"}}