Last active
July 4, 2019 09:16
-
-
Save chenghung/1c45ec95e2d7b49ad1a64fa2f9d77eff to your computer and use it in GitHub Desktop.
Revisions
-
chenghung revised this gist
Jul 4, 2019 . No changes.There are no files selected for viewing
-
chenghung revised this gist
Jul 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,7 @@ GET /orders/:id // refresh PUT /order/:id/changes { id: 5, state: 'unpaid', _links: { self: { method: 'GET', -
chenghung created this gist
Jul 4, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,91 @@ POST /orders { id: 5, state: 'payment-expected', _links: { self: { method: 'GET', href: '/orders/5', } payment: { method: 'PUT', href: '/orders/5/payments', }, change: { method: 'PUT', href: '/orders/5/changes', } cancel: { method: 'PUT', href: '/orders/5/cancels', } } } GET /orders/:id // refresh PUT /order/:id/changes { id: 5, state: 'payment-expected', _links: { self: { method: 'GET', href: '/orders/5', } payment: { method: 'PUT', href: '/orders/5/payments', }, change: { method: 'PUT', href: '/orders/5/changes', } cancel: { method: 'PUT', href: '/orders/5/cancels', } } } PUT /orders/:id/payments { id: 5, state: 'paid', _links: { self: { method: 'GET', href: '/orders/5', } take: { method: 'PUT', href: '/orders/5/takes', } } } PUT /orders/:id/cancels { id: 5, state: 'canceled', _links: { self: { method: 'GET', href: '/orders/5', } } } PUT /orders/:id/takes { id: 5, state: 'completed', _links: { self: { method: 'GET', href: '/orders/5', } } }