{"action":"created","comment":{"url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls/comments/41982880","id":41982880,"diff_hunk":"@@ -0,0 +1,91 @@\n+/*\n+ * The MIT License (MIT)\n+ *\n+ * Copyright (c) 2015 NBCO Yandex.Money LLC\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to deal\n+ * in the Software without restriction, including without limitation the rights\n+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+ * copies of the Software, and to permit persons to whom the Software is\n+ * furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be included in\n+ * all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+ * THE SOFTWARE.\n+ */\n+\n+package com.yandex.money.api.typeadapters;\n+\n+import com.google.gson.JsonDeserializationContext;\n+import com.google.gson.JsonElement;\n+import com.google.gson.JsonObject;\n+import com.google.gson.JsonParseException;\n+import com.google.gson.JsonSerializationContext;\n+import com.yandex.money.api.methods.InstanceId;\n+import com.yandex.money.api.model.Error;\n+\n+import java.lang.reflect.Type;\n+\n+import static com.yandex.money.api.typeadapters.JsonUtils.getString;\n+\n+/**\n+ * Type adapter for {@link InstanceId}.\n+ *\n+ * @author Anton Ermak (ermak@yamoney.ru)\n+ */\n+public final class InstanceIdTypeAdapter extends BaseTypeAdapter<InstanceId> {\n+\n+    private static final InstanceIdTypeAdapter INSTANCE = new InstanceIdTypeAdapter();\n+\n+    private static final String MEMBER_ERROR = \"error\";\n+    private static final String MEMBER_INSTANCE_ID = \"instance_id\";\n+    private static final String MEMBER_STATUS = \"status\";\n+\n+    private InstanceIdTypeAdapter() {\n+    }\n+\n+    /**\n+     * @return instance of this class\n+     */\n+    public static InstanceIdTypeAdapter getInstance() {\n+        return INSTANCE;\n+    }\n+\n+    @Override\n+    public InstanceId deserialize(JsonElement json, Type typeOfT,\n+                                  JsonDeserializationContext context)\n+            throws JsonParseException {\n+\n+        JsonObject o = json.getAsJsonObject();\n+        return new InstanceId(\n+                InstanceId.Status.parse(getString(o, MEMBER_STATUS)),","path":"src/main/java/com/yandex/money/api/typeadapters/InstanceIdTypeAdapter.java","position":69,"original_position":69,"commit_id":"dc171144ee099d93d1e2e74b778cdab35ec8c56e","original_commit_id":"dc171144ee099d93d1e2e74b778cdab35ec8c56e","user":{"login":"yasevich","id":7524839,"avatar_url":"https://avatars.githubusercontent.com/u/7524839?v=3","gravatar_id":"","url":"https://api.github.com/users/yasevich","html_url":"https://github.com/yasevich","followers_url":"https://api.github.com/users/yasevich/followers","following_url":"https://api.github.com/users/yasevich/following{/other_user}","gists_url":"https://api.github.com/users/yasevich/gists{/gist_id}","starred_url":"https://api.github.com/users/yasevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yasevich/subscriptions","organizations_url":"https://api.github.com/users/yasevich/orgs","repos_url":"https://api.github.com/users/yasevich/repos","events_url":"https://api.github.com/users/yasevich/events{/privacy}","received_events_url":"https://api.github.com/users/yasevich/received_events","type":"User","site_admin":false},"body":"```getMandatoryString```?","created_at":"2015-10-14T11:38:07Z","updated_at":"2015-10-14T11:38:07Z","html_url":"https://github.com/yandex-money/yandex-money-sdk-java/pull/17#discussion_r41982880","pull_request_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls/comments/41982880"},"html":{"href":"https://github.com/yandex-money/yandex-money-sdk-java/pull/17#discussion_r41982880"},"pull_request":{"href":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls/17","id":47288799,"html_url":"https://github.com/yandex-money/yandex-money-sdk-java/pull/17","diff_url":"https://github.com/yandex-money/yandex-money-sdk-java/pull/17.diff","patch_url":"https://github.com/yandex-money/yandex-money-sdk-java/pull/17.patch","issue_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/issues/17","number":17,"state":"open","locked":false,"title":"Refactoring. Preparing for library release.","user":{"login":"raymank26","id":8013845,"avatar_url":"https://avatars.githubusercontent.com/u/8013845?v=3","gravatar_id":"","url":"https://api.github.com/users/raymank26","html_url":"https://github.com/raymank26","followers_url":"https://api.github.com/users/raymank26/followers","following_url":"https://api.github.com/users/raymank26/following{/other_user}","gists_url":"https://api.github.com/users/raymank26/gists{/gist_id}","starred_url":"https://api.github.com/users/raymank26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymank26/subscriptions","organizations_url":"https://api.github.com/users/raymank26/orgs","repos_url":"https://api.github.com/users/raymank26/repos","events_url":"https://api.github.com/users/raymank26/events{/privacy}","received_events_url":"https://api.github.com/users/raymank26/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-09T15:55:15Z","updated_at":"2015-10-14T11:38:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"587bd6ae10bda0bb64839d5943729d1888262ddf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls/17/commits","review_comments_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls/17/comments","review_comment_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/issues/17/comments","statuses_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/statuses/dc171144ee099d93d1e2e74b778cdab35ec8c56e","head":{"label":"raymank26:feature/preparing","ref":"feature/preparing","sha":"dc171144ee099d93d1e2e74b778cdab35ec8c56e","user":{"login":"raymank26","id":8013845,"avatar_url":"https://avatars.githubusercontent.com/u/8013845?v=3","gravatar_id":"","url":"https://api.github.com/users/raymank26","html_url":"https://github.com/raymank26","followers_url":"https://api.github.com/users/raymank26/followers","following_url":"https://api.github.com/users/raymank26/following{/other_user}","gists_url":"https://api.github.com/users/raymank26/gists{/gist_id}","starred_url":"https://api.github.com/users/raymank26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymank26/subscriptions","organizations_url":"https://api.github.com/users/raymank26/orgs","repos_url":"https://api.github.com/users/raymank26/repos","events_url":"https://api.github.com/users/raymank26/events{/privacy}","received_events_url":"https://api.github.com/users/raymank26/received_events","type":"User","site_admin":false},"repo":{"id":36813593,"name":"yandex-money-sdk-java","full_name":"raymank26/yandex-money-sdk-java","owner":{"login":"raymank26","id":8013845,"avatar_url":"https://avatars.githubusercontent.com/u/8013845?v=3","gravatar_id":"","url":"https://api.github.com/users/raymank26","html_url":"https://github.com/raymank26","followers_url":"https://api.github.com/users/raymank26/followers","following_url":"https://api.github.com/users/raymank26/following{/other_user}","gists_url":"https://api.github.com/users/raymank26/gists{/gist_id}","starred_url":"https://api.github.com/users/raymank26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymank26/subscriptions","organizations_url":"https://api.github.com/users/raymank26/orgs","repos_url":"https://api.github.com/users/raymank26/repos","events_url":"https://api.github.com/users/raymank26/events{/privacy}","received_events_url":"https://api.github.com/users/raymank26/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/raymank26/yandex-money-sdk-java","description":"","fork":true,"url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java","forks_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/forks","keys_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/teams","hooks_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/hooks","issue_events_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/issues/events{/number}","events_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/events","assignees_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/assignees{/user}","branches_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/branches{/branch}","tags_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/tags","blobs_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/statuses/{sha}","languages_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/languages","stargazers_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/stargazers","contributors_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/contributors","subscribers_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/subscribers","subscription_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/subscription","commits_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/contents/{+path}","compare_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/merges","archive_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/downloads","issues_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/issues{/number}","pulls_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/pulls{/number}","milestones_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/milestones{/number}","notifications_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/labels{/name}","releases_url":"https://api.github.com/repos/raymank26/yandex-money-sdk-java/releases{/id}","created_at":"2015-06-03T15:42:43Z","updated_at":"2015-06-08T10:36:08Z","pushed_at":"2015-10-13T15:34:30Z","git_url":"git://github.com/raymank26/yandex-money-sdk-java.git","ssh_url":"git@github.com:raymank26/yandex-money-sdk-java.git","clone_url":"https://github.com/raymank26/yandex-money-sdk-java.git","svn_url":"https://github.com/raymank26/yandex-money-sdk-java","homepage":null,"size":1233,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yandex-money:feature/payment-forms","ref":"feature/payment-forms","sha":"7a0b2a0f4fd51aa2876bd9fbd36002b21e8457ab","user":{"login":"yandex-money","id":6553002,"avatar_url":"https://avatars.githubusercontent.com/u/6553002?v=3","gravatar_id":"","url":"https://api.github.com/users/yandex-money","html_url":"https://github.com/yandex-money","followers_url":"https://api.github.com/users/yandex-money/followers","following_url":"https://api.github.com/users/yandex-money/following{/other_user}","gists_url":"https://api.github.com/users/yandex-money/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex-money/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex-money/subscriptions","organizations_url":"https://api.github.com/users/yandex-money/orgs","repos_url":"https://api.github.com/users/yandex-money/repos","events_url":"https://api.github.com/users/yandex-money/events{/privacy}","received_events_url":"https://api.github.com/users/yandex-money/received_events","type":"Organization","site_admin":false},"repo":{"id":18875923,"name":"yandex-money-sdk-java","full_name":"yandex-money/yandex-money-sdk-java","owner":{"login":"yandex-money","id":6553002,"avatar_url":"https://avatars.githubusercontent.com/u/6553002?v=3","gravatar_id":"","url":"https://api.github.com/users/yandex-money","html_url":"https://github.com/yandex-money","followers_url":"https://api.github.com/users/yandex-money/followers","following_url":"https://api.github.com/users/yandex-money/following{/other_user}","gists_url":"https://api.github.com/users/yandex-money/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex-money/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex-money/subscriptions","organizations_url":"https://api.github.com/users/yandex-money/orgs","repos_url":"https://api.github.com/users/yandex-money/repos","events_url":"https://api.github.com/users/yandex-money/events{/privacy}","received_events_url":"https://api.github.com/users/yandex-money/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yandex-money/yandex-money-sdk-java","description":"","fork":false,"url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java","forks_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/forks","keys_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/teams","hooks_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/hooks","issue_events_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/issues/events{/number}","events_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/events","assignees_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/assignees{/user}","branches_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/branches{/branch}","tags_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/tags","blobs_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/statuses/{sha}","languages_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/languages","stargazers_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/stargazers","contributors_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/contributors","subscribers_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/subscribers","subscription_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/subscription","commits_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/contents/{+path}","compare_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/merges","archive_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/downloads","issues_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/issues{/number}","pulls_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls{/number}","milestones_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/milestones{/number}","notifications_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/labels{/name}","releases_url":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/releases{/id}","created_at":"2014-04-17T11:22:26Z","updated_at":"2015-09-17T12:55:50Z","pushed_at":"2015-10-13T15:34:30Z","git_url":"git://github.com/yandex-money/yandex-money-sdk-java.git","ssh_url":"git@github.com:yandex-money/yandex-money-sdk-java.git","clone_url":"https://github.com/yandex-money/yandex-money-sdk-java.git","svn_url":"https://github.com/yandex-money/yandex-money-sdk-java","homepage":null,"size":1754,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":3,"forks":12,"open_issues":3,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls/17"},"html":{"href":"https://github.com/yandex-money/yandex-money-sdk-java/pull/17"},"issue":{"href":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/issues/17"},"comments":{"href":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/yandex-money/yandex-money-sdk-java/statuses/dc171144ee099d93d1e2e74b778cdab35ec8c56e"}}}}