@digital8/lighting-illusions-ts-sdk 0.0.1911 → 0.0.1913
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 +28 -0
- package/README.md +18 -2
- package/dist/apis/TransactionsApi.d.ts +64 -0
- package/dist/apis/TransactionsApi.js +257 -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 +3 -1
- package/dist/models/AddressResource.d.ts +2 -2
- package/dist/models/AddressResource.js +6 -2
- package/dist/models/IndexTransactionRequest.d.ts +127 -0
- package/dist/models/IndexTransactionRequest.js +91 -0
- package/dist/models/PaginatedTransactionListResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedTransactionListResourceResponse.js +57 -0
- package/dist/models/PaginatedTransactionResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedTransactionResourceResponse.js +57 -0
- package/dist/models/PaymentMethod.d.ts +30 -0
- package/dist/models/PaymentMethod.js +56 -0
- package/dist/models/PaymentSource.d.ts +26 -0
- package/dist/models/PaymentSource.js +52 -0
- package/dist/models/PaymentStatus.d.ts +25 -0
- package/dist/models/PaymentStatus.js +51 -0
- package/dist/models/RefundTransactionRequest.d.ts +38 -0
- package/dist/models/RefundTransactionRequest.js +53 -0
- package/dist/models/StoreFrontendResource.d.ts +2 -2
- package/dist/models/StoreFrontendResource.js +6 -2
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/StoreResource.d.ts +2 -2
- package/dist/models/StoreResource.js +6 -2
- package/dist/models/StoreTransactionRequest.d.ts +81 -0
- package/dist/models/StoreTransactionRequest.js +78 -0
- 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 +152 -0
- package/dist/models/TransactionResource.js +109 -0
- package/dist/models/TransactionResourceArrayResponse.d.ts +33 -0
- package/dist/models/TransactionResourceArrayResponse.js +50 -0
- package/dist/models/TransactionType.d.ts +25 -0
- package/dist/models/TransactionType.js +51 -0
- package/dist/models/index.d.ts +13 -0
- package/dist/models/index.js +13 -0
- package/docs/IndexTransactionRequest.md +60 -0
- package/docs/PaginatedTransactionListResourceResponse.md +36 -0
- package/docs/PaginatedTransactionResourceResponse.md +36 -0
- package/docs/PaymentMethod.md +32 -0
- package/docs/PaymentSource.md +32 -0
- package/docs/PaymentStatus.md +32 -0
- package/docs/RefundTransactionRequest.md +36 -0
- package/docs/StoreTransactionRequest.md +46 -0
- package/docs/TransactionListResource.md +74 -0
- package/docs/TransactionListResourceArrayResponse.md +34 -0
- package/docs/TransactionResource.md +74 -0
- package/docs/TransactionResourceArrayResponse.md +34 -0
- package/docs/TransactionType.md +32 -0
- package/docs/TransactionsApi.md +209 -0
- package/package.json +1 -1
- package/src/apis/TransactionsApi.ts +186 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AddressFrontendResource.ts +3 -2
- package/src/models/AddressResource.ts +6 -4
- package/src/models/IndexTransactionRequest.ts +190 -0
- package/src/models/PaginatedTransactionListResourceResponse.ts +90 -0
- package/src/models/PaginatedTransactionResourceResponse.ts +90 -0
- package/src/models/PaymentMethod.ts +58 -0
- package/src/models/PaymentSource.ts +54 -0
- package/src/models/PaymentStatus.ts +53 -0
- package/src/models/RefundTransactionRequest.ts +74 -0
- package/src/models/StoreFrontendResource.ts +6 -4
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/StoreResource.ts +6 -4
- package/src/models/StoreTransactionRequest.ts +131 -0
- package/src/models/TransactionListResource.ts +235 -0
- package/src/models/TransactionListResourceArrayResponse.ts +73 -0
- package/src/models/TransactionResource.ts +235 -0
- package/src/models/TransactionResourceArrayResponse.ts +73 -0
- package/src/models/TransactionType.ts +53 -0
- package/src/models/index.ts +13 -0
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const PaymentSource = {
|
|
21
|
+
Checkout: 'checkout',
|
|
22
|
+
ExpressCheckout: 'express_checkout',
|
|
23
|
+
AdminPortal: 'admin_portal'
|
|
24
|
+
} as const;
|
|
25
|
+
export type PaymentSource = typeof PaymentSource[keyof typeof PaymentSource];
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export function instanceOfPaymentSource(value: any): boolean {
|
|
29
|
+
for (const key in PaymentSource) {
|
|
30
|
+
if (Object.prototype.hasOwnProperty.call(PaymentSource, key)) {
|
|
31
|
+
if (PaymentSource[key as keyof typeof PaymentSource] === value) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function PaymentSourceFromJSON(json: any): PaymentSource {
|
|
40
|
+
return PaymentSourceFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function PaymentSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentSource {
|
|
44
|
+
return json as PaymentSource;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function PaymentSourceToJSON(value?: PaymentSource | null): any {
|
|
48
|
+
return value as any;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function PaymentSourceToJSONTyped(value: any, ignoreDiscriminator: boolean): PaymentSource {
|
|
52
|
+
return value as PaymentSource;
|
|
53
|
+
}
|
|
54
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const PaymentStatus = {
|
|
21
|
+
Success: 'success',
|
|
22
|
+
Failure: 'failure'
|
|
23
|
+
} as const;
|
|
24
|
+
export type PaymentStatus = typeof PaymentStatus[keyof typeof PaymentStatus];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfPaymentStatus(value: any): boolean {
|
|
28
|
+
for (const key in PaymentStatus) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(PaymentStatus, key)) {
|
|
30
|
+
if (PaymentStatus[key as keyof typeof PaymentStatus] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function PaymentStatusFromJSON(json: any): PaymentStatus {
|
|
39
|
+
return PaymentStatusFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function PaymentStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentStatus {
|
|
43
|
+
return json as PaymentStatus;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function PaymentStatusToJSON(value?: PaymentStatus | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function PaymentStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): PaymentStatus {
|
|
51
|
+
return value as PaymentStatus;
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
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 RefundTransactionRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface RefundTransactionRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof RefundTransactionRequest
|
|
26
|
+
*/
|
|
27
|
+
amount: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RefundTransactionRequest
|
|
32
|
+
*/
|
|
33
|
+
description?: string | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the RefundTransactionRequest interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfRefundTransactionRequest(value: object): value is RefundTransactionRequest {
|
|
40
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function RefundTransactionRequestFromJSON(json: any): RefundTransactionRequest {
|
|
45
|
+
return RefundTransactionRequestFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function RefundTransactionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RefundTransactionRequest {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
'amount': json['amount'],
|
|
55
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function RefundTransactionRequestToJSON(json: any): RefundTransactionRequest {
|
|
60
|
+
return RefundTransactionRequestToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function RefundTransactionRequestToJSONTyped(value?: RefundTransactionRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'amount': value['amount'],
|
|
71
|
+
'description': value['description'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -48,7 +48,7 @@ export interface StoreFrontendResource {
|
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof StoreFrontendResource
|
|
50
50
|
*/
|
|
51
|
-
website
|
|
51
|
+
website: string;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {string}
|
|
@@ -78,7 +78,7 @@ export interface StoreFrontendResource {
|
|
|
78
78
|
* @type {string}
|
|
79
79
|
* @memberof StoreFrontendResource
|
|
80
80
|
*/
|
|
81
|
-
tagLine
|
|
81
|
+
tagLine: string;
|
|
82
82
|
/**
|
|
83
83
|
*
|
|
84
84
|
* @type {string}
|
|
@@ -106,9 +106,11 @@ export function instanceOfStoreFrontendResource(value: object): value is StoreFr
|
|
|
106
106
|
if (!('siteId' in value) || value['siteId'] === undefined) return false;
|
|
107
107
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
108
108
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
109
|
+
if (!('website' in value) || value['website'] === undefined) return false;
|
|
109
110
|
if (!('phone' in value) || value['phone'] === undefined) return false;
|
|
110
111
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
111
112
|
if (!('longitude' in value) || value['longitude'] === undefined) return false;
|
|
113
|
+
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
112
114
|
if (!('specialDates' in value) || value['specialDates'] === undefined) return false;
|
|
113
115
|
if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
|
|
114
116
|
return true;
|
|
@@ -128,12 +130,12 @@ export function StoreFrontendResourceFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
128
130
|
'siteId': json['siteId'],
|
|
129
131
|
'name': json['name'],
|
|
130
132
|
'email': json['email'],
|
|
131
|
-
'website': json['website']
|
|
133
|
+
'website': json['website'],
|
|
132
134
|
'phone': json['phone'],
|
|
133
135
|
'address': json['address'] == null ? undefined : json['address'],
|
|
134
136
|
'latitude': json['latitude'],
|
|
135
137
|
'longitude': json['longitude'],
|
|
136
|
-
'tagLine': json['tagLine']
|
|
138
|
+
'tagLine': json['tagLine'],
|
|
137
139
|
'openingHours': json['openingHours'] == null ? undefined : json['openingHours'],
|
|
138
140
|
'specialDates': json['specialDates'],
|
|
139
141
|
'suppliers': json['suppliers'],
|
|
@@ -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}
|
|
@@ -100,6 +100,7 @@ export function instanceOfStoreListResource(value: object): value is StoreListRe
|
|
|
100
100
|
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
101
101
|
if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
|
|
102
102
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
103
|
+
if (!('website' in value) || value['website'] === undefined) return false;
|
|
103
104
|
return true;
|
|
104
105
|
}
|
|
105
106
|
|
|
@@ -121,7 +122,7 @@ export function StoreListResourceFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
121
122
|
'latitude': json['latitude'],
|
|
122
123
|
'tagLine': json['tag_line'],
|
|
123
124
|
'email': json['email'],
|
|
124
|
-
'website': json['website']
|
|
125
|
+
'website': json['website'],
|
|
125
126
|
'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
|
|
126
127
|
};
|
|
127
128
|
}
|
|
@@ -89,7 +89,7 @@ export interface StoreResource {
|
|
|
89
89
|
* @type {string}
|
|
90
90
|
* @memberof StoreResource
|
|
91
91
|
*/
|
|
92
|
-
tagLine
|
|
92
|
+
tagLine: string;
|
|
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,7 +137,9 @@ 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;
|
|
140
141
|
if (!('email' in value) || value['email'] === undefined) return false;
|
|
142
|
+
if (!('website' in value) || value['website'] === undefined) return false;
|
|
141
143
|
if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
|
|
142
144
|
if (!('address' in value) || value['address'] === undefined) return false;
|
|
143
145
|
if (!('specialDates' in value) || value['specialDates'] === undefined) return false;
|
|
@@ -160,9 +162,9 @@ export function StoreResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
160
162
|
'phone': json['phone'],
|
|
161
163
|
'longitude': json['longitude'],
|
|
162
164
|
'latitude': json['latitude'],
|
|
163
|
-
'tagLine': json['tag_line']
|
|
165
|
+
'tagLine': json['tag_line'],
|
|
164
166
|
'email': json['email'],
|
|
165
|
-
'website': json['website']
|
|
167
|
+
'website': json['website'],
|
|
166
168
|
'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
|
|
167
169
|
'suppliers': (json['suppliers'] == null ? null : (json['suppliers'] as Array<any>).map(SupplierLiteResourceFromJSON)),
|
|
168
170
|
'address': AddressResourceFromJSON(json['address']),
|
|
@@ -0,0 +1,131 @@
|
|
|
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 StoreTransactionRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface StoreTransactionRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof StoreTransactionRequest
|
|
26
|
+
*/
|
|
27
|
+
cartId?: number | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof StoreTransactionRequest
|
|
32
|
+
*/
|
|
33
|
+
orderId?: number | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof StoreTransactionRequest
|
|
38
|
+
*/
|
|
39
|
+
amount?: number | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof StoreTransactionRequest
|
|
44
|
+
*/
|
|
45
|
+
surcharge: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {StoreTransactionRequestPaymentMethodEnum}
|
|
49
|
+
* @memberof StoreTransactionRequest
|
|
50
|
+
*/
|
|
51
|
+
paymentMethod: StoreTransactionRequestPaymentMethodEnum;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof StoreTransactionRequest
|
|
56
|
+
*/
|
|
57
|
+
nonce?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof StoreTransactionRequest
|
|
62
|
+
*/
|
|
63
|
+
deviceData?: string | null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @export
|
|
69
|
+
*/
|
|
70
|
+
export const StoreTransactionRequestPaymentMethodEnum = {
|
|
71
|
+
BankDeposit: 'bank_deposit',
|
|
72
|
+
Visa: 'visa',
|
|
73
|
+
Mastercard: 'mastercard',
|
|
74
|
+
AmericanExpress: 'american_express',
|
|
75
|
+
GooglePay: 'google_pay',
|
|
76
|
+
PayPal: 'pay_pal',
|
|
77
|
+
ApplePay: 'apple_pay'
|
|
78
|
+
} as const;
|
|
79
|
+
export type StoreTransactionRequestPaymentMethodEnum = typeof StoreTransactionRequestPaymentMethodEnum[keyof typeof StoreTransactionRequestPaymentMethodEnum];
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Check if a given object implements the StoreTransactionRequest interface.
|
|
84
|
+
*/
|
|
85
|
+
export function instanceOfStoreTransactionRequest(value: object): value is StoreTransactionRequest {
|
|
86
|
+
if (!('surcharge' in value) || value['surcharge'] === undefined) return false;
|
|
87
|
+
if (!('paymentMethod' in value) || value['paymentMethod'] === undefined) return false;
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function StoreTransactionRequestFromJSON(json: any): StoreTransactionRequest {
|
|
92
|
+
return StoreTransactionRequestFromJSONTyped(json, false);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function StoreTransactionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): StoreTransactionRequest {
|
|
96
|
+
if (json == null) {
|
|
97
|
+
return json;
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'cartId': json['cart_id'] == null ? undefined : json['cart_id'],
|
|
102
|
+
'orderId': json['order_id'] == null ? undefined : json['order_id'],
|
|
103
|
+
'amount': json['amount'] == null ? undefined : json['amount'],
|
|
104
|
+
'surcharge': json['surcharge'],
|
|
105
|
+
'paymentMethod': json['payment_method'],
|
|
106
|
+
'nonce': json['nonce'] == null ? undefined : json['nonce'],
|
|
107
|
+
'deviceData': json['device_data'] == null ? undefined : json['device_data'],
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function StoreTransactionRequestToJSON(json: any): StoreTransactionRequest {
|
|
112
|
+
return StoreTransactionRequestToJSONTyped(json, false);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function StoreTransactionRequestToJSONTyped(value?: StoreTransactionRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
116
|
+
if (value == null) {
|
|
117
|
+
return value;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return {
|
|
121
|
+
|
|
122
|
+
'cart_id': value['cartId'],
|
|
123
|
+
'order_id': value['orderId'],
|
|
124
|
+
'amount': value['amount'],
|
|
125
|
+
'surcharge': value['surcharge'],
|
|
126
|
+
'payment_method': value['paymentMethod'],
|
|
127
|
+
'nonce': value['nonce'],
|
|
128
|
+
'device_data': value['deviceData'],
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
@@ -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
|
+
|