@digital8/lighting-illusions-ts-sdk 0.0.2744 → 0.0.2745
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 +8 -0
- package/README.md +2 -2
- 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/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +1 -3
- 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/OrderFulfillmentResource.d.ts +1 -1
- package/dist/models/OrderFulfillmentResource.js +1 -3
- 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/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +1 -3
- package/dist/models/StoreResource.d.ts +2 -2
- package/dist/models/StoreResource.js +2 -6
- 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 +7 -0
- package/dist/models/index.js +7 -0
- package/package.json +1 -1
- package/src/apis/StoreCreditsApi.ts +69 -0
- package/src/apis/TransactionsApi.ts +44 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/AddressResource.ts +2 -3
- 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/OrderFulfillmentResource.ts +2 -3
- 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/StoreListResource.ts +2 -3
- package/src/models/StoreResource.ts +4 -6
- 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 +7 -0
package/package.json
CHANGED
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
PaginatedStoreCreditListResourceResponse,
|
|
19
|
+
SearchStoreCreditsRequest,
|
|
20
|
+
} from '../models/index';
|
|
21
|
+
import {
|
|
22
|
+
PaginatedStoreCreditListResourceResponseFromJSON,
|
|
23
|
+
PaginatedStoreCreditListResourceResponseToJSON,
|
|
24
|
+
SearchStoreCreditsRequestFromJSON,
|
|
25
|
+
SearchStoreCreditsRequestToJSON,
|
|
26
|
+
} from '../models/index';
|
|
27
|
+
|
|
28
|
+
export interface IndexStoreCreditRequest {
|
|
29
|
+
searchStoreCreditsRequest?: SearchStoreCreditsRequest;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
export class StoreCreditsApi extends runtime.BaseAPI {
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Auto-generated: indexStoreCredit
|
|
39
|
+
*/
|
|
40
|
+
async indexStoreCreditRaw(requestParameters: IndexStoreCreditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedStoreCreditListResourceResponse>> {
|
|
41
|
+
const queryParameters: any = {};
|
|
42
|
+
|
|
43
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
44
|
+
|
|
45
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
let urlPath = `/admin-api/store-credits/list`;
|
|
49
|
+
|
|
50
|
+
const response = await this.request({
|
|
51
|
+
path: urlPath,
|
|
52
|
+
method: 'POST',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
body: SearchStoreCreditsRequestToJSON(requestParameters['searchStoreCreditsRequest']),
|
|
56
|
+
}, initOverrides);
|
|
57
|
+
|
|
58
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedStoreCreditListResourceResponseFromJSON(jsonValue));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Auto-generated: indexStoreCredit
|
|
63
|
+
*/
|
|
64
|
+
async indexStoreCredit(requestParameters: IndexStoreCreditRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedStoreCreditListResourceResponse> {
|
|
65
|
+
const response = await this.indexStoreCreditRaw(requestParameters, initOverrides);
|
|
66
|
+
return await response.value();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
CreateTransactionRequest,
|
|
19
|
+
GenericResponse,
|
|
19
20
|
PaginatedTransactionListResourceResponse,
|
|
20
21
|
RefundTransactionRequest,
|
|
21
22
|
SearchTransactionsRequest,
|
|
@@ -25,6 +26,8 @@ import type {
|
|
|
25
26
|
import {
|
|
26
27
|
CreateTransactionRequestFromJSON,
|
|
27
28
|
CreateTransactionRequestToJSON,
|
|
29
|
+
GenericResponseFromJSON,
|
|
30
|
+
GenericResponseToJSON,
|
|
28
31
|
PaginatedTransactionListResourceResponseFromJSON,
|
|
29
32
|
PaginatedTransactionListResourceResponseToJSON,
|
|
30
33
|
RefundTransactionRequestFromJSON,
|
|
@@ -37,6 +40,10 @@ import {
|
|
|
37
40
|
TransactionResourceToJSON,
|
|
38
41
|
} from '../models/index';
|
|
39
42
|
|
|
43
|
+
export interface DestroyTransactionRequest {
|
|
44
|
+
transaction: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
export interface IndexTransactionRequest {
|
|
41
48
|
searchTransactionsRequest?: SearchTransactionsRequest;
|
|
42
49
|
}
|
|
@@ -55,6 +62,43 @@ export interface StoreTransactionRequest {
|
|
|
55
62
|
*/
|
|
56
63
|
export class TransactionsApi extends runtime.BaseAPI {
|
|
57
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Auto-generated: destroyTransaction
|
|
67
|
+
*/
|
|
68
|
+
async destroyTransactionRaw(requestParameters: DestroyTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
69
|
+
if (requestParameters['transaction'] == null) {
|
|
70
|
+
throw new runtime.RequiredError(
|
|
71
|
+
'transaction',
|
|
72
|
+
'Required parameter "transaction" was null or undefined when calling destroyTransaction().'
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const queryParameters: any = {};
|
|
77
|
+
|
|
78
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
let urlPath = `/admin-api/transactions/{transaction}/delete`;
|
|
82
|
+
urlPath = urlPath.replace(`{${"transaction"}}`, encodeURIComponent(String(requestParameters['transaction'])));
|
|
83
|
+
|
|
84
|
+
const response = await this.request({
|
|
85
|
+
path: urlPath,
|
|
86
|
+
method: 'DELETE',
|
|
87
|
+
headers: headerParameters,
|
|
88
|
+
query: queryParameters,
|
|
89
|
+
}, initOverrides);
|
|
90
|
+
|
|
91
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Auto-generated: destroyTransaction
|
|
96
|
+
*/
|
|
97
|
+
async destroyTransaction(requestParameters: DestroyTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
98
|
+
const response = await this.destroyTransactionRaw(requestParameters, initOverrides);
|
|
99
|
+
return await response.value();
|
|
100
|
+
}
|
|
101
|
+
|
|
58
102
|
/**
|
|
59
103
|
* Auto-generated: indexTransaction
|
|
60
104
|
*/
|
package/src/apis/index.ts
CHANGED
|
@@ -54,7 +54,7 @@ export interface AddressFrontendResource {
|
|
|
54
54
|
* @type {string}
|
|
55
55
|
* @memberof AddressFrontendResource
|
|
56
56
|
*/
|
|
57
|
-
line2
|
|
57
|
+
line2?: string | null;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
60
|
* @type {string}
|
|
@@ -94,7 +94,6 @@ export function instanceOfAddressFrontendResource(value: object): value is Addre
|
|
|
94
94
|
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
95
95
|
if (!('company' in value) || value['company'] === undefined) return false;
|
|
96
96
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
97
|
-
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
98
97
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
99
98
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
100
99
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -118,7 +117,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
118
117
|
'addresseeName': json['addresseeName'],
|
|
119
118
|
'company': json['company'],
|
|
120
119
|
'line1': json['line1'],
|
|
121
|
-
'line2': json['line2'],
|
|
120
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
122
121
|
'postcode': json['postcode'],
|
|
123
122
|
'suburb': json['suburb'],
|
|
124
123
|
'country': json['country'],
|
|
@@ -54,7 +54,7 @@ export interface AddressResource {
|
|
|
54
54
|
* @type {string}
|
|
55
55
|
* @memberof AddressResource
|
|
56
56
|
*/
|
|
57
|
-
company
|
|
57
|
+
company?: string | null;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
60
|
* @type {string}
|
|
@@ -104,7 +104,6 @@ export interface AddressResource {
|
|
|
104
104
|
*/
|
|
105
105
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
106
106
|
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
107
|
-
if (!('company' in value) || value['company'] === undefined) return false;
|
|
108
107
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
109
108
|
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
110
109
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
@@ -130,7 +129,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
130
129
|
'sourceAddressId': json['sourceAddressId'] == null ? undefined : json['sourceAddressId'],
|
|
131
130
|
'netsuiteId': json['netsuiteId'] == null ? undefined : json['netsuiteId'],
|
|
132
131
|
'addresseeName': json['addresseeName'],
|
|
133
|
-
'company': json['company'],
|
|
132
|
+
'company': json['company'] == null ? undefined : json['company'],
|
|
134
133
|
'line1': json['line1'],
|
|
135
134
|
'line2': json['line2'],
|
|
136
135
|
'postcode': json['postcode'],
|
|
@@ -276,6 +276,12 @@ export interface AdminOrderResource {
|
|
|
276
276
|
* @memberof AdminOrderResource
|
|
277
277
|
*/
|
|
278
278
|
totalSurchargePaid: number;
|
|
279
|
+
/**
|
|
280
|
+
*
|
|
281
|
+
* @type {number}
|
|
282
|
+
* @memberof AdminOrderResource
|
|
283
|
+
*/
|
|
284
|
+
totalStoreCreditPaid: number;
|
|
279
285
|
/**
|
|
280
286
|
*
|
|
281
287
|
* @type {number}
|
|
@@ -404,6 +410,7 @@ export function instanceOfAdminOrderResource(value: object): value is AdminOrder
|
|
|
404
410
|
if (!('grandTotal' in value) || value['grandTotal'] === undefined) return false;
|
|
405
411
|
if (!('totalPaid' in value) || value['totalPaid'] === undefined) return false;
|
|
406
412
|
if (!('totalSurchargePaid' in value) || value['totalSurchargePaid'] === undefined) return false;
|
|
413
|
+
if (!('totalStoreCreditPaid' in value) || value['totalStoreCreditPaid'] === undefined) return false;
|
|
407
414
|
if (!('totalOutstanding' in value) || value['totalOutstanding'] === undefined) return false;
|
|
408
415
|
if (!('insuranceEstimate' in value) || value['insuranceEstimate'] === undefined) return false;
|
|
409
416
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
@@ -464,6 +471,7 @@ export function AdminOrderResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
464
471
|
'grandTotal': json['grandTotal'],
|
|
465
472
|
'totalPaid': json['totalPaid'],
|
|
466
473
|
'totalSurchargePaid': json['totalSurchargePaid'],
|
|
474
|
+
'totalStoreCreditPaid': json['totalStoreCreditPaid'],
|
|
467
475
|
'totalOutstanding': json['totalOutstanding'],
|
|
468
476
|
'insuranceEstimate': json['insuranceEstimate'],
|
|
469
477
|
'site': SiteLiteResourceFromJSON(json['site']),
|
|
@@ -525,6 +533,7 @@ export function AdminOrderResourceToJSONTyped(value?: AdminOrderResource | null,
|
|
|
525
533
|
'grandTotal': value['grandTotal'],
|
|
526
534
|
'totalPaid': value['totalPaid'],
|
|
527
535
|
'totalSurchargePaid': value['totalSurchargePaid'],
|
|
536
|
+
'totalStoreCreditPaid': value['totalStoreCreditPaid'],
|
|
528
537
|
'totalOutstanding': value['totalOutstanding'],
|
|
529
538
|
'insuranceEstimate': value['insuranceEstimate'],
|
|
530
539
|
'site': SiteLiteResourceToJSON(value['site']),
|
|
@@ -80,7 +80,8 @@ export const CreateTransactionRequestPaymentMethodEnum = {
|
|
|
80
80
|
AmericanExpress: 'american_express',
|
|
81
81
|
GooglePay: 'google_pay',
|
|
82
82
|
PayPal: 'pay_pal',
|
|
83
|
-
ApplePay: 'apple_pay'
|
|
83
|
+
ApplePay: 'apple_pay',
|
|
84
|
+
StoreCredit: 'store_credit'
|
|
84
85
|
} as const;
|
|
85
86
|
export type CreateTransactionRequestPaymentMethodEnum = typeof CreateTransactionRequestPaymentMethodEnum[keyof typeof CreateTransactionRequestPaymentMethodEnum];
|
|
86
87
|
|
|
@@ -34,6 +34,13 @@ import {
|
|
|
34
34
|
FrontendCartResourceCouponsInnerToJSON,
|
|
35
35
|
FrontendCartResourceCouponsInnerToJSONTyped,
|
|
36
36
|
} from './FrontendCartResourceCouponsInner';
|
|
37
|
+
import type { FrontendCartResourceStoreCreditsInner } from './FrontendCartResourceStoreCreditsInner';
|
|
38
|
+
import {
|
|
39
|
+
FrontendCartResourceStoreCreditsInnerFromJSON,
|
|
40
|
+
FrontendCartResourceStoreCreditsInnerFromJSONTyped,
|
|
41
|
+
FrontendCartResourceStoreCreditsInnerToJSON,
|
|
42
|
+
FrontendCartResourceStoreCreditsInnerToJSONTyped,
|
|
43
|
+
} from './FrontendCartResourceStoreCreditsInner';
|
|
37
44
|
import type { AddressResource } from './AddressResource';
|
|
38
45
|
import {
|
|
39
46
|
AddressResourceFromJSON,
|
|
@@ -186,6 +193,30 @@ export interface FrontendCartResource {
|
|
|
186
193
|
* @memberof FrontendCartResource
|
|
187
194
|
*/
|
|
188
195
|
grandTotal: number;
|
|
196
|
+
/**
|
|
197
|
+
*
|
|
198
|
+
* @type {Array<FrontendCartResourceStoreCreditsInner>}
|
|
199
|
+
* @memberof FrontendCartResource
|
|
200
|
+
*/
|
|
201
|
+
storeCredits: Array<FrontendCartResourceStoreCreditsInner>;
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @type {number}
|
|
205
|
+
* @memberof FrontendCartResource
|
|
206
|
+
*/
|
|
207
|
+
storeCreditTotal: number;
|
|
208
|
+
/**
|
|
209
|
+
*
|
|
210
|
+
* @type {number}
|
|
211
|
+
* @memberof FrontendCartResource
|
|
212
|
+
*/
|
|
213
|
+
availableStoreCreditTotal: number;
|
|
214
|
+
/**
|
|
215
|
+
*
|
|
216
|
+
* @type {number}
|
|
217
|
+
* @memberof FrontendCartResource
|
|
218
|
+
*/
|
|
219
|
+
amountDue: number;
|
|
189
220
|
}
|
|
190
221
|
|
|
191
222
|
/**
|
|
@@ -211,6 +242,10 @@ export function instanceOfFrontendCartResource(value: object): value is Frontend
|
|
|
211
242
|
if (!('transitInsuranceQuote' in value) || value['transitInsuranceQuote'] === undefined) return false;
|
|
212
243
|
if (!('gst' in value) || value['gst'] === undefined) return false;
|
|
213
244
|
if (!('grandTotal' in value) || value['grandTotal'] === undefined) return false;
|
|
245
|
+
if (!('storeCredits' in value) || value['storeCredits'] === undefined) return false;
|
|
246
|
+
if (!('storeCreditTotal' in value) || value['storeCreditTotal'] === undefined) return false;
|
|
247
|
+
if (!('availableStoreCreditTotal' in value) || value['availableStoreCreditTotal'] === undefined) return false;
|
|
248
|
+
if (!('amountDue' in value) || value['amountDue'] === undefined) return false;
|
|
214
249
|
return true;
|
|
215
250
|
}
|
|
216
251
|
|
|
@@ -247,6 +282,10 @@ export function FrontendCartResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
247
282
|
'transitInsuranceQuote': json['transitInsuranceQuote'],
|
|
248
283
|
'gst': json['gst'],
|
|
249
284
|
'grandTotal': json['grandTotal'],
|
|
285
|
+
'storeCredits': ((json['storeCredits'] as Array<any>).map(FrontendCartResourceStoreCreditsInnerFromJSON)),
|
|
286
|
+
'storeCreditTotal': json['storeCreditTotal'],
|
|
287
|
+
'availableStoreCreditTotal': json['availableStoreCreditTotal'],
|
|
288
|
+
'amountDue': json['amountDue'],
|
|
250
289
|
};
|
|
251
290
|
}
|
|
252
291
|
|
|
@@ -284,6 +323,10 @@ export function FrontendCartResourceToJSONTyped(value?: FrontendCartResource | n
|
|
|
284
323
|
'transitInsuranceQuote': value['transitInsuranceQuote'],
|
|
285
324
|
'gst': value['gst'],
|
|
286
325
|
'grandTotal': value['grandTotal'],
|
|
326
|
+
'storeCredits': ((value['storeCredits'] as Array<any>).map(FrontendCartResourceStoreCreditsInnerToJSON)),
|
|
327
|
+
'storeCreditTotal': value['storeCreditTotal'],
|
|
328
|
+
'availableStoreCreditTotal': value['availableStoreCreditTotal'],
|
|
329
|
+
'amountDue': value['amountDue'],
|
|
287
330
|
};
|
|
288
331
|
}
|
|
289
332
|
|
|
@@ -0,0 +1,81 @@
|
|
|
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 FrontendCartResourceStoreCreditsInner
|
|
20
|
+
*/
|
|
21
|
+
export interface FrontendCartResourceStoreCreditsInner {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof FrontendCartResourceStoreCreditsInner
|
|
26
|
+
*/
|
|
27
|
+
id?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof FrontendCartResourceStoreCreditsInner
|
|
32
|
+
*/
|
|
33
|
+
code?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof FrontendCartResourceStoreCreditsInner
|
|
38
|
+
*/
|
|
39
|
+
amount?: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the FrontendCartResourceStoreCreditsInner interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfFrontendCartResourceStoreCreditsInner(value: object): value is FrontendCartResourceStoreCreditsInner {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function FrontendCartResourceStoreCreditsInnerFromJSON(json: any): FrontendCartResourceStoreCreditsInner {
|
|
50
|
+
return FrontendCartResourceStoreCreditsInnerFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function FrontendCartResourceStoreCreditsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FrontendCartResourceStoreCreditsInner {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
60
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
61
|
+
'amount': json['amount'] == null ? undefined : json['amount'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function FrontendCartResourceStoreCreditsInnerToJSON(json: any): FrontendCartResourceStoreCreditsInner {
|
|
66
|
+
return FrontendCartResourceStoreCreditsInnerToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function FrontendCartResourceStoreCreditsInnerToJSONTyped(value?: FrontendCartResourceStoreCreditsInner | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'id': value['id'],
|
|
77
|
+
'code': value['code'],
|
|
78
|
+
'amount': value['amount'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -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
|
}
|
|
@@ -56,7 +56,7 @@ export interface OrderFulfillmentResource {
|
|
|
56
56
|
* @type {string}
|
|
57
57
|
* @memberof OrderFulfillmentResource
|
|
58
58
|
*/
|
|
59
|
-
trackingUrl
|
|
59
|
+
trackingUrl?: string | null;
|
|
60
60
|
/**
|
|
61
61
|
*
|
|
62
62
|
* @type {string}
|
|
@@ -102,7 +102,6 @@ export function instanceOfOrderFulfillmentResource(value: object): value is Orde
|
|
|
102
102
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
103
103
|
if (!('orderId' in value) || value['orderId'] === undefined) return false;
|
|
104
104
|
if (!('dateShipped' in value) || value['dateShipped'] === undefined) return false;
|
|
105
|
-
if (!('trackingUrl' in value) || value['trackingUrl'] === undefined) return false;
|
|
106
105
|
if (!('trackingCompany' in value) || value['trackingCompany'] === undefined) return false;
|
|
107
106
|
if (!('docnum' in value) || value['docnum'] === undefined) return false;
|
|
108
107
|
if (!('netsuiteId' in value) || value['netsuiteId'] === undefined) return false;
|
|
@@ -124,7 +123,7 @@ export function OrderFulfillmentResourceFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
124
123
|
'orderId': json['orderId'],
|
|
125
124
|
'dateShipped': (new Date(json['dateShipped'])),
|
|
126
125
|
'trackingNumber': json['trackingNumber'] == null ? undefined : json['trackingNumber'],
|
|
127
|
-
'trackingUrl': json['trackingUrl'],
|
|
126
|
+
'trackingUrl': json['trackingUrl'] == null ? undefined : json['trackingUrl'],
|
|
128
127
|
'trackingCompany': json['trackingCompany'],
|
|
129
128
|
'docnum': json['docnum'],
|
|
130
129
|
'netsuiteId': json['netsuiteId'],
|
|
@@ -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'],
|