Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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: 'unpaid',
- _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',
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement