-
Notifications
You must be signed in to change notification settings - Fork 217
/
Copy pathline-items.mock.ts
110 lines (106 loc) · 2.85 KB
/
line-items.mock.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import { CustomItem, DigitalItem, GiftCertificateItem, PhysicalItem } from '../cart';
export function getCustomItem(): CustomItem {
return {
id: '55e11c8f-7dce-4da3-9413-b649533f8bad',
listPrice: 10,
originalPrice: 30,
extendedListPrice: 20,
name: 'Custom item',
quantity: 2,
sku: 'custom-sku',
};
}
export function getPhysicalItem(): PhysicalItem {
return {
id: '666',
variantId: 71,
productId: 103,
sku: 'CLC',
name: 'Canvas Laundry Cart',
url: '/canvas-laundry-cart/',
quantity: 1,
brand: 'OFS',
isTaxable: true,
imageUrl: '/images/canvas-laundry-cart.jpg',
discounts: [],
discountAmount: 10,
couponAmount: 0,
listPrice: 200,
originalPrice: 250,
salePrice: 190,
retailPrice: 210,
comparisonPrice: 200,
extendedListPrice: 200,
extendedSalePrice: 190,
extendedComparisonPrice: 200,
isShippingRequired: true,
addedByPromotion: false,
options: [
{
name: 'n',
nameId: 1,
value: 'v',
valueId: 3,
},
],
categories: [[{ name: 'Cat 1' }], [{ name: 'Furniture' }, { name: 'Bed' }]],
categoryNames: ['Cat 1'],
};
}
export function getDigitalItem(): DigitalItem {
return {
id: '667',
variantId: 72,
productId: 104,
sku: 'CLX',
name: 'Digital Book',
url: '/digital-book/',
quantity: 1,
brand: 'Digitalia',
isTaxable: true,
imageUrl: '/images/digital-book.jpg',
discounts: [],
discountAmount: 0,
couponAmount: 0,
listPrice: 200,
originalPrice: 250,
salePrice: 200,
retailPrice: 210,
comparisonPrice: 200,
downloadPageUrl: 'url.php',
downloadFileUrls: [],
downloadSize: '',
extendedListPrice: 200,
extendedSalePrice: 200,
extendedComparisonPrice: 200,
addedByPromotion: false,
options: [
{
name: 'm',
nameId: 1,
value: 'l',
valueId: 3,
},
],
categories: [[{ name: 'Cat 1' }], [{ name: 'Cat 2' }], [{ name: 'Cat 3' }]],
categoryNames: ['Ebooks', 'Audio Books'],
};
}
export function getGiftCertificateItem(): GiftCertificateItem {
return {
id: 'bd391ead-8c58-4105-b00e-d75d233b429a',
name: '$100 Gift Certificate',
message: 'message',
amount: 100,
taxable: false,
theme: 'General',
sender: {
name: 'pablo',
email: '[email protected]',
},
recipient: {
name: 'luis',
email: '[email protected]',
},
};
}