{"action":"created","comment":{"url":"https://api.github.com/repos/bwittenbrook3/apart/pulls/comments/26548357","id":26548357,"diff_hunk":"@@ -1,14 +1,24 @@\n class User < ActiveRecord::Base\n   rolify\n   after_initialize :set_default_role, :if => :new_record?\n-  after_create :choose_subscription\n+  before_create :setup_braintree_customer\n+  after_create :initialize_payment_plan\n   attr_accessor :login\n \n   def set_default_role\n     self.add_role :user\n   end\n \n-  def choose_subscription\n+  def setup_braintree_customer\n+    result = Braintree::Customer.create(email: self.email)","path":"app/models/user.rb","position":15,"original_position":15,"commit_id":"34c30456ad0765c5b7028c32679875c209badd05","original_commit_id":"34c30456ad0765c5b7028c32679875c209badd05","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Redundant `self` detected.","created_at":"2015-03-17T04:13:37Z","updated_at":"2015-03-17T04:13:37Z","html_url":"https://github.com/bwittenbrook3/apart/pull/9#discussion_r26548357","pull_request_url":"https://api.github.com/repos/bwittenbrook3/apart/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/bwittenbrook3/apart/pulls/comments/26548357"},"html":{"href":"https://github.com/bwittenbrook3/apart/pull/9#discussion_r26548357"},"pull_request":{"href":"https://api.github.com/repos/bwittenbrook3/apart/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/bwittenbrook3/apart/pulls/9","id":31306141,"html_url":"https://github.com/bwittenbrook3/apart/pull/9","diff_url":"https://github.com/bwittenbrook3/apart/pull/9.diff","patch_url":"https://github.com/bwittenbrook3/apart/pull/9.patch","issue_url":"https://api.github.com/repos/bwittenbrook3/apart/issues/9","number":9,"state":"open","locked":false,"title":"Added in braintree payment functionality and testing suite.","user":{"login":"bwittenbrook3","id":5309252,"avatar_url":"https://avatars.githubusercontent.com/u/5309252?v=3","gravatar_id":"","url":"https://api.github.com/users/bwittenbrook3","html_url":"https://github.com/bwittenbrook3","followers_url":"https://api.github.com/users/bwittenbrook3/followers","following_url":"https://api.github.com/users/bwittenbrook3/following{/other_user}","gists_url":"https://api.github.com/users/bwittenbrook3/gists{/gist_id}","starred_url":"https://api.github.com/users/bwittenbrook3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwittenbrook3/subscriptions","organizations_url":"https://api.github.com/users/bwittenbrook3/orgs","repos_url":"https://api.github.com/users/bwittenbrook3/repos","events_url":"https://api.github.com/users/bwittenbrook3/events{/privacy}","received_events_url":"https://api.github.com/users/bwittenbrook3/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-17T04:13:32Z","updated_at":"2015-03-17T04:13:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0cb62159205b90da04838b2703befed07a4f136","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bwittenbrook3/apart/pulls/9/commits","review_comments_url":"https://api.github.com/repos/bwittenbrook3/apart/pulls/9/comments","review_comment_url":"https://api.github.com/repos/bwittenbrook3/apart/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bwittenbrook3/apart/issues/9/comments","statuses_url":"https://api.github.com/repos/bwittenbrook3/apart/statuses/34c30456ad0765c5b7028c32679875c209badd05","head":{"label":"bwittenbrook3:bradley-dev","ref":"bradley-dev","sha":"34c30456ad0765c5b7028c32679875c209badd05","user":{"login":"bwittenbrook3","id":5309252,"avatar_url":"https://avatars.githubusercontent.com/u/5309252?v=3","gravatar_id":"","url":"https://api.github.com/users/bwittenbrook3","html_url":"https://github.com/bwittenbrook3","followers_url":"https://api.github.com/users/bwittenbrook3/followers","following_url":"https://api.github.com/users/bwittenbrook3/following{/other_user}","gists_url":"https://api.github.com/users/bwittenbrook3/gists{/gist_id}","starred_url":"https://api.github.com/users/bwittenbrook3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwittenbrook3/subscriptions","organizations_url":"https://api.github.com/users/bwittenbrook3/orgs","repos_url":"https://api.github.com/users/bwittenbrook3/repos","events_url":"https://api.github.com/users/bwittenbrook3/events{/privacy}","received_events_url":"https://api.github.com/users/bwittenbrook3/received_events","type":"User","site_admin":false},"repo":{"id":31518634,"name":"apart","full_name":"bwittenbrook3/apart","owner":{"login":"bwittenbrook3","id":5309252,"avatar_url":"https://avatars.githubusercontent.com/u/5309252?v=3","gravatar_id":"","url":"https://api.github.com/users/bwittenbrook3","html_url":"https://github.com/bwittenbrook3","followers_url":"https://api.github.com/users/bwittenbrook3/followers","following_url":"https://api.github.com/users/bwittenbrook3/following{/other_user}","gists_url":"https://api.github.com/users/bwittenbrook3/gists{/gist_id}","starred_url":"https://api.github.com/users/bwittenbrook3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwittenbrook3/subscriptions","organizations_url":"https://api.github.com/users/bwittenbrook3/orgs","repos_url":"https://api.github.com/users/bwittenbrook3/repos","events_url":"https://api.github.com/users/bwittenbrook3/events{/privacy}","received_events_url":"https://api.github.com/users/bwittenbrook3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bwittenbrook3/apart","description":"","fork":false,"url":"https://api.github.com/repos/bwittenbrook3/apart","forks_url":"https://api.github.com/repos/bwittenbrook3/apart/forks","keys_url":"https://api.github.com/repos/bwittenbrook3/apart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bwittenbrook3/apart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bwittenbrook3/apart/teams","hooks_url":"https://api.github.com/repos/bwittenbrook3/apart/hooks","issue_events_url":"https://api.github.com/repos/bwittenbrook3/apart/issues/events{/number}","events_url":"https://api.github.com/repos/bwittenbrook3/apart/events","assignees_url":"https://api.github.com/repos/bwittenbrook3/apart/assignees{/user}","branches_url":"https://api.github.com/repos/bwittenbrook3/apart/branches{/branch}","tags_url":"https://api.github.com/repos/bwittenbrook3/apart/tags","blobs_url":"https://api.github.com/repos/bwittenbrook3/apart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bwittenbrook3/apart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bwittenbrook3/apart/git/refs{/sha}","trees_url":"https://api.github.com/repos/bwittenbrook3/apart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bwittenbrook3/apart/statuses/{sha}","languages_url":"https://api.github.com/repos/bwittenbrook3/apart/languages","stargazers_url":"https://api.github.com/repos/bwittenbrook3/apart/stargazers","contributors_url":"https://api.github.com/repos/bwittenbrook3/apart/contributors","subscribers_url":"https://api.github.com/repos/bwittenbrook3/apart/subscribers","subscription_url":"https://api.github.com/repos/bwittenbrook3/apart/subscription","commits_url":"https://api.github.com/repos/bwittenbrook3/apart/commits{/sha}","git_commits_url":"https://api.github.com/repos/bwittenbrook3/apart/git/commits{/sha}","comments_url":"https://api.github.com/repos/bwittenbrook3/apart/comments{/number}","issue_comment_url":"https://api.github.com/repos/bwittenbrook3/apart/issues/comments{/number}","contents_url":"https://api.github.com/repos/bwittenbrook3/apart/contents/{+path}","compare_url":"https://api.github.com/repos/bwittenbrook3/apart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bwittenbrook3/apart/merges","archive_url":"https://api.github.com/repos/bwittenbrook3/apart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bwittenbrook3/apart/downloads","issues_url":"https://api.github.com/repos/bwittenbrook3/apart/issues{/number}","pulls_url":"https://api.github.com/repos/bwittenbrook3/apart/pulls{/number}","milestones_url":"https://api.github.com/repos/bwittenbrook3/apart/milestones{/number}","notifications_url":"https://api.github.com/repos/bwittenbrook3/apart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bwittenbrook3/apart/labels{/name}","releases_url":"https://api.github.com/repos/bwittenbrook3/apart/releases{/id}","created_at":"2015-03-02T01:48:01Z","updated_at":"2015-03-15T02:45:01Z","pushed_at":"2015-03-17T04:13:10Z","git_url":"git://github.com/bwittenbrook3/apart.git","ssh_url":"git@github.com:bwittenbrook3/apart.git","clone_url":"https://github.com/bwittenbrook3/apart.git","svn_url":"https://github.com/bwittenbrook3/apart","homepage":null,"size":968,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"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"}},"base":{"label":"bwittenbrook3:master","ref":"master","sha":"974f99a4839a48cbdc1fb975857335b3b707845f","user":{"login":"bwittenbrook3","id":5309252,"avatar_url":"https://avatars.githubusercontent.com/u/5309252?v=3","gravatar_id":"","url":"https://api.github.com/users/bwittenbrook3","html_url":"https://github.com/bwittenbrook3","followers_url":"https://api.github.com/users/bwittenbrook3/followers","following_url":"https://api.github.com/users/bwittenbrook3/following{/other_user}","gists_url":"https://api.github.com/users/bwittenbrook3/gists{/gist_id}","starred_url":"https://api.github.com/users/bwittenbrook3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwittenbrook3/subscriptions","organizations_url":"https://api.github.com/users/bwittenbrook3/orgs","repos_url":"https://api.github.com/users/bwittenbrook3/repos","events_url":"https://api.github.com/users/bwittenbrook3/events{/privacy}","received_events_url":"https://api.github.com/users/bwittenbrook3/received_events","type":"User","site_admin":false},"repo":{"id":31518634,"name":"apart","full_name":"bwittenbrook3/apart","owner":{"login":"bwittenbrook3","id":5309252,"avatar_url":"https://avatars.githubusercontent.com/u/5309252?v=3","gravatar_id":"","url":"https://api.github.com/users/bwittenbrook3","html_url":"https://github.com/bwittenbrook3","followers_url":"https://api.github.com/users/bwittenbrook3/followers","following_url":"https://api.github.com/users/bwittenbrook3/following{/other_user}","gists_url":"https://api.github.com/users/bwittenbrook3/gists{/gist_id}","starred_url":"https://api.github.com/users/bwittenbrook3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwittenbrook3/subscriptions","organizations_url":"https://api.github.com/users/bwittenbrook3/orgs","repos_url":"https://api.github.com/users/bwittenbrook3/repos","events_url":"https://api.github.com/users/bwittenbrook3/events{/privacy}","received_events_url":"https://api.github.com/users/bwittenbrook3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bwittenbrook3/apart","description":"","fork":false,"url":"https://api.github.com/repos/bwittenbrook3/apart","forks_url":"https://api.github.com/repos/bwittenbrook3/apart/forks","keys_url":"https://api.github.com/repos/bwittenbrook3/apart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bwittenbrook3/apart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bwittenbrook3/apart/teams","hooks_url":"https://api.github.com/repos/bwittenbrook3/apart/hooks","issue_events_url":"https://api.github.com/repos/bwittenbrook3/apart/issues/events{/number}","events_url":"https://api.github.com/repos/bwittenbrook3/apart/events","assignees_url":"https://api.github.com/repos/bwittenbrook3/apart/assignees{/user}","branches_url":"https://api.github.com/repos/bwittenbrook3/apart/branches{/branch}","tags_url":"https://api.github.com/repos/bwittenbrook3/apart/tags","blobs_url":"https://api.github.com/repos/bwittenbrook3/apart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bwittenbrook3/apart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bwittenbrook3/apart/git/refs{/sha}","trees_url":"https://api.github.com/repos/bwittenbrook3/apart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bwittenbrook3/apart/statuses/{sha}","languages_url":"https://api.github.com/repos/bwittenbrook3/apart/languages","stargazers_url":"https://api.github.com/repos/bwittenbrook3/apart/stargazers","contributors_url":"https://api.github.com/repos/bwittenbrook3/apart/contributors","subscribers_url":"https://api.github.com/repos/bwittenbrook3/apart/subscribers","subscription_url":"https://api.github.com/repos/bwittenbrook3/apart/subscription","commits_url":"https://api.github.com/repos/bwittenbrook3/apart/commits{/sha}","git_commits_url":"https://api.github.com/repos/bwittenbrook3/apart/git/commits{/sha}","comments_url":"https://api.github.com/repos/bwittenbrook3/apart/comments{/number}","issue_comment_url":"https://api.github.com/repos/bwittenbrook3/apart/issues/comments{/number}","contents_url":"https://api.github.com/repos/bwittenbrook3/apart/contents/{+path}","compare_url":"https://api.github.com/repos/bwittenbrook3/apart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bwittenbrook3/apart/merges","archive_url":"https://api.github.com/repos/bwittenbrook3/apart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bwittenbrook3/apart/downloads","issues_url":"https://api.github.com/repos/bwittenbrook3/apart/issues{/number}","pulls_url":"https://api.github.com/repos/bwittenbrook3/apart/pulls{/number}","milestones_url":"https://api.github.com/repos/bwittenbrook3/apart/milestones{/number}","notifications_url":"https://api.github.com/repos/bwittenbrook3/apart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bwittenbrook3/apart/labels{/name}","releases_url":"https://api.github.com/repos/bwittenbrook3/apart/releases{/id}","created_at":"2015-03-02T01:48:01Z","updated_at":"2015-03-15T02:45:01Z","pushed_at":"2015-03-17T04:13:10Z","git_url":"git://github.com/bwittenbrook3/apart.git","ssh_url":"git@github.com:bwittenbrook3/apart.git","clone_url":"https://github.com/bwittenbrook3/apart.git","svn_url":"https://github.com/bwittenbrook3/apart","homepage":null,"size":968,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"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/bwittenbrook3/apart/pulls/9"},"html":{"href":"https://github.com/bwittenbrook3/apart/pull/9"},"issue":{"href":"https://api.github.com/repos/bwittenbrook3/apart/issues/9"},"comments":{"href":"https://api.github.com/repos/bwittenbrook3/apart/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/bwittenbrook3/apart/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/bwittenbrook3/apart/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bwittenbrook3/apart/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/bwittenbrook3/apart/statuses/34c30456ad0765c5b7028c32679875c209badd05"}}}}