{"action":"created","comment":{"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/comments/50086615","id":50086615,"diff_hunk":"@@ -0,0 +1,187 @@\n+package io.sphere.sdk.reviews;\n+\n+import com.fasterxml.jackson.core.type.TypeReference;\n+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;\n+import io.sphere.sdk.customers.Customer;\n+import io.sphere.sdk.models.Reference;\n+import io.sphere.sdk.models.Resource;\n+import io.sphere.sdk.states.State;\n+import io.sphere.sdk.types.Custom;\n+import io.sphere.sdk.types.CustomFields;\n+\n+import javax.annotation.Nullable;\n+import java.util.Locale;\n+\n+/**\n+  Reviews are used to evaluate products and channels.\n+\n+  <h3 id=review-approval-process>Review Approval Process</h3>\n+\n+  <p>If you do not need any approval process, skip this part.</p>\n+\n+ <p>If we have an approval process for a review to be used for a product or a channel, we model the approval process with a state machine.</p>\n+\n+ <p>First of all, we create the approved state. Then we create the initial to-approve state, which has a possible transition to the approved state:</p>\n+\n+ {@include.example io.sphere.sdk.reviews.approvaldemo.CreateReviewStates}\n+\n+ Only states with {@link io.sphere.sdk.states.StateRole#REVIEW_INCLUDED_IN_STATISTICS} makes review ratings count in statistics.\n+\n+ <h4 id=creating-reviews>Creating reviews</h4>\n+ <p>Now we can create a review in the initial state to-approve:</p>\n+\n+ {@include.example io.sphere.sdk.reviews.approvaldemo.CreateReviewToApprove}\n+\n+ <h4 id=query-to-approve-reviews>Query which reviews should be approved</h4>","path":"sphere-models/src/main/java/io/sphere/sdk/reviews/Review.java","position":35,"original_position":35,"commit_id":"5411535fd584f85b3f0ce374c39b09281442eaf5","original_commit_id":"5411535fd584f85b3f0ce374c39b09281442eaf5","user":{"login":"lauraluiz","id":1917621,"avatar_url":"https://avatars.githubusercontent.com/u/1917621?v=3","gravatar_id":"","url":"https://api.github.com/users/lauraluiz","html_url":"https://github.com/lauraluiz","followers_url":"https://api.github.com/users/lauraluiz/followers","following_url":"https://api.github.com/users/lauraluiz/following{/other_user}","gists_url":"https://api.github.com/users/lauraluiz/gists{/gist_id}","starred_url":"https://api.github.com/users/lauraluiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauraluiz/subscriptions","organizations_url":"https://api.github.com/users/lauraluiz/orgs","repos_url":"https://api.github.com/users/lauraluiz/repos","events_url":"https://api.github.com/users/lauraluiz/events{/privacy}","received_events_url":"https://api.github.com/users/lauraluiz/received_events","type":"User","site_admin":false},"body":"\"Querying which reviews should be approved\" as we had the rest of the titles \"creating, approving, displaying...\"","created_at":"2016-01-19T09:02:48Z","updated_at":"2016-01-19T09:02:48Z","html_url":"https://github.com/sphereio/sphere-jvm-sdk/pull/930#discussion_r50086615","pull_request_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/930","_links":{"self":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/comments/50086615"},"html":{"href":"https://github.com/sphereio/sphere-jvm-sdk/pull/930#discussion_r50086615"},"pull_request":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/930"}}},"pull_request":{"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/930","id":56174462,"html_url":"https://github.com/sphereio/sphere-jvm-sdk/pull/930","diff_url":"https://github.com/sphereio/sphere-jvm-sdk/pull/930.diff","patch_url":"https://github.com/sphereio/sphere-jvm-sdk/pull/930.patch","issue_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/930","number":930,"state":"open","locked":false,"title":"review endpoint, close #925","user":{"login":"schleichardt","id":1320833,"avatar_url":"https://avatars.githubusercontent.com/u/1320833?v=3","gravatar_id":"","url":"https://api.github.com/users/schleichardt","html_url":"https://github.com/schleichardt","followers_url":"https://api.github.com/users/schleichardt/followers","following_url":"https://api.github.com/users/schleichardt/following{/other_user}","gists_url":"https://api.github.com/users/schleichardt/gists{/gist_id}","starred_url":"https://api.github.com/users/schleichardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schleichardt/subscriptions","organizations_url":"https://api.github.com/users/schleichardt/orgs","repos_url":"https://api.github.com/users/schleichardt/repos","events_url":"https://api.github.com/users/schleichardt/events{/privacy}","received_events_url":"https://api.github.com/users/schleichardt/received_events","type":"User","site_admin":false},"body":"@lauraluiz please review","created_at":"2016-01-15T14:23:32Z","updated_at":"2016-01-19T09:02:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8f5f7976c3ed1356e69c973a7599b88040be1dd","assignee":{"login":"lauraluiz","id":1917621,"avatar_url":"https://avatars.githubusercontent.com/u/1917621?v=3","gravatar_id":"","url":"https://api.github.com/users/lauraluiz","html_url":"https://github.com/lauraluiz","followers_url":"https://api.github.com/users/lauraluiz/followers","following_url":"https://api.github.com/users/lauraluiz/following{/other_user}","gists_url":"https://api.github.com/users/lauraluiz/gists{/gist_id}","starred_url":"https://api.github.com/users/lauraluiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauraluiz/subscriptions","organizations_url":"https://api.github.com/users/lauraluiz/orgs","repos_url":"https://api.github.com/users/lauraluiz/repos","events_url":"https://api.github.com/users/lauraluiz/events{/privacy}","received_events_url":"https://api.github.com/users/lauraluiz/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/milestones/29","html_url":"https://github.com/sphereio/sphere-jvm-sdk/milestones/1.0.0-M26","labels_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/milestones/29/labels","id":1491408,"number":29,"title":"1.0.0-M26","description":"","creator":{"login":"schleichardt","id":1320833,"avatar_url":"https://avatars.githubusercontent.com/u/1320833?v=3","gravatar_id":"","url":"https://api.github.com/users/schleichardt","html_url":"https://github.com/schleichardt","followers_url":"https://api.github.com/users/schleichardt/followers","following_url":"https://api.github.com/users/schleichardt/following{/other_user}","gists_url":"https://api.github.com/users/schleichardt/gists{/gist_id}","starred_url":"https://api.github.com/users/schleichardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schleichardt/subscriptions","organizations_url":"https://api.github.com/users/schleichardt/orgs","repos_url":"https://api.github.com/users/schleichardt/repos","events_url":"https://api.github.com/users/schleichardt/events{/privacy}","received_events_url":"https://api.github.com/users/schleichardt/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":8,"state":"open","created_at":"2016-01-08T13:24:37Z","updated_at":"2016-01-18T15:48:08Z","due_on":"2016-01-14T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/930/commits","review_comments_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/930/comments","review_comment_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/930/comments","statuses_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/statuses/5411535fd584f85b3f0ce374c39b09281442eaf5","head":{"label":"sphereio:feature/925/review-endpoint","ref":"feature/925/review-endpoint","sha":"5411535fd584f85b3f0ce374c39b09281442eaf5","user":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"repo":{"id":20855247,"name":"sphere-jvm-sdk","full_name":"sphereio/sphere-jvm-sdk","owner":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sphereio/sphere-jvm-sdk","description":"The e-commerce SDK from commercetools running on the Java virtual machine.","fork":false,"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk","forks_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/forks","keys_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/teams","hooks_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/hooks","issue_events_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/events","assignees_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/tags","blobs_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/languages","stargazers_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/stargazers","contributors_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/contributors","subscribers_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/subscribers","subscription_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/subscription","commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/merges","archive_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/downloads","issues_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/labels{/name}","releases_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/releases{/id}","created_at":"2014-06-15T12:46:24Z","updated_at":"2016-01-13T06:18:19Z","pushed_at":"2016-01-18T21:03:46Z","git_url":"git://github.com/sphereio/sphere-jvm-sdk.git","ssh_url":"git@github.com:sphereio/sphere-jvm-sdk.git","clone_url":"https://github.com/sphereio/sphere-jvm-sdk.git","svn_url":"https://github.com/sphereio/sphere-jvm-sdk","homepage":"","size":47633,"stargazers_count":19,"watchers_count":19,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":94,"forks":8,"open_issues":94,"watchers":19,"default_branch":"master"}},"base":{"label":"sphereio:master","ref":"master","sha":"50e18e328b2db894a3b52a19c64e36eff92eb762","user":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"repo":{"id":20855247,"name":"sphere-jvm-sdk","full_name":"sphereio/sphere-jvm-sdk","owner":{"login":"sphereio","id":4119130,"avatar_url":"https://avatars.githubusercontent.com/u/4119130?v=3","gravatar_id":"","url":"https://api.github.com/users/sphereio","html_url":"https://github.com/sphereio","followers_url":"https://api.github.com/users/sphereio/followers","following_url":"https://api.github.com/users/sphereio/following{/other_user}","gists_url":"https://api.github.com/users/sphereio/gists{/gist_id}","starred_url":"https://api.github.com/users/sphereio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphereio/subscriptions","organizations_url":"https://api.github.com/users/sphereio/orgs","repos_url":"https://api.github.com/users/sphereio/repos","events_url":"https://api.github.com/users/sphereio/events{/privacy}","received_events_url":"https://api.github.com/users/sphereio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sphereio/sphere-jvm-sdk","description":"The e-commerce SDK from commercetools running on the Java virtual machine.","fork":false,"url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk","forks_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/forks","keys_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/teams","hooks_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/hooks","issue_events_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/events","assignees_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/tags","blobs_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/languages","stargazers_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/stargazers","contributors_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/contributors","subscribers_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/subscribers","subscription_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/subscription","commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/merges","archive_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/downloads","issues_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/labels{/name}","releases_url":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/releases{/id}","created_at":"2014-06-15T12:46:24Z","updated_at":"2016-01-13T06:18:19Z","pushed_at":"2016-01-18T21:03:46Z","git_url":"git://github.com/sphereio/sphere-jvm-sdk.git","ssh_url":"git@github.com:sphereio/sphere-jvm-sdk.git","clone_url":"https://github.com/sphereio/sphere-jvm-sdk.git","svn_url":"https://github.com/sphereio/sphere-jvm-sdk","homepage":"","size":47633,"stargazers_count":19,"watchers_count":19,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":94,"forks":8,"open_issues":94,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/930"},"html":{"href":"https://github.com/sphereio/sphere-jvm-sdk/pull/930"},"issue":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/930"},"comments":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/issues/930/comments"},"review_comments":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/930/comments"},"review_comment":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/pulls/930/commits"},"statuses":{"href":"https://api.github.com/repos/sphereio/sphere-jvm-sdk/statuses/5411535fd584f85b3f0ce374c39b09281442eaf5"}}}}