@orchesty/connector-woocommerce 1.0.0 → 1.0.1

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 (154) hide show
  1. package/dist/package.json +4 -1
  2. package/package.json +5 -2
  3. package/CHANGELOG.md +0 -12
  4. package/coverage/clover.xml +0 -404
  5. package/coverage/coverage-final.json +0 -21
  6. package/coverage/lcov-report/base.css +0 -224
  7. package/coverage/lcov-report/block-navigation.js +0 -87
  8. package/coverage/lcov-report/favicon.png +0 -0
  9. package/coverage/lcov-report/index.html +0 -161
  10. package/coverage/lcov-report/prettify.css +0 -1
  11. package/coverage/lcov-report/prettify.js +0 -2
  12. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  13. package/coverage/lcov-report/sorter.js +0 -210
  14. package/coverage/lcov-report/src/Batch/WooCommerceGetOrders.ts.html +0 -640
  15. package/coverage/lcov-report/src/Batch/WooCommerceGetProducts.ts.html +0 -532
  16. package/coverage/lcov-report/src/Batch/WooCommerceGetVariants.ts.html +0 -433
  17. package/coverage/lcov-report/src/Batch/index.html +0 -146
  18. package/coverage/lcov-report/src/Connector/WooCommerceAddNote.ts.html +0 -220
  19. package/coverage/lcov-report/src/Connector/WooCommerceCreateProduct.ts.html +0 -178
  20. package/coverage/lcov-report/src/Connector/WooCommerceCreateProductCategory.ts.html +0 -307
  21. package/coverage/lcov-report/src/Connector/WooCommerceGetOrderNotes.ts.html +0 -274
  22. package/coverage/lcov-report/src/Connector/WooCommerceGetOrderStatuses.ts.html +0 -175
  23. package/coverage/lcov-report/src/Connector/WooCommerceGetPaymentGateways.ts.html +0 -295
  24. package/coverage/lcov-report/src/Connector/WooCommerceGetProduct.ts.html +0 -181
  25. package/coverage/lcov-report/src/Connector/WooCommerceGetProductVariant.ts.html +0 -496
  26. package/coverage/lcov-report/src/Connector/WooCommerceGetProductsBySku.ts.html +0 -226
  27. package/coverage/lcov-report/src/Connector/WooCommerceGetSettingsGeneral.ts.html +0 -238
  28. package/coverage/lcov-report/src/Connector/WooCommerceGetShippingMethods.ts.html +0 -478
  29. package/coverage/lcov-report/src/Connector/WooCommerceUpdateOrder.ts.html +0 -193
  30. package/coverage/lcov-report/src/Connector/WooCommerceUpdateProduct.ts.html +0 -199
  31. package/coverage/lcov-report/src/Connector/WooCommerceUpdateProductQuantity.ts.html +0 -220
  32. package/coverage/lcov-report/src/Connector/WooCommerceUpdateProductVariant.ts.html +0 -199
  33. package/coverage/lcov-report/src/Connector/index.html +0 -326
  34. package/coverage/lcov-report/src/WooCommerceApplication.ts.html +0 -364
  35. package/coverage/lcov-report/src/index.html +0 -116
  36. package/coverage/lcov-report/test/dataProvider.ts.html +0 -427
  37. package/coverage/lcov-report/test/index.html +0 -116
  38. package/coverage/lcov.info +0 -661
  39. package/jest.config.js +0 -13
  40. package/src/Batch/WooCommerceGetOrders.ts +0 -185
  41. package/src/Batch/WooCommerceGetProducts.ts +0 -149
  42. package/src/Batch/WooCommerceGetVariants.ts +0 -116
  43. package/src/Batch/__tests__/Data/WooCommerceGetOrders/ids-input.json +0 -8
  44. package/src/Batch/__tests__/Data/WooCommerceGetOrders/ids-mock.json +0 -319
  45. package/src/Batch/__tests__/Data/WooCommerceGetOrders/ids-output.json +0 -16
  46. package/src/Batch/__tests__/Data/WooCommerceGetOrders/input.json +0 -6
  47. package/src/Batch/__tests__/Data/WooCommerceGetOrders/lastRun-input.json +0 -6
  48. package/src/Batch/__tests__/Data/WooCommerceGetOrders/lastRun-mock.json +0 -319
  49. package/src/Batch/__tests__/Data/WooCommerceGetOrders/lastRun-output.json +0 -15
  50. package/src/Batch/__tests__/Data/WooCommerceGetOrders/mock.json +0 -319
  51. package/src/Batch/__tests__/Data/WooCommerceGetOrders/output.json +0 -15
  52. package/src/Batch/__tests__/Data/WooCommerceGetProducts/input.json +0 -7
  53. package/src/Batch/__tests__/Data/WooCommerceGetProducts/mock.json +0 -170
  54. package/src/Batch/__tests__/Data/WooCommerceGetProducts/output.json +0 -11
  55. package/src/Batch/__tests__/Data/WooCommerceGetProducts/withAfter-input.json +0 -7
  56. package/src/Batch/__tests__/Data/WooCommerceGetProducts/withAfter-mock.json +0 -170
  57. package/src/Batch/__tests__/Data/WooCommerceGetProducts/withAfter-output.json +0 -11
  58. package/src/Batch/__tests__/Data/WooCommerceGetVariants/input.json +0 -169
  59. package/src/Batch/__tests__/Data/WooCommerceGetVariants/mock.json +0 -160
  60. package/src/Batch/__tests__/Data/WooCommerceGetVariants/output.json +0 -11
  61. package/src/Batch/__tests__/WooCommerceGetOrders.ts +0 -42
  62. package/src/Batch/__tests__/WooCommerceGetProducts.ts +0 -37
  63. package/src/Batch/__tests__/WooCommerceGetVariants.ts +0 -32
  64. package/src/Connector/WooCommerceAddNote.ts +0 -45
  65. package/src/Connector/WooCommerceCreateProduct.ts +0 -31
  66. package/src/Connector/WooCommerceCreateProductCategory.ts +0 -74
  67. package/src/Connector/WooCommerceGetOrderNotes.ts +0 -63
  68. package/src/Connector/WooCommerceGetOrderStatuses.ts +0 -30
  69. package/src/Connector/WooCommerceGetPaymentGateways.ts +0 -70
  70. package/src/Connector/WooCommerceGetProduct.ts +0 -32
  71. package/src/Connector/WooCommerceGetProductVariant.ts +0 -137
  72. package/src/Connector/WooCommerceGetProductsBySku.ts +0 -47
  73. package/src/Connector/WooCommerceGetSettingsGeneral.ts +0 -51
  74. package/src/Connector/WooCommerceGetShippingMethods.ts +0 -131
  75. package/src/Connector/WooCommerceRegisterWebhook.ts +0 -106
  76. package/src/Connector/WooCommerceUnsubscribeWebhooks.ts +0 -91
  77. package/src/Connector/WooCommerceUpdateOrder.ts +0 -36
  78. package/src/Connector/WooCommerceUpdateProduct.ts +0 -38
  79. package/src/Connector/WooCommerceUpdateProductQuantity.ts +0 -45
  80. package/src/Connector/WooCommerceUpdateProductVariant.ts +0 -38
  81. package/src/Connector/__tests__/Data/WooCommerceAddNote/input.json +0 -11
  82. package/src/Connector/__tests__/Data/WooCommerceAddNote/mock.json +0 -22
  83. package/src/Connector/__tests__/Data/WooCommerceAddNote/output.json +0 -23
  84. package/src/Connector/__tests__/Data/WooCommerceCreateProduct/input.json +0 -28
  85. package/src/Connector/__tests__/Data/WooCommerceCreateProduct/mock.json +0 -125
  86. package/src/Connector/__tests__/Data/WooCommerceCreateProduct/output.json +0 -126
  87. package/src/Connector/__tests__/Data/WooCommerceCreateProductCategory/input.json +0 -11
  88. package/src/Connector/__tests__/Data/WooCommerceCreateProductCategory/mock.json +0 -36
  89. package/src/Connector/__tests__/Data/WooCommerceCreateProductCategory/output.json +0 -37
  90. package/src/Connector/__tests__/Data/WooCommerceGetOrderNotes/input.json +0 -8
  91. package/src/Connector/__tests__/Data/WooCommerceGetOrderNotes/mock.json +0 -81
  92. package/src/Connector/__tests__/Data/WooCommerceGetOrderNotes/output.json +0 -82
  93. package/src/Connector/__tests__/Data/WooCommerceGetOrderStatuses/input.json +0 -6
  94. package/src/Connector/__tests__/Data/WooCommerceGetOrderStatuses/mock.json +0 -41
  95. package/src/Connector/__tests__/Data/WooCommerceGetOrderStatuses/output.json +0 -42
  96. package/src/Connector/__tests__/Data/WooCommerceGetPaymentGateways/input.json +0 -6
  97. package/src/Connector/__tests__/Data/WooCommerceGetPaymentGateways/mock.json +0 -350
  98. package/src/Connector/__tests__/Data/WooCommerceGetPaymentGateways/output.json +0 -351
  99. package/src/Connector/__tests__/Data/WooCommerceGetProduct/input.json +0 -8
  100. package/src/Connector/__tests__/Data/WooCommerceGetProduct/mock.json +0 -125
  101. package/src/Connector/__tests__/Data/WooCommerceGetProduct/output.json +0 -126
  102. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/input.json +0 -37
  103. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/mock.json +0 -81
  104. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/mock1.json +0 -81
  105. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/nok-input.json +0 -22
  106. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/nok-mock.json +0 -81
  107. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/nok-output.json +0 -24
  108. package/src/Connector/__tests__/Data/WooCommerceGetProductVariant/output.json +0 -37
  109. package/src/Connector/__tests__/Data/WooCommerceGetProductsBySku/input.json +0 -8
  110. package/src/Connector/__tests__/Data/WooCommerceGetProductsBySku/mock.json +0 -170
  111. package/src/Connector/__tests__/Data/WooCommerceGetProductsBySku/output.json +0 -169
  112. package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/input.json +0 -6
  113. package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/mock.json +0 -3459
  114. package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/output.json +0 -3460
  115. package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/with-id-input.json +0 -8
  116. package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/with-id-mock.json +0 -30
  117. package/src/Connector/__tests__/Data/WooCommerceGetSettingsGeneral/with-id-output.json +0 -31
  118. package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/input.json +0 -6
  119. package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/mock.json +0 -50
  120. package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/mock1.json +0 -187
  121. package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/mock2.json +0 -187
  122. package/src/Connector/__tests__/Data/WooCommerceGetShippingMethods/output.json +0 -373
  123. package/src/Connector/__tests__/Data/WooCommerceUpdateOrder/input.json +0 -9
  124. package/src/Connector/__tests__/Data/WooCommerceUpdateOrder/mock.json +0 -169
  125. package/src/Connector/__tests__/Data/WooCommerceUpdateOrder/output.json +0 -170
  126. package/src/Connector/__tests__/Data/WooCommerceUpdateProduct/input.json +0 -9
  127. package/src/Connector/__tests__/Data/WooCommerceUpdateProduct/mock.json +0 -125
  128. package/src/Connector/__tests__/Data/WooCommerceUpdateProduct/output.json +0 -126
  129. package/src/Connector/__tests__/Data/WooCommerceUpdateProductQuantity/input.json +0 -20
  130. package/src/Connector/__tests__/Data/WooCommerceUpdateProductQuantity/mock.json +0 -162
  131. package/src/Connector/__tests__/Data/WooCommerceUpdateProductQuantity/output.json +0 -6
  132. package/src/Connector/__tests__/Data/WooCommerceUpdateProductVariant/input.json +0 -10
  133. package/src/Connector/__tests__/Data/WooCommerceUpdateProductVariant/mock.json +0 -125
  134. package/src/Connector/__tests__/Data/WooCommerceUpdateProductVariant/output.json +0 -126
  135. package/src/Connector/__tests__/WooCommerceAddNote.ts +0 -18
  136. package/src/Connector/__tests__/WooCommerceCreateProduct.ts +0 -18
  137. package/src/Connector/__tests__/WooCommerceCreateProductCategory.ts +0 -18
  138. package/src/Connector/__tests__/WooCommerceGetOrderNotes.ts +0 -18
  139. package/src/Connector/__tests__/WooCommerceGetOrderStatuses.ts +0 -18
  140. package/src/Connector/__tests__/WooCommerceGetPaymentGateways.ts +0 -18
  141. package/src/Connector/__tests__/WooCommerceGetProduct.ts +0 -18
  142. package/src/Connector/__tests__/WooCommerceGetProductVariant.ts +0 -25
  143. package/src/Connector/__tests__/WooCommerceGetProductsBySku.ts +0 -18
  144. package/src/Connector/__tests__/WooCommerceGetSettingsGeneral.ts +0 -25
  145. package/src/Connector/__tests__/WooCommerceGetShippingMethods.ts +0 -18
  146. package/src/Connector/__tests__/WooCommerceUpdateOrder.ts +0 -18
  147. package/src/Connector/__tests__/WooCommerceUpdateProduct.ts +0 -18
  148. package/src/Connector/__tests__/WooCommerceUpdateProductQuantity.ts +0 -18
  149. package/src/Connector/__tests__/WooCommerceUpdateProductVariant.ts +0 -18
  150. package/src/WooCommerceApplication.ts +0 -93
  151. package/test/dataProvider.ts +0 -114
  152. package/tsconfig.json +0 -8
  153. package/tsconfig.prod.json +0 -13
  154. 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
- }