{"action":"created","comment":{"url":"https://api.github.com/repos/georgestam/veronica/pulls/comments/110605379","pull_request_review_id":31788578,"id":110605379,"diff_hunk":"@@ -0,0 +1,105 @@\n+class OrdersController < ApplicationController\n+  \n+  before_action :authenticate_user!\n+  before_action :set_journey, only: %i(new create checkout)\n+  before_action :set_order, only: %i(checkout charge)\n+  before_action :instantiate_order, only: %i(create)\n+  before_action :ensure_booking_is_active, only: %i(new checkout create)\n+  \n+  def checkout\n+  end\n+  \n+  def new\n+    @minutes = Order.calculate_minutes(@journey)","path":"app/controllers/orders_controller.rb","position":13,"original_position":13,"commit_id":"42059e211d9614985624d6367378884ca96c5bce","original_commit_id":"42059e211d9614985624d6367378884ca96c5bce","user":{"login":"vemv","id":1162994,"avatar_url":"https://avatars2.githubusercontent.com/u/1162994?v=3","gravatar_id":"","url":"https://api.github.com/users/vemv","html_url":"https://github.com/vemv","followers_url":"https://api.github.com/users/vemv/followers","following_url":"https://api.github.com/users/vemv/following{/other_user}","gists_url":"https://api.github.com/users/vemv/gists{/gist_id}","starred_url":"https://api.github.com/users/vemv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vemv/subscriptions","organizations_url":"https://api.github.com/users/vemv/orgs","repos_url":"https://api.github.com/users/vemv/repos","events_url":"https://api.github.com/users/vemv/events{/privacy}","received_events_url":"https://api.github.com/users/vemv/received_events","type":"User","site_admin":false},"body":"minutes of what?\r\n\r\nI suggest renaming this variable to something more descriptive\r\n\r\nimparted_minutes, billable_minutes, something like that (don't know the answer for this case)","created_at":"2017-04-10T09:04:08Z","updated_at":"2017-04-10T09:14:49Z","html_url":"https://github.com/georgestam/veronica/pull/56#discussion_r110605379","pull_request_url":"https://api.github.com/repos/georgestam/veronica/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/georgestam/veronica/pulls/comments/110605379"},"html":{"href":"https://github.com/georgestam/veronica/pull/56#discussion_r110605379"},"pull_request":{"href":"https://api.github.com/repos/georgestam/veronica/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/georgestam/veronica/pulls/56","id":114919072,"html_url":"https://github.com/georgestam/veronica/pull/56","diff_url":"https://github.com/georgestam/veronica/pull/56.diff","patch_url":"https://github.com/georgestam/veronica/pull/56.patch","issue_url":"https://api.github.com/repos/georgestam/veronica/issues/56","number":56,"state":"open","locked":false,"title":"Stripe and orders table implementation","user":{"login":"georgestam","id":16335156,"avatar_url":"https://avatars2.githubusercontent.com/u/16335156?v=3","gravatar_id":"","url":"https://api.github.com/users/georgestam","html_url":"https://github.com/georgestam","followers_url":"https://api.github.com/users/georgestam/followers","following_url":"https://api.github.com/users/georgestam/following{/other_user}","gists_url":"https://api.github.com/users/georgestam/gists{/gist_id}","starred_url":"https://api.github.com/users/georgestam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgestam/subscriptions","organizations_url":"https://api.github.com/users/georgestam/orgs","repos_url":"https://api.github.com/users/georgestam/repos","events_url":"https://api.github.com/users/georgestam/events{/privacy}","received_events_url":"https://api.github.com/users/georgestam/received_events","type":"User","site_admin":false},"body":"@vemv PR from issue #43 and #24. \r\nThe workflow is as follows:\r\n- Teacher input hours in their booking card (as per 9fd8bd20309c361a3be69edc58722fb64ffdf183)\r\n- Whenever the teacher feels convenient, he/she clicks the button to create an invoice.\r\n- Teacher input all the hours (in minutes) outstanding i.e. not paid yet), and create the order (old invoices are canceled by default). \r\n- An email is sent to the parent with a link to pay.\r\n- Parent click the link, review the details and click the stripe button to pay the invoice.  \r\n\r\nThis feature works but I have the following comments:\r\n- I cannot use your vemv engine because when `@order.charge!`is called,  I get:  `uninitialized constant Invoiceable::SpaceOrder`, as `invoiceable.rb`module calls to `space_order.rb`. Therefore I created a simple version of the action `charge` in  `order_controller.rb`\r\n- I have added the `config.i18n.load_path += Dir[Rails.root.join('config/locales/**/*.yml').to_s]` in `application.rb`in order to have the mailers locales in `config/locales/en/mailers.yml`. However, it seems not to be working (I have located for now all the mailers translations in the main `en.yml`).  \r\n- I still have to implement the testing.\r\n- Rspec is now failing because mailers have to be moved  moved now within `mailers/action/..`","created_at":"2017-04-07T23:35:46Z","updated_at":"2017-04-10T09:14:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0df1e0401ee4d5275f41ebdb34f50a6fa41d6051","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/georgestam/veronica/pulls/56/commits","review_comments_url":"https://api.github.com/repos/georgestam/veronica/pulls/56/comments","review_comment_url":"https://api.github.com/repos/georgestam/veronica/pulls/comments{/number}","comments_url":"https://api.github.com/repos/georgestam/veronica/issues/56/comments","statuses_url":"https://api.github.com/repos/georgestam/veronica/statuses/42059e211d9614985624d6367378884ca96c5bce","head":{"label":"georgestam:stripe-implementation","ref":"stripe-implementation","sha":"42059e211d9614985624d6367378884ca96c5bce","user":{"login":"georgestam","id":16335156,"avatar_url":"https://avatars2.githubusercontent.com/u/16335156?v=3","gravatar_id":"","url":"https://api.github.com/users/georgestam","html_url":"https://github.com/georgestam","followers_url":"https://api.github.com/users/georgestam/followers","following_url":"https://api.github.com/users/georgestam/following{/other_user}","gists_url":"https://api.github.com/users/georgestam/gists{/gist_id}","starred_url":"https://api.github.com/users/georgestam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgestam/subscriptions","organizations_url":"https://api.github.com/users/georgestam/orgs","repos_url":"https://api.github.com/users/georgestam/repos","events_url":"https://api.github.com/users/georgestam/events{/privacy}","received_events_url":"https://api.github.com/users/georgestam/received_events","type":"User","site_admin":false},"repo":{"id":69020069,"name":"veronica","full_name":"georgestam/veronica","owner":{"login":"georgestam","id":16335156,"avatar_url":"https://avatars2.githubusercontent.com/u/16335156?v=3","gravatar_id":"","url":"https://api.github.com/users/georgestam","html_url":"https://github.com/georgestam","followers_url":"https://api.github.com/users/georgestam/followers","following_url":"https://api.github.com/users/georgestam/following{/other_user}","gists_url":"https://api.github.com/users/georgestam/gists{/gist_id}","starred_url":"https://api.github.com/users/georgestam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgestam/subscriptions","organizations_url":"https://api.github.com/users/georgestam/orgs","repos_url":"https://api.github.com/users/georgestam/repos","events_url":"https://api.github.com/users/georgestam/events{/privacy}","received_events_url":"https://api.github.com/users/georgestam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/georgestam/veronica","description":null,"fork":false,"url":"https://api.github.com/repos/georgestam/veronica","forks_url":"https://api.github.com/repos/georgestam/veronica/forks","keys_url":"https://api.github.com/repos/georgestam/veronica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/georgestam/veronica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/georgestam/veronica/teams","hooks_url":"https://api.github.com/repos/georgestam/veronica/hooks","issue_events_url":"https://api.github.com/repos/georgestam/veronica/issues/events{/number}","events_url":"https://api.github.com/repos/georgestam/veronica/events","assignees_url":"https://api.github.com/repos/georgestam/veronica/assignees{/user}","branches_url":"https://api.github.com/repos/georgestam/veronica/branches{/branch}","tags_url":"https://api.github.com/repos/georgestam/veronica/tags","blobs_url":"https://api.github.com/repos/georgestam/veronica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/georgestam/veronica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/georgestam/veronica/git/refs{/sha}","trees_url":"https://api.github.com/repos/georgestam/veronica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/georgestam/veronica/statuses/{sha}","languages_url":"https://api.github.com/repos/georgestam/veronica/languages","stargazers_url":"https://api.github.com/repos/georgestam/veronica/stargazers","contributors_url":"https://api.github.com/repos/georgestam/veronica/contributors","subscribers_url":"https://api.github.com/repos/georgestam/veronica/subscribers","subscription_url":"https://api.github.com/repos/georgestam/veronica/subscription","commits_url":"https://api.github.com/repos/georgestam/veronica/commits{/sha}","git_commits_url":"https://api.github.com/repos/georgestam/veronica/git/commits{/sha}","comments_url":"https://api.github.com/repos/georgestam/veronica/comments{/number}","issue_comment_url":"https://api.github.com/repos/georgestam/veronica/issues/comments{/number}","contents_url":"https://api.github.com/repos/georgestam/veronica/contents/{+path}","compare_url":"https://api.github.com/repos/georgestam/veronica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/georgestam/veronica/merges","archive_url":"https://api.github.com/repos/georgestam/veronica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/georgestam/veronica/downloads","issues_url":"https://api.github.com/repos/georgestam/veronica/issues{/number}","pulls_url":"https://api.github.com/repos/georgestam/veronica/pulls{/number}","milestones_url":"https://api.github.com/repos/georgestam/veronica/milestones{/number}","notifications_url":"https://api.github.com/repos/georgestam/veronica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/georgestam/veronica/labels{/name}","releases_url":"https://api.github.com/repos/georgestam/veronica/releases{/id}","deployments_url":"https://api.github.com/repos/georgestam/veronica/deployments","created_at":"2016-09-23T11:47:52Z","updated_at":"2017-03-09T16:01:42Z","pushed_at":"2017-04-09T22:59:47Z","git_url":"git://github.com/georgestam/veronica.git","ssh_url":"git@github.com:georgestam/veronica.git","clone_url":"https://github.com/georgestam/veronica.git","svn_url":"https://github.com/georgestam/veronica","homepage":null,"size":44458,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":22,"forks":2,"open_issues":22,"watchers":2,"default_branch":"master"}},"base":{"label":"georgestam:master","ref":"master","sha":"bb09318dbb27573d73a4ca5c2dc34c02786a053f","user":{"login":"georgestam","id":16335156,"avatar_url":"https://avatars2.githubusercontent.com/u/16335156?v=3","gravatar_id":"","url":"https://api.github.com/users/georgestam","html_url":"https://github.com/georgestam","followers_url":"https://api.github.com/users/georgestam/followers","following_url":"https://api.github.com/users/georgestam/following{/other_user}","gists_url":"https://api.github.com/users/georgestam/gists{/gist_id}","starred_url":"https://api.github.com/users/georgestam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgestam/subscriptions","organizations_url":"https://api.github.com/users/georgestam/orgs","repos_url":"https://api.github.com/users/georgestam/repos","events_url":"https://api.github.com/users/georgestam/events{/privacy}","received_events_url":"https://api.github.com/users/georgestam/received_events","type":"User","site_admin":false},"repo":{"id":69020069,"name":"veronica","full_name":"georgestam/veronica","owner":{"login":"georgestam","id":16335156,"avatar_url":"https://avatars2.githubusercontent.com/u/16335156?v=3","gravatar_id":"","url":"https://api.github.com/users/georgestam","html_url":"https://github.com/georgestam","followers_url":"https://api.github.com/users/georgestam/followers","following_url":"https://api.github.com/users/georgestam/following{/other_user}","gists_url":"https://api.github.com/users/georgestam/gists{/gist_id}","starred_url":"https://api.github.com/users/georgestam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgestam/subscriptions","organizations_url":"https://api.github.com/users/georgestam/orgs","repos_url":"https://api.github.com/users/georgestam/repos","events_url":"https://api.github.com/users/georgestam/events{/privacy}","received_events_url":"https://api.github.com/users/georgestam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/georgestam/veronica","description":null,"fork":false,"url":"https://api.github.com/repos/georgestam/veronica","forks_url":"https://api.github.com/repos/georgestam/veronica/forks","keys_url":"https://api.github.com/repos/georgestam/veronica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/georgestam/veronica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/georgestam/veronica/teams","hooks_url":"https://api.github.com/repos/georgestam/veronica/hooks","issue_events_url":"https://api.github.com/repos/georgestam/veronica/issues/events{/number}","events_url":"https://api.github.com/repos/georgestam/veronica/events","assignees_url":"https://api.github.com/repos/georgestam/veronica/assignees{/user}","branches_url":"https://api.github.com/repos/georgestam/veronica/branches{/branch}","tags_url":"https://api.github.com/repos/georgestam/veronica/tags","blobs_url":"https://api.github.com/repos/georgestam/veronica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/georgestam/veronica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/georgestam/veronica/git/refs{/sha}","trees_url":"https://api.github.com/repos/georgestam/veronica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/georgestam/veronica/statuses/{sha}","languages_url":"https://api.github.com/repos/georgestam/veronica/languages","stargazers_url":"https://api.github.com/repos/georgestam/veronica/stargazers","contributors_url":"https://api.github.com/repos/georgestam/veronica/contributors","subscribers_url":"https://api.github.com/repos/georgestam/veronica/subscribers","subscription_url":"https://api.github.com/repos/georgestam/veronica/subscription","commits_url":"https://api.github.com/repos/georgestam/veronica/commits{/sha}","git_commits_url":"https://api.github.com/repos/georgestam/veronica/git/commits{/sha}","comments_url":"https://api.github.com/repos/georgestam/veronica/comments{/number}","issue_comment_url":"https://api.github.com/repos/georgestam/veronica/issues/comments{/number}","contents_url":"https://api.github.com/repos/georgestam/veronica/contents/{+path}","compare_url":"https://api.github.com/repos/georgestam/veronica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/georgestam/veronica/merges","archive_url":"https://api.github.com/repos/georgestam/veronica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/georgestam/veronica/downloads","issues_url":"https://api.github.com/repos/georgestam/veronica/issues{/number}","pulls_url":"https://api.github.com/repos/georgestam/veronica/pulls{/number}","milestones_url":"https://api.github.com/repos/georgestam/veronica/milestones{/number}","notifications_url":"https://api.github.com/repos/georgestam/veronica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/georgestam/veronica/labels{/name}","releases_url":"https://api.github.com/repos/georgestam/veronica/releases{/id}","deployments_url":"https://api.github.com/repos/georgestam/veronica/deployments","created_at":"2016-09-23T11:47:52Z","updated_at":"2017-03-09T16:01:42Z","pushed_at":"2017-04-09T22:59:47Z","git_url":"git://github.com/georgestam/veronica.git","ssh_url":"git@github.com:georgestam/veronica.git","clone_url":"https://github.com/georgestam/veronica.git","svn_url":"https://github.com/georgestam/veronica","homepage":null,"size":44458,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":22,"forks":2,"open_issues":22,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/georgestam/veronica/pulls/56"},"html":{"href":"https://github.com/georgestam/veronica/pull/56"},"issue":{"href":"https://api.github.com/repos/georgestam/veronica/issues/56"},"comments":{"href":"https://api.github.com/repos/georgestam/veronica/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/georgestam/veronica/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/georgestam/veronica/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/georgestam/veronica/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/georgestam/veronica/statuses/42059e211d9614985624d6367378884ca96c5bce"}}}}
{"actor":{"display_login":"vemv"}}