@esolve/ng-esolve-connect 0.78.0 → 0.79.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/esm2022/lib/account/esolve-account.service.mjs +2 -2
- package/esm2022/lib/cart/classes/esolve-cart-tax-breakdown.model.mjs +7 -0
- package/esm2022/lib/cart/classes/esolve-cart-totals.model.mjs +68 -44
- package/esm2022/lib/cart/esolve-cart.service.mjs +2 -3
- package/esm2022/lib/cart/interfaces/esolve-cart-totals-record.interface.mjs +1 -1
- package/fesm2022/esolve-ng-esolve-connect.mjs +75 -46
- package/fesm2022/esolve-ng-esolve-connect.mjs.map +1 -1
- package/lib/cart/classes/esolve-cart-tax-breakdown.model.d.ts +4 -0
- package/lib/cart/classes/esolve-cart-totals.model.d.ts +11 -30
- package/lib/cart/interfaces/esolve-cart-totals-record.interface.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { EsolveCartTotalsRecord } from '../interfaces';
|
|
1
2
|
import { EsolveDeliveryCategoryTotalsMap, EsolveDeliveryCategoryTotalsMapRecord } from '../types';
|
|
3
|
+
import { EsolveCartTaxBreakdown } from './esolve-cart-tax-breakdown.model';
|
|
2
4
|
/**
|
|
3
5
|
* Totals in cart
|
|
4
6
|
*/
|
|
@@ -16,9 +18,13 @@ export declare class EsolveCartTotals {
|
|
|
16
18
|
*/
|
|
17
19
|
sub_total: number;
|
|
18
20
|
/**
|
|
19
|
-
* Total VAT of all the items in the cart
|
|
21
|
+
* Total VAT of all the items in the cart including the discount
|
|
20
22
|
*/
|
|
21
23
|
vat_total: number;
|
|
24
|
+
/**
|
|
25
|
+
* Breakdown of the tax in the cart
|
|
26
|
+
*/
|
|
27
|
+
tax: EsolveCartTaxBreakdown;
|
|
22
28
|
/**
|
|
23
29
|
* Total discount of all the item in the cart
|
|
24
30
|
*/
|
|
@@ -40,33 +46,8 @@ export declare class EsolveCartTotals {
|
|
|
40
46
|
* (NOTE: shipping and insurance is not included)
|
|
41
47
|
*/
|
|
42
48
|
get total(): number;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
records?: number,
|
|
48
|
-
/**
|
|
49
|
-
* Total quantity of all items in a cart
|
|
50
|
-
*/
|
|
51
|
-
items?: number,
|
|
52
|
-
/**
|
|
53
|
-
* Total in cart before discount and VAT is added
|
|
54
|
-
*/
|
|
55
|
-
sub_total?: number,
|
|
56
|
-
/**
|
|
57
|
-
* Total VAT of all the items in the cart
|
|
58
|
-
*/
|
|
59
|
-
vat_total?: number,
|
|
60
|
-
/**
|
|
61
|
-
* Total discount of all the item in the cart
|
|
62
|
-
*/
|
|
63
|
-
discount_total?: number,
|
|
64
|
-
/**
|
|
65
|
-
* Total of all vouchers used
|
|
66
|
-
*/
|
|
67
|
-
voucher_total?: number,
|
|
68
|
-
/**
|
|
69
|
-
* Total of allowance
|
|
70
|
-
*/
|
|
71
|
-
allowance?: number, delivery_category_totals?: EsolveDeliveryCategoryTotalsMapRecord);
|
|
49
|
+
get discount_total_incl(): number;
|
|
50
|
+
get sub_total_incl(): number;
|
|
51
|
+
constructor(record?: EsolveCartTotalsRecord);
|
|
52
|
+
populateDeliveryCategoryTotals(delivery_category_totals?: EsolveDeliveryCategoryTotalsMapRecord): void;
|
|
72
53
|
}
|
|
@@ -4,9 +4,10 @@ export interface EsolveCartTotalsRecord {
|
|
|
4
4
|
items: string;
|
|
5
5
|
total: string;
|
|
6
6
|
vat: string;
|
|
7
|
+
vat_on_goods?: string;
|
|
8
|
+
vat_on_discount?: string;
|
|
7
9
|
discount: string;
|
|
8
10
|
vouchers: string;
|
|
9
|
-
wallet: string;
|
|
10
11
|
allowance: string;
|
|
11
12
|
delivery_category_totals?: EsolveDeliveryCategoryTotalsMapRecord;
|
|
12
13
|
}
|