merchi_sdk_ts 1.0.26 → 1.0.28

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.
@@ -96,6 +96,10 @@ var Cart = /** @class */ (function (_super) {
96
96
  Cart.property(),
97
97
  __metadata("design:type", String)
98
98
  ], Cart.prototype, "currency", void 0);
99
+ __decorate([
100
+ Cart.property(),
101
+ __metadata("design:type", Number)
102
+ ], Cart.prototype, "discountedAmount", void 0);
99
103
  __decorate([
100
104
  Cart.property(),
101
105
  __metadata("design:type", Number)
@@ -91,6 +91,10 @@ var Invoice = /** @class */ (function (_super) {
91
91
  Invoice.property({ type: Number }),
92
92
  __metadata("design:type", Object)
93
93
  ], Invoice.prototype, "subtotalCost", void 0);
94
+ __decorate([
95
+ Invoice.property(),
96
+ __metadata("design:type", Number)
97
+ ], Invoice.prototype, "discountedAmount", void 0);
94
98
  __decorate([
95
99
  Invoice.property({ type: Number }),
96
100
  __metadata("design:type", Object)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "merchi_sdk_ts",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "repository": "git@github.com:merchisdk/merchi_sdk_ts.git",
@@ -1,10 +1,12 @@
1
1
  export function getQueryStringValue(name: string) {
2
- const query = window.location.search.substring(1);
3
- const vars = query.split('&');
4
- for (let i = 0; i < vars.length; i++) {
5
- const pair = vars[i].split('=');
6
- if (pair[0] === name) {
7
- return decodeURIComponent(pair[1]);
2
+ if ((window as any) && typeof window !== 'undefined') {
3
+ const query = (window as any).location.search.substring(1);
4
+ const vars = query.split('&');
5
+ for (let i = 0; i < vars.length; i++) {
6
+ const pair = vars[i].split('=');
7
+ if (pair[0] === name) {
8
+ return decodeURIComponent(pair[1]);
9
+ }
8
10
  }
9
11
  }
10
12
  return undefined;