ti2-ventrata 1.0.16 → 1.0.17

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 (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -40,7 +40,7 @@ const doMapCurry = mapObj => item => doMap(item, mapObj);
40
40
 
41
41
  const productMapIn = {
42
42
  productId: R.path(['id']),
43
- productName: R.path(['title']),
43
+ productName: o => R.path(['title'], o) || R.prop('internalName', o),
44
44
  availableCurrencies: R.path(['availableCurrencies']),
45
45
  defaultCurrency: R.path(['defaultCurrency']),
46
46
  options: e => R.pathOr(undefined, ['options'], e).map(option => doMap(option, optionMapIn, ['id', 'title'])),
@@ -48,7 +48,7 @@ const productMapIn = {
48
48
 
49
49
  const optionMapIn = {
50
50
  optionId: R.path(['id']),
51
- optionName: R.path(['title']),
51
+ optionName: o => R.path(['title'], o) || R.prop('internalName', o),
52
52
  units: option => R.pathOr(undefined, ['units'], option).map(unit => doMap(unit, unitMap)),
53
53
  };
54
54
 
@@ -101,7 +101,7 @@ const capitalize = sParam => {
101
101
 
102
102
  const unitMap = {
103
103
  unitId: R.path(['id']),
104
- unitName: R.path(['title']),
104
+ unitName: o => R.path(['title'], o) || R.prop('internalName', o),
105
105
  type: R.path(['type']),
106
106
  subtitle: R.path(['subtitle']),
107
107
  restrictions: R.path(['restrictions']),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ti2-ventrata",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Ventrata's TI2 Plugin",
5
5
  "main": "index.js",
6
6
  "scripts": {