@digital8/lighting-illusions-ts-sdk 0.0.2744 → 0.0.2746

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +2 -2
  3. package/dist/apis/CouponsApi.d.ts +9 -1
  4. package/dist/apis/CouponsApi.js +42 -0
  5. package/dist/apis/StoreCreditsApi.d.ts +29 -0
  6. package/dist/apis/StoreCreditsApi.js +125 -0
  7. package/dist/apis/TransactionsApi.d.ts +12 -1
  8. package/dist/apis/TransactionsApi.js +46 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/models/AdminOrderResource.d.ts +6 -0
  12. package/dist/models/AdminOrderResource.js +4 -0
  13. package/dist/models/CreateTransactionRequest.d.ts +1 -0
  14. package/dist/models/CreateTransactionRequest.js +2 -1
  15. package/dist/models/FrontendCartResource.d.ts +25 -0
  16. package/dist/models/FrontendCartResource.js +17 -0
  17. package/dist/models/FrontendCartResourceStoreCreditsInner.d.ts +44 -0
  18. package/dist/models/FrontendCartResourceStoreCreditsInner.js +53 -0
  19. package/dist/models/FrontendOrderResource.d.ts +6 -0
  20. package/dist/models/FrontendOrderResource.js +4 -0
  21. package/dist/models/GeneratedCouponCodeResource.d.ts +32 -0
  22. package/dist/models/GeneratedCouponCodeResource.js +51 -0
  23. package/dist/models/GeneratedCouponCodeResourceArrayResponse.d.ts +33 -0
  24. package/dist/models/GeneratedCouponCodeResourceArrayResponse.js +50 -0
  25. package/dist/models/PaginatedStoreCreditListResourceResponse.d.ts +40 -0
  26. package/dist/models/PaginatedStoreCreditListResourceResponse.js +57 -0
  27. package/dist/models/PaymentMethod.d.ts +1 -0
  28. package/dist/models/PaymentMethod.js +2 -1
  29. package/dist/models/PaymentTotalsResource.d.ts +25 -0
  30. package/dist/models/PaymentTotalsResource.js +17 -0
  31. package/dist/models/SearchStoreCreditsRequest.d.ts +106 -0
  32. package/dist/models/SearchStoreCreditsRequest.js +86 -0
  33. package/dist/models/SearchTransactionsRequest.d.ts +3 -2
  34. package/dist/models/SearchTransactionsRequest.js +3 -2
  35. package/dist/models/StoreCreditListResource.d.ts +86 -0
  36. package/dist/models/StoreCreditListResource.js +80 -0
  37. package/dist/models/StoreCreditListResourceArrayResponse.d.ts +33 -0
  38. package/dist/models/StoreCreditListResourceArrayResponse.js +50 -0
  39. package/dist/models/StoreCreditLiteResource.d.ts +44 -0
  40. package/dist/models/StoreCreditLiteResource.js +59 -0
  41. package/dist/models/StoreCreditLiteResourceArrayResponse.d.ts +33 -0
  42. package/dist/models/StoreCreditLiteResourceArrayResponse.js +50 -0
  43. package/dist/models/StoreFrontendResource.d.ts +1 -1
  44. package/dist/models/StoreFrontendResource.js +3 -1
  45. package/dist/models/StoreResource.d.ts +1 -1
  46. package/dist/models/StoreResource.js +1 -3
  47. package/dist/models/TransactionListResource.d.ts +12 -8
  48. package/dist/models/TransactionListResource.js +12 -8
  49. package/dist/models/TransactionLiteResource.d.ts +12 -8
  50. package/dist/models/TransactionLiteResource.js +12 -8
  51. package/dist/models/TransactionResource.d.ts +12 -8
  52. package/dist/models/TransactionResource.js +12 -8
  53. package/dist/models/index.d.ts +9 -0
  54. package/dist/models/index.js +9 -0
  55. package/package.json +1 -1
  56. package/src/apis/CouponsApi.ts +32 -0
  57. package/src/apis/StoreCreditsApi.ts +69 -0
  58. package/src/apis/TransactionsApi.ts +44 -0
  59. package/src/apis/index.ts +1 -0
  60. package/src/models/AdminOrderResource.ts +9 -0
  61. package/src/models/CreateTransactionRequest.ts +2 -1
  62. package/src/models/FrontendCartResource.ts +43 -0
  63. package/src/models/FrontendCartResourceStoreCreditsInner.ts +81 -0
  64. package/src/models/FrontendOrderResource.ts +9 -0
  65. package/src/models/GeneratedCouponCodeResource.ts +66 -0
  66. package/src/models/GeneratedCouponCodeResourceArrayResponse.ts +73 -0
  67. package/src/models/PaginatedStoreCreditListResourceResponse.ts +90 -0
  68. package/src/models/PaymentMethod.ts +2 -1
  69. package/src/models/PaymentTotalsResource.ts +44 -0
  70. package/src/models/SearchStoreCreditsRequest.ts +161 -0
  71. package/src/models/SearchTransactionsRequest.ts +12 -4
  72. package/src/models/StoreCreditListResource.ts +143 -0
  73. package/src/models/StoreCreditListResourceArrayResponse.ts +73 -0
  74. package/src/models/StoreCreditLiteResource.ts +84 -0
  75. package/src/models/StoreCreditLiteResourceArrayResponse.ts +73 -0
  76. package/src/models/StoreFrontendResource.ts +3 -2
  77. package/src/models/StoreResource.ts +2 -3
  78. package/src/models/TransactionListResource.ts +47 -16
  79. package/src/models/TransactionLiteResource.ts +47 -16
  80. package/src/models/TransactionResource.ts +47 -16
  81. package/src/models/index.ts +9 -0
@@ -71,6 +71,8 @@ function instanceOfFrontendOrderResource(value) {
71
71
  return false;
72
72
  if (!('surchargePaid' in value) || value['surchargePaid'] === undefined)
73
73
  return false;
74
+ if (!('storeCreditPaid' in value) || value['storeCreditPaid'] === undefined)
75
+ return false;
74
76
  if (!('amountDue' in value) || value['amountDue'] === undefined)
75
77
  return false;
76
78
  return true;
@@ -108,6 +110,7 @@ function FrontendOrderResourceFromJSONTyped(json, ignoreDiscriminator) {
108
110
  'grandTotal': json['grandTotal'],
109
111
  'amountPaid': json['amountPaid'],
110
112
  'surchargePaid': json['surchargePaid'],
113
+ 'storeCreditPaid': json['storeCreditPaid'],
111
114
  'amountDue': json['amountDue'],
112
115
  };
113
116
  }
@@ -145,6 +148,7 @@ function FrontendOrderResourceToJSONTyped(value, ignoreDiscriminator) {
145
148
  'grandTotal': value['grandTotal'],
146
149
  'amountPaid': value['amountPaid'],
147
150
  'surchargePaid': value['surchargePaid'],
151
+ 'storeCreditPaid': value['storeCreditPaid'],
148
152
  'amountDue': value['amountDue'],
149
153
  };
150
154
  }
@@ -0,0 +1,32 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface GeneratedCouponCodeResource
16
+ */
17
+ export interface GeneratedCouponCodeResource {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof GeneratedCouponCodeResource
22
+ */
23
+ code: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the GeneratedCouponCodeResource interface.
27
+ */
28
+ export declare function instanceOfGeneratedCouponCodeResource(value: object): value is GeneratedCouponCodeResource;
29
+ export declare function GeneratedCouponCodeResourceFromJSON(json: any): GeneratedCouponCodeResource;
30
+ export declare function GeneratedCouponCodeResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeneratedCouponCodeResource;
31
+ export declare function GeneratedCouponCodeResourceToJSON(json: any): GeneratedCouponCodeResource;
32
+ export declare function GeneratedCouponCodeResourceToJSONTyped(value?: GeneratedCouponCodeResource | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
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.instanceOfGeneratedCouponCodeResource = instanceOfGeneratedCouponCodeResource;
17
+ exports.GeneratedCouponCodeResourceFromJSON = GeneratedCouponCodeResourceFromJSON;
18
+ exports.GeneratedCouponCodeResourceFromJSONTyped = GeneratedCouponCodeResourceFromJSONTyped;
19
+ exports.GeneratedCouponCodeResourceToJSON = GeneratedCouponCodeResourceToJSON;
20
+ exports.GeneratedCouponCodeResourceToJSONTyped = GeneratedCouponCodeResourceToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the GeneratedCouponCodeResource interface.
23
+ */
24
+ function instanceOfGeneratedCouponCodeResource(value) {
25
+ if (!('code' in value) || value['code'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function GeneratedCouponCodeResourceFromJSON(json) {
30
+ return GeneratedCouponCodeResourceFromJSONTyped(json, false);
31
+ }
32
+ function GeneratedCouponCodeResourceFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'code': json['code'],
38
+ };
39
+ }
40
+ function GeneratedCouponCodeResourceToJSON(json) {
41
+ return GeneratedCouponCodeResourceToJSONTyped(json, false);
42
+ }
43
+ function GeneratedCouponCodeResourceToJSONTyped(value, ignoreDiscriminator) {
44
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'code': value['code'],
50
+ };
51
+ }
@@ -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 { GeneratedCouponCodeResource } from './GeneratedCouponCodeResource';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface GeneratedCouponCodeResourceArrayResponse
17
+ */
18
+ export interface GeneratedCouponCodeResourceArrayResponse {
19
+ /**
20
+ *
21
+ * @type {Array<GeneratedCouponCodeResource>}
22
+ * @memberof GeneratedCouponCodeResourceArrayResponse
23
+ */
24
+ data?: Array<GeneratedCouponCodeResource>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the GeneratedCouponCodeResourceArrayResponse interface.
28
+ */
29
+ export declare function instanceOfGeneratedCouponCodeResourceArrayResponse(value: object): value is GeneratedCouponCodeResourceArrayResponse;
30
+ export declare function GeneratedCouponCodeResourceArrayResponseFromJSON(json: any): GeneratedCouponCodeResourceArrayResponse;
31
+ export declare function GeneratedCouponCodeResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeneratedCouponCodeResourceArrayResponse;
32
+ export declare function GeneratedCouponCodeResourceArrayResponseToJSON(json: any): GeneratedCouponCodeResourceArrayResponse;
33
+ export declare function GeneratedCouponCodeResourceArrayResponseToJSONTyped(value?: GeneratedCouponCodeResourceArrayResponse | 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.instanceOfGeneratedCouponCodeResourceArrayResponse = instanceOfGeneratedCouponCodeResourceArrayResponse;
17
+ exports.GeneratedCouponCodeResourceArrayResponseFromJSON = GeneratedCouponCodeResourceArrayResponseFromJSON;
18
+ exports.GeneratedCouponCodeResourceArrayResponseFromJSONTyped = GeneratedCouponCodeResourceArrayResponseFromJSONTyped;
19
+ exports.GeneratedCouponCodeResourceArrayResponseToJSON = GeneratedCouponCodeResourceArrayResponseToJSON;
20
+ exports.GeneratedCouponCodeResourceArrayResponseToJSONTyped = GeneratedCouponCodeResourceArrayResponseToJSONTyped;
21
+ var GeneratedCouponCodeResource_1 = require("./GeneratedCouponCodeResource");
22
+ /**
23
+ * Check if a given object implements the GeneratedCouponCodeResourceArrayResponse interface.
24
+ */
25
+ function instanceOfGeneratedCouponCodeResourceArrayResponse(value) {
26
+ return true;
27
+ }
28
+ function GeneratedCouponCodeResourceArrayResponseFromJSON(json) {
29
+ return GeneratedCouponCodeResourceArrayResponseFromJSONTyped(json, false);
30
+ }
31
+ function GeneratedCouponCodeResourceArrayResponseFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'data': json['data'] == null ? undefined : (json['data'].map(GeneratedCouponCodeResource_1.GeneratedCouponCodeResourceFromJSON)),
37
+ };
38
+ }
39
+ function GeneratedCouponCodeResourceArrayResponseToJSON(json) {
40
+ return GeneratedCouponCodeResourceArrayResponseToJSONTyped(json, false);
41
+ }
42
+ function GeneratedCouponCodeResourceArrayResponseToJSONTyped(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(GeneratedCouponCodeResource_1.GeneratedCouponCodeResourceToJSON)),
49
+ };
50
+ }
@@ -0,0 +1,40 @@
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 { StoreCreditListResource } from './StoreCreditListResource';
13
+ import type { PagingMetadata } from './PagingMetadata';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface PaginatedStoreCreditListResourceResponse
18
+ */
19
+ export interface PaginatedStoreCreditListResourceResponse {
20
+ /**
21
+ *
22
+ * @type {Array<StoreCreditListResource>}
23
+ * @memberof PaginatedStoreCreditListResourceResponse
24
+ */
25
+ data: Array<StoreCreditListResource>;
26
+ /**
27
+ *
28
+ * @type {PagingMetadata}
29
+ * @memberof PaginatedStoreCreditListResourceResponse
30
+ */
31
+ meta: PagingMetadata;
32
+ }
33
+ /**
34
+ * Check if a given object implements the PaginatedStoreCreditListResourceResponse interface.
35
+ */
36
+ export declare function instanceOfPaginatedStoreCreditListResourceResponse(value: object): value is PaginatedStoreCreditListResourceResponse;
37
+ export declare function PaginatedStoreCreditListResourceResponseFromJSON(json: any): PaginatedStoreCreditListResourceResponse;
38
+ export declare function PaginatedStoreCreditListResourceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedStoreCreditListResourceResponse;
39
+ export declare function PaginatedStoreCreditListResourceResponseToJSON(json: any): PaginatedStoreCreditListResourceResponse;
40
+ export declare function PaginatedStoreCreditListResourceResponseToJSONTyped(value?: PaginatedStoreCreditListResourceResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
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.instanceOfPaginatedStoreCreditListResourceResponse = instanceOfPaginatedStoreCreditListResourceResponse;
17
+ exports.PaginatedStoreCreditListResourceResponseFromJSON = PaginatedStoreCreditListResourceResponseFromJSON;
18
+ exports.PaginatedStoreCreditListResourceResponseFromJSONTyped = PaginatedStoreCreditListResourceResponseFromJSONTyped;
19
+ exports.PaginatedStoreCreditListResourceResponseToJSON = PaginatedStoreCreditListResourceResponseToJSON;
20
+ exports.PaginatedStoreCreditListResourceResponseToJSONTyped = PaginatedStoreCreditListResourceResponseToJSONTyped;
21
+ var StoreCreditListResource_1 = require("./StoreCreditListResource");
22
+ var PagingMetadata_1 = require("./PagingMetadata");
23
+ /**
24
+ * Check if a given object implements the PaginatedStoreCreditListResourceResponse interface.
25
+ */
26
+ function instanceOfPaginatedStoreCreditListResourceResponse(value) {
27
+ if (!('data' in value) || value['data'] === undefined)
28
+ return false;
29
+ if (!('meta' in value) || value['meta'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function PaginatedStoreCreditListResourceResponseFromJSON(json) {
34
+ return PaginatedStoreCreditListResourceResponseFromJSONTyped(json, false);
35
+ }
36
+ function PaginatedStoreCreditListResourceResponseFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'data': (json['data'].map(StoreCreditListResource_1.StoreCreditListResourceFromJSON)),
42
+ 'meta': (0, PagingMetadata_1.PagingMetadataFromJSON)(json['meta']),
43
+ };
44
+ }
45
+ function PaginatedStoreCreditListResourceResponseToJSON(json) {
46
+ return PaginatedStoreCreditListResourceResponseToJSONTyped(json, false);
47
+ }
48
+ function PaginatedStoreCreditListResourceResponseToJSONTyped(value, ignoreDiscriminator) {
49
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'data': (value['data'].map(StoreCreditListResource_1.StoreCreditListResourceToJSON)),
55
+ 'meta': (0, PagingMetadata_1.PagingMetadataToJSON)(value['meta']),
56
+ };
57
+ }
@@ -21,6 +21,7 @@ export declare const PaymentMethod: {
21
21
  readonly GooglePay: "google_pay";
22
22
  readonly PayPal: "pay_pal";
23
23
  readonly ApplePay: "apple_pay";
24
+ readonly StoreCredit: "store_credit";
24
25
  };
25
26
  export type PaymentMethod = typeof PaymentMethod[keyof typeof PaymentMethod];
26
27
  export declare function instanceOfPaymentMethod(value: any): boolean;
@@ -30,7 +30,8 @@ exports.PaymentMethod = {
30
30
  AmericanExpress: 'american_express',
31
31
  GooglePay: 'google_pay',
32
32
  PayPal: 'pay_pal',
33
- ApplePay: 'apple_pay'
33
+ ApplePay: 'apple_pay',
34
+ StoreCredit: 'store_credit'
34
35
  };
35
36
  function instanceOfPaymentMethod(value) {
36
37
  for (var key in exports.PaymentMethod) {
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { FrontendCartResourceStoreCreditsInner } from './FrontendCartResourceStoreCreditsInner';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -69,12 +70,36 @@ export interface PaymentTotalsResource {
69
70
  * @memberof PaymentTotalsResource
70
71
  */
71
72
  surchargePaid: number;
73
+ /**
74
+ *
75
+ * @type {number}
76
+ * @memberof PaymentTotalsResource
77
+ */
78
+ storeCreditPaid: number;
72
79
  /**
73
80
  *
74
81
  * @type {number}
75
82
  * @memberof PaymentTotalsResource
76
83
  */
77
84
  amountDue: number;
85
+ /**
86
+ *
87
+ * @type {Array<FrontendCartResourceStoreCreditsInner>}
88
+ * @memberof PaymentTotalsResource
89
+ */
90
+ storeCredits: Array<FrontendCartResourceStoreCreditsInner>;
91
+ /**
92
+ *
93
+ * @type {number}
94
+ * @memberof PaymentTotalsResource
95
+ */
96
+ storeCreditTotal: number;
97
+ /**
98
+ *
99
+ * @type {number}
100
+ * @memberof PaymentTotalsResource
101
+ */
102
+ availableStoreCreditTotal: number;
78
103
  /**
79
104
  *
80
105
  * @type {Array<object>}
@@ -18,6 +18,7 @@ exports.PaymentTotalsResourceFromJSON = PaymentTotalsResourceFromJSON;
18
18
  exports.PaymentTotalsResourceFromJSONTyped = PaymentTotalsResourceFromJSONTyped;
19
19
  exports.PaymentTotalsResourceToJSON = PaymentTotalsResourceToJSON;
20
20
  exports.PaymentTotalsResourceToJSONTyped = PaymentTotalsResourceToJSONTyped;
21
+ var FrontendCartResourceStoreCreditsInner_1 = require("./FrontendCartResourceStoreCreditsInner");
21
22
  /**
22
23
  * Check if a given object implements the PaymentTotalsResource interface.
23
24
  */
@@ -40,8 +41,16 @@ function instanceOfPaymentTotalsResource(value) {
40
41
  return false;
41
42
  if (!('surchargePaid' in value) || value['surchargePaid'] === undefined)
42
43
  return false;
44
+ if (!('storeCreditPaid' in value) || value['storeCreditPaid'] === undefined)
45
+ return false;
43
46
  if (!('amountDue' in value) || value['amountDue'] === undefined)
44
47
  return false;
48
+ if (!('storeCredits' in value) || value['storeCredits'] === undefined)
49
+ return false;
50
+ if (!('storeCreditTotal' in value) || value['storeCreditTotal'] === undefined)
51
+ return false;
52
+ if (!('availableStoreCreditTotal' in value) || value['availableStoreCreditTotal'] === undefined)
53
+ return false;
45
54
  if (!('appliedCoupons' in value) || value['appliedCoupons'] === undefined)
46
55
  return false;
47
56
  if (!('noOfItems' in value) || value['noOfItems'] === undefined)
@@ -75,7 +84,11 @@ function PaymentTotalsResourceFromJSONTyped(json, ignoreDiscriminator) {
75
84
  'finalTotal': json['finalTotal'],
76
85
  'amountPaid': json['amountPaid'],
77
86
  'surchargePaid': json['surchargePaid'],
87
+ 'storeCreditPaid': json['storeCreditPaid'],
78
88
  'amountDue': json['amountDue'],
89
+ 'storeCredits': (json['storeCredits'].map(FrontendCartResourceStoreCreditsInner_1.FrontendCartResourceStoreCreditsInnerFromJSON)),
90
+ 'storeCreditTotal': json['storeCreditTotal'],
91
+ 'availableStoreCreditTotal': json['availableStoreCreditTotal'],
79
92
  'appliedCoupons': json['appliedCoupons'],
80
93
  'noOfItems': json['noOfItems'],
81
94
  'lineItems': json['lineItems'],
@@ -104,7 +117,11 @@ function PaymentTotalsResourceToJSONTyped(value, ignoreDiscriminator) {
104
117
  'finalTotal': value['finalTotal'],
105
118
  'amountPaid': value['amountPaid'],
106
119
  'surchargePaid': value['surchargePaid'],
120
+ 'storeCreditPaid': value['storeCreditPaid'],
107
121
  'amountDue': value['amountDue'],
122
+ 'storeCredits': (value['storeCredits'].map(FrontendCartResourceStoreCreditsInner_1.FrontendCartResourceStoreCreditsInnerToJSON)),
123
+ 'storeCreditTotal': value['storeCreditTotal'],
124
+ 'availableStoreCreditTotal': value['availableStoreCreditTotal'],
108
125
  'appliedCoupons': value['appliedCoupons'],
109
126
  'noOfItems': value['noOfItems'],
110
127
  'lineItems': value['lineItems'],
@@ -0,0 +1,106 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface SearchStoreCreditsRequest
16
+ */
17
+ export interface SearchStoreCreditsRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SearchStoreCreditsRequest
22
+ */
23
+ search?: string | null;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof SearchStoreCreditsRequest
28
+ */
29
+ sortBy?: SearchStoreCreditsRequestSortByEnum;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof SearchStoreCreditsRequest
34
+ */
35
+ sortDirection?: SearchStoreCreditsRequestSortDirectionEnum;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof SearchStoreCreditsRequest
40
+ */
41
+ perPage?: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof SearchStoreCreditsRequest
46
+ */
47
+ page?: number;
48
+ /**
49
+ *
50
+ * @type {Array<string>}
51
+ * @memberof SearchStoreCreditsRequest
52
+ */
53
+ siteId?: Array<string>;
54
+ /**
55
+ *
56
+ * @type {Array<string>}
57
+ * @memberof SearchStoreCreditsRequest
58
+ */
59
+ customerId?: Array<string>;
60
+ /**
61
+ *
62
+ * @type {number}
63
+ * @memberof SearchStoreCreditsRequest
64
+ */
65
+ relatedId?: number;
66
+ /**
67
+ *
68
+ * @type {string}
69
+ * @memberof SearchStoreCreditsRequest
70
+ */
71
+ relatedType?: string;
72
+ /**
73
+ *
74
+ * @type {boolean}
75
+ * @memberof SearchStoreCreditsRequest
76
+ */
77
+ includesRelations?: boolean;
78
+ }
79
+ /**
80
+ * @export
81
+ */
82
+ export declare const SearchStoreCreditsRequestSortByEnum: {
83
+ readonly Id: "id";
84
+ readonly Code: "code";
85
+ readonly ExpiryDate: "expiry_date";
86
+ readonly OriginalAmount: "original_amount";
87
+ readonly AmountRemaining: "amount_remaining";
88
+ readonly CreatedAt: "created_at";
89
+ };
90
+ export type SearchStoreCreditsRequestSortByEnum = typeof SearchStoreCreditsRequestSortByEnum[keyof typeof SearchStoreCreditsRequestSortByEnum];
91
+ /**
92
+ * @export
93
+ */
94
+ export declare const SearchStoreCreditsRequestSortDirectionEnum: {
95
+ readonly Asc: "asc";
96
+ readonly Desc: "desc";
97
+ };
98
+ export type SearchStoreCreditsRequestSortDirectionEnum = typeof SearchStoreCreditsRequestSortDirectionEnum[keyof typeof SearchStoreCreditsRequestSortDirectionEnum];
99
+ /**
100
+ * Check if a given object implements the SearchStoreCreditsRequest interface.
101
+ */
102
+ export declare function instanceOfSearchStoreCreditsRequest(value: object): value is SearchStoreCreditsRequest;
103
+ export declare function SearchStoreCreditsRequestFromJSON(json: any): SearchStoreCreditsRequest;
104
+ export declare function SearchStoreCreditsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchStoreCreditsRequest;
105
+ export declare function SearchStoreCreditsRequestToJSON(json: any): SearchStoreCreditsRequest;
106
+ export declare function SearchStoreCreditsRequestToJSONTyped(value?: SearchStoreCreditsRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,86 @@
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.SearchStoreCreditsRequestSortDirectionEnum = exports.SearchStoreCreditsRequestSortByEnum = void 0;
17
+ exports.instanceOfSearchStoreCreditsRequest = instanceOfSearchStoreCreditsRequest;
18
+ exports.SearchStoreCreditsRequestFromJSON = SearchStoreCreditsRequestFromJSON;
19
+ exports.SearchStoreCreditsRequestFromJSONTyped = SearchStoreCreditsRequestFromJSONTyped;
20
+ exports.SearchStoreCreditsRequestToJSON = SearchStoreCreditsRequestToJSON;
21
+ exports.SearchStoreCreditsRequestToJSONTyped = SearchStoreCreditsRequestToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.SearchStoreCreditsRequestSortByEnum = {
26
+ Id: 'id',
27
+ Code: 'code',
28
+ ExpiryDate: 'expiry_date',
29
+ OriginalAmount: 'original_amount',
30
+ AmountRemaining: 'amount_remaining',
31
+ CreatedAt: 'created_at'
32
+ };
33
+ /**
34
+ * @export
35
+ */
36
+ exports.SearchStoreCreditsRequestSortDirectionEnum = {
37
+ Asc: 'asc',
38
+ Desc: 'desc'
39
+ };
40
+ /**
41
+ * Check if a given object implements the SearchStoreCreditsRequest interface.
42
+ */
43
+ function instanceOfSearchStoreCreditsRequest(value) {
44
+ return true;
45
+ }
46
+ function SearchStoreCreditsRequestFromJSON(json) {
47
+ return SearchStoreCreditsRequestFromJSONTyped(json, false);
48
+ }
49
+ function SearchStoreCreditsRequestFromJSONTyped(json, ignoreDiscriminator) {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+ 'search': json['search'] == null ? undefined : json['search'],
55
+ 'sortBy': json['sortBy'] == null ? undefined : json['sortBy'],
56
+ 'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
57
+ 'perPage': json['per_page'] == null ? undefined : json['per_page'],
58
+ 'page': json['page'] == null ? undefined : json['page'],
59
+ 'siteId': json['site_id'] == null ? undefined : json['site_id'],
60
+ 'customerId': json['customer_id'] == null ? undefined : json['customer_id'],
61
+ 'relatedId': json['related_id'] == null ? undefined : json['related_id'],
62
+ 'relatedType': json['related_type'] == null ? undefined : json['related_type'],
63
+ 'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
64
+ };
65
+ }
66
+ function SearchStoreCreditsRequestToJSON(json) {
67
+ return SearchStoreCreditsRequestToJSONTyped(json, false);
68
+ }
69
+ function SearchStoreCreditsRequestToJSONTyped(value, ignoreDiscriminator) {
70
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
71
+ if (value == null) {
72
+ return value;
73
+ }
74
+ return {
75
+ 'search': value['search'],
76
+ 'sortBy': value['sortBy'],
77
+ 'sortDirection': value['sortDirection'],
78
+ 'per_page': value['perPage'],
79
+ 'page': value['page'],
80
+ 'site_id': value['siteId'],
81
+ 'customer_id': value['customerId'],
82
+ 'related_id': value['relatedId'],
83
+ 'related_type': value['relatedType'],
84
+ 'includes_relations': value['includesRelations'],
85
+ };
86
+ }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { PaymentMethod } from './PaymentMethod';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -59,10 +60,10 @@ export interface SearchTransactionsRequest {
59
60
  type?: Array<string>;
60
61
  /**
61
62
  *
62
- * @type {Array<string>}
63
+ * @type {Array<PaymentMethod>}
63
64
  * @memberof SearchTransactionsRequest
64
65
  */
65
- paymentMethod?: Array<string>;
66
+ paymentMethod?: Array<PaymentMethod>;
66
67
  /**
67
68
  *
68
69
  * @type {Array<string>}
@@ -19,6 +19,7 @@ exports.SearchTransactionsRequestFromJSON = SearchTransactionsRequestFromJSON;
19
19
  exports.SearchTransactionsRequestFromJSONTyped = SearchTransactionsRequestFromJSONTyped;
20
20
  exports.SearchTransactionsRequestToJSON = SearchTransactionsRequestToJSON;
21
21
  exports.SearchTransactionsRequestToJSONTyped = SearchTransactionsRequestToJSONTyped;
22
+ var PaymentMethod_1 = require("./PaymentMethod");
22
23
  /**
23
24
  * @export
24
25
  */
@@ -62,7 +63,7 @@ function SearchTransactionsRequestFromJSONTyped(json, ignoreDiscriminator) {
62
63
  'page': json['page'] == null ? undefined : json['page'],
63
64
  'paymentSource': json['payment_source'] == null ? undefined : json['payment_source'],
64
65
  'type': json['type'] == null ? undefined : json['type'],
65
- 'paymentMethod': json['payment_method'] == null ? undefined : json['payment_method'],
66
+ 'paymentMethod': json['payment_method'] == null ? undefined : (json['payment_method'].map(PaymentMethod_1.PaymentMethodFromJSON)),
66
67
  'status': json['status'] == null ? undefined : json['status'],
67
68
  'beforeCreatedAt': json['before_created_at'] == null ? undefined : (new Date(json['before_created_at'])),
68
69
  'afterCreatedAt': json['after_created_at'] == null ? undefined : (new Date(json['after_created_at'])),
@@ -87,7 +88,7 @@ function SearchTransactionsRequestToJSONTyped(value, ignoreDiscriminator) {
87
88
  'page': value['page'],
88
89
  'payment_source': value['paymentSource'],
89
90
  'type': value['type'],
90
- 'payment_method': value['paymentMethod'],
91
+ 'payment_method': value['paymentMethod'] == null ? undefined : (value['paymentMethod'].map(PaymentMethod_1.PaymentMethodToJSON)),
91
92
  'status': value['status'],
92
93
  'before_created_at': value['beforeCreatedAt'] == null ? undefined : ((value['beforeCreatedAt']).toISOString()),
93
94
  'after_created_at': value['afterCreatedAt'] == null ? undefined : ((value['afterCreatedAt']).toISOString()),