{"action":"created","comment":{"url":"https://api.github.com/repos/stripe/stripe-java/pulls/comments/193791272","pull_request_review_id":126820553,"id":193791272,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Mzc5MTI3Mg==","diff_hunk":"@@ -0,0 +1,103 @@\n+package com.stripe.functional;\n+\n+import static org.junit.Assert.assertEquals;\n+import static org.junit.Assert.assertNotNull;\n+\n+import com.stripe.BaseStripeTest;\n+import com.stripe.exception.StripeException;\n+import com.stripe.model.DeletedSKU;\n+import com.stripe.model.SKU;\n+import com.stripe.model.SKUCollection;\n+import com.stripe.net.APIResource;\n+\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+import org.junit.Test;\n+\n+public class SKUTest extends BaseStripeTest {\n+  public static final String RESOURCE_ID = \"sku_123\";\n+\n+  @Test\n+  public void testCreate() throws StripeException {\n+    Map<String, Object> attributes = new HashMap<String, Object>();\n+    attributes.put(\"attr1\", \"val1\");\n+    attributes.put(\"attr2\", \"val2\");\n+    Map<String, Object> inventory = new HashMap<String, Object>();\n+    inventory.put(\"type\", \"bucket\");\n+    inventory.put(\"value\", \"limited\");\n+    Map<String, Object> params = new HashMap<String, Object>();\n+    params.put(\"active\", true);\n+    params.put(\"attributes\", attributes);\n+    params.put(\"price\", 499);\n+    params.put(\"currency\", \"usd\");\n+    params.put(\"inventory\", inventory);\n+    params.put(\"product\", \"prod_123\");\n+    params.put(\"image\", \"http://example.com/foo.png\");\n+\n+    SKU sku = SKU.create(params);\n+\n+    assertNotNull(sku);\n+    verifyRequest(\n+        APIResource.RequestMethod.POST,\n+        \"/v1/skus\",\n+        params\n+    );\n+  }\n+\n+  @Test\n+  public void testRetrieve() throws StripeException {\n+    SKU sku = SKU.retrieve(RESOURCE_ID);\n+\n+    assertNotNull(sku);\n+    verifyRequest(\n+        APIResource.RequestMethod.GET,\n+        String.format(\"/v1/skus/%s\", RESOURCE_ID)\n+    );\n+  }\n+\n+  @Test\n+  public void testUpdate() throws StripeException {\n+    final SKU sku = SKU.retrieve(RESOURCE_ID);\n+\n+    Map<String, Object> inventory = new HashMap<String, Object>();\n+    inventory.put(\"type\", \"bucket\");\n+    inventory.put(\"value\", \"in_stock\");\n+    Map<String, Object> params = new HashMap<String, Object>();\n+    params.put(\"inventory\", inventory);\n+\n+    SKU updatedSku = sku.update(params);\n+\n+    assertNotNull(updatedSku);\n+    verifyRequest(\n+        APIResource.RequestMethod.POST,\n+        String.format(\"/v1/skus/%s\", sku.getId()),\n+        params\n+    );\n+  }\n+\n+  @Test\n+  public void testDelete() throws StripeException {\n+    SKU sku = SKU.retrieve(RESOURCE_ID);\n+\n+    DeletedSKU deletedSku = sku.delete();\n+\n+    assertNotNull(deletedSku);\n+    verifyRequest(\n+        APIResource.RequestMethod.DELETE,\n+        String.format(\"/v1/skus/%s\", sku.getId())\n+    );\n+  }\n+\n+  @Test\n+  public void testList() throws StripeException {\n+    SKUCollection skus = SKU.list(null);","path":"src/test/java/com/stripe/functional/SKUTest.java","position":94,"original_position":94,"commit_id":"d449372a62b71d8f1a3babcc4cf9bef79f85044f","original_commit_id":"d449372a62b71d8f1a3babcc4cf9bef79f85044f","user":{"login":"remi-stripe","id":9683352,"node_id":"MDQ6VXNlcjk2ODMzNTI=","avatar_url":"https://avatars0.githubusercontent.com/u/9683352?v=4","gravatar_id":"","url":"https://api.github.com/users/remi-stripe","html_url":"https://github.com/remi-stripe","followers_url":"https://api.github.com/users/remi-stripe/followers","following_url":"https://api.github.com/users/remi-stripe/following{/other_user}","gists_url":"https://api.github.com/users/remi-stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/remi-stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remi-stripe/subscriptions","organizations_url":"https://api.github.com/users/remi-stripe/orgs","repos_url":"https://api.github.com/users/remi-stripe/repos","events_url":"https://api.github.com/users/remi-stripe/events{/privacy}","received_events_url":"https://api.github.com/users/remi-stripe/received_events","type":"User","site_admin":false},"body":"should be called `resources`","created_at":"2018-06-07T15:31:12Z","updated_at":"2018-06-07T16:00:16Z","html_url":"https://github.com/stripe/stripe-java/pull/452#discussion_r193791272","pull_request_url":"https://api.github.com/repos/stripe/stripe-java/pulls/452","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/stripe/stripe-java/pulls/comments/193791272"},"html":{"href":"https://github.com/stripe/stripe-java/pull/452#discussion_r193791272"},"pull_request":{"href":"https://api.github.com/repos/stripe/stripe-java/pulls/452"}}},"pull_request":{"url":"https://api.github.com/repos/stripe/stripe-java/pulls/452","id":170163229,"node_id":"MDExOlB1bGxSZXF1ZXN0MTcwMTYzMjI5","html_url":"https://github.com/stripe/stripe-java/pull/452","diff_url":"https://github.com/stripe/stripe-java/pull/452.diff","patch_url":"https://github.com/stripe/stripe-java/pull/452.patch","issue_url":"https://api.github.com/repos/stripe/stripe-java/issues/452","number":452,"state":"open","locked":false,"title":"Use stripe-mock for tests","user":{"login":"ob-stripe","id":23086931,"node_id":"MDQ6VXNlcjIzMDg2OTMx","avatar_url":"https://avatars0.githubusercontent.com/u/23086931?v=4","gravatar_id":"","url":"https://api.github.com/users/ob-stripe","html_url":"https://github.com/ob-stripe","followers_url":"https://api.github.com/users/ob-stripe/followers","following_url":"https://api.github.com/users/ob-stripe/following{/other_user}","gists_url":"https://api.github.com/users/ob-stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/ob-stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ob-stripe/subscriptions","organizations_url":"https://api.github.com/users/ob-stripe/orgs","repos_url":"https://api.github.com/users/ob-stripe/repos","events_url":"https://api.github.com/users/ob-stripe/events{/privacy}","received_events_url":"https://api.github.com/users/ob-stripe/received_events","type":"User","site_admin":false},"body":"Updated version of #384.\r\n","created_at":"2018-02-20T11:15:55Z","updated_at":"2018-06-07T16:00:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c650ac5fae931f0ad41cbfa0521b2bdba07a57d6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/stripe/stripe-java/pulls/452/commits","review_comments_url":"https://api.github.com/repos/stripe/stripe-java/pulls/452/comments","review_comment_url":"https://api.github.com/repos/stripe/stripe-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stripe/stripe-java/issues/452/comments","statuses_url":"https://api.github.com/repos/stripe/stripe-java/statuses/d449372a62b71d8f1a3babcc4cf9bef79f85044f","head":{"label":"stripe:ob-stripe-mock","ref":"ob-stripe-mock","sha":"d449372a62b71d8f1a3babcc4cf9bef79f85044f","user":{"login":"stripe","id":856813,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1NjgxMw==","avatar_url":"https://avatars1.githubusercontent.com/u/856813?v=4","gravatar_id":"","url":"https://api.github.com/users/stripe","html_url":"https://github.com/stripe","followers_url":"https://api.github.com/users/stripe/followers","following_url":"https://api.github.com/users/stripe/following{/other_user}","gists_url":"https://api.github.com/users/stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stripe/subscriptions","organizations_url":"https://api.github.com/users/stripe/orgs","repos_url":"https://api.github.com/users/stripe/repos","events_url":"https://api.github.com/users/stripe/events{/privacy}","received_events_url":"https://api.github.com/users/stripe/received_events","type":"Organization","site_admin":false},"repo":{"id":2176646,"node_id":"MDEwOlJlcG9zaXRvcnkyMTc2NjQ2","name":"stripe-java","full_name":"stripe/stripe-java","owner":{"login":"stripe","id":856813,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1NjgxMw==","avatar_url":"https://avatars1.githubusercontent.com/u/856813?v=4","gravatar_id":"","url":"https://api.github.com/users/stripe","html_url":"https://github.com/stripe","followers_url":"https://api.github.com/users/stripe/followers","following_url":"https://api.github.com/users/stripe/following{/other_user}","gists_url":"https://api.github.com/users/stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stripe/subscriptions","organizations_url":"https://api.github.com/users/stripe/orgs","repos_url":"https://api.github.com/users/stripe/repos","events_url":"https://api.github.com/users/stripe/events{/privacy}","received_events_url":"https://api.github.com/users/stripe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stripe/stripe-java","description":"Java library for the Stripe API.    ","fork":false,"url":"https://api.github.com/repos/stripe/stripe-java","forks_url":"https://api.github.com/repos/stripe/stripe-java/forks","keys_url":"https://api.github.com/repos/stripe/stripe-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stripe/stripe-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stripe/stripe-java/teams","hooks_url":"https://api.github.com/repos/stripe/stripe-java/hooks","issue_events_url":"https://api.github.com/repos/stripe/stripe-java/issues/events{/number}","events_url":"https://api.github.com/repos/stripe/stripe-java/events","assignees_url":"https://api.github.com/repos/stripe/stripe-java/assignees{/user}","branches_url":"https://api.github.com/repos/stripe/stripe-java/branches{/branch}","tags_url":"https://api.github.com/repos/stripe/stripe-java/tags","blobs_url":"https://api.github.com/repos/stripe/stripe-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stripe/stripe-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stripe/stripe-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/stripe/stripe-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stripe/stripe-java/statuses/{sha}","languages_url":"https://api.github.com/repos/stripe/stripe-java/languages","stargazers_url":"https://api.github.com/repos/stripe/stripe-java/stargazers","contributors_url":"https://api.github.com/repos/stripe/stripe-java/contributors","subscribers_url":"https://api.github.com/repos/stripe/stripe-java/subscribers","subscription_url":"https://api.github.com/repos/stripe/stripe-java/subscription","commits_url":"https://api.github.com/repos/stripe/stripe-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/stripe/stripe-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/stripe/stripe-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/stripe/stripe-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/stripe/stripe-java/contents/{+path}","compare_url":"https://api.github.com/repos/stripe/stripe-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stripe/stripe-java/merges","archive_url":"https://api.github.com/repos/stripe/stripe-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stripe/stripe-java/downloads","issues_url":"https://api.github.com/repos/stripe/stripe-java/issues{/number}","pulls_url":"https://api.github.com/repos/stripe/stripe-java/pulls{/number}","milestones_url":"https://api.github.com/repos/stripe/stripe-java/milestones{/number}","notifications_url":"https://api.github.com/repos/stripe/stripe-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stripe/stripe-java/labels{/name}","releases_url":"https://api.github.com/repos/stripe/stripe-java/releases{/id}","deployments_url":"https://api.github.com/repos/stripe/stripe-java/deployments","created_at":"2011-08-09T00:06:31Z","updated_at":"2018-06-07T12:12:07Z","pushed_at":"2018-06-07T15:09:22Z","git_url":"git://github.com/stripe/stripe-java.git","ssh_url":"git@github.com:stripe/stripe-java.git","clone_url":"https://github.com/stripe/stripe-java.git","svn_url":"https://github.com/stripe/stripe-java","homepage":"https://stripe.com","size":2289,"stargazers_count":335,"watchers_count":335,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":200,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":200,"open_issues":15,"watchers":335,"default_branch":"master"}},"base":{"label":"stripe:master","ref":"master","sha":"493ef7bbaa47c2970d9d78e1a0acd5c95f6bad12","user":{"login":"stripe","id":856813,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1NjgxMw==","avatar_url":"https://avatars1.githubusercontent.com/u/856813?v=4","gravatar_id":"","url":"https://api.github.com/users/stripe","html_url":"https://github.com/stripe","followers_url":"https://api.github.com/users/stripe/followers","following_url":"https://api.github.com/users/stripe/following{/other_user}","gists_url":"https://api.github.com/users/stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stripe/subscriptions","organizations_url":"https://api.github.com/users/stripe/orgs","repos_url":"https://api.github.com/users/stripe/repos","events_url":"https://api.github.com/users/stripe/events{/privacy}","received_events_url":"https://api.github.com/users/stripe/received_events","type":"Organization","site_admin":false},"repo":{"id":2176646,"node_id":"MDEwOlJlcG9zaXRvcnkyMTc2NjQ2","name":"stripe-java","full_name":"stripe/stripe-java","owner":{"login":"stripe","id":856813,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1NjgxMw==","avatar_url":"https://avatars1.githubusercontent.com/u/856813?v=4","gravatar_id":"","url":"https://api.github.com/users/stripe","html_url":"https://github.com/stripe","followers_url":"https://api.github.com/users/stripe/followers","following_url":"https://api.github.com/users/stripe/following{/other_user}","gists_url":"https://api.github.com/users/stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stripe/subscriptions","organizations_url":"https://api.github.com/users/stripe/orgs","repos_url":"https://api.github.com/users/stripe/repos","events_url":"https://api.github.com/users/stripe/events{/privacy}","received_events_url":"https://api.github.com/users/stripe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stripe/stripe-java","description":"Java library for the Stripe API.    ","fork":false,"url":"https://api.github.com/repos/stripe/stripe-java","forks_url":"https://api.github.com/repos/stripe/stripe-java/forks","keys_url":"https://api.github.com/repos/stripe/stripe-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stripe/stripe-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stripe/stripe-java/teams","hooks_url":"https://api.github.com/repos/stripe/stripe-java/hooks","issue_events_url":"https://api.github.com/repos/stripe/stripe-java/issues/events{/number}","events_url":"https://api.github.com/repos/stripe/stripe-java/events","assignees_url":"https://api.github.com/repos/stripe/stripe-java/assignees{/user}","branches_url":"https://api.github.com/repos/stripe/stripe-java/branches{/branch}","tags_url":"https://api.github.com/repos/stripe/stripe-java/tags","blobs_url":"https://api.github.com/repos/stripe/stripe-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stripe/stripe-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stripe/stripe-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/stripe/stripe-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stripe/stripe-java/statuses/{sha}","languages_url":"https://api.github.com/repos/stripe/stripe-java/languages","stargazers_url":"https://api.github.com/repos/stripe/stripe-java/stargazers","contributors_url":"https://api.github.com/repos/stripe/stripe-java/contributors","subscribers_url":"https://api.github.com/repos/stripe/stripe-java/subscribers","subscription_url":"https://api.github.com/repos/stripe/stripe-java/subscription","commits_url":"https://api.github.com/repos/stripe/stripe-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/stripe/stripe-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/stripe/stripe-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/stripe/stripe-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/stripe/stripe-java/contents/{+path}","compare_url":"https://api.github.com/repos/stripe/stripe-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stripe/stripe-java/merges","archive_url":"https://api.github.com/repos/stripe/stripe-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stripe/stripe-java/downloads","issues_url":"https://api.github.com/repos/stripe/stripe-java/issues{/number}","pulls_url":"https://api.github.com/repos/stripe/stripe-java/pulls{/number}","milestones_url":"https://api.github.com/repos/stripe/stripe-java/milestones{/number}","notifications_url":"https://api.github.com/repos/stripe/stripe-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stripe/stripe-java/labels{/name}","releases_url":"https://api.github.com/repos/stripe/stripe-java/releases{/id}","deployments_url":"https://api.github.com/repos/stripe/stripe-java/deployments","created_at":"2011-08-09T00:06:31Z","updated_at":"2018-06-07T12:12:07Z","pushed_at":"2018-06-07T15:09:22Z","git_url":"git://github.com/stripe/stripe-java.git","ssh_url":"git@github.com:stripe/stripe-java.git","clone_url":"https://github.com/stripe/stripe-java.git","svn_url":"https://github.com/stripe/stripe-java","homepage":"https://stripe.com","size":2289,"stargazers_count":335,"watchers_count":335,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":200,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":200,"open_issues":15,"watchers":335,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stripe/stripe-java/pulls/452"},"html":{"href":"https://github.com/stripe/stripe-java/pull/452"},"issue":{"href":"https://api.github.com/repos/stripe/stripe-java/issues/452"},"comments":{"href":"https://api.github.com/repos/stripe/stripe-java/issues/452/comments"},"review_comments":{"href":"https://api.github.com/repos/stripe/stripe-java/pulls/452/comments"},"review_comment":{"href":"https://api.github.com/repos/stripe/stripe-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stripe/stripe-java/pulls/452/commits"},"statuses":{"href":"https://api.github.com/repos/stripe/stripe-java/statuses/d449372a62b71d8f1a3babcc4cf9bef79f85044f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"remi-stripe"}}