{"action":"created","comment":{"url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments/25232509","id":25232509,"diff_hunk":"@@ -64,6 +71,7 @@ class Transaction < ActiveRecord::Base\n   validates_presence_of :payment_gateway\n \n   monetize :minimum_commission_cents, with_model_currency: :minimum_commission_currency\n+  monetize :unit_price_cents, with_model_currency: :unit_price_currency","path":"app/models/transaction.rb","position":27,"original_position":27,"commit_id":"7d592907654aa8c43c7de845e0f03ebd0167aeac","original_commit_id":"7d592907654aa8c43c7de845e0f03ebd0167aeac","user":{"login":"ovan","id":271845,"avatar_url":"https://avatars.githubusercontent.com/u/271845?v=3","gravatar_id":"","url":"https://api.github.com/users/ovan","html_url":"https://github.com/ovan","followers_url":"https://api.github.com/users/ovan/followers","following_url":"https://api.github.com/users/ovan/following{/other_user}","gists_url":"https://api.github.com/users/ovan/gists{/gist_id}","starred_url":"https://api.github.com/users/ovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovan/subscriptions","organizations_url":"https://api.github.com/users/ovan/orgs","repos_url":"https://api.github.com/users/ovan/repos","events_url":"https://api.github.com/users/ovan/events{/privacy}","received_events_url":"https://api.github.com/users/ovan/received_events","type":"User","site_admin":false},"body":"I prefer all monetary values to be stored with separate currency to avoid update on one value to affect others. In this case the purpose is to never modify these amounts after insert but still it feels more clean this way.\r\n\r\nHaven't used the money rails gem too much so being explicit helped me understand what actually happens here. Makes the code more readable to me.","created_at":"2015-02-24T07:08:07Z","updated_at":"2015-02-24T07:08:07Z","html_url":"https://github.com/sharetribe/sharetribe/pull/1001#discussion_r25232509","pull_request_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1001","_links":{"self":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments/25232509"},"html":{"href":"https://github.com/sharetribe/sharetribe/pull/1001#discussion_r25232509"},"pull_request":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1001"}}},"pull_request":{"url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1001","id":29519207,"html_url":"https://github.com/sharetribe/sharetribe/pull/1001","diff_url":"https://github.com/sharetribe/sharetribe/pull/1001.diff","patch_url":"https://github.com/sharetribe/sharetribe/pull/1001.patch","issue_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/1001","number":1001,"state":"open","locked":false,"title":"Remove dependency to listing in tx service","user":{"login":"ovan","id":271845,"avatar_url":"https://avatars.githubusercontent.com/u/271845?v=3","gravatar_id":"","url":"https://api.github.com/users/ovan","html_url":"https://github.com/ovan","followers_url":"https://api.github.com/users/ovan/followers","following_url":"https://api.github.com/users/ovan/following{/other_user}","gists_url":"https://api.github.com/users/ovan/gists{/gist_id}","starred_url":"https://api.github.com/users/ovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovan/subscriptions","organizations_url":"https://api.github.com/users/ovan/orgs","repos_url":"https://api.github.com/users/ovan/repos","events_url":"https://api.github.com/users/ovan/events{/privacy}","received_events_url":"https://api.github.com/users/ovan/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-18T11:47:13Z","updated_at":"2015-02-24T07:08:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1afa4fde88b1141c39c8f9804d450f9e418fb905","assignee":{"login":"sktoiva","id":230815,"avatar_url":"https://avatars.githubusercontent.com/u/230815?v=3","gravatar_id":"","url":"https://api.github.com/users/sktoiva","html_url":"https://github.com/sktoiva","followers_url":"https://api.github.com/users/sktoiva/followers","following_url":"https://api.github.com/users/sktoiva/following{/other_user}","gists_url":"https://api.github.com/users/sktoiva/gists{/gist_id}","starred_url":"https://api.github.com/users/sktoiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sktoiva/subscriptions","organizations_url":"https://api.github.com/users/sktoiva/orgs","repos_url":"https://api.github.com/users/sktoiva/repos","events_url":"https://api.github.com/users/sktoiva/events{/privacy}","received_events_url":"https://api.github.com/users/sktoiva/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1001/commits","review_comments_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1001/comments","review_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/1001/comments","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/7d592907654aa8c43c7de845e0f03ebd0167aeac","head":{"label":"sharetribe:tx-service-rm-listing-dep","ref":"tx-service-rm-listing-dep","sha":"7d592907654aa8c43c7de845e0f03ebd0167aeac","user":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"repo":{"id":4447023,"name":"sharetribe","full_name":"sharetribe/sharetribe","owner":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sharetribe/sharetribe","description":"Open source marketplace platform","fork":false,"url":"https://api.github.com/repos/sharetribe/sharetribe","forks_url":"https://api.github.com/repos/sharetribe/sharetribe/forks","keys_url":"https://api.github.com/repos/sharetribe/sharetribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharetribe/sharetribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharetribe/sharetribe/teams","hooks_url":"https://api.github.com/repos/sharetribe/sharetribe/hooks","issue_events_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/events{/number}","events_url":"https://api.github.com/repos/sharetribe/sharetribe/events","assignees_url":"https://api.github.com/repos/sharetribe/sharetribe/assignees{/user}","branches_url":"https://api.github.com/repos/sharetribe/sharetribe/branches{/branch}","tags_url":"https://api.github.com/repos/sharetribe/sharetribe/tags","blobs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharetribe/sharetribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharetribe/sharetribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/{sha}","languages_url":"https://api.github.com/repos/sharetribe/sharetribe/languages","stargazers_url":"https://api.github.com/repos/sharetribe/sharetribe/stargazers","contributors_url":"https://api.github.com/repos/sharetribe/sharetribe/contributors","subscribers_url":"https://api.github.com/repos/sharetribe/sharetribe/subscribers","subscription_url":"https://api.github.com/repos/sharetribe/sharetribe/subscription","commits_url":"https://api.github.com/repos/sharetribe/sharetribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharetribe/sharetribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharetribe/sharetribe/contents/{+path}","compare_url":"https://api.github.com/repos/sharetribe/sharetribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharetribe/sharetribe/merges","archive_url":"https://api.github.com/repos/sharetribe/sharetribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharetribe/sharetribe/downloads","issues_url":"https://api.github.com/repos/sharetribe/sharetribe/issues{/number}","pulls_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls{/number}","milestones_url":"https://api.github.com/repos/sharetribe/sharetribe/milestones{/number}","notifications_url":"https://api.github.com/repos/sharetribe/sharetribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharetribe/sharetribe/labels{/name}","releases_url":"https://api.github.com/repos/sharetribe/sharetribe/releases{/id}","created_at":"2012-05-25T15:34:17Z","updated_at":"2015-02-23T12:16:22Z","pushed_at":"2015-02-24T06:57:45Z","git_url":"git://github.com/sharetribe/sharetribe.git","ssh_url":"git@github.com:sharetribe/sharetribe.git","clone_url":"https://github.com/sharetribe/sharetribe.git","svn_url":"https://github.com/sharetribe/sharetribe","homepage":"https://www.sharetribe.com","size":95977,"stargazers_count":224,"watchers_count":224,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":149,"mirror_url":null,"open_issues_count":18,"forks":149,"open_issues":18,"watchers":224,"default_branch":"master"}},"base":{"label":"sharetribe:master","ref":"master","sha":"151a1b6079b5e6f2ad7a81807ed0e5b61026b231","user":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"repo":{"id":4447023,"name":"sharetribe","full_name":"sharetribe/sharetribe","owner":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sharetribe/sharetribe","description":"Open source marketplace platform","fork":false,"url":"https://api.github.com/repos/sharetribe/sharetribe","forks_url":"https://api.github.com/repos/sharetribe/sharetribe/forks","keys_url":"https://api.github.com/repos/sharetribe/sharetribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharetribe/sharetribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharetribe/sharetribe/teams","hooks_url":"https://api.github.com/repos/sharetribe/sharetribe/hooks","issue_events_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/events{/number}","events_url":"https://api.github.com/repos/sharetribe/sharetribe/events","assignees_url":"https://api.github.com/repos/sharetribe/sharetribe/assignees{/user}","branches_url":"https://api.github.com/repos/sharetribe/sharetribe/branches{/branch}","tags_url":"https://api.github.com/repos/sharetribe/sharetribe/tags","blobs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharetribe/sharetribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharetribe/sharetribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/{sha}","languages_url":"https://api.github.com/repos/sharetribe/sharetribe/languages","stargazers_url":"https://api.github.com/repos/sharetribe/sharetribe/stargazers","contributors_url":"https://api.github.com/repos/sharetribe/sharetribe/contributors","subscribers_url":"https://api.github.com/repos/sharetribe/sharetribe/subscribers","subscription_url":"https://api.github.com/repos/sharetribe/sharetribe/subscription","commits_url":"https://api.github.com/repos/sharetribe/sharetribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharetribe/sharetribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharetribe/sharetribe/contents/{+path}","compare_url":"https://api.github.com/repos/sharetribe/sharetribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharetribe/sharetribe/merges","archive_url":"https://api.github.com/repos/sharetribe/sharetribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharetribe/sharetribe/downloads","issues_url":"https://api.github.com/repos/sharetribe/sharetribe/issues{/number}","pulls_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls{/number}","milestones_url":"https://api.github.com/repos/sharetribe/sharetribe/milestones{/number}","notifications_url":"https://api.github.com/repos/sharetribe/sharetribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharetribe/sharetribe/labels{/name}","releases_url":"https://api.github.com/repos/sharetribe/sharetribe/releases{/id}","created_at":"2012-05-25T15:34:17Z","updated_at":"2015-02-23T12:16:22Z","pushed_at":"2015-02-24T06:57:45Z","git_url":"git://github.com/sharetribe/sharetribe.git","ssh_url":"git@github.com:sharetribe/sharetribe.git","clone_url":"https://github.com/sharetribe/sharetribe.git","svn_url":"https://github.com/sharetribe/sharetribe","homepage":"https://www.sharetribe.com","size":95977,"stargazers_count":224,"watchers_count":224,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":149,"mirror_url":null,"open_issues_count":18,"forks":149,"open_issues":18,"watchers":224,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1001"},"html":{"href":"https://github.com/sharetribe/sharetribe/pull/1001"},"issue":{"href":"https://api.github.com/repos/sharetribe/sharetribe/issues/1001"},"comments":{"href":"https://api.github.com/repos/sharetribe/sharetribe/issues/1001/comments"},"review_comments":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1001/comments"},"review_comment":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1001/commits"},"statuses":{"href":"https://api.github.com/repos/sharetribe/sharetribe/statuses/7d592907654aa8c43c7de845e0f03ebd0167aeac"}}}}