@orchesty/connector-woocommerce 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/LICENSE +190 -0
- package/coverage/clover.xml +404 -0
- package/coverage/coverage-final.json +21 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +161 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/Batch/WooCommerceGetOrders.ts.html +640 -0
- package/coverage/lcov-report/src/Batch/WooCommerceGetProducts.ts.html +532 -0
- package/coverage/lcov-report/src/Batch/WooCommerceGetVariants.ts.html +433 -0
- package/coverage/lcov-report/src/Batch/index.html +146 -0
- package/coverage/lcov-report/src/Connector/WooCommerceAddNote.ts.html +220 -0
- package/coverage/lcov-report/src/Connector/WooCommerceCreateProduct.ts.html +178 -0
- package/coverage/lcov-report/src/Connector/WooCommerceCreateProductCategory.ts.html +307 -0
- package/coverage/lcov-report/src/Connector/WooCommerceGetOrderNotes.ts.html +274 -0
- package/coverage/lcov-report/src/Connector/WooCommerceGetOrderStatuses.ts.html +175 -0
- package/coverage/lcov-report/src/Connector/WooCommerceGetPaymentGateways.ts.html +295 -0
- package/coverage/lcov-report/src/Connector/WooCommerceGetProduct.ts.html +181 -0
- package/coverage/lcov-report/src/Connector/WooCommerceGetProductVariant.ts.html +496 -0
- package/coverage/lcov-report/src/Connector/WooCommerceGetProductsBySku.ts.html +226 -0
- package/coverage/lcov-report/src/Connector/WooCommerceGetSettingsGeneral.ts.html +238 -0
- package/coverage/lcov-report/src/Connector/WooCommerceGetShippingMethods.ts.html +478 -0
- package/coverage/lcov-report/src/Connector/WooCommerceUpdateOrder.ts.html +193 -0
- package/coverage/lcov-report/src/Connector/WooCommerceUpdateProduct.ts.html +199 -0
- package/coverage/lcov-report/src/Connector/WooCommerceUpdateProductQuantity.ts.html +220 -0
- package/coverage/lcov-report/src/Connector/WooCommerceUpdateProductVariant.ts.html +199 -0
- package/coverage/lcov-report/src/Connector/index.html +326 -0
- package/coverage/lcov-report/src/WooCommerceApplication.ts.html +364 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/test/dataProvider.ts.html +427 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov.info +661 -0
- package/dist/Batch/WooCommerceGetOrders.d.ts +133 -0
- package/dist/Batch/WooCommerceGetOrders.js +44 -0
- package/dist/Batch/WooCommerceGetProducts.d.ts +108 -0
- package/dist/Batch/WooCommerceGetProducts.js +36 -0
- package/dist/Batch/WooCommerceGetVariants.d.ts +81 -0
- package/dist/Batch/WooCommerceGetVariants.js +30 -0
- package/dist/Connector/WooCommerceAddNote.d.ts +18 -0
- package/dist/Connector/WooCommerceAddNote.js +23 -0
- package/dist/Connector/WooCommerceCreateProduct.d.ts +10 -0
- package/dist/Connector/WooCommerceCreateProduct.js +20 -0
- package/dist/Connector/WooCommerceCreateProductCategory.d.ts +41 -0
- package/dist/Connector/WooCommerceCreateProductCategory.js +28 -0
- package/dist/Connector/WooCommerceGetOrderNotes.d.ts +33 -0
- package/dist/Connector/WooCommerceGetOrderNotes.js +24 -0
- package/dist/Connector/WooCommerceGetOrderStatuses.d.ts +11 -0
- package/dist/Connector/WooCommerceGetOrderStatuses.js +20 -0
- package/dist/Connector/WooCommerceGetPaymentGateways.d.ts +48 -0
- package/dist/Connector/WooCommerceGetPaymentGateways.js +20 -0
- package/dist/Connector/WooCommerceGetProduct.d.ts +11 -0
- package/dist/Connector/WooCommerceGetProduct.js +21 -0
- package/dist/Connector/WooCommerceGetProductVariant.d.ts +12 -0
- package/dist/Connector/WooCommerceGetProductVariant.js +46 -0
- package/dist/Connector/WooCommerceGetProductsBySku.d.ts +12 -0
- package/dist/Connector/WooCommerceGetProductsBySku.js +34 -0
- package/dist/Connector/WooCommerceGetSettingsGeneral.d.ts +29 -0
- package/dist/Connector/WooCommerceGetSettingsGeneral.js +21 -0
- package/dist/Connector/WooCommerceGetShippingMethods.d.ts +82 -0
- package/dist/Connector/WooCommerceGetShippingMethods.js +36 -0
- package/dist/Connector/WooCommerceRegisterWebhook.d.ts +7 -0
- package/dist/Connector/WooCommerceRegisterWebhook.js +65 -0
- package/dist/Connector/WooCommerceUnsubscribeWebhooks.d.ts +6 -0
- package/dist/Connector/WooCommerceUnsubscribeWebhooks.js +59 -0
- package/dist/Connector/WooCommerceUpdateOrder.d.ts +12 -0
- package/dist/Connector/WooCommerceUpdateOrder.js +23 -0
- package/dist/Connector/WooCommerceUpdateProduct.d.ts +12 -0
- package/dist/Connector/WooCommerceUpdateProduct.js +25 -0
- package/dist/Connector/WooCommerceUpdateProductQuantity.d.ts +16 -0
- package/dist/Connector/WooCommerceUpdateProductQuantity.js +22 -0
- package/dist/Connector/WooCommerceUpdateProductVariant.d.ts +13 -0
- package/dist/Connector/WooCommerceUpdateProductVariant.js +21 -0
- package/dist/WooCommerceApplication.d.ts +21 -0
- package/dist/WooCommerceApplication.js +101 -0
- package/dist/package.json +28 -0
- package/jest.config.js +13 -0
- package/package.json +28 -0
- package/src/Batch/WooCommerceGetOrders.ts +185 -0
- package/src/Batch/WooCommerceGetProducts.ts +149 -0
- package/src/Batch/WooCommerceGetVariants.ts +116 -0
- package/src/Batch/__tests__/Data/WooCommerceGetOrders/ids-input.json +8 -0
- package/src/Batch/__tests__/Data/WooCommerceGetOrders/ids-mock.json +319 -0
- package/src/Batch/__tests__/Data/WooCommerceGetOrders/ids-output.json +16 -0
- package/src/Batch/__tests__/Data/WooCommerceGetOrders/input.json +6 -0
- package/src/Batch/__tests__/Data/WooCommerceGetOrders/lastRun-input.json +6 -0
- package/src/Batch/__tests__/Data/WooCommerceGetOrders/lastRun-mock.json +319 -0
- package/src/Batch/__tests__/Data/WooCommerceGetOrders/lastRun-output.json +15 -0
- package/src/Batch/__tests__/Data/WooCommerceGetOrders/mock.json +319 -0
- package/src/Batch/__tests__/Data/WooCommerceGetOrders/output.json +15 -0
- package/src/Batch/__tests__/Data/WooCommerceGetProducts/input.json +7 -0
- package/src/Batch/__tests__/Data/WooCommerceGetProducts/mock.json +170 -0
- package/src/Batch/__tests__/Data/WooCommerceGetProducts/output.json +11 -0
- package/src/Batch/__tests__/Data/WooCommerceGetProducts/withAfter-input.json +7 -0
- package/src/Batch/__tests__/Data/WooCommerceGetProducts/withAfter-mock.json +170 -0
- package/src/Batch/__tests__/Data/WooCommerceGetProducts/withAfter-output.json +11 -0
- package/src/Batch/__tests__/Data/WooCommerceGetVariants/input.json +169 -0
- package/src/Batch/__tests__/Data/WooCommerceGetVariants/mock.json +160 -0
- package/src/Batch/__tests__/Data/WooCommerceGetVariants/output.json +11 -0
- package/src/Batch/__tests__/WooCommerceGetOrders.ts +42 -0
- package/src/Batch/__tests__/WooCommerceGetProducts.ts +37 -0
- package/src/Batch/__tests__/WooCommerceGetVariants.ts +32 -0
- package/src/Connector/WooCommerceAddNote.ts +45 -0
- package/src/Connector/WooCommerceCreateProduct.ts +31 -0
- package/src/Connector/WooCommerceCreateProductCategory.ts +74 -0
- package/src/Connector/WooCommerceGetOrderNotes.ts +63 -0
- package/src/Connector/WooCommerceGetOrderStatuses.ts +30 -0
- package/src/Connector/WooCommerceGetPaymentGateways.ts +70 -0
- package/src/Connector/WooCommerceGetProduct.ts +32 -0
- package/src/Connector/WooCommerceGetProductVariant.ts +137 -0
- package/src/Connector/WooCommerceGetProductsBySku.ts +47 -0
- package/src/Connector/WooCommerceGetSettingsGeneral.ts +51 -0
- package/src/Connector/WooCommerceGetShippingMethods.ts +131 -0
- package/src/Connector/WooCommerceRegisterWebhook.ts +106 -0
- package/src/Connector/WooCommerceUnsubscribeWebhooks.ts +91 -0
- package/src/Connector/WooCommerceUpdateOrder.ts +36 -0
- package/src/Connector/WooCommerceUpdateProduct.ts +38 -0
- package/src/Connector/WooCommerceUpdateProductQuantity.ts +45 -0
- package/src/Connector/WooCommerceUpdateProductVariant.ts +38 -0
- package/src/Connector/__tests__/Data/WooCommerceAddNote/input.json +11 -0
- package/src/Connector/__tests__/Data/WooCommerceAddNote/mock.json +22 -0
- package/src/Connector/__tests__/Data/WooCommerceAddNote/output.json +23 -0
- package/src/Connector/__tests__/Data/WooCommerceCreateProduct/input.json +28 -0
- package/src/Connector/__tests__/Data/WooCommerceCreateProduct/mock.json +125 -0
- package/src/Connector/__tests__/Data/WooCommerceCreateProduct/output.json +126 -0
- package/src/Connector/__tests__/Data/WooCommerceCreateProductCategory/input.json +11 -0
- package/src/Connector/__tests__/Data/WooCommerceCreateProductCategory/mock.json +36 -0
- package/src/Connector/__tests__/Data/WooCommerceCreateProductCategory/output.json +37 -0
- package/src/Connector/__tests__/Data/WooCommerceGetOrderNotes/input.json +8 -0
- package/src/Connector/__tests__/Data/WooCommerceGetOrderNotes/mock.json +81 -0
- package/src/Connector/__tests__/Data/WooCommerceGetOrderNotes/output.json +82 -0
- package/src/Connector/__tests__/Data/WooCommerceGetOrderStatuses/input.json +6 -0
- package/src/Connector/__tests__/Data/WooCommerceGetOrderStatuses/mock.json +41 -0
- package/src/Connector/__tests__/Data/WooCommerceGetOrderStatuses/output.json +42 -0
- package/src/Connector/__tests__/Data/WooCommerceGetPaymentGateways/input.json +6 -0
- package/src/Connector/__tests__/Data/WooCommerceGetPaymentGateways/mock.json +350 -0
- package/src/Connector/__tests__/Data/WooCommerceGetPaymentGateways/output.json +351 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProduct/input.json +8 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProduct/mock.json +125 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProduct/output.json +126 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/input.json +37 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/mock.json +81 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/mock1.json +81 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/nok-input.json +22 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/nok-mock.json +81 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/nok-output.json +24 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/output.json +37 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProductsBySku/input.json +8 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProductsBySku/mock.json +170 -0
- package/src/Connector/__tests__/Data/WooCommerceGetProductsBySku/output.json +169 -0
- package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/input.json +6 -0
- package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/mock.json +3459 -0
- package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/output.json +3460 -0
- package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/with-id-input.json +8 -0
- package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/with-id-mock.json +30 -0
- package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/with-id-output.json +31 -0
- package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/input.json +6 -0
- package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/mock.json +50 -0
- package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/mock1.json +187 -0
- package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/mock2.json +187 -0
- package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/output.json +373 -0
- package/src/Connector/__tests__/Data/WooCommerceUpdateOrder/input.json +9 -0
- package/src/Connector/__tests__/Data/WooCommerceUpdateOrder/mock.json +169 -0
- package/src/Connector/__tests__/Data/WooCommerceUpdateOrder/output.json +170 -0
- package/src/Connector/__tests__/Data/WooCommerceUpdateProduct/input.json +9 -0
- package/src/Connector/__tests__/Data/WooCommerceUpdateProduct/mock.json +125 -0
- package/src/Connector/__tests__/Data/WooCommerceUpdateProduct/output.json +126 -0
- package/src/Connector/__tests__/Data/WooCommerceUpdateProductQuantity/input.json +20 -0
- package/src/Connector/__tests__/Data/WooCommerceUpdateProductQuantity/mock.json +162 -0
- package/src/Connector/__tests__/Data/WooCommerceUpdateProductQuantity/output.json +6 -0
- package/src/Connector/__tests__/Data/WooCommerceUpdateProductVariant/input.json +10 -0
- package/src/Connector/__tests__/Data/WooCommerceUpdateProductVariant/mock.json +125 -0
- package/src/Connector/__tests__/Data/WooCommerceUpdateProductVariant/output.json +126 -0
- package/src/Connector/__tests__/WooCommerceAddNote.ts +18 -0
- package/src/Connector/__tests__/WooCommerceCreateProduct.ts +18 -0
- package/src/Connector/__tests__/WooCommerceCreateProductCategory.ts +18 -0
- package/src/Connector/__tests__/WooCommerceGetOrderNotes.ts +18 -0
- package/src/Connector/__tests__/WooCommerceGetOrderStatuses.ts +18 -0
- package/src/Connector/__tests__/WooCommerceGetPaymentGateways.ts +18 -0
- package/src/Connector/__tests__/WooCommerceGetProduct.ts +18 -0
- package/src/Connector/__tests__/WooCommerceGetProductVariant.ts +25 -0
- package/src/Connector/__tests__/WooCommerceGetProductsBySku.ts +18 -0
- package/src/Connector/__tests__/WooCommerceGetSettingsGeneral.ts +25 -0
- package/src/Connector/__tests__/WooCommerceGetShippingMethods.ts +18 -0
- package/src/Connector/__tests__/WooCommerceUpdateOrder.ts +18 -0
- package/src/Connector/__tests__/WooCommerceUpdateProduct.ts +18 -0
- package/src/Connector/__tests__/WooCommerceUpdateProductQuantity.ts +18 -0
- package/src/Connector/__tests__/WooCommerceUpdateProductVariant.ts +18 -0
- package/src/WooCommerceApplication.ts +93 -0
- package/test/dataProvider.ts +114 -0
- package/tsconfig.json +8 -0
- package/tsconfig.prod.json +13 -0
- package/tsconfig.prod.tsbuildinfo +1 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
+
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
3
|
+
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
4
|
+
import { IVariant } from '../Batch/WooCommerceGetVariants';
|
|
5
|
+
|
|
6
|
+
export const NAME = 'woo-commerce-update-product-variant';
|
|
7
|
+
|
|
8
|
+
export default class WooCommerceUpdateProductVariant extends AConnector {
|
|
9
|
+
|
|
10
|
+
public getName(): string {
|
|
11
|
+
return NAME;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public async processAction(dto: ProcessDto<IInput>): Promise<ProcessDto<IOutput>> {
|
|
15
|
+
const { productId, id, ...rest } = dto.getJsonData();
|
|
16
|
+
|
|
17
|
+
const req = await this.getApplication().getRequestDto(
|
|
18
|
+
dto,
|
|
19
|
+
await this.getApplicationInstallFromProcess(dto),
|
|
20
|
+
HttpMethods.PUT,
|
|
21
|
+
`wp-json/wc/v3/products/${productId}/variations/${id}`,
|
|
22
|
+
JSON.stringify(rest),
|
|
23
|
+
);
|
|
24
|
+
const resp = await this.getSender().send<IResponse>(req, [200]);
|
|
25
|
+
|
|
26
|
+
return dto.setNewJsonData(resp.getJsonBody());
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface IInput extends Partial<IVariant> {
|
|
32
|
+
id: number;
|
|
33
|
+
productId: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
type IResponse = IVariant;
|
|
37
|
+
|
|
38
|
+
export type IOutput = IVariant;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"http": "POST http://woocomerce.com/wp-json/wc/v3/orders/1/notes",
|
|
3
|
+
"code": 200,
|
|
4
|
+
"body": {
|
|
5
|
+
"id": 727,
|
|
6
|
+
"author": "system",
|
|
7
|
+
"note": "Neco",
|
|
8
|
+
"customer_note": true,
|
|
9
|
+
"_links": {
|
|
10
|
+
"self": [
|
|
11
|
+
{
|
|
12
|
+
"href": "https://example.com/wp-json/wc/v3/orders/727"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"collection": [
|
|
16
|
+
{
|
|
17
|
+
"href": "https://example.com/wp-json/wc/v3/orders"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"headers": {
|
|
3
|
+
"user": "TestUser"
|
|
4
|
+
},
|
|
5
|
+
"data": {
|
|
6
|
+
"_links": {
|
|
7
|
+
"collection": [
|
|
8
|
+
{
|
|
9
|
+
"href": "https://example.com/wp-json/wc/v3/orders"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"self": [
|
|
13
|
+
{
|
|
14
|
+
"href": "https://example.com/wp-json/wc/v3/orders/727"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"author": "system",
|
|
19
|
+
"customer_note": true,
|
|
20
|
+
"id": 727,
|
|
21
|
+
"note": "Neco"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"headers": {
|
|
3
|
+
"user": "TestUser"
|
|
4
|
+
},
|
|
5
|
+
"data": {
|
|
6
|
+
"name": "Premium Quality",
|
|
7
|
+
"type": "simple",
|
|
8
|
+
"regular_price": "21.99",
|
|
9
|
+
"description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",
|
|
10
|
+
"short_description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.",
|
|
11
|
+
"categories": [
|
|
12
|
+
{
|
|
13
|
+
"id": 9
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": 14
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"images": [
|
|
20
|
+
{
|
|
21
|
+
"src": "http://demo.woothemes.com/woocommerce/wp-content/uploads/sites/56/2013/06/T_2_front.jpg"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"src": "http://demo.woothemes.com/woocommerce/wp-content/uploads/sites/56/2013/06/T_2_back.jpg"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"http": "POST http://woocomerce.com/wp-json/wc/v3/products",
|
|
3
|
+
"code": 200,
|
|
4
|
+
"body": {
|
|
5
|
+
"id": 794,
|
|
6
|
+
"name": "Premium Quality",
|
|
7
|
+
"slug": "premium-quality-19",
|
|
8
|
+
"permalink": "https://example.com/product/premium-quality-19/",
|
|
9
|
+
"date_created": "2017-03-23T17:01:14",
|
|
10
|
+
"date_created_gmt": "2017-03-23T20:01:14",
|
|
11
|
+
"date_modified": "2017-03-23T17:01:14",
|
|
12
|
+
"date_modified_gmt": "2017-03-23T20:01:14",
|
|
13
|
+
"type": "simple",
|
|
14
|
+
"status": "publish",
|
|
15
|
+
"featured": false,
|
|
16
|
+
"catalog_visibility": "visible",
|
|
17
|
+
"description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\n",
|
|
18
|
+
"short_description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>\n",
|
|
19
|
+
"sku": "",
|
|
20
|
+
"price": "21.99",
|
|
21
|
+
"regular_price": "21.99",
|
|
22
|
+
"sale_price": "",
|
|
23
|
+
"date_on_sale_from": null,
|
|
24
|
+
"date_on_sale_from_gmt": null,
|
|
25
|
+
"date_on_sale_to": null,
|
|
26
|
+
"date_on_sale_to_gmt": null,
|
|
27
|
+
"price_html": "<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">$</span>21.99</span>",
|
|
28
|
+
"on_sale": false,
|
|
29
|
+
"purchasable": true,
|
|
30
|
+
"total_sales": 0,
|
|
31
|
+
"virtual": false,
|
|
32
|
+
"downloadable": false,
|
|
33
|
+
"downloads": [],
|
|
34
|
+
"download_limit": -1,
|
|
35
|
+
"download_expiry": -1,
|
|
36
|
+
"external_url": "",
|
|
37
|
+
"button_text": "",
|
|
38
|
+
"tax_status": "taxable",
|
|
39
|
+
"tax_class": "",
|
|
40
|
+
"manage_stock": false,
|
|
41
|
+
"stock_quantity": null,
|
|
42
|
+
"stock_status": "instock",
|
|
43
|
+
"backorders": "no",
|
|
44
|
+
"backorders_allowed": false,
|
|
45
|
+
"backordered": false,
|
|
46
|
+
"sold_individually": false,
|
|
47
|
+
"weight": "",
|
|
48
|
+
"dimensions": {
|
|
49
|
+
"length": "",
|
|
50
|
+
"width": "",
|
|
51
|
+
"height": ""
|
|
52
|
+
},
|
|
53
|
+
"shipping_required": true,
|
|
54
|
+
"shipping_taxable": true,
|
|
55
|
+
"shipping_class": "",
|
|
56
|
+
"shipping_class_id": 0,
|
|
57
|
+
"reviews_allowed": true,
|
|
58
|
+
"average_rating": "0.00",
|
|
59
|
+
"rating_count": 0,
|
|
60
|
+
"related_ids": [
|
|
61
|
+
53,
|
|
62
|
+
40,
|
|
63
|
+
56,
|
|
64
|
+
479,
|
|
65
|
+
99
|
|
66
|
+
],
|
|
67
|
+
"upsell_ids": [],
|
|
68
|
+
"cross_sell_ids": [],
|
|
69
|
+
"parent_id": 0,
|
|
70
|
+
"purchase_note": "",
|
|
71
|
+
"categories": [
|
|
72
|
+
{
|
|
73
|
+
"id": 9,
|
|
74
|
+
"name": "Clothing",
|
|
75
|
+
"slug": "clothing"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": 14,
|
|
79
|
+
"name": "T-shirts",
|
|
80
|
+
"slug": "t-shirts"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"tags": [],
|
|
84
|
+
"images": [
|
|
85
|
+
{
|
|
86
|
+
"id": 792,
|
|
87
|
+
"date_created": "2017-03-23T14:01:13",
|
|
88
|
+
"date_created_gmt": "2017-03-23T20:01:13",
|
|
89
|
+
"date_modified": "2017-03-23T14:01:13",
|
|
90
|
+
"date_modified_gmt": "2017-03-23T20:01:13",
|
|
91
|
+
"src": "https://example.com/wp-content/uploads/2017/03/T_2_front-4.jpg",
|
|
92
|
+
"name": "",
|
|
93
|
+
"alt": ""
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": 793,
|
|
97
|
+
"date_created": "2017-03-23T14:01:14",
|
|
98
|
+
"date_created_gmt": "2017-03-23T20:01:14",
|
|
99
|
+
"date_modified": "2017-03-23T14:01:14",
|
|
100
|
+
"date_modified_gmt": "2017-03-23T20:01:14",
|
|
101
|
+
"src": "https://example.com/wp-content/uploads/2017/03/T_2_back-2.jpg",
|
|
102
|
+
"name": "",
|
|
103
|
+
"alt": ""
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"attributes": [],
|
|
107
|
+
"default_attributes": [],
|
|
108
|
+
"variations": [],
|
|
109
|
+
"grouped_products": [],
|
|
110
|
+
"menu_order": 0,
|
|
111
|
+
"meta_data": [],
|
|
112
|
+
"_links": {
|
|
113
|
+
"self": [
|
|
114
|
+
{
|
|
115
|
+
"href": "https://example.com/wp-json/wc/v3/products/794"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"collection": [
|
|
119
|
+
{
|
|
120
|
+
"href": "https://example.com/wp-json/wc/v3/products"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"headers": {
|
|
3
|
+
"user": "TestUser"
|
|
4
|
+
},
|
|
5
|
+
"data": {
|
|
6
|
+
"id": 794,
|
|
7
|
+
"name": "Premium Quality",
|
|
8
|
+
"slug": "premium-quality-19",
|
|
9
|
+
"permalink": "https://example.com/product/premium-quality-19/",
|
|
10
|
+
"date_created": "2017-03-23T17:01:14",
|
|
11
|
+
"date_created_gmt": "2017-03-23T20:01:14",
|
|
12
|
+
"date_modified": "2017-03-23T17:01:14",
|
|
13
|
+
"date_modified_gmt": "2017-03-23T20:01:14",
|
|
14
|
+
"type": "simple",
|
|
15
|
+
"status": "publish",
|
|
16
|
+
"featured": false,
|
|
17
|
+
"catalog_visibility": "visible",
|
|
18
|
+
"description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>\n",
|
|
19
|
+
"short_description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>\n",
|
|
20
|
+
"sku": "",
|
|
21
|
+
"price": "21.99",
|
|
22
|
+
"regular_price": "21.99",
|
|
23
|
+
"sale_price": "",
|
|
24
|
+
"date_on_sale_from": null,
|
|
25
|
+
"date_on_sale_from_gmt": null,
|
|
26
|
+
"date_on_sale_to": null,
|
|
27
|
+
"date_on_sale_to_gmt": null,
|
|
28
|
+
"price_html": "<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">$</span>21.99</span>",
|
|
29
|
+
"on_sale": false,
|
|
30
|
+
"purchasable": true,
|
|
31
|
+
"total_sales": 0,
|
|
32
|
+
"virtual": false,
|
|
33
|
+
"downloadable": false,
|
|
34
|
+
"downloads": [],
|
|
35
|
+
"download_limit": -1,
|
|
36
|
+
"download_expiry": -1,
|
|
37
|
+
"external_url": "",
|
|
38
|
+
"button_text": "",
|
|
39
|
+
"tax_status": "taxable",
|
|
40
|
+
"tax_class": "",
|
|
41
|
+
"manage_stock": false,
|
|
42
|
+
"stock_quantity": null,
|
|
43
|
+
"stock_status": "instock",
|
|
44
|
+
"backorders": "no",
|
|
45
|
+
"backorders_allowed": false,
|
|
46
|
+
"backordered": false,
|
|
47
|
+
"sold_individually": false,
|
|
48
|
+
"weight": "",
|
|
49
|
+
"dimensions": {
|
|
50
|
+
"length": "",
|
|
51
|
+
"width": "",
|
|
52
|
+
"height": ""
|
|
53
|
+
},
|
|
54
|
+
"shipping_required": true,
|
|
55
|
+
"shipping_taxable": true,
|
|
56
|
+
"shipping_class": "",
|
|
57
|
+
"shipping_class_id": 0,
|
|
58
|
+
"reviews_allowed": true,
|
|
59
|
+
"average_rating": "0.00",
|
|
60
|
+
"rating_count": 0,
|
|
61
|
+
"related_ids": [
|
|
62
|
+
53,
|
|
63
|
+
40,
|
|
64
|
+
56,
|
|
65
|
+
479,
|
|
66
|
+
99
|
|
67
|
+
],
|
|
68
|
+
"upsell_ids": [],
|
|
69
|
+
"cross_sell_ids": [],
|
|
70
|
+
"parent_id": 0,
|
|
71
|
+
"purchase_note": "",
|
|
72
|
+
"categories": [
|
|
73
|
+
{
|
|
74
|
+
"id": 9,
|
|
75
|
+
"name": "Clothing",
|
|
76
|
+
"slug": "clothing"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": 14,
|
|
80
|
+
"name": "T-shirts",
|
|
81
|
+
"slug": "t-shirts"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"tags": [],
|
|
85
|
+
"images": [
|
|
86
|
+
{
|
|
87
|
+
"id": 792,
|
|
88
|
+
"date_created": "2017-03-23T14:01:13",
|
|
89
|
+
"date_created_gmt": "2017-03-23T20:01:13",
|
|
90
|
+
"date_modified": "2017-03-23T14:01:13",
|
|
91
|
+
"date_modified_gmt": "2017-03-23T20:01:13",
|
|
92
|
+
"src": "https://example.com/wp-content/uploads/2017/03/T_2_front-4.jpg",
|
|
93
|
+
"name": "",
|
|
94
|
+
"alt": ""
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": 793,
|
|
98
|
+
"date_created": "2017-03-23T14:01:14",
|
|
99
|
+
"date_created_gmt": "2017-03-23T20:01:14",
|
|
100
|
+
"date_modified": "2017-03-23T14:01:14",
|
|
101
|
+
"date_modified_gmt": "2017-03-23T20:01:14",
|
|
102
|
+
"src": "https://example.com/wp-content/uploads/2017/03/T_2_back-2.jpg",
|
|
103
|
+
"name": "",
|
|
104
|
+
"alt": ""
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"attributes": [],
|
|
108
|
+
"default_attributes": [],
|
|
109
|
+
"variations": [],
|
|
110
|
+
"grouped_products": [],
|
|
111
|
+
"menu_order": 0,
|
|
112
|
+
"meta_data": [],
|
|
113
|
+
"_links": {
|
|
114
|
+
"self": [
|
|
115
|
+
{
|
|
116
|
+
"href": "https://example.com/wp-json/wc/v3/products/794"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"collection": [
|
|
120
|
+
{
|
|
121
|
+
"href": "https://example.com/wp-json/wc/v3/products"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"http": "POST http://woocomerce.com/wp-json/wc/v3/products/categories",
|
|
3
|
+
"code": 200,
|
|
4
|
+
"body": {
|
|
5
|
+
"id": 9,
|
|
6
|
+
"name": "Clothing",
|
|
7
|
+
"slug": "clothing",
|
|
8
|
+
"parent": 0,
|
|
9
|
+
"description": "",
|
|
10
|
+
"display": "default",
|
|
11
|
+
"image": {
|
|
12
|
+
"id": 730,
|
|
13
|
+
"date_created": "2017-03-23T00:01:07",
|
|
14
|
+
"date_created_gmt": "2017-03-23T03:01:07",
|
|
15
|
+
"date_modified": "2017-03-23T00:01:07",
|
|
16
|
+
"date_modified_gmt": "2017-03-23T03:01:07",
|
|
17
|
+
"src": "https://example.com/wp-content/uploads/2017/03/T_2_front.jpg",
|
|
18
|
+
"name": "",
|
|
19
|
+
"alt": ""
|
|
20
|
+
},
|
|
21
|
+
"menu_order": 0,
|
|
22
|
+
"count": 36,
|
|
23
|
+
"_links": {
|
|
24
|
+
"self": [
|
|
25
|
+
{
|
|
26
|
+
"href": "https://example.com/wp-json/wc/v3/products/categories/9"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"collection": [
|
|
30
|
+
{
|
|
31
|
+
"href": "https://example.com/wp-json/wc/v3/products/categories"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"headers": {
|
|
3
|
+
"user": "TestUser"
|
|
4
|
+
},
|
|
5
|
+
"data": {
|
|
6
|
+
"id": 9,
|
|
7
|
+
"name": "Clothing",
|
|
8
|
+
"slug": "clothing",
|
|
9
|
+
"parent": 0,
|
|
10
|
+
"description": "",
|
|
11
|
+
"display": "default",
|
|
12
|
+
"image": {
|
|
13
|
+
"id": 730,
|
|
14
|
+
"date_created": "2017-03-23T00:01:07",
|
|
15
|
+
"date_created_gmt": "2017-03-23T03:01:07",
|
|
16
|
+
"date_modified": "2017-03-23T00:01:07",
|
|
17
|
+
"date_modified_gmt": "2017-03-23T03:01:07",
|
|
18
|
+
"src": "https://example.com/wp-content/uploads/2017/03/T_2_front.jpg",
|
|
19
|
+
"name": "",
|
|
20
|
+
"alt": ""
|
|
21
|
+
},
|
|
22
|
+
"menu_order": 0,
|
|
23
|
+
"count": 36,
|
|
24
|
+
"_links": {
|
|
25
|
+
"self": [
|
|
26
|
+
{
|
|
27
|
+
"href": "https://example.com/wp-json/wc/v3/products/categories/9"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"collection": [
|
|
31
|
+
{
|
|
32
|
+
"href": "https://example.com/wp-json/wc/v3/products/categories"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"http": "GET http://woocomerce.com/wp-json/wc/v3/orders/1/notes",
|
|
3
|
+
"code": 200,
|
|
4
|
+
"body": [
|
|
5
|
+
{
|
|
6
|
+
"id": 281,
|
|
7
|
+
"author": "system",
|
|
8
|
+
"date_created": "2017-03-21T16:46:41",
|
|
9
|
+
"date_created_gmt": "2017-03-21T19:46:41",
|
|
10
|
+
"note": "Order ok!!!",
|
|
11
|
+
"customer_note": false,
|
|
12
|
+
"_links": {
|
|
13
|
+
"self": [
|
|
14
|
+
{
|
|
15
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723/notes/281"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"collection": [
|
|
19
|
+
{
|
|
20
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723/notes"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"up": [
|
|
24
|
+
{
|
|
25
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": 280,
|
|
32
|
+
"author": "system",
|
|
33
|
+
"date_created": "2017-03-21T16:16:58",
|
|
34
|
+
"date_created_gmt": "2017-03-21T19:16:58",
|
|
35
|
+
"note": "Order status changed from On hold to Completed.",
|
|
36
|
+
"customer_note": false,
|
|
37
|
+
"_links": {
|
|
38
|
+
"self": [
|
|
39
|
+
{
|
|
40
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723/notes/280"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"collection": [
|
|
44
|
+
{
|
|
45
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723/notes"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"up": [
|
|
49
|
+
{
|
|
50
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": 279,
|
|
57
|
+
"author": "system",
|
|
58
|
+
"date_created": "2017-03-21T16:16:46",
|
|
59
|
+
"date_created_gmt": "2017-03-21T19:16:46",
|
|
60
|
+
"note": "Awaiting BACS payment Order status changed from Pending payment to On hold.",
|
|
61
|
+
"customer_note": false,
|
|
62
|
+
"_links": {
|
|
63
|
+
"self": [
|
|
64
|
+
{
|
|
65
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723/notes/279"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"collection": [
|
|
69
|
+
{
|
|
70
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723/notes"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"up": [
|
|
74
|
+
{
|
|
75
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"headers": {
|
|
3
|
+
"user": "TestUser"
|
|
4
|
+
},
|
|
5
|
+
"data": [
|
|
6
|
+
{
|
|
7
|
+
"_links": {
|
|
8
|
+
"collection": [
|
|
9
|
+
{
|
|
10
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723/notes"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"self": [
|
|
14
|
+
{
|
|
15
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723/notes/281"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"up": [
|
|
19
|
+
{
|
|
20
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"author": "system",
|
|
25
|
+
"customer_note": false,
|
|
26
|
+
"date_created": "2017-03-21T16:46:41",
|
|
27
|
+
"date_created_gmt": "2017-03-21T19:46:41",
|
|
28
|
+
"id": 281,
|
|
29
|
+
"note": "Order ok!!!"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"_links": {
|
|
33
|
+
"collection": [
|
|
34
|
+
{
|
|
35
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723/notes"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"self": [
|
|
39
|
+
{
|
|
40
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723/notes/280"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"up": [
|
|
44
|
+
{
|
|
45
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"author": "system",
|
|
50
|
+
"customer_note": false,
|
|
51
|
+
"date_created": "2017-03-21T16:16:58",
|
|
52
|
+
"date_created_gmt": "2017-03-21T19:16:58",
|
|
53
|
+
"id": 280,
|
|
54
|
+
"note": "Order status changed from On hold to Completed."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"_links": {
|
|
58
|
+
"collection": [
|
|
59
|
+
{
|
|
60
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723/notes"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"self": [
|
|
64
|
+
{
|
|
65
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723/notes/279"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"up": [
|
|
69
|
+
{
|
|
70
|
+
"href": "https://example.com/wp-json/wc/v3/orders/723"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"author": "system",
|
|
75
|
+
"customer_note": false,
|
|
76
|
+
"date_created": "2017-03-21T16:16:46",
|
|
77
|
+
"date_created_gmt": "2017-03-21T19:16:46",
|
|
78
|
+
"id": 279,
|
|
79
|
+
"note": "Awaiting BACS payment Order status changed from Pending payment to On hold."
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|