@digital8/lighting-illusions-ts-sdk 0.0.1952 → 0.0.1953
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 +6 -4
- package/README.md +5 -4
- package/dist/apis/TransactionsApi.d.ts +3 -3
- package/dist/apis/TransactionsApi.js +2 -2
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +3 -1
- package/dist/models/OrderListResource.d.ts +0 -7
- package/dist/models/OrderListResource.js +0 -5
- package/dist/models/PaginatedTransactionListResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedTransactionListResourceResponse.js +57 -0
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +1 -3
- package/dist/models/StoreListResource.d.ts +2 -2
- package/dist/models/StoreListResource.js +6 -2
- package/dist/models/StoreResource.d.ts +2 -2
- package/dist/models/StoreResource.js +4 -4
- package/dist/models/TransactionListResource.d.ts +152 -0
- package/dist/models/TransactionListResource.js +109 -0
- package/dist/models/TransactionListResourceArrayResponse.d.ts +33 -0
- package/dist/models/TransactionListResourceArrayResponse.js +50 -0
- package/dist/models/TransactionResource.d.ts +24 -0
- package/dist/models/TransactionResource.js +8 -0
- package/dist/models/index.d.ts +3 -2
- package/dist/models/index.js +3 -2
- package/docs/OrderListResource.md +0 -2
- package/docs/PaginatedTransactionListResourceResponse.md +36 -0
- package/docs/{TransactionLiteResource.md → TransactionListResource.md} +30 -4
- package/docs/{TransactionLiteResourceArrayResponse.md → TransactionListResourceArrayResponse.md} +5 -5
- package/docs/TransactionResource.md +8 -0
- package/docs/TransactionsApi.md +3 -3
- package/package.json +1 -1
- package/src/apis/TransactionsApi.ts +7 -7
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/ExternalApiLogResource.ts +3 -2
- package/src/models/OrderListResource.ts +0 -16
- package/src/models/PaginatedTransactionListResourceResponse.ts +90 -0
- package/src/models/StoreFrontendResource.ts +2 -3
- package/src/models/StoreListResource.ts +6 -4
- package/src/models/StoreResource.ts +5 -5
- package/src/models/TransactionListResource.ts +235 -0
- package/src/models/TransactionListResourceArrayResponse.ts +73 -0
- package/src/models/TransactionResource.ts +32 -0
- package/src/models/index.ts +3 -2
- package/dist/models/TransactionLiteResource.d.ts +0 -74
- package/dist/models/TransactionLiteResource.js +0 -77
- package/dist/models/TransactionLiteResourceArrayResponse.d.ts +0 -33
- package/dist/models/TransactionLiteResourceArrayResponse.js +0 -50
- package/src/models/TransactionLiteResource.ts +0 -128
- package/src/models/TransactionLiteResourceArrayResponse.ts +0 -73
|
@@ -27,13 +27,6 @@ import {
|
|
|
27
27
|
LineItemListResourceToJSON,
|
|
28
28
|
LineItemListResourceToJSONTyped,
|
|
29
29
|
} from './LineItemListResource';
|
|
30
|
-
import type { TransactionLiteResource } from './TransactionLiteResource';
|
|
31
|
-
import {
|
|
32
|
-
TransactionLiteResourceFromJSON,
|
|
33
|
-
TransactionLiteResourceFromJSONTyped,
|
|
34
|
-
TransactionLiteResourceToJSON,
|
|
35
|
-
TransactionLiteResourceToJSONTyped,
|
|
36
|
-
} from './TransactionLiteResource';
|
|
37
30
|
import type { CustomerListResource } from './CustomerListResource';
|
|
38
31
|
import {
|
|
39
32
|
CustomerListResourceFromJSON,
|
|
@@ -138,12 +131,6 @@ export interface OrderListResource {
|
|
|
138
131
|
* @memberof OrderListResource
|
|
139
132
|
*/
|
|
140
133
|
lineItems: Array<LineItemListResource> | null;
|
|
141
|
-
/**
|
|
142
|
-
*
|
|
143
|
-
* @type {Array<TransactionLiteResource>}
|
|
144
|
-
* @memberof OrderListResource
|
|
145
|
-
*/
|
|
146
|
-
transactions: Array<TransactionLiteResource> | null;
|
|
147
134
|
}
|
|
148
135
|
|
|
149
136
|
/**
|
|
@@ -160,7 +147,6 @@ export function instanceOfOrderListResource(value: object): value is OrderListRe
|
|
|
160
147
|
if (!('customer' in value) || value['customer'] === undefined) return false;
|
|
161
148
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
162
149
|
if (!('lineItems' in value) || value['lineItems'] === undefined) return false;
|
|
163
|
-
if (!('transactions' in value) || value['transactions'] === undefined) return false;
|
|
164
150
|
return true;
|
|
165
151
|
}
|
|
166
152
|
|
|
@@ -189,7 +175,6 @@ export function OrderListResourceFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
189
175
|
'customer': CustomerListResourceFromJSON(json['customer']),
|
|
190
176
|
'status': json['status'],
|
|
191
177
|
'lineItems': (json['line_items'] == null ? null : (json['line_items'] as Array<any>).map(LineItemListResourceFromJSON)),
|
|
192
|
-
'transactions': (json['transactions'] == null ? null : (json['transactions'] as Array<any>).map(TransactionLiteResourceFromJSON)),
|
|
193
178
|
};
|
|
194
179
|
}
|
|
195
180
|
|
|
@@ -219,7 +204,6 @@ export function OrderListResourceToJSONTyped(value?: OrderListResource | null, i
|
|
|
219
204
|
'customer': CustomerListResourceToJSON(value['customer']),
|
|
220
205
|
'status': value['status'],
|
|
221
206
|
'line_items': (value['lineItems'] == null ? null : (value['lineItems'] as Array<any>).map(LineItemListResourceToJSON)),
|
|
222
|
-
'transactions': (value['transactions'] == null ? null : (value['transactions'] as Array<any>).map(TransactionLiteResourceToJSON)),
|
|
223
207
|
};
|
|
224
208
|
}
|
|
225
209
|
|
|
@@ -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 { PagingMetadata } from './PagingMetadata';
|
|
17
|
+
import {
|
|
18
|
+
PagingMetadataFromJSON,
|
|
19
|
+
PagingMetadataFromJSONTyped,
|
|
20
|
+
PagingMetadataToJSON,
|
|
21
|
+
PagingMetadataToJSONTyped,
|
|
22
|
+
} from './PagingMetadata';
|
|
23
|
+
import type { TransactionListResource } from './TransactionListResource';
|
|
24
|
+
import {
|
|
25
|
+
TransactionListResourceFromJSON,
|
|
26
|
+
TransactionListResourceFromJSONTyped,
|
|
27
|
+
TransactionListResourceToJSON,
|
|
28
|
+
TransactionListResourceToJSONTyped,
|
|
29
|
+
} from './TransactionListResource';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface PaginatedTransactionListResourceResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface PaginatedTransactionListResourceResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<TransactionListResource>}
|
|
40
|
+
* @memberof PaginatedTransactionListResourceResponse
|
|
41
|
+
*/
|
|
42
|
+
data: Array<TransactionListResource>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {PagingMetadata}
|
|
46
|
+
* @memberof PaginatedTransactionListResourceResponse
|
|
47
|
+
*/
|
|
48
|
+
meta: PagingMetadata;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the PaginatedTransactionListResourceResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfPaginatedTransactionListResourceResponse(value: object): value is PaginatedTransactionListResourceResponse {
|
|
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 PaginatedTransactionListResourceResponseFromJSON(json: any): PaginatedTransactionListResourceResponse {
|
|
61
|
+
return PaginatedTransactionListResourceResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function PaginatedTransactionListResourceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTransactionListResourceResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': ((json['data'] as Array<any>).map(TransactionListResourceFromJSON)),
|
|
71
|
+
'meta': PagingMetadataFromJSON(json['meta']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function PaginatedTransactionListResourceResponseToJSON(json: any): PaginatedTransactionListResourceResponse {
|
|
76
|
+
return PaginatedTransactionListResourceResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function PaginatedTransactionListResourceResponseToJSONTyped(value?: PaginatedTransactionListResourceResponse | 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(TransactionListResourceToJSON)),
|
|
87
|
+
'meta': PagingMetadataToJSON(value['meta']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -78,7 +78,7 @@ export interface StoreFrontendResource {
|
|
|
78
78
|
* @type {string}
|
|
79
79
|
* @memberof StoreFrontendResource
|
|
80
80
|
*/
|
|
81
|
-
tagLine
|
|
81
|
+
tagLine?: string | null;
|
|
82
82
|
/**
|
|
83
83
|
*
|
|
84
84
|
* @type {string}
|
|
@@ -110,7 +110,6 @@ export function instanceOfStoreFrontendResource(value: object): value is StoreFr
|
|
|
110
110
|
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
111
111
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
112
112
|
if (!('longitude' in value) || value['longitude'] === undefined) return false;
|
|
113
|
-
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
114
113
|
if (!('specialDates' in value) || value['specialDates'] === undefined) return false;
|
|
115
114
|
if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
|
|
116
115
|
return true;
|
|
@@ -135,7 +134,7 @@ export function StoreFrontendResourceFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
135
134
|
'address': json['address'] == null ? undefined : json['address'],
|
|
136
135
|
'latitude': json['latitude'],
|
|
137
136
|
'longitude': json['longitude'],
|
|
138
|
-
'tagLine': json['tagLine'],
|
|
137
|
+
'tagLine': json['tagLine'] == null ? undefined : json['tagLine'],
|
|
139
138
|
'openingHours': json['openingHours'] == null ? undefined : json['openingHours'],
|
|
140
139
|
'specialDates': json['specialDates'],
|
|
141
140
|
'suppliers': json['suppliers'],
|
|
@@ -68,7 +68,7 @@ export interface StoreListResource {
|
|
|
68
68
|
* @type {string}
|
|
69
69
|
* @memberof StoreListResource
|
|
70
70
|
*/
|
|
71
|
-
tagLine
|
|
71
|
+
tagLine: string;
|
|
72
72
|
/**
|
|
73
73
|
*
|
|
74
74
|
* @type {string}
|
|
@@ -80,7 +80,7 @@ export interface StoreListResource {
|
|
|
80
80
|
* @type {string}
|
|
81
81
|
* @memberof StoreListResource
|
|
82
82
|
*/
|
|
83
|
-
website
|
|
83
|
+
website: string;
|
|
84
84
|
/**
|
|
85
85
|
*
|
|
86
86
|
* @type {string}
|
|
@@ -98,7 +98,9 @@ export function instanceOfStoreListResource(value: object): value is StoreListRe
|
|
|
98
98
|
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
99
99
|
if (!('longitude' in value) || value['longitude'] === undefined) return false;
|
|
100
100
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
101
|
+
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
101
102
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
103
|
+
if (!('website' in value) || value['website'] === undefined) return false;
|
|
102
104
|
return true;
|
|
103
105
|
}
|
|
104
106
|
|
|
@@ -118,9 +120,9 @@ export function StoreListResourceFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
118
120
|
'phone': json['phone'],
|
|
119
121
|
'longitude': json['longitude'],
|
|
120
122
|
'latitude': json['latitude'],
|
|
121
|
-
'tagLine': json['tag_line']
|
|
123
|
+
'tagLine': json['tag_line'],
|
|
122
124
|
'email': json['email'],
|
|
123
|
-
'website': json['website']
|
|
125
|
+
'website': json['website'],
|
|
124
126
|
'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
|
|
125
127
|
};
|
|
126
128
|
}
|
|
@@ -89,7 +89,7 @@ export interface StoreResource {
|
|
|
89
89
|
* @type {string}
|
|
90
90
|
* @memberof StoreResource
|
|
91
91
|
*/
|
|
92
|
-
tagLine
|
|
92
|
+
tagLine?: string | null;
|
|
93
93
|
/**
|
|
94
94
|
*
|
|
95
95
|
* @type {string}
|
|
@@ -101,7 +101,7 @@ export interface StoreResource {
|
|
|
101
101
|
* @type {string}
|
|
102
102
|
* @memberof StoreResource
|
|
103
103
|
*/
|
|
104
|
-
website
|
|
104
|
+
website: string;
|
|
105
105
|
/**
|
|
106
106
|
*
|
|
107
107
|
* @type {string}
|
|
@@ -137,8 +137,8 @@ export function instanceOfStoreResource(value: object): value is StoreResource {
|
|
|
137
137
|
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
138
138
|
if (!('longitude' in value) || value['longitude'] === undefined) return false;
|
|
139
139
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
140
|
-
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
141
140
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
141
|
+
if (!('website' in value) || value['website'] === undefined) return false;
|
|
142
142
|
if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
|
|
143
143
|
if (!('address' in value) || value['address'] === undefined) return false;
|
|
144
144
|
if (!('specialDates' in value) || value['specialDates'] === undefined) return false;
|
|
@@ -161,9 +161,9 @@ export function StoreResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
161
161
|
'phone': json['phone'],
|
|
162
162
|
'longitude': json['longitude'],
|
|
163
163
|
'latitude': json['latitude'],
|
|
164
|
-
'tagLine': json['tag_line'],
|
|
164
|
+
'tagLine': json['tag_line'] == null ? undefined : json['tag_line'],
|
|
165
165
|
'email': json['email'],
|
|
166
|
-
'website': json['website']
|
|
166
|
+
'website': json['website'],
|
|
167
167
|
'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
|
|
168
168
|
'suppliers': (json['suppliers'] == null ? null : (json['suppliers'] as Array<any>).map(SupplierLiteResourceFromJSON)),
|
|
169
169
|
'address': AddressResourceFromJSON(json['address']),
|
|
@@ -0,0 +1,235 @@
|
|
|
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 TransactionListResource
|
|
20
|
+
*/
|
|
21
|
+
export interface TransactionListResource {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof TransactionListResource
|
|
26
|
+
*/
|
|
27
|
+
id?: number | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof TransactionListResource
|
|
32
|
+
*/
|
|
33
|
+
orderId?: number | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof TransactionListResource
|
|
38
|
+
*/
|
|
39
|
+
cartId?: number | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof TransactionListResource
|
|
44
|
+
*/
|
|
45
|
+
adminId?: number | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof TransactionListResource
|
|
50
|
+
*/
|
|
51
|
+
paymentSource: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof TransactionListResource
|
|
56
|
+
*/
|
|
57
|
+
paymentMethod: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof TransactionListResource
|
|
62
|
+
*/
|
|
63
|
+
type: string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof TransactionListResource
|
|
68
|
+
*/
|
|
69
|
+
status: string;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof TransactionListResource
|
|
74
|
+
*/
|
|
75
|
+
amount: number;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof TransactionListResource
|
|
80
|
+
*/
|
|
81
|
+
surcharge: number;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {number}
|
|
85
|
+
* @memberof TransactionListResource
|
|
86
|
+
*/
|
|
87
|
+
totalAmount: number;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {number}
|
|
91
|
+
* @memberof TransactionListResource
|
|
92
|
+
*/
|
|
93
|
+
refundedAmount: number;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {number}
|
|
97
|
+
* @memberof TransactionListResource
|
|
98
|
+
*/
|
|
99
|
+
unrefundedAmount: number;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {string}
|
|
103
|
+
* @memberof TransactionListResource
|
|
104
|
+
*/
|
|
105
|
+
reference: string;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {string}
|
|
109
|
+
* @memberof TransactionListResource
|
|
110
|
+
*/
|
|
111
|
+
description?: string | null;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {string}
|
|
115
|
+
* @memberof TransactionListResource
|
|
116
|
+
*/
|
|
117
|
+
extendedData?: string | null;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @type {string}
|
|
121
|
+
* @memberof TransactionListResource
|
|
122
|
+
*/
|
|
123
|
+
riskScore?: string | null;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @type {string}
|
|
127
|
+
* @memberof TransactionListResource
|
|
128
|
+
*/
|
|
129
|
+
fraudDecision?: string | null;
|
|
130
|
+
/**
|
|
131
|
+
*
|
|
132
|
+
* @type {number}
|
|
133
|
+
* @memberof TransactionListResource
|
|
134
|
+
*/
|
|
135
|
+
refundedTransactionId?: number | null;
|
|
136
|
+
/**
|
|
137
|
+
*
|
|
138
|
+
* @type {Date}
|
|
139
|
+
* @memberof TransactionListResource
|
|
140
|
+
*/
|
|
141
|
+
createdAt?: Date | null;
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @type {Date}
|
|
145
|
+
* @memberof TransactionListResource
|
|
146
|
+
*/
|
|
147
|
+
updatedAt?: Date | null;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Check if a given object implements the TransactionListResource interface.
|
|
152
|
+
*/
|
|
153
|
+
export function instanceOfTransactionListResource(value: object): value is TransactionListResource {
|
|
154
|
+
if (!('paymentSource' in value) || value['paymentSource'] === undefined) return false;
|
|
155
|
+
if (!('paymentMethod' in value) || value['paymentMethod'] === undefined) return false;
|
|
156
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
157
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
158
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
159
|
+
if (!('surcharge' in value) || value['surcharge'] === undefined) return false;
|
|
160
|
+
if (!('totalAmount' in value) || value['totalAmount'] === undefined) return false;
|
|
161
|
+
if (!('refundedAmount' in value) || value['refundedAmount'] === undefined) return false;
|
|
162
|
+
if (!('unrefundedAmount' in value) || value['unrefundedAmount'] === undefined) return false;
|
|
163
|
+
if (!('reference' in value) || value['reference'] === undefined) return false;
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export function TransactionListResourceFromJSON(json: any): TransactionListResource {
|
|
168
|
+
return TransactionListResourceFromJSONTyped(json, false);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export function TransactionListResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionListResource {
|
|
172
|
+
if (json == null) {
|
|
173
|
+
return json;
|
|
174
|
+
}
|
|
175
|
+
return {
|
|
176
|
+
|
|
177
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
178
|
+
'orderId': json['order_id'] == null ? undefined : json['order_id'],
|
|
179
|
+
'cartId': json['cart_id'] == null ? undefined : json['cart_id'],
|
|
180
|
+
'adminId': json['admin_id'] == null ? undefined : json['admin_id'],
|
|
181
|
+
'paymentSource': json['payment_source'],
|
|
182
|
+
'paymentMethod': json['payment_method'],
|
|
183
|
+
'type': json['type'],
|
|
184
|
+
'status': json['status'],
|
|
185
|
+
'amount': json['amount'],
|
|
186
|
+
'surcharge': json['surcharge'],
|
|
187
|
+
'totalAmount': json['total_amount'],
|
|
188
|
+
'refundedAmount': json['refunded_amount'],
|
|
189
|
+
'unrefundedAmount': json['unrefunded_amount'],
|
|
190
|
+
'reference': json['reference'],
|
|
191
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
192
|
+
'extendedData': json['extended_data'] == null ? undefined : json['extended_data'],
|
|
193
|
+
'riskScore': json['risk_score'] == null ? undefined : json['risk_score'],
|
|
194
|
+
'fraudDecision': json['fraud_decision'] == null ? undefined : json['fraud_decision'],
|
|
195
|
+
'refundedTransactionId': json['refunded_transaction_id'] == null ? undefined : json['refunded_transaction_id'],
|
|
196
|
+
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
197
|
+
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export function TransactionListResourceToJSON(json: any): TransactionListResource {
|
|
202
|
+
return TransactionListResourceToJSONTyped(json, false);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export function TransactionListResourceToJSONTyped(value?: TransactionListResource | null, ignoreDiscriminator: boolean = false): any {
|
|
206
|
+
if (value == null) {
|
|
207
|
+
return value;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return {
|
|
211
|
+
|
|
212
|
+
'id': value['id'],
|
|
213
|
+
'order_id': value['orderId'],
|
|
214
|
+
'cart_id': value['cartId'],
|
|
215
|
+
'admin_id': value['adminId'],
|
|
216
|
+
'payment_source': value['paymentSource'],
|
|
217
|
+
'payment_method': value['paymentMethod'],
|
|
218
|
+
'type': value['type'],
|
|
219
|
+
'status': value['status'],
|
|
220
|
+
'amount': value['amount'],
|
|
221
|
+
'surcharge': value['surcharge'],
|
|
222
|
+
'total_amount': value['totalAmount'],
|
|
223
|
+
'refunded_amount': value['refundedAmount'],
|
|
224
|
+
'unrefunded_amount': value['unrefundedAmount'],
|
|
225
|
+
'reference': value['reference'],
|
|
226
|
+
'description': value['description'],
|
|
227
|
+
'extended_data': value['extendedData'],
|
|
228
|
+
'risk_score': value['riskScore'],
|
|
229
|
+
'fraud_decision': value['fraudDecision'],
|
|
230
|
+
'refunded_transaction_id': value['refundedTransactionId'],
|
|
231
|
+
'created_at': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
232
|
+
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
|
|
@@ -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 { TransactionListResource } from './TransactionListResource';
|
|
17
|
+
import {
|
|
18
|
+
TransactionListResourceFromJSON,
|
|
19
|
+
TransactionListResourceFromJSONTyped,
|
|
20
|
+
TransactionListResourceToJSON,
|
|
21
|
+
TransactionListResourceToJSONTyped,
|
|
22
|
+
} from './TransactionListResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface TransactionListResourceArrayResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface TransactionListResourceArrayResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<TransactionListResource>}
|
|
33
|
+
* @memberof TransactionListResourceArrayResponse
|
|
34
|
+
*/
|
|
35
|
+
data?: Array<TransactionListResource>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the TransactionListResourceArrayResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfTransactionListResourceArrayResponse(value: object): value is TransactionListResourceArrayResponse {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function TransactionListResourceArrayResponseFromJSON(json: any): TransactionListResourceArrayResponse {
|
|
46
|
+
return TransactionListResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function TransactionListResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionListResourceArrayResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(TransactionListResourceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function TransactionListResourceArrayResponseToJSON(json: any): TransactionListResourceArrayResponse {
|
|
60
|
+
return TransactionListResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function TransactionListResourceArrayResponseToJSONTyped(value?: TransactionListResourceArrayResponse | 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(TransactionListResourceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -25,6 +25,24 @@ export interface TransactionResource {
|
|
|
25
25
|
* @memberof TransactionResource
|
|
26
26
|
*/
|
|
27
27
|
id?: number | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof TransactionResource
|
|
32
|
+
*/
|
|
33
|
+
orderId?: number | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof TransactionResource
|
|
38
|
+
*/
|
|
39
|
+
cartId?: number | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof TransactionResource
|
|
44
|
+
*/
|
|
45
|
+
adminId?: number | null;
|
|
28
46
|
/**
|
|
29
47
|
*
|
|
30
48
|
* @type {string}
|
|
@@ -121,6 +139,12 @@ export interface TransactionResource {
|
|
|
121
139
|
* @memberof TransactionResource
|
|
122
140
|
*/
|
|
123
141
|
createdAt?: Date | null;
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @type {Date}
|
|
145
|
+
* @memberof TransactionResource
|
|
146
|
+
*/
|
|
147
|
+
updatedAt?: Date | null;
|
|
124
148
|
}
|
|
125
149
|
|
|
126
150
|
/**
|
|
@@ -151,6 +175,9 @@ export function TransactionResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
151
175
|
return {
|
|
152
176
|
|
|
153
177
|
'id': json['id'] == null ? undefined : json['id'],
|
|
178
|
+
'orderId': json['order_id'] == null ? undefined : json['order_id'],
|
|
179
|
+
'cartId': json['cart_id'] == null ? undefined : json['cart_id'],
|
|
180
|
+
'adminId': json['admin_id'] == null ? undefined : json['admin_id'],
|
|
154
181
|
'paymentSource': json['payment_source'],
|
|
155
182
|
'paymentMethod': json['payment_method'],
|
|
156
183
|
'type': json['type'],
|
|
@@ -167,6 +194,7 @@ export function TransactionResourceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
167
194
|
'fraudDecision': json['fraud_decision'] == null ? undefined : json['fraud_decision'],
|
|
168
195
|
'refundedTransactionId': json['refunded_transaction_id'] == null ? undefined : json['refunded_transaction_id'],
|
|
169
196
|
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
197
|
+
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
170
198
|
};
|
|
171
199
|
}
|
|
172
200
|
|
|
@@ -182,6 +210,9 @@ export function TransactionResourceToJSONTyped(value?: TransactionResource | nul
|
|
|
182
210
|
return {
|
|
183
211
|
|
|
184
212
|
'id': value['id'],
|
|
213
|
+
'order_id': value['orderId'],
|
|
214
|
+
'cart_id': value['cartId'],
|
|
215
|
+
'admin_id': value['adminId'],
|
|
185
216
|
'payment_source': value['paymentSource'],
|
|
186
217
|
'payment_method': value['paymentMethod'],
|
|
187
218
|
'type': value['type'],
|
|
@@ -198,6 +229,7 @@ export function TransactionResourceToJSONTyped(value?: TransactionResource | nul
|
|
|
198
229
|
'fraud_decision': value['fraudDecision'],
|
|
199
230
|
'refunded_transaction_id': value['refundedTransactionId'],
|
|
200
231
|
'created_at': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
232
|
+
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
201
233
|
};
|
|
202
234
|
}
|
|
203
235
|
|
package/src/models/index.ts
CHANGED
|
@@ -268,6 +268,7 @@ export * from './PaginatedSupplierResourceResponse';
|
|
|
268
268
|
export * from './PaginatedTagListResourceResponse';
|
|
269
269
|
export * from './PaginatedTagLiteResourceResponse';
|
|
270
270
|
export * from './PaginatedTagResourceResponse';
|
|
271
|
+
export * from './PaginatedTransactionListResourceResponse';
|
|
271
272
|
export * from './PaginatedTransactionResourceResponse';
|
|
272
273
|
export * from './PagingMetadata';
|
|
273
274
|
export * from './PaymentMethod';
|
|
@@ -461,8 +462,8 @@ export * from './TagLiteResourceArrayResponse';
|
|
|
461
462
|
export * from './TagResource';
|
|
462
463
|
export * from './TagResourceArrayResponse';
|
|
463
464
|
export * from './TagType';
|
|
464
|
-
export * from './
|
|
465
|
-
export * from './
|
|
465
|
+
export * from './TransactionListResource';
|
|
466
|
+
export * from './TransactionListResourceArrayResponse';
|
|
466
467
|
export * from './TransactionResource';
|
|
467
468
|
export * from './TransactionResourceArrayResponse';
|
|
468
469
|
export * from './TransactionType';
|