@orchesty/connector-woocommerce 1.0.0 → 2.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.
Files changed (158) hide show
  1. package/README.md +102 -0
  2. package/dist/Connector/WooCommerceGetProductVariant.d.ts +15 -1
  3. package/dist/Connector/WooCommerceRegisterWebhook.js +1 -0
  4. package/dist/Connector/WooCommerceUnsubscribeWebhooks.js +5 -1
  5. package/dist/package.json +7 -5
  6. package/package.json +6 -4
  7. package/CHANGELOG.md +0 -12
  8. package/coverage/clover.xml +0 -404
  9. package/coverage/coverage-final.json +0 -21
  10. package/coverage/lcov-report/base.css +0 -224
  11. package/coverage/lcov-report/block-navigation.js +0 -87
  12. package/coverage/lcov-report/favicon.png +0 -0
  13. package/coverage/lcov-report/index.html +0 -161
  14. package/coverage/lcov-report/prettify.css +0 -1
  15. package/coverage/lcov-report/prettify.js +0 -2
  16. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  17. package/coverage/lcov-report/sorter.js +0 -210
  18. package/coverage/lcov-report/src/Batch/WooCommerceGetOrders.ts.html +0 -640
  19. package/coverage/lcov-report/src/Batch/WooCommerceGetProducts.ts.html +0 -532
  20. package/coverage/lcov-report/src/Batch/WooCommerceGetVariants.ts.html +0 -433
  21. package/coverage/lcov-report/src/Batch/index.html +0 -146
  22. package/coverage/lcov-report/src/Connector/WooCommerceAddNote.ts.html +0 -220
  23. package/coverage/lcov-report/src/Connector/WooCommerceCreateProduct.ts.html +0 -178
  24. package/coverage/lcov-report/src/Connector/WooCommerceCreateProductCategory.ts.html +0 -307
  25. package/coverage/lcov-report/src/Connector/WooCommerceGetOrderNotes.ts.html +0 -274
  26. package/coverage/lcov-report/src/Connector/WooCommerceGetOrderStatuses.ts.html +0 -175
  27. package/coverage/lcov-report/src/Connector/WooCommerceGetPaymentGateways.ts.html +0 -295
  28. package/coverage/lcov-report/src/Connector/WooCommerceGetProduct.ts.html +0 -181
  29. package/coverage/lcov-report/src/Connector/WooCommerceGetProductVariant.ts.html +0 -496
  30. package/coverage/lcov-report/src/Connector/WooCommerceGetProductsBySku.ts.html +0 -226
  31. package/coverage/lcov-report/src/Connector/WooCommerceGetSettingsGeneral.ts.html +0 -238
  32. package/coverage/lcov-report/src/Connector/WooCommerceGetShippingMethods.ts.html +0 -478
  33. package/coverage/lcov-report/src/Connector/WooCommerceUpdateOrder.ts.html +0 -193
  34. package/coverage/lcov-report/src/Connector/WooCommerceUpdateProduct.ts.html +0 -199
  35. package/coverage/lcov-report/src/Connector/WooCommerceUpdateProductQuantity.ts.html +0 -220
  36. package/coverage/lcov-report/src/Connector/WooCommerceUpdateProductVariant.ts.html +0 -199
  37. package/coverage/lcov-report/src/Connector/index.html +0 -326
  38. package/coverage/lcov-report/src/WooCommerceApplication.ts.html +0 -364
  39. package/coverage/lcov-report/src/index.html +0 -116
  40. package/coverage/lcov-report/test/dataProvider.ts.html +0 -427
  41. package/coverage/lcov-report/test/index.html +0 -116
  42. package/coverage/lcov.info +0 -661
  43. package/jest.config.js +0 -13
  44. package/src/Batch/WooCommerceGetOrders.ts +0 -185
  45. package/src/Batch/WooCommerceGetProducts.ts +0 -149
  46. package/src/Batch/WooCommerceGetVariants.ts +0 -116
  47. package/src/Batch/__tests__/Data/WooCommerceGetOrders/ids-input.json +0 -8
  48. package/src/Batch/__tests__/Data/WooCommerceGetOrders/ids-mock.json +0 -319
  49. package/src/Batch/__tests__/Data/WooCommerceGetOrders/ids-output.json +0 -16
  50. package/src/Batch/__tests__/Data/WooCommerceGetOrders/input.json +0 -6
  51. package/src/Batch/__tests__/Data/WooCommerceGetOrders/lastRun-input.json +0 -6
  52. package/src/Batch/__tests__/Data/WooCommerceGetOrders/lastRun-mock.json +0 -319
  53. package/src/Batch/__tests__/Data/WooCommerceGetOrders/lastRun-output.json +0 -15
  54. package/src/Batch/__tests__/Data/WooCommerceGetOrders/mock.json +0 -319
  55. package/src/Batch/__tests__/Data/WooCommerceGetOrders/output.json +0 -15
  56. package/src/Batch/__tests__/Data/WooCommerceGetProducts/input.json +0 -7
  57. package/src/Batch/__tests__/Data/WooCommerceGetProducts/mock.json +0 -170
  58. package/src/Batch/__tests__/Data/WooCommerceGetProducts/output.json +0 -11
  59. package/src/Batch/__tests__/Data/WooCommerceGetProducts/withAfter-input.json +0 -7
  60. package/src/Batch/__tests__/Data/WooCommerceGetProducts/withAfter-mock.json +0 -170
  61. package/src/Batch/__tests__/Data/WooCommerceGetProducts/withAfter-output.json +0 -11
  62. package/src/Batch/__tests__/Data/WooCommerceGetVariants/input.json +0 -169
  63. package/src/Batch/__tests__/Data/WooCommerceGetVariants/mock.json +0 -160
  64. package/src/Batch/__tests__/Data/WooCommerceGetVariants/output.json +0 -11
  65. package/src/Batch/__tests__/WooCommerceGetOrders.ts +0 -42
  66. package/src/Batch/__tests__/WooCommerceGetProducts.ts +0 -37
  67. package/src/Batch/__tests__/WooCommerceGetVariants.ts +0 -32
  68. package/src/Connector/WooCommerceAddNote.ts +0 -45
  69. package/src/Connector/WooCommerceCreateProduct.ts +0 -31
  70. package/src/Connector/WooCommerceCreateProductCategory.ts +0 -74
  71. package/src/Connector/WooCommerceGetOrderNotes.ts +0 -63
  72. package/src/Connector/WooCommerceGetOrderStatuses.ts +0 -30
  73. package/src/Connector/WooCommerceGetPaymentGateways.ts +0 -70
  74. package/src/Connector/WooCommerceGetProduct.ts +0 -32
  75. package/src/Connector/WooCommerceGetProductVariant.ts +0 -137
  76. package/src/Connector/WooCommerceGetProductsBySku.ts +0 -47
  77. package/src/Connector/WooCommerceGetSettingsGeneral.ts +0 -51
  78. package/src/Connector/WooCommerceGetShippingMethods.ts +0 -131
  79. package/src/Connector/WooCommerceRegisterWebhook.ts +0 -106
  80. package/src/Connector/WooCommerceUnsubscribeWebhooks.ts +0 -91
  81. package/src/Connector/WooCommerceUpdateOrder.ts +0 -36
  82. package/src/Connector/WooCommerceUpdateProduct.ts +0 -38
  83. package/src/Connector/WooCommerceUpdateProductQuantity.ts +0 -45
  84. package/src/Connector/WooCommerceUpdateProductVariant.ts +0 -38
  85. package/src/Connector/__tests__/Data/WooCommerceAddNote/input.json +0 -11
  86. package/src/Connector/__tests__/Data/WooCommerceAddNote/mock.json +0 -22
  87. package/src/Connector/__tests__/Data/WooCommerceAddNote/output.json +0 -23
  88. package/src/Connector/__tests__/Data/WooCommerceCreateProduct/input.json +0 -28
  89. package/src/Connector/__tests__/Data/WooCommerceCreateProduct/mock.json +0 -125
  90. package/src/Connector/__tests__/Data/WooCommerceCreateProduct/output.json +0 -126
  91. package/src/Connector/__tests__/Data/WooCommerceCreateProductCategory/input.json +0 -11
  92. package/src/Connector/__tests__/Data/WooCommerceCreateProductCategory/mock.json +0 -36
  93. package/src/Connector/__tests__/Data/WooCommerceCreateProductCategory/output.json +0 -37
  94. package/src/Connector/__tests__/Data/WooCommerceGetOrderNotes/input.json +0 -8
  95. package/src/Connector/__tests__/Data/WooCommerceGetOrderNotes/mock.json +0 -81
  96. package/src/Connector/__tests__/Data/WooCommerceGetOrderNotes/output.json +0 -82
  97. package/src/Connector/__tests__/Data/WooCommerceGetOrderStatuses/input.json +0 -6
  98. package/src/Connector/__tests__/Data/WooCommerceGetOrderStatuses/mock.json +0 -41
  99. package/src/Connector/__tests__/Data/WooCommerceGetOrderStatuses/output.json +0 -42
  100. package/src/Connector/__tests__/Data/WooCommerceGetPaymentGateways/input.json +0 -6
  101. package/src/Connector/__tests__/Data/WooCommerceGetPaymentGateways/mock.json +0 -350
  102. package/src/Connector/__tests__/Data/WooCommerceGetPaymentGateways/output.json +0 -351
  103. package/src/Connector/__tests__/Data/WooCommerceGetProduct/input.json +0 -8
  104. package/src/Connector/__tests__/Data/WooCommerceGetProduct/mock.json +0 -125
  105. package/src/Connector/__tests__/Data/WooCommerceGetProduct/output.json +0 -126
  106. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/input.json +0 -37
  107. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/mock.json +0 -81
  108. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/mock1.json +0 -81
  109. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/nok-input.json +0 -22
  110. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/nok-mock.json +0 -81
  111. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/nok-output.json +0 -24
  112. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/output.json +0 -37
  113. package/src/Connector/__tests__/Data/WooCommerceGetProductsBySku/input.json +0 -8
  114. package/src/Connector/__tests__/Data/WooCommerceGetProductsBySku/mock.json +0 -170
  115. package/src/Connector/__tests__/Data/WooCommerceGetProductsBySku/output.json +0 -169
  116. package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/input.json +0 -6
  117. package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/mock.json +0 -3459
  118. package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/output.json +0 -3460
  119. package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/with-id-input.json +0 -8
  120. package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/with-id-mock.json +0 -30
  121. package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/with-id-output.json +0 -31
  122. package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/input.json +0 -6
  123. package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/mock.json +0 -50
  124. package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/mock1.json +0 -187
  125. package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/mock2.json +0 -187
  126. package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/output.json +0 -373
  127. package/src/Connector/__tests__/Data/WooCommerceUpdateOrder/input.json +0 -9
  128. package/src/Connector/__tests__/Data/WooCommerceUpdateOrder/mock.json +0 -169
  129. package/src/Connector/__tests__/Data/WooCommerceUpdateOrder/output.json +0 -170
  130. package/src/Connector/__tests__/Data/WooCommerceUpdateProduct/input.json +0 -9
  131. package/src/Connector/__tests__/Data/WooCommerceUpdateProduct/mock.json +0 -125
  132. package/src/Connector/__tests__/Data/WooCommerceUpdateProduct/output.json +0 -126
  133. package/src/Connector/__tests__/Data/WooCommerceUpdateProductQuantity/input.json +0 -20
  134. package/src/Connector/__tests__/Data/WooCommerceUpdateProductQuantity/mock.json +0 -162
  135. package/src/Connector/__tests__/Data/WooCommerceUpdateProductQuantity/output.json +0 -6
  136. package/src/Connector/__tests__/Data/WooCommerceUpdateProductVariant/input.json +0 -10
  137. package/src/Connector/__tests__/Data/WooCommerceUpdateProductVariant/mock.json +0 -125
  138. package/src/Connector/__tests__/Data/WooCommerceUpdateProductVariant/output.json +0 -126
  139. package/src/Connector/__tests__/WooCommerceAddNote.ts +0 -18
  140. package/src/Connector/__tests__/WooCommerceCreateProduct.ts +0 -18
  141. package/src/Connector/__tests__/WooCommerceCreateProductCategory.ts +0 -18
  142. package/src/Connector/__tests__/WooCommerceGetOrderNotes.ts +0 -18
  143. package/src/Connector/__tests__/WooCommerceGetOrderStatuses.ts +0 -18
  144. package/src/Connector/__tests__/WooCommerceGetPaymentGateways.ts +0 -18
  145. package/src/Connector/__tests__/WooCommerceGetProduct.ts +0 -18
  146. package/src/Connector/__tests__/WooCommerceGetProductVariant.ts +0 -25
  147. package/src/Connector/__tests__/WooCommerceGetProductsBySku.ts +0 -18
  148. package/src/Connector/__tests__/WooCommerceGetSettingsGeneral.ts +0 -25
  149. package/src/Connector/__tests__/WooCommerceGetShippingMethods.ts +0 -18
  150. package/src/Connector/__tests__/WooCommerceUpdateOrder.ts +0 -18
  151. package/src/Connector/__tests__/WooCommerceUpdateProduct.ts +0 -18
  152. package/src/Connector/__tests__/WooCommerceUpdateProductQuantity.ts +0 -18
  153. package/src/Connector/__tests__/WooCommerceUpdateProductVariant.ts +0 -18
  154. package/src/WooCommerceApplication.ts +0 -93
  155. package/test/dataProvider.ts +0 -114
  156. package/tsconfig.json +0 -8
  157. package/tsconfig.prod.json +0 -13
  158. package/tsconfig.prod.tsbuildinfo +0 -1
@@ -1,8 +0,0 @@
1
- {
2
- "headers": {
3
- "user": "TestUser"
4
- },
5
- "data": {
6
- "id": "woocommerce_allowed_countries"
7
- }
8
- }
@@ -1,30 +0,0 @@
1
- {
2
- "http": "GET http://woocomerce.com/wp-json/wc/v3/settings/general/woocommerce_allowed_countries",
3
- "code": 200,
4
- "body": {
5
- "id": "woocommerce_allowed_countries",
6
- "label": "Oblast(i) prodeje",
7
- "description": "Tato volba umožňuje omezit země, ve kterých jste ochotni prodávat.",
8
- "type": "select",
9
- "default": "all",
10
- "options": {
11
- "all": "Prodávat do všech zemí",
12
- "all_except": "Prodávat do všech zemí kromě…",
13
- "specific": "Prodávat do vybraných zemí"
14
- },
15
- "tip": "Tato volba umožňuje omezit země, ve kterých jste ochotni prodávat.",
16
- "value": "all",
17
- "_links": {
18
- "self": [
19
- {
20
- "href": "http://127.0.0.10/wp-json/wc/v3/settings/general/woocommerce_allowed_countries"
21
- }
22
- ],
23
- "collection": [
24
- {
25
- "href": "http://127.0.0.10/wp-json/wc/v3/settings/general"
26
- }
27
- ]
28
- }
29
- }
30
- }
@@ -1,31 +0,0 @@
1
- {
2
- "headers": {
3
- "user": "TestUser"
4
- },
5
- "data": {
6
- "_links": {
7
- "collection": [
8
- {
9
- "href": "http://127.0.0.10/wp-json/wc/v3/settings/general"
10
- }
11
- ],
12
- "self": [
13
- {
14
- "href": "http://127.0.0.10/wp-json/wc/v3/settings/general/woocommerce_allowed_countries"
15
- }
16
- ]
17
- },
18
- "default": "all",
19
- "description": "Tato volba umožňuje omezit země, ve kterých jste ochotni prodávat.",
20
- "id": "woocommerce_allowed_countries",
21
- "label": "Oblast(i) prodeje",
22
- "options": {
23
- "all": "Prodávat do všech zemí",
24
- "all_except": "Prodávat do všech zemí kromě…",
25
- "specific": "Prodávat do vybraných zemí"
26
- },
27
- "tip": "Tato volba umožňuje omezit země, ve kterých jste ochotni prodávat.",
28
- "type": "select",
29
- "value": "all"
30
- }
31
- }
@@ -1,6 +0,0 @@
1
- {
2
- "headers": {
3
- "user": "TestUser"
4
- },
5
- "data": {}
6
- }
@@ -1,50 +0,0 @@
1
- {
2
- "http": "GET http://woocomerce.com/wp-json/wc/v3/shipping/zones?per_page=10000",
3
- "code": 200,
4
- "body": [
5
- {
6
- "id": 0,
7
- "name": "Rest of the World",
8
- "order": 0,
9
- "_links": {
10
- "self": [
11
- {
12
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/0"
13
- }
14
- ],
15
- "collection": [
16
- {
17
- "href": "https://example.com/wp-json/wc/v3/shipping/zones"
18
- }
19
- ],
20
- "describedby": [
21
- {
22
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/0/locations"
23
- }
24
- ]
25
- }
26
- },
27
- {
28
- "id": 5,
29
- "name": "Brazil",
30
- "order": 0,
31
- "_links": {
32
- "self": [
33
- {
34
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5"
35
- }
36
- ],
37
- "collection": [
38
- {
39
- "href": "https://example.com/wp-json/wc/v3/shipping/zones"
40
- }
41
- ],
42
- "describedby": [
43
- {
44
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5/locations"
45
- }
46
- ]
47
- }
48
- }
49
- ]
50
- }
@@ -1,187 +0,0 @@
1
- {
2
- "http": "GET http://woocomerce.com/wp-json/wc/v3/shipping/zones/0/methods?per_page=10000",
3
- "code": 200,
4
- "body": [
5
- {
6
- "instance_id": 26,
7
- "title": "Flat rate",
8
- "order": 1,
9
- "enabled": true,
10
- "method_id": "flat_rate",
11
- "method_title": "Flat rate",
12
- "method_description": "<p>Lets you charge a fixed rate for shipping.</p>\n",
13
- "settings": {
14
- "title": {
15
- "id": "title",
16
- "label": "Method title",
17
- "description": "This controls the title which the user sees during checkout.",
18
- "type": "text",
19
- "value": "Flat rate",
20
- "default": "Flat rate",
21
- "tip": "This controls the title which the user sees during checkout.",
22
- "placeholder": ""
23
- },
24
- "tax_status": {
25
- "id": "tax_status",
26
- "label": "Tax status",
27
- "description": "",
28
- "type": "select",
29
- "value": "taxable",
30
- "default": "taxable",
31
- "tip": "",
32
- "placeholder": "",
33
- "options": {
34
- "taxable": "Taxable",
35
- "none": "None"
36
- }
37
- },
38
- "cost": {
39
- "id": "cost",
40
- "label": "Cost",
41
- "description": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
42
- "type": "text",
43
- "value": "0",
44
- "default": "",
45
- "tip": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
46
- "placeholder": ""
47
- },
48
- "class_costs": {
49
- "id": "class_costs",
50
- "label": "Shipping class costs",
51
- "description": "These costs can optionally be added based on the <a href=\"https://example.com/wp-admin/admin.php?page=wc-settings&tab=shipping&section=classes\">product shipping class</a>.",
52
- "type": "title",
53
- "value": "",
54
- "default": "",
55
- "tip": "These costs can optionally be added based on the <a href=\"https://example.com/wp-admin/admin.php?page=wc-settings&tab=shipping&section=classes\">product shipping class</a>.",
56
- "placeholder": ""
57
- },
58
- "class_cost_92": {
59
- "id": "class_cost_92",
60
- "label": "\"Express\" shipping class cost",
61
- "description": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
62
- "type": "text",
63
- "value": "",
64
- "default": "",
65
- "tip": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
66
- "placeholder": "N/A"
67
- },
68
- "class_cost_91": {
69
- "id": "class_cost_91",
70
- "label": "\"Priority\" shipping class cost",
71
- "description": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
72
- "type": "text",
73
- "value": "",
74
- "default": "",
75
- "tip": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
76
- "placeholder": "N/A"
77
- },
78
- "no_class_cost": {
79
- "id": "no_class_cost",
80
- "label": "No shipping class cost",
81
- "description": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
82
- "type": "text",
83
- "value": "",
84
- "default": "",
85
- "tip": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
86
- "placeholder": "N/A"
87
- },
88
- "type": {
89
- "id": "type",
90
- "label": "Calculation type",
91
- "description": "",
92
- "type": "select",
93
- "value": "class",
94
- "default": "class",
95
- "tip": "",
96
- "placeholder": "",
97
- "options": {
98
- "class": "Per class: Charge shipping for each shipping class individually",
99
- "order": "Per order: Charge shipping for the most expensive shipping class"
100
- }
101
- }
102
- },
103
- "_links": {
104
- "self": [
105
- {
106
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5/methods/26"
107
- }
108
- ],
109
- "collection": [
110
- {
111
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5/methods"
112
- }
113
- ],
114
- "describes": [
115
- {
116
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5"
117
- }
118
- ]
119
- }
120
- },
121
- {
122
- "instance_id": 27,
123
- "title": "Free shipping",
124
- "order": 2,
125
- "enabled": true,
126
- "method_id": "free_shipping",
127
- "method_title": "Free shipping",
128
- "method_description": "<p>Free shipping is a special method which can be triggered with coupons and minimum spends.</p>\n",
129
- "settings": {
130
- "title": {
131
- "id": "title",
132
- "label": "Title",
133
- "description": "This controls the title which the user sees during checkout.",
134
- "type": "text",
135
- "value": "Free shipping",
136
- "default": "Free shipping",
137
- "tip": "This controls the title which the user sees during checkout.",
138
- "placeholder": ""
139
- },
140
- "requires": {
141
- "id": "requires",
142
- "label": "Free shipping requires...",
143
- "description": "",
144
- "type": "select",
145
- "value": "",
146
- "default": "",
147
- "tip": "",
148
- "placeholder": "",
149
- "options": {
150
- "": "N/A",
151
- "coupon": "A valid free shipping coupon",
152
- "min_amount": "A minimum order amount",
153
- "either": "A minimum order amount OR a coupon",
154
- "both": "A minimum order amount AND a coupon"
155
- }
156
- },
157
- "min_amount": {
158
- "id": "min_amount",
159
- "label": "Minimum order amount",
160
- "description": "Users will need to spend this amount to get free shipping (if enabled above).",
161
- "type": "price",
162
- "value": "0",
163
- "default": "",
164
- "tip": "Users will need to spend this amount to get free shipping (if enabled above).",
165
- "placeholder": ""
166
- }
167
- },
168
- "_links": {
169
- "self": [
170
- {
171
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5/methods/27"
172
- }
173
- ],
174
- "collection": [
175
- {
176
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5/methods"
177
- }
178
- ],
179
- "describes": [
180
- {
181
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5"
182
- }
183
- ]
184
- }
185
- }
186
- ]
187
- }
@@ -1,187 +0,0 @@
1
- {
2
- "http": "GET http://woocomerce.com/wp-json/wc/v3/shipping/zones/5/methods?per_page=10000",
3
- "code": 200,
4
- "body": [
5
- {
6
- "instance_id": 26,
7
- "title": "Flat rate",
8
- "order": 1,
9
- "enabled": true,
10
- "method_id": "flat_rate",
11
- "method_title": "Flat rate",
12
- "method_description": "<p>Lets you charge a fixed rate for shipping.</p>\n",
13
- "settings": {
14
- "title": {
15
- "id": "title",
16
- "label": "Method title",
17
- "description": "This controls the title which the user sees during checkout.",
18
- "type": "text",
19
- "value": "Flat rate",
20
- "default": "Flat rate",
21
- "tip": "This controls the title which the user sees during checkout.",
22
- "placeholder": ""
23
- },
24
- "tax_status": {
25
- "id": "tax_status",
26
- "label": "Tax status",
27
- "description": "",
28
- "type": "select",
29
- "value": "taxable",
30
- "default": "taxable",
31
- "tip": "",
32
- "placeholder": "",
33
- "options": {
34
- "taxable": "Taxable",
35
- "none": "None"
36
- }
37
- },
38
- "cost": {
39
- "id": "cost",
40
- "label": "Cost",
41
- "description": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
42
- "type": "text",
43
- "value": "0",
44
- "default": "",
45
- "tip": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
46
- "placeholder": ""
47
- },
48
- "class_costs": {
49
- "id": "class_costs",
50
- "label": "Shipping class costs",
51
- "description": "These costs can optionally be added based on the <a href=\"https://example.com/wp-admin/admin.php?page=wc-settings&tab=shipping&section=classes\">product shipping class</a>.",
52
- "type": "title",
53
- "value": "",
54
- "default": "",
55
- "tip": "These costs can optionally be added based on the <a href=\"https://example.com/wp-admin/admin.php?page=wc-settings&tab=shipping&section=classes\">product shipping class</a>.",
56
- "placeholder": ""
57
- },
58
- "class_cost_92": {
59
- "id": "class_cost_92",
60
- "label": "\"Express\" shipping class cost",
61
- "description": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
62
- "type": "text",
63
- "value": "",
64
- "default": "",
65
- "tip": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
66
- "placeholder": "N/A"
67
- },
68
- "class_cost_91": {
69
- "id": "class_cost_91",
70
- "label": "\"Priority\" shipping class cost",
71
- "description": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
72
- "type": "text",
73
- "value": "",
74
- "default": "",
75
- "tip": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
76
- "placeholder": "N/A"
77
- },
78
- "no_class_cost": {
79
- "id": "no_class_cost",
80
- "label": "No shipping class cost",
81
- "description": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
82
- "type": "text",
83
- "value": "",
84
- "default": "",
85
- "tip": "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.<br/><br/>Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent=\"10\" min_fee=\"20\" max_fee=\"\"]</code> for percentage based fees.",
86
- "placeholder": "N/A"
87
- },
88
- "type": {
89
- "id": "type",
90
- "label": "Calculation type",
91
- "description": "",
92
- "type": "select",
93
- "value": "class",
94
- "default": "class",
95
- "tip": "",
96
- "placeholder": "",
97
- "options": {
98
- "class": "Per class: Charge shipping for each shipping class individually",
99
- "order": "Per order: Charge shipping for the most expensive shipping class"
100
- }
101
- }
102
- },
103
- "_links": {
104
- "self": [
105
- {
106
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5/methods/26"
107
- }
108
- ],
109
- "collection": [
110
- {
111
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5/methods"
112
- }
113
- ],
114
- "describes": [
115
- {
116
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5"
117
- }
118
- ]
119
- }
120
- },
121
- {
122
- "instance_id": 27,
123
- "title": "Free shipping",
124
- "order": 2,
125
- "enabled": true,
126
- "method_id": "free_shipping",
127
- "method_title": "Free shipping",
128
- "method_description": "<p>Free shipping is a special method which can be triggered with coupons and minimum spends.</p>\n",
129
- "settings": {
130
- "title": {
131
- "id": "title",
132
- "label": "Title",
133
- "description": "This controls the title which the user sees during checkout.",
134
- "type": "text",
135
- "value": "Free shipping",
136
- "default": "Free shipping",
137
- "tip": "This controls the title which the user sees during checkout.",
138
- "placeholder": ""
139
- },
140
- "requires": {
141
- "id": "requires",
142
- "label": "Free shipping requires...",
143
- "description": "",
144
- "type": "select",
145
- "value": "",
146
- "default": "",
147
- "tip": "",
148
- "placeholder": "",
149
- "options": {
150
- "": "N/A",
151
- "coupon": "A valid free shipping coupon",
152
- "min_amount": "A minimum order amount",
153
- "either": "A minimum order amount OR a coupon",
154
- "both": "A minimum order amount AND a coupon"
155
- }
156
- },
157
- "min_amount": {
158
- "id": "min_amount",
159
- "label": "Minimum order amount",
160
- "description": "Users will need to spend this amount to get free shipping (if enabled above).",
161
- "type": "price",
162
- "value": "0",
163
- "default": "",
164
- "tip": "Users will need to spend this amount to get free shipping (if enabled above).",
165
- "placeholder": ""
166
- }
167
- },
168
- "_links": {
169
- "self": [
170
- {
171
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5/methods/27"
172
- }
173
- ],
174
- "collection": [
175
- {
176
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5/methods"
177
- }
178
- ],
179
- "describes": [
180
- {
181
- "href": "https://example.com/wp-json/wc/v3/shipping/zones/5"
182
- }
183
- ]
184
- }
185
- }
186
- ]
187
- }