@zeniai/client-epic-state 5.3.0 → 5.3.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.
@@ -12,6 +12,7 @@ export interface InvoicingLineItemPayload {
12
12
  discount_amount?: number;
13
13
  entity_description?: string;
14
14
  entity_type?: string;
15
+ gross_amount?: number | null;
15
16
  id?: string;
16
17
  is_taxed?: boolean;
17
18
  item_level_discount_amount?: number;
@@ -17,6 +17,9 @@ const mapLineItem = (payload, currencyCode, currencySymbol) => ({
17
17
  : undefined,
18
18
  entityDescription: payload.entity_description,
19
19
  entityType: payload.entity_type,
20
+ grossAmount: payload.gross_amount != null
21
+ ? (0, amount_1.toAmount)(payload.gross_amount, currencyCode, currencySymbol)
22
+ : undefined,
20
23
  id: payload.id,
21
24
  isTaxed: payload.is_taxed,
22
25
  itemLevelDiscountAmount: payload.item_level_discount_amount != null
@@ -13,6 +13,8 @@ export interface InvoicingLineItem {
13
13
  discountAmount?: Amount;
14
14
  entityDescription?: string;
15
15
  entityType?: string;
16
+ /** Price before item-level coupons (`amount` is after); absent on older invoices. */
17
+ grossAmount?: Amount;
16
18
  id?: ID;
17
19
  isTaxed?: boolean;
18
20
  itemLevelDiscountAmount?: Amount;
@@ -14,6 +14,9 @@ const mapLineItem = (payload, currencyCode, currencySymbol) => ({
14
14
  : undefined,
15
15
  entityDescription: payload.entity_description,
16
16
  entityType: payload.entity_type,
17
+ grossAmount: payload.gross_amount != null
18
+ ? toAmount(payload.gross_amount, currencyCode, currencySymbol)
19
+ : undefined,
17
20
  id: payload.id,
18
21
  isTaxed: payload.is_taxed,
19
22
  itemLevelDiscountAmount: payload.item_level_discount_amount != null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",