@digital8/lighting-illusions-ts-sdk 0.0.2744 → 0.0.2746
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/.openapi-generator/FILES +10 -0
- package/README.md +2 -2
- package/dist/apis/CouponsApi.d.ts +9 -1
- package/dist/apis/CouponsApi.js +42 -0
- package/dist/apis/StoreCreditsApi.d.ts +29 -0
- package/dist/apis/StoreCreditsApi.js +125 -0
- package/dist/apis/TransactionsApi.d.ts +12 -1
- package/dist/apis/TransactionsApi.js +46 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AdminOrderResource.d.ts +6 -0
- package/dist/models/AdminOrderResource.js +4 -0
- package/dist/models/CreateTransactionRequest.d.ts +1 -0
- package/dist/models/CreateTransactionRequest.js +2 -1
- package/dist/models/FrontendCartResource.d.ts +25 -0
- package/dist/models/FrontendCartResource.js +17 -0
- package/dist/models/FrontendCartResourceStoreCreditsInner.d.ts +44 -0
- package/dist/models/FrontendCartResourceStoreCreditsInner.js +53 -0
- package/dist/models/FrontendOrderResource.d.ts +6 -0
- package/dist/models/FrontendOrderResource.js +4 -0
- package/dist/models/GeneratedCouponCodeResource.d.ts +32 -0
- package/dist/models/GeneratedCouponCodeResource.js +51 -0
- package/dist/models/GeneratedCouponCodeResourceArrayResponse.d.ts +33 -0
- package/dist/models/GeneratedCouponCodeResourceArrayResponse.js +50 -0
- package/dist/models/PaginatedStoreCreditListResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedStoreCreditListResourceResponse.js +57 -0
- package/dist/models/PaymentMethod.d.ts +1 -0
- package/dist/models/PaymentMethod.js +2 -1
- package/dist/models/PaymentTotalsResource.d.ts +25 -0
- package/dist/models/PaymentTotalsResource.js +17 -0
- package/dist/models/SearchStoreCreditsRequest.d.ts +106 -0
- package/dist/models/SearchStoreCreditsRequest.js +86 -0
- package/dist/models/SearchTransactionsRequest.d.ts +3 -2
- package/dist/models/SearchTransactionsRequest.js +3 -2
- package/dist/models/StoreCreditListResource.d.ts +86 -0
- package/dist/models/StoreCreditListResource.js +80 -0
- package/dist/models/StoreCreditListResourceArrayResponse.d.ts +33 -0
- package/dist/models/StoreCreditListResourceArrayResponse.js +50 -0
- package/dist/models/StoreCreditLiteResource.d.ts +44 -0
- package/dist/models/StoreCreditLiteResource.js +59 -0
- package/dist/models/StoreCreditLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/StoreCreditLiteResourceArrayResponse.js +50 -0
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +3 -1
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +1 -3
- package/dist/models/TransactionListResource.d.ts +12 -8
- package/dist/models/TransactionListResource.js +12 -8
- package/dist/models/TransactionLiteResource.d.ts +12 -8
- package/dist/models/TransactionLiteResource.js +12 -8
- package/dist/models/TransactionResource.d.ts +12 -8
- package/dist/models/TransactionResource.js +12 -8
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/package.json +1 -1
- package/src/apis/CouponsApi.ts +32 -0
- package/src/apis/StoreCreditsApi.ts +69 -0
- package/src/apis/TransactionsApi.ts +44 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AdminOrderResource.ts +9 -0
- package/src/models/CreateTransactionRequest.ts +2 -1
- package/src/models/FrontendCartResource.ts +43 -0
- package/src/models/FrontendCartResourceStoreCreditsInner.ts +81 -0
- package/src/models/FrontendOrderResource.ts +9 -0
- package/src/models/GeneratedCouponCodeResource.ts +66 -0
- package/src/models/GeneratedCouponCodeResourceArrayResponse.ts +73 -0
- package/src/models/PaginatedStoreCreditListResourceResponse.ts +90 -0
- package/src/models/PaymentMethod.ts +2 -1
- package/src/models/PaymentTotalsResource.ts +44 -0
- package/src/models/SearchStoreCreditsRequest.ts +161 -0
- package/src/models/SearchTransactionsRequest.ts +12 -4
- package/src/models/StoreCreditListResource.ts +143 -0
- package/src/models/StoreCreditListResourceArrayResponse.ts +73 -0
- package/src/models/StoreCreditLiteResource.ts +84 -0
- package/src/models/StoreCreditLiteResourceArrayResponse.ts +73 -0
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreResource.ts +2 -3
- package/src/models/TransactionListResource.ts +47 -16
- package/src/models/TransactionLiteResource.ts +47 -16
- package/src/models/TransactionResource.ts +47 -16
- package/src/models/index.ts +9 -0
|
@@ -205,6 +205,12 @@ export interface FrontendOrderResource {
|
|
|
205
205
|
* @memberof FrontendOrderResource
|
|
206
206
|
*/
|
|
207
207
|
surchargePaid: number;
|
|
208
|
+
/**
|
|
209
|
+
*
|
|
210
|
+
* @type {number}
|
|
211
|
+
* @memberof FrontendOrderResource
|
|
212
|
+
*/
|
|
213
|
+
storeCreditPaid: number;
|
|
208
214
|
/**
|
|
209
215
|
*
|
|
210
216
|
* @type {number}
|
|
@@ -239,6 +245,7 @@ export function instanceOfFrontendOrderResource(value: object): value is Fronten
|
|
|
239
245
|
if (!('grandTotal' in value) || value['grandTotal'] === undefined) return false;
|
|
240
246
|
if (!('amountPaid' in value) || value['amountPaid'] === undefined) return false;
|
|
241
247
|
if (!('surchargePaid' in value) || value['surchargePaid'] === undefined) return false;
|
|
248
|
+
if (!('storeCreditPaid' in value) || value['storeCreditPaid'] === undefined) return false;
|
|
242
249
|
if (!('amountDue' in value) || value['amountDue'] === undefined) return false;
|
|
243
250
|
return true;
|
|
244
251
|
}
|
|
@@ -278,6 +285,7 @@ export function FrontendOrderResourceFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
278
285
|
'grandTotal': json['grandTotal'],
|
|
279
286
|
'amountPaid': json['amountPaid'],
|
|
280
287
|
'surchargePaid': json['surchargePaid'],
|
|
288
|
+
'storeCreditPaid': json['storeCreditPaid'],
|
|
281
289
|
'amountDue': json['amountDue'],
|
|
282
290
|
};
|
|
283
291
|
}
|
|
@@ -318,6 +326,7 @@ export function FrontendOrderResourceToJSONTyped(value?: FrontendOrderResource |
|
|
|
318
326
|
'grandTotal': value['grandTotal'],
|
|
319
327
|
'amountPaid': value['amountPaid'],
|
|
320
328
|
'surchargePaid': value['surchargePaid'],
|
|
329
|
+
'storeCreditPaid': value['storeCreditPaid'],
|
|
321
330
|
'amountDue': value['amountDue'],
|
|
322
331
|
};
|
|
323
332
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GeneratedCouponCodeResource
|
|
20
|
+
*/
|
|
21
|
+
export interface GeneratedCouponCodeResource {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GeneratedCouponCodeResource
|
|
26
|
+
*/
|
|
27
|
+
code: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the GeneratedCouponCodeResource interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfGeneratedCouponCodeResource(value: object): value is GeneratedCouponCodeResource {
|
|
34
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function GeneratedCouponCodeResourceFromJSON(json: any): GeneratedCouponCodeResource {
|
|
39
|
+
return GeneratedCouponCodeResourceFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function GeneratedCouponCodeResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeneratedCouponCodeResource {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'code': json['code'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function GeneratedCouponCodeResourceToJSON(json: any): GeneratedCouponCodeResource {
|
|
53
|
+
return GeneratedCouponCodeResourceToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function GeneratedCouponCodeResourceToJSONTyped(value?: GeneratedCouponCodeResource | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'code': value['code'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { GeneratedCouponCodeResource } from './GeneratedCouponCodeResource';
|
|
17
|
+
import {
|
|
18
|
+
GeneratedCouponCodeResourceFromJSON,
|
|
19
|
+
GeneratedCouponCodeResourceFromJSONTyped,
|
|
20
|
+
GeneratedCouponCodeResourceToJSON,
|
|
21
|
+
GeneratedCouponCodeResourceToJSONTyped,
|
|
22
|
+
} from './GeneratedCouponCodeResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface GeneratedCouponCodeResourceArrayResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface GeneratedCouponCodeResourceArrayResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<GeneratedCouponCodeResource>}
|
|
33
|
+
* @memberof GeneratedCouponCodeResourceArrayResponse
|
|
34
|
+
*/
|
|
35
|
+
data?: Array<GeneratedCouponCodeResource>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the GeneratedCouponCodeResourceArrayResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfGeneratedCouponCodeResourceArrayResponse(value: object): value is GeneratedCouponCodeResourceArrayResponse {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function GeneratedCouponCodeResourceArrayResponseFromJSON(json: any): GeneratedCouponCodeResourceArrayResponse {
|
|
46
|
+
return GeneratedCouponCodeResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function GeneratedCouponCodeResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeneratedCouponCodeResourceArrayResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(GeneratedCouponCodeResourceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function GeneratedCouponCodeResourceArrayResponseToJSON(json: any): GeneratedCouponCodeResourceArrayResponse {
|
|
60
|
+
return GeneratedCouponCodeResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function GeneratedCouponCodeResourceArrayResponseToJSONTyped(value?: GeneratedCouponCodeResourceArrayResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(GeneratedCouponCodeResourceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { StoreCreditListResource } from './StoreCreditListResource';
|
|
17
|
+
import {
|
|
18
|
+
StoreCreditListResourceFromJSON,
|
|
19
|
+
StoreCreditListResourceFromJSONTyped,
|
|
20
|
+
StoreCreditListResourceToJSON,
|
|
21
|
+
StoreCreditListResourceToJSONTyped,
|
|
22
|
+
} from './StoreCreditListResource';
|
|
23
|
+
import type { PagingMetadata } from './PagingMetadata';
|
|
24
|
+
import {
|
|
25
|
+
PagingMetadataFromJSON,
|
|
26
|
+
PagingMetadataFromJSONTyped,
|
|
27
|
+
PagingMetadataToJSON,
|
|
28
|
+
PagingMetadataToJSONTyped,
|
|
29
|
+
} from './PagingMetadata';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface PaginatedStoreCreditListResourceResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface PaginatedStoreCreditListResourceResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<StoreCreditListResource>}
|
|
40
|
+
* @memberof PaginatedStoreCreditListResourceResponse
|
|
41
|
+
*/
|
|
42
|
+
data: Array<StoreCreditListResource>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {PagingMetadata}
|
|
46
|
+
* @memberof PaginatedStoreCreditListResourceResponse
|
|
47
|
+
*/
|
|
48
|
+
meta: PagingMetadata;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the PaginatedStoreCreditListResourceResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfPaginatedStoreCreditListResourceResponse(value: object): value is PaginatedStoreCreditListResourceResponse {
|
|
55
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
56
|
+
if (!('meta' in value) || value['meta'] === undefined) return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function PaginatedStoreCreditListResourceResponseFromJSON(json: any): PaginatedStoreCreditListResourceResponse {
|
|
61
|
+
return PaginatedStoreCreditListResourceResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function PaginatedStoreCreditListResourceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedStoreCreditListResourceResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': ((json['data'] as Array<any>).map(StoreCreditListResourceFromJSON)),
|
|
71
|
+
'meta': PagingMetadataFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function PaginatedStoreCreditListResourceResponseToJSON(json: any): PaginatedStoreCreditListResourceResponse {
|
|
76
|
+
return PaginatedStoreCreditListResourceResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function PaginatedStoreCreditListResourceResponseToJSONTyped(value?: PaginatedStoreCreditListResourceResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'data': ((value['data'] as Array<any>).map(StoreCreditListResourceToJSON)),
|
|
87
|
+
'meta': PagingMetadataToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -24,7 +24,8 @@ export const PaymentMethod = {
|
|
|
24
24
|
AmericanExpress: 'american_express',
|
|
25
25
|
GooglePay: 'google_pay',
|
|
26
26
|
PayPal: 'pay_pal',
|
|
27
|
-
ApplePay: 'apple_pay'
|
|
27
|
+
ApplePay: 'apple_pay',
|
|
28
|
+
StoreCredit: 'store_credit'
|
|
28
29
|
} as const;
|
|
29
30
|
export type PaymentMethod = typeof PaymentMethod[keyof typeof PaymentMethod];
|
|
30
31
|
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { FrontendCartResourceStoreCreditsInner } from './FrontendCartResourceStoreCreditsInner';
|
|
17
|
+
import {
|
|
18
|
+
FrontendCartResourceStoreCreditsInnerFromJSON,
|
|
19
|
+
FrontendCartResourceStoreCreditsInnerFromJSONTyped,
|
|
20
|
+
FrontendCartResourceStoreCreditsInnerToJSON,
|
|
21
|
+
FrontendCartResourceStoreCreditsInnerToJSONTyped,
|
|
22
|
+
} from './FrontendCartResourceStoreCreditsInner';
|
|
23
|
+
|
|
16
24
|
/**
|
|
17
25
|
*
|
|
18
26
|
* @export
|
|
@@ -73,12 +81,36 @@ export interface PaymentTotalsResource {
|
|
|
73
81
|
* @memberof PaymentTotalsResource
|
|
74
82
|
*/
|
|
75
83
|
surchargePaid: number;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {number}
|
|
87
|
+
* @memberof PaymentTotalsResource
|
|
88
|
+
*/
|
|
89
|
+
storeCreditPaid: number;
|
|
76
90
|
/**
|
|
77
91
|
*
|
|
78
92
|
* @type {number}
|
|
79
93
|
* @memberof PaymentTotalsResource
|
|
80
94
|
*/
|
|
81
95
|
amountDue: number;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {Array<FrontendCartResourceStoreCreditsInner>}
|
|
99
|
+
* @memberof PaymentTotalsResource
|
|
100
|
+
*/
|
|
101
|
+
storeCredits: Array<FrontendCartResourceStoreCreditsInner>;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {number}
|
|
105
|
+
* @memberof PaymentTotalsResource
|
|
106
|
+
*/
|
|
107
|
+
storeCreditTotal: number;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {number}
|
|
111
|
+
* @memberof PaymentTotalsResource
|
|
112
|
+
*/
|
|
113
|
+
availableStoreCreditTotal: number;
|
|
82
114
|
/**
|
|
83
115
|
*
|
|
84
116
|
* @type {Array<object>}
|
|
@@ -142,7 +174,11 @@ export function instanceOfPaymentTotalsResource(value: object): value is Payment
|
|
|
142
174
|
if (!('finalTotal' in value) || value['finalTotal'] === undefined) return false;
|
|
143
175
|
if (!('amountPaid' in value) || value['amountPaid'] === undefined) return false;
|
|
144
176
|
if (!('surchargePaid' in value) || value['surchargePaid'] === undefined) return false;
|
|
177
|
+
if (!('storeCreditPaid' in value) || value['storeCreditPaid'] === undefined) return false;
|
|
145
178
|
if (!('amountDue' in value) || value['amountDue'] === undefined) return false;
|
|
179
|
+
if (!('storeCredits' in value) || value['storeCredits'] === undefined) return false;
|
|
180
|
+
if (!('storeCreditTotal' in value) || value['storeCreditTotal'] === undefined) return false;
|
|
181
|
+
if (!('availableStoreCreditTotal' in value) || value['availableStoreCreditTotal'] === undefined) return false;
|
|
146
182
|
if (!('appliedCoupons' in value) || value['appliedCoupons'] === undefined) return false;
|
|
147
183
|
if (!('noOfItems' in value) || value['noOfItems'] === undefined) return false;
|
|
148
184
|
if (!('lineItems' in value) || value['lineItems'] === undefined) return false;
|
|
@@ -172,7 +208,11 @@ export function PaymentTotalsResourceFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
172
208
|
'finalTotal': json['finalTotal'],
|
|
173
209
|
'amountPaid': json['amountPaid'],
|
|
174
210
|
'surchargePaid': json['surchargePaid'],
|
|
211
|
+
'storeCreditPaid': json['storeCreditPaid'],
|
|
175
212
|
'amountDue': json['amountDue'],
|
|
213
|
+
'storeCredits': ((json['storeCredits'] as Array<any>).map(FrontendCartResourceStoreCreditsInnerFromJSON)),
|
|
214
|
+
'storeCreditTotal': json['storeCreditTotal'],
|
|
215
|
+
'availableStoreCreditTotal': json['availableStoreCreditTotal'],
|
|
176
216
|
'appliedCoupons': json['appliedCoupons'],
|
|
177
217
|
'noOfItems': json['noOfItems'],
|
|
178
218
|
'lineItems': json['lineItems'],
|
|
@@ -204,7 +244,11 @@ export function PaymentTotalsResourceToJSONTyped(value?: PaymentTotalsResource |
|
|
|
204
244
|
'finalTotal': value['finalTotal'],
|
|
205
245
|
'amountPaid': value['amountPaid'],
|
|
206
246
|
'surchargePaid': value['surchargePaid'],
|
|
247
|
+
'storeCreditPaid': value['storeCreditPaid'],
|
|
207
248
|
'amountDue': value['amountDue'],
|
|
249
|
+
'storeCredits': ((value['storeCredits'] as Array<any>).map(FrontendCartResourceStoreCreditsInnerToJSON)),
|
|
250
|
+
'storeCreditTotal': value['storeCreditTotal'],
|
|
251
|
+
'availableStoreCreditTotal': value['availableStoreCreditTotal'],
|
|
208
252
|
'appliedCoupons': value['appliedCoupons'],
|
|
209
253
|
'noOfItems': value['noOfItems'],
|
|
210
254
|
'lineItems': value['lineItems'],
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SearchStoreCreditsRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SearchStoreCreditsRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SearchStoreCreditsRequest
|
|
26
|
+
*/
|
|
27
|
+
search?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SearchStoreCreditsRequest
|
|
32
|
+
*/
|
|
33
|
+
sortBy?: SearchStoreCreditsRequestSortByEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof SearchStoreCreditsRequest
|
|
38
|
+
*/
|
|
39
|
+
sortDirection?: SearchStoreCreditsRequestSortDirectionEnum;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof SearchStoreCreditsRequest
|
|
44
|
+
*/
|
|
45
|
+
perPage?: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof SearchStoreCreditsRequest
|
|
50
|
+
*/
|
|
51
|
+
page?: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {Array<string>}
|
|
55
|
+
* @memberof SearchStoreCreditsRequest
|
|
56
|
+
*/
|
|
57
|
+
siteId?: Array<string>;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Array<string>}
|
|
61
|
+
* @memberof SearchStoreCreditsRequest
|
|
62
|
+
*/
|
|
63
|
+
customerId?: Array<string>;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof SearchStoreCreditsRequest
|
|
68
|
+
*/
|
|
69
|
+
relatedId?: number;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof SearchStoreCreditsRequest
|
|
74
|
+
*/
|
|
75
|
+
relatedType?: string;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {boolean}
|
|
79
|
+
* @memberof SearchStoreCreditsRequest
|
|
80
|
+
*/
|
|
81
|
+
includesRelations?: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @export
|
|
87
|
+
*/
|
|
88
|
+
export const SearchStoreCreditsRequestSortByEnum = {
|
|
89
|
+
Id: 'id',
|
|
90
|
+
Code: 'code',
|
|
91
|
+
ExpiryDate: 'expiry_date',
|
|
92
|
+
OriginalAmount: 'original_amount',
|
|
93
|
+
AmountRemaining: 'amount_remaining',
|
|
94
|
+
CreatedAt: 'created_at'
|
|
95
|
+
} as const;
|
|
96
|
+
export type SearchStoreCreditsRequestSortByEnum = typeof SearchStoreCreditsRequestSortByEnum[keyof typeof SearchStoreCreditsRequestSortByEnum];
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @export
|
|
100
|
+
*/
|
|
101
|
+
export const SearchStoreCreditsRequestSortDirectionEnum = {
|
|
102
|
+
Asc: 'asc',
|
|
103
|
+
Desc: 'desc'
|
|
104
|
+
} as const;
|
|
105
|
+
export type SearchStoreCreditsRequestSortDirectionEnum = typeof SearchStoreCreditsRequestSortDirectionEnum[keyof typeof SearchStoreCreditsRequestSortDirectionEnum];
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Check if a given object implements the SearchStoreCreditsRequest interface.
|
|
110
|
+
*/
|
|
111
|
+
export function instanceOfSearchStoreCreditsRequest(value: object): value is SearchStoreCreditsRequest {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function SearchStoreCreditsRequestFromJSON(json: any): SearchStoreCreditsRequest {
|
|
116
|
+
return SearchStoreCreditsRequestFromJSONTyped(json, false);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function SearchStoreCreditsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchStoreCreditsRequest {
|
|
120
|
+
if (json == null) {
|
|
121
|
+
return json;
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
|
|
125
|
+
'search': json['search'] == null ? undefined : json['search'],
|
|
126
|
+
'sortBy': json['sortBy'] == null ? undefined : json['sortBy'],
|
|
127
|
+
'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
|
|
128
|
+
'perPage': json['per_page'] == null ? undefined : json['per_page'],
|
|
129
|
+
'page': json['page'] == null ? undefined : json['page'],
|
|
130
|
+
'siteId': json['site_id'] == null ? undefined : json['site_id'],
|
|
131
|
+
'customerId': json['customer_id'] == null ? undefined : json['customer_id'],
|
|
132
|
+
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
133
|
+
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
134
|
+
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function SearchStoreCreditsRequestToJSON(json: any): SearchStoreCreditsRequest {
|
|
139
|
+
return SearchStoreCreditsRequestToJSONTyped(json, false);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function SearchStoreCreditsRequestToJSONTyped(value?: SearchStoreCreditsRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
143
|
+
if (value == null) {
|
|
144
|
+
return value;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return {
|
|
148
|
+
|
|
149
|
+
'search': value['search'],
|
|
150
|
+
'sortBy': value['sortBy'],
|
|
151
|
+
'sortDirection': value['sortDirection'],
|
|
152
|
+
'per_page': value['perPage'],
|
|
153
|
+
'page': value['page'],
|
|
154
|
+
'site_id': value['siteId'],
|
|
155
|
+
'customer_id': value['customerId'],
|
|
156
|
+
'related_id': value['relatedId'],
|
|
157
|
+
'related_type': value['relatedType'],
|
|
158
|
+
'includes_relations': value['includesRelations'],
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PaymentMethod } from './PaymentMethod';
|
|
17
|
+
import {
|
|
18
|
+
PaymentMethodFromJSON,
|
|
19
|
+
PaymentMethodFromJSONTyped,
|
|
20
|
+
PaymentMethodToJSON,
|
|
21
|
+
PaymentMethodToJSONTyped,
|
|
22
|
+
} from './PaymentMethod';
|
|
23
|
+
|
|
16
24
|
/**
|
|
17
25
|
*
|
|
18
26
|
* @export
|
|
@@ -63,10 +71,10 @@ export interface SearchTransactionsRequest {
|
|
|
63
71
|
type?: Array<string>;
|
|
64
72
|
/**
|
|
65
73
|
*
|
|
66
|
-
* @type {Array<
|
|
74
|
+
* @type {Array<PaymentMethod>}
|
|
67
75
|
* @memberof SearchTransactionsRequest
|
|
68
76
|
*/
|
|
69
|
-
paymentMethod?: Array<
|
|
77
|
+
paymentMethod?: Array<PaymentMethod>;
|
|
70
78
|
/**
|
|
71
79
|
*
|
|
72
80
|
* @type {Array<string>}
|
|
@@ -159,7 +167,7 @@ export function SearchTransactionsRequestFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
159
167
|
'page': json['page'] == null ? undefined : json['page'],
|
|
160
168
|
'paymentSource': json['payment_source'] == null ? undefined : json['payment_source'],
|
|
161
169
|
'type': json['type'] == null ? undefined : json['type'],
|
|
162
|
-
'paymentMethod': json['payment_method'] == null ? undefined : json['payment_method'],
|
|
170
|
+
'paymentMethod': json['payment_method'] == null ? undefined : ((json['payment_method'] as Array<any>).map(PaymentMethodFromJSON)),
|
|
163
171
|
'status': json['status'] == null ? undefined : json['status'],
|
|
164
172
|
'beforeCreatedAt': json['before_created_at'] == null ? undefined : (new Date(json['before_created_at'])),
|
|
165
173
|
'afterCreatedAt': json['after_created_at'] == null ? undefined : (new Date(json['after_created_at'])),
|
|
@@ -187,7 +195,7 @@ export function SearchTransactionsRequestToJSONTyped(value?: SearchTransactionsR
|
|
|
187
195
|
'page': value['page'],
|
|
188
196
|
'payment_source': value['paymentSource'],
|
|
189
197
|
'type': value['type'],
|
|
190
|
-
'payment_method': value['paymentMethod'],
|
|
198
|
+
'payment_method': value['paymentMethod'] == null ? undefined : ((value['paymentMethod'] as Array<any>).map(PaymentMethodToJSON)),
|
|
191
199
|
'status': value['status'],
|
|
192
200
|
'before_created_at': value['beforeCreatedAt'] == null ? undefined : ((value['beforeCreatedAt']).toISOString()),
|
|
193
201
|
'after_created_at': value['afterCreatedAt'] == null ? undefined : ((value['afterCreatedAt']).toISOString()),
|