-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds mock implementations for API calls.
- Loading branch information
1 parent
37f927a
commit 09baace
Showing
8 changed files
with
403 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import mockData from './mockData'; | ||
|
||
function getItems() { | ||
return new Promise(resolve => setTimeout(() => resolve(mockData), 1500)); | ||
} | ||
|
||
export default getItems; |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { default as getItems } from './getItems'; | ||
export { default as postInvoice } from './postInvoice'; |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,291 @@ | ||
{ | ||
"data": { | ||
"current_page": 1, | ||
"data": [ | ||
{ | ||
"id": "412fa6b9-de0c-49e8-b023-f66a878e2b8d", | ||
"user_id": "08172f90-c2e8-41d4-be0a-4cc601cd5770", | ||
"merchant_id": "6d329797-b64d-47d1-a457-4798e2b361b5", | ||
"thumbnail_id": null, | ||
"item": "Item 2", | ||
"code": "item-2", | ||
"category": "default", | ||
"details": "details about Item 2", | ||
"is_active": true, | ||
"is_taxable": true, | ||
"is_service": false, | ||
"is_subscription": false, | ||
"is_discount": false, | ||
"price": 5, | ||
"in_stock": 100, | ||
"low_stock_alert": 10, | ||
"meta": [], | ||
"created_at": "2019-04-16 15:29:49", | ||
"updated_at": "2019-04-23 13:03:28", | ||
"deleted_at": null, | ||
"user": { | ||
"id": "08172f90-c2e8-41d4-be0a-4cc601cd5770", | ||
"system_admin": false, | ||
"name": "user", | ||
"email": "[email protected]", | ||
"email_verification_sent_at": "2019-04-16 15:29:48", | ||
"email_verified_at": "2019-04-16 15:29:48", | ||
"is_api_key": false, | ||
"acknowledgments": { | ||
"tutorial": true | ||
}, | ||
"created_at": "2019-04-16 15:29:48", | ||
"updated_at": "2019-04-16 15:29:48", | ||
"deleted_at": null, | ||
"brand": null, | ||
"gravatar": "//www.gravatar.com/avatar/edca79f00b23dfdc0f0eb803630be006", | ||
"team_admin": null, | ||
"team_enabled": null, | ||
"team_role": null, | ||
"merchant_options": [], | ||
"is_default": false | ||
}, | ||
"files": [], | ||
"thumbnail": null | ||
}, | ||
{ | ||
"id": "04e9d469-ac93-4c60-ba69-0ebc9cd1955b", | ||
"user_id": "08172f90-c2e8-41d4-be0a-4cc601cd5770", | ||
"merchant_id": "6d329797-b64d-47d1-a457-4798e2b361b5", | ||
"thumbnail_id": null, | ||
"item": "Item 4", | ||
"code": "item-4", | ||
"category": "default", | ||
"details": "details about Item 4", | ||
"is_active": true, | ||
"is_taxable": true, | ||
"is_service": false, | ||
"is_subscription": false, | ||
"is_discount": false, | ||
"price": 8, | ||
"in_stock": 100, | ||
"low_stock_alert": 10, | ||
"meta": [], | ||
"created_at": "2019-04-16 15:29:49", | ||
"updated_at": "2019-04-16 15:29:49", | ||
"deleted_at": null, | ||
"user": { | ||
"id": "08172f90-c2e8-41d4-be0a-4cc601cd5770", | ||
"system_admin": false, | ||
"name": "user", | ||
"email": "[email protected]", | ||
"email_verification_sent_at": "2019-04-16 15:29:48", | ||
"email_verified_at": "2019-04-16 15:29:48", | ||
"is_api_key": false, | ||
"acknowledgments": { | ||
"tutorial": true | ||
}, | ||
"created_at": "2019-04-16 15:29:48", | ||
"updated_at": "2019-04-16 15:29:48", | ||
"deleted_at": null, | ||
"brand": null, | ||
"gravatar": "//www.gravatar.com/avatar/edca79f00b23dfdc0f0eb803630be006", | ||
"team_admin": null, | ||
"team_enabled": null, | ||
"team_role": null, | ||
"merchant_options": [], | ||
"is_default": false | ||
}, | ||
"files": [], | ||
"thumbnail": null | ||
}, | ||
{ | ||
"id": "262db41c-90ed-46df-b3c3-e498807d188f", | ||
"user_id": "08172f90-c2e8-41d4-be0a-4cc601cd5770", | ||
"merchant_id": "6d329797-b64d-47d1-a457-4798e2b361b5", | ||
"thumbnail_id": null, | ||
"item": "Item 5", | ||
"code": "item-5", | ||
"category": "default", | ||
"details": "details about Item 5", | ||
"is_active": true, | ||
"is_taxable": true, | ||
"is_service": false, | ||
"is_subscription": false, | ||
"is_discount": false, | ||
"price": 10, | ||
"in_stock": 100, | ||
"low_stock_alert": 10, | ||
"meta": [], | ||
"created_at": "2019-04-16 15:29:49", | ||
"updated_at": "2019-04-16 15:29:49", | ||
"deleted_at": null, | ||
"user": { | ||
"id": "08172f90-c2e8-41d4-be0a-4cc601cd5770", | ||
"system_admin": false, | ||
"name": "user", | ||
"email": "[email protected]", | ||
"email_verification_sent_at": "2019-04-16 15:29:48", | ||
"email_verified_at": "2019-04-16 15:29:48", | ||
"is_api_key": false, | ||
"acknowledgments": { | ||
"tutorial": true | ||
}, | ||
"created_at": "2019-04-16 15:29:48", | ||
"updated_at": "2019-04-16 15:29:48", | ||
"deleted_at": null, | ||
"brand": null, | ||
"gravatar": "//www.gravatar.com/avatar/edca79f00b23dfdc0f0eb803630be006", | ||
"team_admin": null, | ||
"team_enabled": null, | ||
"team_role": null, | ||
"merchant_options": [], | ||
"is_default": false | ||
}, | ||
"files": [], | ||
"thumbnail": null | ||
}, | ||
{ | ||
"id": "afd15eb8-6556-40f5-b6ce-fd9ceb6a2251", | ||
"user_id": "08172f90-c2e8-41d4-be0a-4cc601cd5770", | ||
"merchant_id": "6d329797-b64d-47d1-a457-4798e2b361b5", | ||
"thumbnail_id": null, | ||
"item": "Item 3", | ||
"code": "item-3", | ||
"category": "default", | ||
"details": "details about item 3", | ||
"is_active": true, | ||
"is_taxable": true, | ||
"is_service": false, | ||
"is_subscription": false, | ||
"is_discount": false, | ||
"price": 20, | ||
"in_stock": 100, | ||
"low_stock_alert": 10, | ||
"meta": [], | ||
"created_at": "2019-04-16 15:29:49", | ||
"updated_at": "2019-05-30 15:49:40", | ||
"deleted_at": null, | ||
"user": { | ||
"id": "08172f90-c2e8-41d4-be0a-4cc601cd5770", | ||
"system_admin": false, | ||
"name": "user", | ||
"email": "[email protected]", | ||
"email_verification_sent_at": "2019-04-16 15:29:48", | ||
"email_verified_at": "2019-04-16 15:29:48", | ||
"is_api_key": false, | ||
"acknowledgments": { | ||
"tutorial": true | ||
}, | ||
"created_at": "2019-04-16 15:29:48", | ||
"updated_at": "2019-04-16 15:29:48", | ||
"deleted_at": null, | ||
"brand": null, | ||
"gravatar": "//www.gravatar.com/avatar/edca79f00b23dfdc0f0eb803630be006", | ||
"team_admin": null, | ||
"team_enabled": null, | ||
"team_role": null, | ||
"merchant_options": [], | ||
"is_default": false | ||
}, | ||
"files": [], | ||
"thumbnail": null | ||
}, | ||
{ | ||
"id": "c85d4614-cdab-4ba3-9ff5-087843cb10a6", | ||
"user_id": "08172f90-c2e8-41d4-be0a-4cc601cd5770", | ||
"merchant_id": "6d329797-b64d-47d1-a457-4798e2b361b5", | ||
"thumbnail_id": null, | ||
"item": "Item 1", | ||
"code": "item-1", | ||
"category": "default", | ||
"details": "", | ||
"is_active": true, | ||
"is_taxable": true, | ||
"is_service": false, | ||
"is_subscription": false, | ||
"is_discount": false, | ||
"price": 20, | ||
"in_stock": 100, | ||
"low_stock_alert": 10, | ||
"meta": [], | ||
"created_at": "2019-04-16 15:29:49", | ||
"updated_at": "2019-05-30 15:49:25", | ||
"deleted_at": null, | ||
"user": { | ||
"id": "08172f90-c2e8-41d4-be0a-4cc601cd5770", | ||
"system_admin": false, | ||
"name": "user", | ||
"email": "[email protected]", | ||
"email_verification_sent_at": "2019-04-16 15:29:48", | ||
"email_verified_at": "2019-04-16 15:29:48", | ||
"is_api_key": false, | ||
"acknowledgments": { | ||
"tutorial": true | ||
}, | ||
"created_at": "2019-04-16 15:29:48", | ||
"updated_at": "2019-04-16 15:29:48", | ||
"deleted_at": null, | ||
"brand": null, | ||
"gravatar": "//www.gravatar.com/avatar/edca79f00b23dfdc0f0eb803630be006", | ||
"team_admin": null, | ||
"team_enabled": null, | ||
"team_role": null, | ||
"merchant_options": [], | ||
"is_default": false | ||
}, | ||
"files": [], | ||
"thumbnail": null | ||
}, | ||
{ | ||
"id": "185cce0d-5c63-4d57-a773-132bf2970167", | ||
"user_id": "08172f90-c2e8-41d4-be0a-4cc601cd5770", | ||
"merchant_id": "6d329797-b64d-47d1-a457-4798e2b361b5", | ||
"thumbnail_id": null, | ||
"item": "Service 1", | ||
"code": null, | ||
"category": null, | ||
"details": "Details about Service 1.", | ||
"is_active": true, | ||
"is_taxable": false, | ||
"is_service": true, | ||
"is_subscription": false, | ||
"is_discount": false, | ||
"price": 50, | ||
"in_stock": 0, | ||
"low_stock_alert": null, | ||
"meta": [], | ||
"created_at": "2019-06-16 18:35:49", | ||
"updated_at": "2019-06-16 18:35:49", | ||
"deleted_at": null, | ||
"user": { | ||
"id": "08172f90-c2e8-41d4-be0a-4cc601cd5770", | ||
"system_admin": false, | ||
"name": "user", | ||
"email": "[email protected]", | ||
"email_verification_sent_at": "2019-04-16 15:29:48", | ||
"email_verified_at": "2019-04-16 15:29:48", | ||
"is_api_key": false, | ||
"acknowledgments": { | ||
"tutorial": true | ||
}, | ||
"created_at": "2019-04-16 15:29:48", | ||
"updated_at": "2019-04-16 15:29:48", | ||
"deleted_at": null, | ||
"brand": null, | ||
"gravatar": "//www.gravatar.com/avatar/edca79f00b23dfdc0f0eb803630be006", | ||
"team_admin": null, | ||
"team_enabled": null, | ||
"team_role": null, | ||
"merchant_options": [], | ||
"is_default": false | ||
}, | ||
"files": [], | ||
"thumbnail": null | ||
} | ||
], | ||
"total": 6 | ||
}, | ||
"status": 200, | ||
"statusText": "", | ||
"headers": { | ||
"content-type": "application/json", | ||
"cache-control": "no-cache, private" | ||
}, | ||
"request": {} | ||
} |
Oops, something went wrong.