@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
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfTransactionListResource = instanceOfTransactionListResource;
|
|
17
|
+
exports.TransactionListResourceFromJSON = TransactionListResourceFromJSON;
|
|
18
|
+
exports.TransactionListResourceFromJSONTyped = TransactionListResourceFromJSONTyped;
|
|
19
|
+
exports.TransactionListResourceToJSON = TransactionListResourceToJSON;
|
|
20
|
+
exports.TransactionListResourceToJSONTyped = TransactionListResourceToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the TransactionListResource interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfTransactionListResource(value) {
|
|
25
|
+
if (!('paymentSource' in value) || value['paymentSource'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('paymentMethod' in value) || value['paymentMethod'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('amount' in value) || value['amount'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('surcharge' in value) || value['surcharge'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('totalAmount' in value) || value['totalAmount'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('refundedAmount' in value) || value['refundedAmount'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('unrefundedAmount' in value) || value['unrefundedAmount'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('reference' in value) || value['reference'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
function TransactionListResourceFromJSON(json) {
|
|
48
|
+
return TransactionListResourceFromJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function TransactionListResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
56
|
+
'orderId': json['order_id'] == null ? undefined : json['order_id'],
|
|
57
|
+
'cartId': json['cart_id'] == null ? undefined : json['cart_id'],
|
|
58
|
+
'adminId': json['admin_id'] == null ? undefined : json['admin_id'],
|
|
59
|
+
'paymentSource': json['payment_source'],
|
|
60
|
+
'paymentMethod': json['payment_method'],
|
|
61
|
+
'type': json['type'],
|
|
62
|
+
'status': json['status'],
|
|
63
|
+
'amount': json['amount'],
|
|
64
|
+
'surcharge': json['surcharge'],
|
|
65
|
+
'totalAmount': json['total_amount'],
|
|
66
|
+
'refundedAmount': json['refunded_amount'],
|
|
67
|
+
'unrefundedAmount': json['unrefunded_amount'],
|
|
68
|
+
'reference': json['reference'],
|
|
69
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
70
|
+
'extendedData': json['extended_data'] == null ? undefined : json['extended_data'],
|
|
71
|
+
'riskScore': json['risk_score'] == null ? undefined : json['risk_score'],
|
|
72
|
+
'fraudDecision': json['fraud_decision'] == null ? undefined : json['fraud_decision'],
|
|
73
|
+
'refundedTransactionId': json['refunded_transaction_id'] == null ? undefined : json['refunded_transaction_id'],
|
|
74
|
+
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
75
|
+
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function TransactionListResourceToJSON(json) {
|
|
79
|
+
return TransactionListResourceToJSONTyped(json, false);
|
|
80
|
+
}
|
|
81
|
+
function TransactionListResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
82
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
'id': value['id'],
|
|
88
|
+
'order_id': value['orderId'],
|
|
89
|
+
'cart_id': value['cartId'],
|
|
90
|
+
'admin_id': value['adminId'],
|
|
91
|
+
'payment_source': value['paymentSource'],
|
|
92
|
+
'payment_method': value['paymentMethod'],
|
|
93
|
+
'type': value['type'],
|
|
94
|
+
'status': value['status'],
|
|
95
|
+
'amount': value['amount'],
|
|
96
|
+
'surcharge': value['surcharge'],
|
|
97
|
+
'total_amount': value['totalAmount'],
|
|
98
|
+
'refunded_amount': value['refundedAmount'],
|
|
99
|
+
'unrefunded_amount': value['unrefundedAmount'],
|
|
100
|
+
'reference': value['reference'],
|
|
101
|
+
'description': value['description'],
|
|
102
|
+
'extended_data': value['extendedData'],
|
|
103
|
+
'risk_score': value['riskScore'],
|
|
104
|
+
'fraud_decision': value['fraudDecision'],
|
|
105
|
+
'refunded_transaction_id': value['refundedTransactionId'],
|
|
106
|
+
'created_at': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
107
|
+
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My API
|
|
3
|
+
* API documentation for my Laravel app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { TransactionListResource } from './TransactionListResource';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface TransactionListResourceArrayResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface TransactionListResourceArrayResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<TransactionListResource>}
|
|
22
|
+
* @memberof TransactionListResourceArrayResponse
|
|
23
|
+
*/
|
|
24
|
+
data?: Array<TransactionListResource>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the TransactionListResourceArrayResponse interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfTransactionListResourceArrayResponse(value: object): value is TransactionListResourceArrayResponse;
|
|
30
|
+
export declare function TransactionListResourceArrayResponseFromJSON(json: any): TransactionListResourceArrayResponse;
|
|
31
|
+
export declare function TransactionListResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionListResourceArrayResponse;
|
|
32
|
+
export declare function TransactionListResourceArrayResponseToJSON(json: any): TransactionListResourceArrayResponse;
|
|
33
|
+
export declare function TransactionListResourceArrayResponseToJSONTyped(value?: TransactionListResourceArrayResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfTransactionListResourceArrayResponse = instanceOfTransactionListResourceArrayResponse;
|
|
17
|
+
exports.TransactionListResourceArrayResponseFromJSON = TransactionListResourceArrayResponseFromJSON;
|
|
18
|
+
exports.TransactionListResourceArrayResponseFromJSONTyped = TransactionListResourceArrayResponseFromJSONTyped;
|
|
19
|
+
exports.TransactionListResourceArrayResponseToJSON = TransactionListResourceArrayResponseToJSON;
|
|
20
|
+
exports.TransactionListResourceArrayResponseToJSONTyped = TransactionListResourceArrayResponseToJSONTyped;
|
|
21
|
+
var TransactionListResource_1 = require("./TransactionListResource");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the TransactionListResourceArrayResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfTransactionListResourceArrayResponse(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function TransactionListResourceArrayResponseFromJSON(json) {
|
|
29
|
+
return TransactionListResourceArrayResponseFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function TransactionListResourceArrayResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'data': json['data'] == null ? undefined : (json['data'].map(TransactionListResource_1.TransactionListResourceFromJSON)),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function TransactionListResourceArrayResponseToJSON(json) {
|
|
40
|
+
return TransactionListResourceArrayResponseToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function TransactionListResourceArrayResponseToJSONTyped(value, ignoreDiscriminator) {
|
|
43
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'data': value['data'] == null ? undefined : (value['data'].map(TransactionListResource_1.TransactionListResourceToJSON)),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -21,6 +21,24 @@ export interface TransactionResource {
|
|
|
21
21
|
* @memberof TransactionResource
|
|
22
22
|
*/
|
|
23
23
|
id?: number | null;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof TransactionResource
|
|
28
|
+
*/
|
|
29
|
+
orderId?: number | null;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof TransactionResource
|
|
34
|
+
*/
|
|
35
|
+
cartId?: number | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof TransactionResource
|
|
40
|
+
*/
|
|
41
|
+
adminId?: number | null;
|
|
24
42
|
/**
|
|
25
43
|
*
|
|
26
44
|
* @type {string}
|
|
@@ -117,6 +135,12 @@ export interface TransactionResource {
|
|
|
117
135
|
* @memberof TransactionResource
|
|
118
136
|
*/
|
|
119
137
|
createdAt?: Date | null;
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
* @type {Date}
|
|
141
|
+
* @memberof TransactionResource
|
|
142
|
+
*/
|
|
143
|
+
updatedAt?: Date | null;
|
|
120
144
|
}
|
|
121
145
|
/**
|
|
122
146
|
* Check if a given object implements the TransactionResource interface.
|
|
@@ -53,6 +53,9 @@ function TransactionResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
53
53
|
}
|
|
54
54
|
return {
|
|
55
55
|
'id': json['id'] == null ? undefined : json['id'],
|
|
56
|
+
'orderId': json['order_id'] == null ? undefined : json['order_id'],
|
|
57
|
+
'cartId': json['cart_id'] == null ? undefined : json['cart_id'],
|
|
58
|
+
'adminId': json['admin_id'] == null ? undefined : json['admin_id'],
|
|
56
59
|
'paymentSource': json['payment_source'],
|
|
57
60
|
'paymentMethod': json['payment_method'],
|
|
58
61
|
'type': json['type'],
|
|
@@ -69,6 +72,7 @@ function TransactionResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
69
72
|
'fraudDecision': json['fraud_decision'] == null ? undefined : json['fraud_decision'],
|
|
70
73
|
'refundedTransactionId': json['refunded_transaction_id'] == null ? undefined : json['refunded_transaction_id'],
|
|
71
74
|
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
75
|
+
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
72
76
|
};
|
|
73
77
|
}
|
|
74
78
|
function TransactionResourceToJSON(json) {
|
|
@@ -81,6 +85,9 @@ function TransactionResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
81
85
|
}
|
|
82
86
|
return {
|
|
83
87
|
'id': value['id'],
|
|
88
|
+
'order_id': value['orderId'],
|
|
89
|
+
'cart_id': value['cartId'],
|
|
90
|
+
'admin_id': value['adminId'],
|
|
84
91
|
'payment_source': value['paymentSource'],
|
|
85
92
|
'payment_method': value['paymentMethod'],
|
|
86
93
|
'type': value['type'],
|
|
@@ -97,5 +104,6 @@ function TransactionResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
97
104
|
'fraud_decision': value['fraudDecision'],
|
|
98
105
|
'refunded_transaction_id': value['refundedTransactionId'],
|
|
99
106
|
'created_at': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
107
|
+
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
100
108
|
};
|
|
101
109
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -266,6 +266,7 @@ export * from './PaginatedSupplierResourceResponse';
|
|
|
266
266
|
export * from './PaginatedTagListResourceResponse';
|
|
267
267
|
export * from './PaginatedTagLiteResourceResponse';
|
|
268
268
|
export * from './PaginatedTagResourceResponse';
|
|
269
|
+
export * from './PaginatedTransactionListResourceResponse';
|
|
269
270
|
export * from './PaginatedTransactionResourceResponse';
|
|
270
271
|
export * from './PagingMetadata';
|
|
271
272
|
export * from './PaymentMethod';
|
|
@@ -459,8 +460,8 @@ export * from './TagLiteResourceArrayResponse';
|
|
|
459
460
|
export * from './TagResource';
|
|
460
461
|
export * from './TagResourceArrayResponse';
|
|
461
462
|
export * from './TagType';
|
|
462
|
-
export * from './
|
|
463
|
-
export * from './
|
|
463
|
+
export * from './TransactionListResource';
|
|
464
|
+
export * from './TransactionListResourceArrayResponse';
|
|
464
465
|
export * from './TransactionResource';
|
|
465
466
|
export * from './TransactionResourceArrayResponse';
|
|
466
467
|
export * from './TransactionType';
|
package/dist/models/index.js
CHANGED
|
@@ -284,6 +284,7 @@ __exportStar(require("./PaginatedSupplierResourceResponse"), exports);
|
|
|
284
284
|
__exportStar(require("./PaginatedTagListResourceResponse"), exports);
|
|
285
285
|
__exportStar(require("./PaginatedTagLiteResourceResponse"), exports);
|
|
286
286
|
__exportStar(require("./PaginatedTagResourceResponse"), exports);
|
|
287
|
+
__exportStar(require("./PaginatedTransactionListResourceResponse"), exports);
|
|
287
288
|
__exportStar(require("./PaginatedTransactionResourceResponse"), exports);
|
|
288
289
|
__exportStar(require("./PagingMetadata"), exports);
|
|
289
290
|
__exportStar(require("./PaymentMethod"), exports);
|
|
@@ -477,8 +478,8 @@ __exportStar(require("./TagLiteResourceArrayResponse"), exports);
|
|
|
477
478
|
__exportStar(require("./TagResource"), exports);
|
|
478
479
|
__exportStar(require("./TagResourceArrayResponse"), exports);
|
|
479
480
|
__exportStar(require("./TagType"), exports);
|
|
480
|
-
__exportStar(require("./
|
|
481
|
-
__exportStar(require("./
|
|
481
|
+
__exportStar(require("./TransactionListResource"), exports);
|
|
482
|
+
__exportStar(require("./TransactionListResourceArrayResponse"), exports);
|
|
482
483
|
__exportStar(require("./TransactionResource"), exports);
|
|
483
484
|
__exportStar(require("./TransactionResourceArrayResponse"), exports);
|
|
484
485
|
__exportStar(require("./TransactionType"), exports);
|
|
@@ -21,7 +21,6 @@ Name | Type
|
|
|
21
21
|
`customer` | [CustomerListResource](CustomerListResource.md)
|
|
22
22
|
`status` | Array<number>
|
|
23
23
|
`lineItems` | [Array<LineItemListResource>](LineItemListResource.md)
|
|
24
|
-
`transactions` | [Array<TransactionLiteResource>](TransactionLiteResource.md)
|
|
25
24
|
|
|
26
25
|
## Example
|
|
27
26
|
|
|
@@ -45,7 +44,6 @@ const example = {
|
|
|
45
44
|
"customer": null,
|
|
46
45
|
"status": null,
|
|
47
46
|
"lineItems": null,
|
|
48
|
-
"transactions": null,
|
|
49
47
|
} satisfies OrderListResource
|
|
50
48
|
|
|
51
49
|
console.log(example)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# PaginatedTransactionListResourceResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<TransactionListResource>](TransactionListResource.md)
|
|
10
|
+
`meta` | [PagingMetadata](PagingMetadata.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { PaginatedTransactionListResourceResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"data": null,
|
|
20
|
+
"meta": null,
|
|
21
|
+
} satisfies PaginatedTransactionListResourceResponse
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as PaginatedTransactionListResourceResponse
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -1,36 +1,62 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# TransactionListResource
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`orderId` | number
|
|
11
|
+
`cartId` | number
|
|
12
|
+
`adminId` | number
|
|
13
|
+
`paymentSource` | string
|
|
9
14
|
`paymentMethod` | string
|
|
10
15
|
`type` | string
|
|
11
16
|
`status` | string
|
|
12
17
|
`amount` | number
|
|
13
18
|
`surcharge` | number
|
|
14
19
|
`totalAmount` | number
|
|
20
|
+
`refundedAmount` | number
|
|
21
|
+
`unrefundedAmount` | number
|
|
15
22
|
`reference` | string
|
|
23
|
+
`description` | string
|
|
24
|
+
`extendedData` | string
|
|
25
|
+
`riskScore` | string
|
|
26
|
+
`fraudDecision` | string
|
|
27
|
+
`refundedTransactionId` | number
|
|
16
28
|
`createdAt` | Date
|
|
29
|
+
`updatedAt` | Date
|
|
17
30
|
|
|
18
31
|
## Example
|
|
19
32
|
|
|
20
33
|
```typescript
|
|
21
|
-
import type {
|
|
34
|
+
import type { TransactionListResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
22
35
|
|
|
23
36
|
// TODO: Update the object below with actual values
|
|
24
37
|
const example = {
|
|
38
|
+
"id": null,
|
|
39
|
+
"orderId": null,
|
|
40
|
+
"cartId": null,
|
|
41
|
+
"adminId": null,
|
|
42
|
+
"paymentSource": null,
|
|
25
43
|
"paymentMethod": null,
|
|
26
44
|
"type": null,
|
|
27
45
|
"status": null,
|
|
28
46
|
"amount": null,
|
|
29
47
|
"surcharge": null,
|
|
30
48
|
"totalAmount": null,
|
|
49
|
+
"refundedAmount": null,
|
|
50
|
+
"unrefundedAmount": null,
|
|
31
51
|
"reference": null,
|
|
52
|
+
"description": null,
|
|
53
|
+
"extendedData": null,
|
|
54
|
+
"riskScore": null,
|
|
55
|
+
"fraudDecision": null,
|
|
56
|
+
"refundedTransactionId": null,
|
|
32
57
|
"createdAt": null,
|
|
33
|
-
|
|
58
|
+
"updatedAt": null,
|
|
59
|
+
} satisfies TransactionListResource
|
|
34
60
|
|
|
35
61
|
console.log(example)
|
|
36
62
|
|
|
@@ -39,7 +65,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
39
65
|
console.log(exampleJSON)
|
|
40
66
|
|
|
41
67
|
// Parse the JSON string back to an object
|
|
42
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
68
|
+
const exampleParsed = JSON.parse(exampleJSON) as TransactionListResource
|
|
43
69
|
console.log(exampleParsed)
|
|
44
70
|
```
|
|
45
71
|
|
package/docs/{TransactionLiteResourceArrayResponse.md → TransactionListResourceArrayResponse.md}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# TransactionListResourceArrayResponse
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`data` | [Array<
|
|
9
|
+
`data` | [Array<TransactionListResource>](TransactionListResource.md)
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import type {
|
|
14
|
+
import type { TransactionListResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
15
|
|
|
16
16
|
// TODO: Update the object below with actual values
|
|
17
17
|
const example = {
|
|
18
18
|
"data": null,
|
|
19
|
-
} satisfies
|
|
19
|
+
} satisfies TransactionListResourceArrayResponse
|
|
20
20
|
|
|
21
21
|
console.log(example)
|
|
22
22
|
|
|
@@ -25,7 +25,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
25
25
|
console.log(exampleJSON)
|
|
26
26
|
|
|
27
27
|
// Parse the JSON string back to an object
|
|
28
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as TransactionListResourceArrayResponse
|
|
29
29
|
console.log(exampleParsed)
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`id` | number
|
|
10
|
+
`orderId` | number
|
|
11
|
+
`cartId` | number
|
|
12
|
+
`adminId` | number
|
|
10
13
|
`paymentSource` | string
|
|
11
14
|
`paymentMethod` | string
|
|
12
15
|
`type` | string
|
|
@@ -23,6 +26,7 @@ Name | Type
|
|
|
23
26
|
`fraudDecision` | string
|
|
24
27
|
`refundedTransactionId` | number
|
|
25
28
|
`createdAt` | Date
|
|
29
|
+
`updatedAt` | Date
|
|
26
30
|
|
|
27
31
|
## Example
|
|
28
32
|
|
|
@@ -32,6 +36,9 @@ import type { TransactionResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
|
32
36
|
// TODO: Update the object below with actual values
|
|
33
37
|
const example = {
|
|
34
38
|
"id": null,
|
|
39
|
+
"orderId": null,
|
|
40
|
+
"cartId": null,
|
|
41
|
+
"adminId": null,
|
|
35
42
|
"paymentSource": null,
|
|
36
43
|
"paymentMethod": null,
|
|
37
44
|
"type": null,
|
|
@@ -48,6 +55,7 @@ const example = {
|
|
|
48
55
|
"fraudDecision": null,
|
|
49
56
|
"refundedTransactionId": null,
|
|
50
57
|
"createdAt": null,
|
|
58
|
+
"updatedAt": null,
|
|
51
59
|
} satisfies TransactionResource
|
|
52
60
|
|
|
53
61
|
console.log(example)
|
package/docs/TransactionsApi.md
CHANGED
|
@@ -12,7 +12,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
12
12
|
|
|
13
13
|
## indexTransaction
|
|
14
14
|
|
|
15
|
-
>
|
|
15
|
+
> PaginatedTransactionListResourceResponse indexTransaction(indexTransactionRequest)
|
|
16
16
|
|
|
17
17
|
Auto-generated: indexTransaction
|
|
18
18
|
|
|
@@ -55,7 +55,7 @@ example().catch(console.error);
|
|
|
55
55
|
|
|
56
56
|
### Return type
|
|
57
57
|
|
|
58
|
-
[**
|
|
58
|
+
[**PaginatedTransactionListResourceResponse**](PaginatedTransactionListResourceResponse.md)
|
|
59
59
|
|
|
60
60
|
### Authorization
|
|
61
61
|
|
|
@@ -70,7 +70,7 @@ No authorization required
|
|
|
70
70
|
### HTTP response details
|
|
71
71
|
| Status code | Description | Response headers |
|
|
72
72
|
|-------------|-------------|------------------|
|
|
73
|
-
| **200** | Paginated response \\JsonResponse<\\ResourcePaginator<\\
|
|
73
|
+
| **200** | Paginated response \\JsonResponse<\\ResourcePaginator<\\TransactionListResource[]>> | - |
|
|
74
74
|
|
|
75
75
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
76
76
|
|
package/package.json
CHANGED
|
@@ -24,10 +24,10 @@ import {
|
|
|
24
24
|
IndexTransactionRequestToJSON,
|
|
25
25
|
} from '../models/IndexTransactionRequest';
|
|
26
26
|
import {
|
|
27
|
-
type
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} from '../models/
|
|
27
|
+
type PaginatedTransactionListResourceResponse,
|
|
28
|
+
PaginatedTransactionListResourceResponseFromJSON,
|
|
29
|
+
PaginatedTransactionListResourceResponseToJSON,
|
|
30
|
+
} from '../models/PaginatedTransactionListResourceResponse';
|
|
31
31
|
import {
|
|
32
32
|
type RefundTransactionRequest,
|
|
33
33
|
RefundTransactionRequestFromJSON,
|
|
@@ -87,17 +87,17 @@ export class TransactionsApi extends runtime.BaseAPI {
|
|
|
87
87
|
/**
|
|
88
88
|
* Auto-generated: indexTransaction
|
|
89
89
|
*/
|
|
90
|
-
async indexTransactionRaw(requestParameters: IndexTransactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
90
|
+
async indexTransactionRaw(requestParameters: IndexTransactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedTransactionListResourceResponse>> {
|
|
91
91
|
const requestOptions = await this.indexTransactionRequestOpts(requestParameters);
|
|
92
92
|
const response = await this.request(requestOptions, initOverrides);
|
|
93
93
|
|
|
94
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
94
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTransactionListResourceResponseFromJSON(jsonValue));
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* Auto-generated: indexTransaction
|
|
99
99
|
*/
|
|
100
|
-
async indexTransaction(requestParameters: IndexTransactionOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
100
|
+
async indexTransaction(requestParameters: IndexTransactionOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedTransactionListResourceResponse> {
|
|
101
101
|
const response = await this.indexTransactionRaw(requestParameters, initOverrides);
|
|
102
102
|
return await response.value();
|
|
103
103
|
}
|
|
@@ -24,7 +24,7 @@ export interface AddressFrontendResource {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof AddressFrontendResource
|
|
26
26
|
*/
|
|
27
|
-
company
|
|
27
|
+
company?: string | null;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
@@ -73,7 +73,6 @@ export interface AddressFrontendResource {
|
|
|
73
73
|
* Check if a given object implements the AddressFrontendResource interface.
|
|
74
74
|
*/
|
|
75
75
|
export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
|
|
76
|
-
if (!('company' in value) || value['company'] === undefined) return false;
|
|
77
76
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
78
77
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
79
78
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
@@ -93,7 +92,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
93
92
|
}
|
|
94
93
|
return {
|
|
95
94
|
|
|
96
|
-
'company': json['company'],
|
|
95
|
+
'company': json['company'] == null ? undefined : json['company'],
|
|
97
96
|
'line1': json['line1'],
|
|
98
97
|
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
99
98
|
'postcode': json['postcode'],
|
|
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
|
|
|
74
74
|
* @type {string}
|
|
75
75
|
* @memberof ExternalApiLogResource
|
|
76
76
|
*/
|
|
77
|
-
requestPayload
|
|
77
|
+
requestPayload: string;
|
|
78
78
|
/**
|
|
79
79
|
*
|
|
80
80
|
* @type {string}
|
|
@@ -106,6 +106,7 @@ export function instanceOfExternalApiLogResource(value: object): value is Extern
|
|
|
106
106
|
if (!('exteranlApiLoggableId' in value) || value['exteranlApiLoggableId'] === undefined) return false;
|
|
107
107
|
if (!('endpoint' in value) || value['endpoint'] === undefined) return false;
|
|
108
108
|
if (!('responseCode' in value) || value['responseCode'] === undefined) return false;
|
|
109
|
+
if (!('requestPayload' in value) || value['requestPayload'] === undefined) return false;
|
|
109
110
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
|
|
110
111
|
if (!('site' in value) || value['site'] === undefined) return false;
|
|
111
112
|
return true;
|
|
@@ -128,7 +129,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
128
129
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
129
130
|
'endpoint': json['endpoint'],
|
|
130
131
|
'responseCode': json['responseCode'],
|
|
131
|
-
'requestPayload': json['requestPayload']
|
|
132
|
+
'requestPayload': json['requestPayload'],
|
|
132
133
|
'responsePayload': json['responsePayload'],
|
|
133
134
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
134
135
|
'site': SiteLiteResourceFromJSON(json['site']),
|