@tillhub/schemas 6.104.0 → 6.105.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
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# [6.105.0](https://github.com/tillhub/schemas/compare/v6.104.0...v6.105.0) (2021-12-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **abocard-systems:** fixes due to linter ([49ddbc3](https://github.com/tillhub/schemas/commit/49ddbc3))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **abocard:** Add "discount_type" and "selling_price_method" ([#649](https://github.com/tillhub/schemas/issues/649)) ([b2024de](https://github.com/tillhub/schemas/commit/b2024de))
|
|
12
|
+
* **prices:** add actual prices schema #API-1257 ([2260e72](https://github.com/tillhub/schemas/commit/2260e72)), closes [#API-1257](https://github.com/tillhub/schemas/issues/API-1257)
|
|
13
|
+
|
|
1
14
|
# [6.104.0](https://github.com/tillhub/schemas/compare/v6.103.0...v6.104.0) (2021-12-07)
|
|
2
15
|
|
|
3
16
|
|
|
@@ -231,7 +231,28 @@ const request = {
|
|
|
231
231
|
description: 'Defines whether assigning a customer is required for creation actions within this system.',
|
|
232
232
|
type: 'boolean',
|
|
233
233
|
default: 'false'
|
|
234
|
-
})
|
|
234
|
+
}),
|
|
235
|
+
discount_type: oneOf(
|
|
236
|
+
{
|
|
237
|
+
description: `
|
|
238
|
+
the calculation type of the discount of the Purpose Product (Zweck/Artikel).
|
|
239
|
+
* \`relative\` - stores discount absolute in currency of system
|
|
240
|
+
* \`absolute\` - stores relative discount value in percent (e.g.: 12,58%) to allow two decimals on percent if necessary (which wouldn’t be possible with a rate)
|
|
241
|
+
`,
|
|
242
|
+
type: 'string',
|
|
243
|
+
enum: ['relative', 'absolute']
|
|
244
|
+
},
|
|
245
|
+
{ default: null }
|
|
246
|
+
),
|
|
247
|
+
selling_price_method: {
|
|
248
|
+
description: `
|
|
249
|
+
"static", "dynamic" configuration of selling price.
|
|
250
|
+
* \`static\` - For "static" we use the current behavior of our implementation.
|
|
251
|
+
* \`dynamic\` - For "dynamic" we calculate the selling price according to this document
|
|
252
|
+
`,
|
|
253
|
+
enum: ['static', 'dynamic'],
|
|
254
|
+
default: 'static'
|
|
255
|
+
}
|
|
235
256
|
}
|
|
236
257
|
|
|
237
258
|
const response = {
|
package/lib/v1/products/index.js
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
$id: 'https://schemas.tillhub.com/v1/products.prices.actual.query.schema.json',
|
|
3
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
4
|
+
additionalProperties: false,
|
|
5
|
+
type: 'object',
|
|
6
|
+
required: [
|
|
7
|
+
'location'
|
|
8
|
+
],
|
|
9
|
+
properties: {
|
|
10
|
+
product_id: {
|
|
11
|
+
description: 'Product ID (required if no "product_custom_id" provided)',
|
|
12
|
+
type: 'string',
|
|
13
|
+
format: 'uuid',
|
|
14
|
+
example: 'fd4bac62-937b-445f-b7bf-fb9e653de50f'
|
|
15
|
+
},
|
|
16
|
+
product_custom_id: {
|
|
17
|
+
description: 'Product custom ID',
|
|
18
|
+
type: 'string',
|
|
19
|
+
example: '936835 1234'
|
|
20
|
+
},
|
|
21
|
+
location: {
|
|
22
|
+
description: 'Product location',
|
|
23
|
+
type: 'string',
|
|
24
|
+
format: 'uuid',
|
|
25
|
+
example: '69ac1b92-7956-43d8-8620-e556299b5023'
|
|
26
|
+
},
|
|
27
|
+
quantity: {
|
|
28
|
+
description: 'Product quantity (to search among product scaled price embedded in product only)',
|
|
29
|
+
type: 'integer',
|
|
30
|
+
minimum: 0,
|
|
31
|
+
example: 3
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const priceBookEntryBase = require('../book/entry').base
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
$id: 'https://schemas.tillhub.com/v1/products.prices.actual.response.schema.json',
|
|
5
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
6
|
+
additionalProperties: false,
|
|
7
|
+
type: 'object',
|
|
8
|
+
required: [
|
|
9
|
+
],
|
|
10
|
+
properties: {
|
|
11
|
+
amount_net: priceBookEntryBase.amount_net,
|
|
12
|
+
amount_gross: priceBookEntryBase.amount_gross,
|
|
13
|
+
rate: priceBookEntryBase.rate,
|
|
14
|
+
currency: priceBookEntryBase.currency
|
|
15
|
+
}
|
|
16
|
+
}
|