{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/payments/pulls/comments/30726620","id":30726620,"diff_hunk":"@@ -0,0 +1,324 @@\n+Storage API\n+###########\n+\n+For this examples let's say:\n+\n+- Buyers logs with Firefox Account Bearer Tokens\n+- Seller apps logs with Hawk\n+- Payment App logs with Basic Auth\n+\n+\n+As a user, I want to retrieve my information about my purchases\n+===============================================================\n+\n+.. code-block:: http\n+\n+    GET /buckets/mozilla/collections/payments/records\n+    Authorization: Bearer <User Firefox Account Bearer Token>\n+\n+\n+    HTTP/1.1 200 OK\n+    Content-Type: application/json; charset=UTF-8\n+\n+    {\n+      \"items\": [\n+        {\n+            \"id\": \"dc86afa9-a839-4ce1-ae02-3d538b75496f\",\n+            \"last_modified\": 1432024555580,\n+            \"buyer\": \"fxa:5331be33303ccff19d3c49b6da276913\",\n+            \"seller\": \"hawk:144c22a77d75937740ec3c957fbdb1d1\",\n+            \"product\": \"bb5bf35f-cb2b-40e7-b1ef-8b097bd550f2\",\n+            \"added_on\": 1432024555580,\n+            \"valid_until\": 1463560555580\n+        },\n+        {\n+            \"id\": \"23160c47-27a5-41f6-9164-21d46141804d\",\n+            \"last_modified\": 1430140411480,\n+            \"title\": \"MoFo\",\n+            \"buyer\": \"fxa:5331be33303ccff19d3c49b6da276913\",\n+            \"seller\": \"hawk:5851128c0c7d72c6845339599b46d092\",\n+            \"product\": \"bda9d953-dd81-427d-b7fc-7bcb0df9d666\",\n+            \"added_on\": 1430140411480,\n+            \"valid_until\": 1432732411480\n+        }\n+      ]\n+    }\n+\n+\n+As the payments app, I want to submit new payment information for a given user\n+==============================================================================\n+\n+.. code-block:: http\n+\n+    POST /buckets/mozilla/collections/payments/records\n+    Authorization: Basic <PaimentApp Basic Auth Credentials>\n+\n+    {\n+      \"data\": {\n+        \"last_modified\": 1432024555580,\n+        \"buyer\": \"fxa:5331be33303ccff19d3c49b6da276913\",\n+        \"seller\": \"hawk:144c22a77d75937740ec3c957fbdb1d1\",\n+        \"product\": \"bb5bf35f-cb2b-40e7-b1ef-8b097bd550f2\",\n+        \"added_on\": 1432024555580,","path":"docs/design/api/storage.rst","position":62,"original_position":62,"commit_id":"0bd30732a8b2c6a8b01e5a74dcec8a3d00cf5ad8","original_commit_id":"0bd30732a8b2c6a8b01e5a74dcec8a3d00cf5ad8","user":{"login":"kumar303","id":55398,"avatar_url":"https://avatars.githubusercontent.com/u/55398?v=3","gravatar_id":"","url":"https://api.github.com/users/kumar303","html_url":"https://github.com/kumar303","followers_url":"https://api.github.com/users/kumar303/followers","following_url":"https://api.github.com/users/kumar303/following{/other_user}","gists_url":"https://api.github.com/users/kumar303/gists{/gist_id}","starred_url":"https://api.github.com/users/kumar303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumar303/subscriptions","organizations_url":"https://api.github.com/users/kumar303/orgs","repos_url":"https://api.github.com/users/kumar303/repos","events_url":"https://api.github.com/users/kumar303/events{/privacy}","received_events_url":"https://api.github.com/users/kumar303/received_events","type":"User","site_admin":false},"body":"I wonder if we need a start date for a product. I can't really think of a realistic case for that. We could always add it later if needed.","created_at":"2015-05-20T17:28:35Z","updated_at":"2015-05-20T17:28:35Z","html_url":"https://github.com/mozilla/payments/pull/56#discussion_r30726620","pull_request_url":"https://api.github.com/repos/mozilla/payments/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/mozilla/payments/pulls/comments/30726620"},"html":{"href":"https://github.com/mozilla/payments/pull/56#discussion_r30726620"},"pull_request":{"href":"https://api.github.com/repos/mozilla/payments/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/payments/pulls/56","id":35810410,"html_url":"https://github.com/mozilla/payments/pull/56","diff_url":"https://github.com/mozilla/payments/pull/56.diff","patch_url":"https://github.com/mozilla/payments/pull/56.patch","issue_url":"https://api.github.com/repos/mozilla/payments/issues/56","number":56,"state":"open","locked":false,"title":"Add the storage API documentation.","user":{"login":"Natim","id":229453,"avatar_url":"https://avatars.githubusercontent.com/u/229453?v=3","gravatar_id":"","url":"https://api.github.com/users/Natim","html_url":"https://github.com/Natim","followers_url":"https://api.github.com/users/Natim/followers","following_url":"https://api.github.com/users/Natim/following{/other_user}","gists_url":"https://api.github.com/users/Natim/gists{/gist_id}","starred_url":"https://api.github.com/users/Natim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Natim/subscriptions","organizations_url":"https://api.github.com/users/Natim/orgs","repos_url":"https://api.github.com/users/Natim/repos","events_url":"https://api.github.com/users/Natim/events{/privacy}","received_events_url":"https://api.github.com/users/Natim/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-05-20T08:56:36Z","updated_at":"2015-05-20T17:28:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1a1452448eaebd35d1abdbf6209f1c6a6caf4ea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/payments/pulls/56/commits","review_comments_url":"https://api.github.com/repos/mozilla/payments/pulls/56/comments","review_comment_url":"https://api.github.com/repos/mozilla/payments/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/payments/issues/56/comments","statuses_url":"https://api.github.com/repos/mozilla/payments/statuses/0bd30732a8b2c6a8b01e5a74dcec8a3d00cf5ad8","head":{"label":"Natim:storage-api","ref":"storage-api","sha":"0bd30732a8b2c6a8b01e5a74dcec8a3d00cf5ad8","user":{"login":"Natim","id":229453,"avatar_url":"https://avatars.githubusercontent.com/u/229453?v=3","gravatar_id":"","url":"https://api.github.com/users/Natim","html_url":"https://github.com/Natim","followers_url":"https://api.github.com/users/Natim/followers","following_url":"https://api.github.com/users/Natim/following{/other_user}","gists_url":"https://api.github.com/users/Natim/gists{/gist_id}","starred_url":"https://api.github.com/users/Natim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Natim/subscriptions","organizations_url":"https://api.github.com/users/Natim/orgs","repos_url":"https://api.github.com/users/Natim/repos","events_url":"https://api.github.com/users/Natim/events{/privacy}","received_events_url":"https://api.github.com/users/Natim/received_events","type":"User","site_admin":false},"repo":{"id":35937122,"name":"payments","full_name":"Natim/payments","owner":{"login":"Natim","id":229453,"avatar_url":"https://avatars.githubusercontent.com/u/229453?v=3","gravatar_id":"","url":"https://api.github.com/users/Natim","html_url":"https://github.com/Natim","followers_url":"https://api.github.com/users/Natim/followers","following_url":"https://api.github.com/users/Natim/following{/other_user}","gists_url":"https://api.github.com/users/Natim/gists{/gist_id}","starred_url":"https://api.github.com/users/Natim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Natim/subscriptions","organizations_url":"https://api.github.com/users/Natim/orgs","repos_url":"https://api.github.com/users/Natim/repos","events_url":"https://api.github.com/users/Natim/events{/privacy}","received_events_url":"https://api.github.com/users/Natim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Natim/payments","description":"The root repository for all things Payments at Mozilla.","fork":true,"url":"https://api.github.com/repos/Natim/payments","forks_url":"https://api.github.com/repos/Natim/payments/forks","keys_url":"https://api.github.com/repos/Natim/payments/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Natim/payments/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Natim/payments/teams","hooks_url":"https://api.github.com/repos/Natim/payments/hooks","issue_events_url":"https://api.github.com/repos/Natim/payments/issues/events{/number}","events_url":"https://api.github.com/repos/Natim/payments/events","assignees_url":"https://api.github.com/repos/Natim/payments/assignees{/user}","branches_url":"https://api.github.com/repos/Natim/payments/branches{/branch}","tags_url":"https://api.github.com/repos/Natim/payments/tags","blobs_url":"https://api.github.com/repos/Natim/payments/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Natim/payments/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Natim/payments/git/refs{/sha}","trees_url":"https://api.github.com/repos/Natim/payments/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Natim/payments/statuses/{sha}","languages_url":"https://api.github.com/repos/Natim/payments/languages","stargazers_url":"https://api.github.com/repos/Natim/payments/stargazers","contributors_url":"https://api.github.com/repos/Natim/payments/contributors","subscribers_url":"https://api.github.com/repos/Natim/payments/subscribers","subscription_url":"https://api.github.com/repos/Natim/payments/subscription","commits_url":"https://api.github.com/repos/Natim/payments/commits{/sha}","git_commits_url":"https://api.github.com/repos/Natim/payments/git/commits{/sha}","comments_url":"https://api.github.com/repos/Natim/payments/comments{/number}","issue_comment_url":"https://api.github.com/repos/Natim/payments/issues/comments{/number}","contents_url":"https://api.github.com/repos/Natim/payments/contents/{+path}","compare_url":"https://api.github.com/repos/Natim/payments/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Natim/payments/merges","archive_url":"https://api.github.com/repos/Natim/payments/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Natim/payments/downloads","issues_url":"https://api.github.com/repos/Natim/payments/issues{/number}","pulls_url":"https://api.github.com/repos/Natim/payments/pulls{/number}","milestones_url":"https://api.github.com/repos/Natim/payments/milestones{/number}","notifications_url":"https://api.github.com/repos/Natim/payments/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Natim/payments/labels{/name}","releases_url":"https://api.github.com/repos/Natim/payments/releases{/id}","created_at":"2015-05-20T08:56:16Z","updated_at":"2015-04-08T22:52:11Z","pushed_at":"2015-05-20T09:08:40Z","git_url":"git://github.com/Natim/payments.git","ssh_url":"git@github.com:Natim/payments.git","clone_url":"https://github.com/Natim/payments.git","svn_url":"https://github.com/Natim/payments","homepage":null,"size":2219,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"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":"mozilla:master","ref":"master","sha":"f3634808fc63b084a1c9facc7039d1f1ee4c66f9","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":31629202,"name":"payments","full_name":"mozilla/payments","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/payments","description":"The root repository for all things Payments at Mozilla.","fork":false,"url":"https://api.github.com/repos/mozilla/payments","forks_url":"https://api.github.com/repos/mozilla/payments/forks","keys_url":"https://api.github.com/repos/mozilla/payments/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/payments/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/payments/teams","hooks_url":"https://api.github.com/repos/mozilla/payments/hooks","issue_events_url":"https://api.github.com/repos/mozilla/payments/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/payments/events","assignees_url":"https://api.github.com/repos/mozilla/payments/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/payments/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/payments/tags","blobs_url":"https://api.github.com/repos/mozilla/payments/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/payments/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/payments/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/payments/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/payments/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/payments/languages","stargazers_url":"https://api.github.com/repos/mozilla/payments/stargazers","contributors_url":"https://api.github.com/repos/mozilla/payments/contributors","subscribers_url":"https://api.github.com/repos/mozilla/payments/subscribers","subscription_url":"https://api.github.com/repos/mozilla/payments/subscription","commits_url":"https://api.github.com/repos/mozilla/payments/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/payments/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/payments/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/payments/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/payments/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/payments/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/payments/merges","archive_url":"https://api.github.com/repos/mozilla/payments/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/payments/downloads","issues_url":"https://api.github.com/repos/mozilla/payments/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/payments/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/payments/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/payments/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/payments/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/payments/releases{/id}","created_at":"2015-03-04T00:29:14Z","updated_at":"2015-04-08T22:52:11Z","pushed_at":"2015-05-20T09:08:41Z","git_url":"git://github.com/mozilla/payments.git","ssh_url":"git@github.com:mozilla/payments.git","clone_url":"https://github.com/mozilla/payments.git","svn_url":"https://github.com/mozilla/payments","homepage":null,"size":2219,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":16,"forks":3,"open_issues":16,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/payments/pulls/56"},"html":{"href":"https://github.com/mozilla/payments/pull/56"},"issue":{"href":"https://api.github.com/repos/mozilla/payments/issues/56"},"comments":{"href":"https://api.github.com/repos/mozilla/payments/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/payments/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/payments/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/payments/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/payments/statuses/0bd30732a8b2c6a8b01e5a74dcec8a3d00cf5ad8"}}}}