@digital8/lighting-illusions-ts-sdk 0.0.2061 → 0.0.2063

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 (76) hide show
  1. package/.openapi-generator/FILES +18 -0
  2. package/README.md +12 -2
  3. package/dist/apis/OrdersApi.d.ts +17 -0
  4. package/dist/apis/OrdersApi.js +60 -0
  5. package/dist/models/AddressFrontendResource.d.ts +2 -2
  6. package/dist/models/AddressFrontendResource.js +4 -4
  7. package/dist/models/AddressResource.d.ts +2 -2
  8. package/dist/models/AddressResource.js +6 -2
  9. package/dist/models/AdminOrderLineItemResource.d.ts +93 -0
  10. package/dist/models/AdminOrderLineItemResource.js +90 -0
  11. package/dist/models/AdminOrderLineItemResourceArrayResponse.d.ts +33 -0
  12. package/dist/models/AdminOrderLineItemResourceArrayResponse.js +50 -0
  13. package/dist/models/AdminOrderResource.d.ts +16 -3
  14. package/dist/models/AdminOrderResource.js +12 -3
  15. package/dist/models/ExternalApiLogResource.d.ts +1 -1
  16. package/dist/models/ExternalApiLogResource.js +1 -3
  17. package/dist/models/OrderFulfillmentLineItemResource.d.ts +45 -0
  18. package/dist/models/OrderFulfillmentLineItemResource.js +60 -0
  19. package/dist/models/OrderFulfillmentLineItemResourceArrayResponse.d.ts +33 -0
  20. package/dist/models/OrderFulfillmentLineItemResourceArrayResponse.js +50 -0
  21. package/dist/models/OrderFulfillmentResource.d.ts +86 -0
  22. package/dist/models/OrderFulfillmentResource.js +77 -0
  23. package/dist/models/OrderFulfillmentResourceArrayResponse.d.ts +33 -0
  24. package/dist/models/OrderFulfillmentResourceArrayResponse.js +50 -0
  25. package/dist/models/OrderStatusId.d.ts +37 -0
  26. package/dist/models/OrderStatusId.js +63 -0
  27. package/dist/models/PaginatedOrderFulfillmentResourceResponse.d.ts +40 -0
  28. package/dist/models/PaginatedOrderFulfillmentResourceResponse.js +57 -0
  29. package/dist/models/SearchOrderFulfillmentsRequest.d.ts +120 -0
  30. package/dist/models/SearchOrderFulfillmentsRequest.js +88 -0
  31. package/dist/models/StoreFrontendResource.d.ts +1 -1
  32. package/dist/models/StoreFrontendResource.js +3 -1
  33. package/dist/models/StoreListResource.d.ts +1 -1
  34. package/dist/models/StoreListResource.js +3 -1
  35. package/dist/models/StoreResource.d.ts +2 -2
  36. package/dist/models/StoreResource.js +6 -2
  37. package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
  38. package/dist/models/StoreSpecialDateFrontendResource.js +1 -3
  39. package/dist/models/StoreSpecialDateResource.d.ts +2 -2
  40. package/dist/models/StoreSpecialDateResource.js +1 -3
  41. package/dist/models/index.d.ts +9 -0
  42. package/dist/models/index.js +9 -0
  43. package/docs/AdminOrderLineItemResource.md +54 -0
  44. package/docs/AdminOrderLineItemResourceArrayResponse.md +34 -0
  45. package/docs/AdminOrderResource.md +5 -1
  46. package/docs/OrderFulfillmentLineItemResource.md +38 -0
  47. package/docs/OrderFulfillmentLineItemResourceArrayResponse.md +34 -0
  48. package/docs/OrderFulfillmentResource.md +52 -0
  49. package/docs/OrderFulfillmentResourceArrayResponse.md +34 -0
  50. package/docs/OrderStatusId.md +32 -0
  51. package/docs/OrdersApi.md +66 -0
  52. package/docs/PaginatedOrderFulfillmentResourceResponse.md +36 -0
  53. package/docs/SearchOrderFulfillmentsRequest.md +58 -0
  54. package/docs/StoreSpecialDateFrontendResource.md +1 -1
  55. package/docs/StoreSpecialDateResource.md +1 -1
  56. package/package.json +1 -1
  57. package/src/apis/OrdersApi.ts +54 -0
  58. package/src/models/AddressFrontendResource.ts +5 -5
  59. package/src/models/AddressResource.ts +6 -4
  60. package/src/models/AdminOrderLineItemResource.ts +163 -0
  61. package/src/models/AdminOrderLineItemResourceArrayResponse.ts +73 -0
  62. package/src/models/AdminOrderResource.ts +36 -11
  63. package/src/models/ExternalApiLogResource.ts +2 -3
  64. package/src/models/OrderFulfillmentLineItemResource.ts +92 -0
  65. package/src/models/OrderFulfillmentLineItemResourceArrayResponse.ts +73 -0
  66. package/src/models/OrderFulfillmentResource.ts +142 -0
  67. package/src/models/OrderFulfillmentResourceArrayResponse.ts +73 -0
  68. package/src/models/OrderStatusId.ts +65 -0
  69. package/src/models/PaginatedOrderFulfillmentResourceResponse.ts +90 -0
  70. package/src/models/SearchOrderFulfillmentsRequest.ts +181 -0
  71. package/src/models/StoreFrontendResource.ts +3 -2
  72. package/src/models/StoreListResource.ts +3 -2
  73. package/src/models/StoreResource.ts +6 -4
  74. package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
  75. package/src/models/StoreSpecialDateResource.ts +3 -4
  76. package/src/models/index.ts +9 -0
@@ -0,0 +1,34 @@
1
+
2
+ # OrderFulfillmentLineItemResourceArrayResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [Array<OrderFulfillmentLineItemResource>](OrderFulfillmentLineItemResource.md)
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { OrderFulfillmentLineItemResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "data": null,
19
+ } satisfies OrderFulfillmentLineItemResourceArrayResponse
20
+
21
+ console.log(example)
22
+
23
+ // Convert the instance to a JSON string
24
+ const exampleJSON: string = JSON.stringify(example)
25
+ console.log(exampleJSON)
26
+
27
+ // Parse the JSON string back to an object
28
+ const exampleParsed = JSON.parse(exampleJSON) as OrderFulfillmentLineItemResourceArrayResponse
29
+ console.log(exampleParsed)
30
+ ```
31
+
32
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
+
34
+
@@ -0,0 +1,52 @@
1
+
2
+ # OrderFulfillmentResource
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | number
10
+ `orderId` | number
11
+ `dateShipped` | Date
12
+ `trackingNumber` | string
13
+ `trackingUrl` | string
14
+ `trackingCompany` | string
15
+ `docnum` | string
16
+ `createdAt` | Date
17
+ `updatedAt` | Date
18
+ `orderFulfillmentLineItems` | object
19
+
20
+ ## Example
21
+
22
+ ```typescript
23
+ import type { OrderFulfillmentResource } from '@digital8/lighting-illusions-ts-sdk'
24
+
25
+ // TODO: Update the object below with actual values
26
+ const example = {
27
+ "id": null,
28
+ "orderId": null,
29
+ "dateShipped": null,
30
+ "trackingNumber": null,
31
+ "trackingUrl": null,
32
+ "trackingCompany": null,
33
+ "docnum": null,
34
+ "createdAt": null,
35
+ "updatedAt": null,
36
+ "orderFulfillmentLineItems": null,
37
+ } satisfies OrderFulfillmentResource
38
+
39
+ console.log(example)
40
+
41
+ // Convert the instance to a JSON string
42
+ const exampleJSON: string = JSON.stringify(example)
43
+ console.log(exampleJSON)
44
+
45
+ // Parse the JSON string back to an object
46
+ const exampleParsed = JSON.parse(exampleJSON) as OrderFulfillmentResource
47
+ console.log(exampleParsed)
48
+ ```
49
+
50
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
51
+
52
+
@@ -0,0 +1,34 @@
1
+
2
+ # OrderFulfillmentResourceArrayResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [Array<OrderFulfillmentResource>](OrderFulfillmentResource.md)
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { OrderFulfillmentResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "data": null,
19
+ } satisfies OrderFulfillmentResourceArrayResponse
20
+
21
+ console.log(example)
22
+
23
+ // Convert the instance to a JSON string
24
+ const exampleJSON: string = JSON.stringify(example)
25
+ console.log(exampleJSON)
26
+
27
+ // Parse the JSON string back to an object
28
+ const exampleParsed = JSON.parse(exampleJSON) as OrderFulfillmentResourceArrayResponse
29
+ console.log(exampleParsed)
30
+ ```
31
+
32
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
+
34
+
@@ -0,0 +1,32 @@
1
+
2
+ # OrderStatusId
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import type { OrderStatusId } from '@digital8/lighting-illusions-ts-sdk'
14
+
15
+ // TODO: Update the object below with actual values
16
+ const example = {
17
+ } satisfies OrderStatusId
18
+
19
+ console.log(example)
20
+
21
+ // Convert the instance to a JSON string
22
+ const exampleJSON: string = JSON.stringify(example)
23
+ console.log(exampleJSON)
24
+
25
+ // Parse the JSON string back to an object
26
+ const exampleParsed = JSON.parse(exampleJSON) as OrderStatusId
27
+ console.log(exampleParsed)
28
+ ```
29
+
30
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
31
+
32
+
package/docs/OrdersApi.md CHANGED
@@ -4,6 +4,7 @@ All URIs are relative to *http://localhost/api*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
+ | [**allOrderFulfillment**](OrdersApi.md#allorderfulfillment) | **POST** /admin-api/orders/fulfillments/all | Auto-generated: allOrderFulfillment |
7
8
  | [**attachCouponOrder**](OrdersApi.md#attachcouponorder) | **POST** /admin-api/orders/{order}/coupons/attach | Auto-generated: attachCouponOrder |
8
9
  | [**attachItemOrder**](OrdersApi.md#attachitemorder) | **POST** /admin-api/orders/{order}/line-items/attach | Auto-generated: attachItemOrder |
9
10
  | [**destroyOrder**](OrdersApi.md#destroyorder) | **DELETE** /admin-api/orders/{order}/delete | Auto-generated: destroyOrder |
@@ -19,6 +20,71 @@ All URIs are relative to *http://localhost/api*
19
20
 
20
21
 
21
22
 
23
+ ## allOrderFulfillment
24
+
25
+ > PaginatedOrderFulfillmentResourceResponse allOrderFulfillment(searchOrderFulfillmentsRequest)
26
+
27
+ Auto-generated: allOrderFulfillment
28
+
29
+ ### Example
30
+
31
+ ```ts
32
+ import {
33
+ Configuration,
34
+ OrdersApi,
35
+ } from '@digital8/lighting-illusions-ts-sdk';
36
+ import type { AllOrderFulfillmentRequest } from '@digital8/lighting-illusions-ts-sdk';
37
+
38
+ async function example() {
39
+ console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
40
+ const api = new OrdersApi();
41
+
42
+ const body = {
43
+ // SearchOrderFulfillmentsRequest (optional)
44
+ searchOrderFulfillmentsRequest: ...,
45
+ } satisfies AllOrderFulfillmentRequest;
46
+
47
+ try {
48
+ const data = await api.allOrderFulfillment(body);
49
+ console.log(data);
50
+ } catch (error) {
51
+ console.error(error);
52
+ }
53
+ }
54
+
55
+ // Run the test
56
+ example().catch(console.error);
57
+ ```
58
+
59
+ ### Parameters
60
+
61
+
62
+ | Name | Type | Description | Notes |
63
+ |------------- | ------------- | ------------- | -------------|
64
+ | **searchOrderFulfillmentsRequest** | [SearchOrderFulfillmentsRequest](SearchOrderFulfillmentsRequest.md) | | [Optional] |
65
+
66
+ ### Return type
67
+
68
+ [**PaginatedOrderFulfillmentResourceResponse**](PaginatedOrderFulfillmentResourceResponse.md)
69
+
70
+ ### Authorization
71
+
72
+ No authorization required
73
+
74
+ ### HTTP request headers
75
+
76
+ - **Content-Type**: `application/json`
77
+ - **Accept**: `application/json`
78
+
79
+
80
+ ### HTTP response details
81
+ | Status code | Description | Response headers |
82
+ |-------------|-------------|------------------|
83
+ | **200** | Paginated response \\JsonResponse<\\ResourcePaginator<\\OrderFulfillmentResource[]>> | - |
84
+
85
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
86
+
87
+
22
88
  ## attachCouponOrder
23
89
 
24
90
  > AdminOrderResource attachCouponOrder(order, attachCouponRequest)
@@ -0,0 +1,36 @@
1
+
2
+ # PaginatedOrderFulfillmentResourceResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [Array<OrderFulfillmentResource>](OrderFulfillmentResource.md)
10
+ `meta` | [PagingMetadata](PagingMetadata.md)
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { PaginatedOrderFulfillmentResourceResponse } 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 PaginatedOrderFulfillmentResourceResponse
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 PaginatedOrderFulfillmentResourceResponse
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
+
@@ -0,0 +1,58 @@
1
+
2
+ # SearchOrderFulfillmentsRequest
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `search` | string
10
+ `sortBy` | string
11
+ `sortDirection` | string
12
+ `perPage` | number
13
+ `page` | number
14
+ `orderId` | Array<string>
15
+ `beforeDateShipped` | Date
16
+ `afterDateShipped` | Date
17
+ `beforeCreatedAt` | Date
18
+ `afterCreatedAt` | Date
19
+ `relatedId` | number
20
+ `relatedType` | string
21
+ `includesRelations` | boolean
22
+
23
+ ## Example
24
+
25
+ ```typescript
26
+ import type { SearchOrderFulfillmentsRequest } from '@digital8/lighting-illusions-ts-sdk'
27
+
28
+ // TODO: Update the object below with actual values
29
+ const example = {
30
+ "search": null,
31
+ "sortBy": null,
32
+ "sortDirection": null,
33
+ "perPage": null,
34
+ "page": null,
35
+ "orderId": null,
36
+ "beforeDateShipped": null,
37
+ "afterDateShipped": null,
38
+ "beforeCreatedAt": null,
39
+ "afterCreatedAt": null,
40
+ "relatedId": null,
41
+ "relatedType": null,
42
+ "includesRelations": null,
43
+ } satisfies SearchOrderFulfillmentsRequest
44
+
45
+ console.log(example)
46
+
47
+ // Convert the instance to a JSON string
48
+ const exampleJSON: string = JSON.stringify(example)
49
+ console.log(exampleJSON)
50
+
51
+ // Parse the JSON string back to an object
52
+ const exampleParsed = JSON.parse(exampleJSON) as SearchOrderFulfillmentsRequest
53
+ console.log(exampleParsed)
54
+ ```
55
+
56
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
57
+
58
+
@@ -9,7 +9,7 @@ Name | Type
9
9
  `id` | number
10
10
  `name` | string
11
11
  `hours` | string
12
- `date` | object
12
+ `date` | string
13
13
  `closed` | boolean
14
14
  `displayStartDate` | object
15
15
  `displayEndDate` | object
@@ -9,7 +9,7 @@ Name | Type
9
9
  `id` | number
10
10
  `name` | string
11
11
  `hours` | string
12
- `date` | object
12
+ `date` | string
13
13
  `closed` | boolean
14
14
  `displayStartDate` | string
15
15
  `displayEndDate` | string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/lighting-illusions-ts-sdk",
3
- "version": "0.0.2061",
3
+ "version": "0.0.2063",
4
4
  "description": "OpenAPI client for @digital8/lighting-illusions-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -48,6 +48,11 @@ import {
48
48
  OrderStatusWithCountResourceArrayResponseFromJSON,
49
49
  OrderStatusWithCountResourceArrayResponseToJSON,
50
50
  } from '../models/OrderStatusWithCountResourceArrayResponse';
51
+ import {
52
+ type PaginatedOrderFulfillmentResourceResponse,
53
+ PaginatedOrderFulfillmentResourceResponseFromJSON,
54
+ PaginatedOrderFulfillmentResourceResponseToJSON,
55
+ } from '../models/PaginatedOrderFulfillmentResourceResponse';
51
56
  import {
52
57
  type PaginatedOrderListResourceResponse,
53
58
  PaginatedOrderListResourceResponseFromJSON,
@@ -58,6 +63,11 @@ import {
58
63
  SearchAllOrdersRequestFromJSON,
59
64
  SearchAllOrdersRequestToJSON,
60
65
  } from '../models/SearchAllOrdersRequest';
66
+ import {
67
+ type SearchOrderFulfillmentsRequest,
68
+ SearchOrderFulfillmentsRequestFromJSON,
69
+ SearchOrderFulfillmentsRequestToJSON,
70
+ } from '../models/SearchOrderFulfillmentsRequest';
61
71
  import {
62
72
  type SearchOrdersRequest,
63
73
  SearchOrdersRequestFromJSON,
@@ -74,6 +84,10 @@ import {
74
84
  UpdateOrderRequestToJSON,
75
85
  } from '../models/UpdateOrderRequest';
76
86
 
87
+ export interface AllOrderFulfillmentRequest {
88
+ searchOrderFulfillmentsRequest?: SearchOrderFulfillmentsRequest;
89
+ }
90
+
77
91
  export interface AttachCouponOrderRequest {
78
92
  order: number;
79
93
  attachCouponRequest?: AttachCouponRequest;
@@ -130,6 +144,46 @@ export interface UpdateOrderOperationRequest {
130
144
  */
131
145
  export class OrdersApi extends runtime.BaseAPI {
132
146
 
147
+ /**
148
+ * Creates request options for allOrderFulfillment without sending the request
149
+ */
150
+ async allOrderFulfillmentRequestOpts(requestParameters: AllOrderFulfillmentRequest): Promise<runtime.RequestOpts> {
151
+ const queryParameters: any = {};
152
+
153
+ const headerParameters: runtime.HTTPHeaders = {};
154
+
155
+ headerParameters['Content-Type'] = 'application/json';
156
+
157
+
158
+ let urlPath = `/admin-api/orders/fulfillments/all`;
159
+
160
+ return {
161
+ path: urlPath,
162
+ method: 'POST',
163
+ headers: headerParameters,
164
+ query: queryParameters,
165
+ body: SearchOrderFulfillmentsRequestToJSON(requestParameters['searchOrderFulfillmentsRequest']),
166
+ };
167
+ }
168
+
169
+ /**
170
+ * Auto-generated: allOrderFulfillment
171
+ */
172
+ async allOrderFulfillmentRaw(requestParameters: AllOrderFulfillmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedOrderFulfillmentResourceResponse>> {
173
+ const requestOptions = await this.allOrderFulfillmentRequestOpts(requestParameters);
174
+ const response = await this.request(requestOptions, initOverrides);
175
+
176
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOrderFulfillmentResourceResponseFromJSON(jsonValue));
177
+ }
178
+
179
+ /**
180
+ * Auto-generated: allOrderFulfillment
181
+ */
182
+ async allOrderFulfillment(requestParameters: AllOrderFulfillmentRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedOrderFulfillmentResourceResponse> {
183
+ const response = await this.allOrderFulfillmentRaw(requestParameters, initOverrides);
184
+ return await response.value();
185
+ }
186
+
133
187
  /**
134
188
  * Creates request options for attachCouponOrder without sending the request
135
189
  */
@@ -24,7 +24,7 @@ export interface AddressFrontendResource {
24
24
  * @type {string}
25
25
  * @memberof AddressFrontendResource
26
26
  */
27
- company: string;
27
+ company?: string | null;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -36,7 +36,7 @@ export interface AddressFrontendResource {
36
36
  * @type {string}
37
37
  * @memberof AddressFrontendResource
38
38
  */
39
- line2?: string | null;
39
+ line2: string;
40
40
  /**
41
41
  *
42
42
  * @type {string}
@@ -73,8 +73,8 @@ 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;
77
+ if (!('line2' in value) || value['line2'] === undefined) return false;
78
78
  if (!('postcode' in value) || value['postcode'] === undefined) return false;
79
79
  if (!('suburb' in value) || value['suburb'] === undefined) return false;
80
80
  if (!('country' in value) || value['country'] === undefined) return false;
@@ -93,9 +93,9 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
93
93
  }
94
94
  return {
95
95
 
96
- 'company': json['company'],
96
+ 'company': json['company'] == null ? undefined : json['company'],
97
97
  'line1': json['line1'],
98
- 'line2': json['line2'] == null ? undefined : json['line2'],
98
+ 'line2': json['line2'],
99
99
  'postcode': json['postcode'],
100
100
  'suburb': json['suburb'],
101
101
  'country': json['country'],
@@ -48,7 +48,7 @@ export interface AddressResource {
48
48
  * @type {string}
49
49
  * @memberof AddressResource
50
50
  */
51
- company?: string | null;
51
+ company: string;
52
52
  /**
53
53
  *
54
54
  * @type {string}
@@ -60,7 +60,7 @@ export interface AddressResource {
60
60
  * @type {string}
61
61
  * @memberof AddressResource
62
62
  */
63
- line2?: string | null;
63
+ line2: string;
64
64
  /**
65
65
  *
66
66
  * @type {string}
@@ -98,7 +98,9 @@ export interface AddressResource {
98
98
  */
99
99
  export function instanceOfAddressResource(value: object): value is AddressResource {
100
100
  if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
101
+ if (!('company' in value) || value['company'] === undefined) return false;
101
102
  if (!('line1' in value) || value['line1'] === undefined) return false;
103
+ if (!('line2' in value) || value['line2'] === undefined) return false;
102
104
  if (!('postcode' in value) || value['postcode'] === undefined) return false;
103
105
  if (!('suburb' in value) || value['suburb'] === undefined) return false;
104
106
  if (!('country' in value) || value['country'] === undefined) return false;
@@ -121,9 +123,9 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
121
123
  'type': json['type'] == null ? undefined : json['type'],
122
124
  'sourceAddressId': json['sourceAddressId'] == null ? undefined : json['sourceAddressId'],
123
125
  'addresseeName': json['addresseeName'],
124
- 'company': json['company'] == null ? undefined : json['company'],
126
+ 'company': json['company'],
125
127
  'line1': json['line1'],
126
- 'line2': json['line2'] == null ? undefined : json['line2'],
128
+ 'line2': json['line2'],
127
129
  'postcode': json['postcode'],
128
130
  'suburb': json['suburb'],
129
131
  'country': json['country'],
@@ -0,0 +1,163 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * My API
5
+ * API documentation for my Laravel app
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { ProductChildLineItemLiteResource } from './ProductChildLineItemLiteResource';
17
+ import {
18
+ ProductChildLineItemLiteResourceFromJSON,
19
+ ProductChildLineItemLiteResourceFromJSONTyped,
20
+ ProductChildLineItemLiteResourceToJSON,
21
+ ProductChildLineItemLiteResourceToJSONTyped,
22
+ } from './ProductChildLineItemLiteResource';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface AdminOrderLineItemResource
28
+ */
29
+ export interface AdminOrderLineItemResource {
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof AdminOrderLineItemResource
34
+ */
35
+ id: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof AdminOrderLineItemResource
40
+ */
41
+ quantity: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof AdminOrderLineItemResource
46
+ */
47
+ productPrice: number;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof AdminOrderLineItemResource
52
+ */
53
+ labelId?: number | null;
54
+ /**
55
+ *
56
+ * @type {number}
57
+ * @memberof AdminOrderLineItemResource
58
+ */
59
+ productDiscount: number;
60
+ /**
61
+ *
62
+ * @type {number}
63
+ * @memberof AdminOrderLineItemResource
64
+ */
65
+ totalDiscount: number;
66
+ /**
67
+ *
68
+ * @type {number}
69
+ * @memberof AdminOrderLineItemResource
70
+ */
71
+ lineSubtotal: number;
72
+ /**
73
+ *
74
+ * @type {object}
75
+ * @memberof AdminOrderLineItemResource
76
+ */
77
+ discounts: object;
78
+ /**
79
+ *
80
+ * @type {ProductChildLineItemLiteResource}
81
+ * @memberof AdminOrderLineItemResource
82
+ */
83
+ productChild: ProductChildLineItemLiteResource | null;
84
+ /**
85
+ *
86
+ * @type {number}
87
+ * @memberof AdminOrderLineItemResource
88
+ */
89
+ quantityFulfilled: number;
90
+ /**
91
+ *
92
+ * @type {number}
93
+ * @memberof AdminOrderLineItemResource
94
+ */
95
+ returnsQuantity: number;
96
+ }
97
+
98
+ /**
99
+ * Check if a given object implements the AdminOrderLineItemResource interface.
100
+ */
101
+ export function instanceOfAdminOrderLineItemResource(value: object): value is AdminOrderLineItemResource {
102
+ if (!('id' in value) || value['id'] === undefined) return false;
103
+ if (!('quantity' in value) || value['quantity'] === undefined) return false;
104
+ if (!('productPrice' in value) || value['productPrice'] === undefined) return false;
105
+ if (!('productDiscount' in value) || value['productDiscount'] === undefined) return false;
106
+ if (!('totalDiscount' in value) || value['totalDiscount'] === undefined) return false;
107
+ if (!('lineSubtotal' in value) || value['lineSubtotal'] === undefined) return false;
108
+ if (!('discounts' in value) || value['discounts'] === undefined) return false;
109
+ if (!('productChild' in value) || value['productChild'] === undefined) return false;
110
+ if (!('quantityFulfilled' in value) || value['quantityFulfilled'] === undefined) return false;
111
+ if (!('returnsQuantity' in value) || value['returnsQuantity'] === undefined) return false;
112
+ return true;
113
+ }
114
+
115
+ export function AdminOrderLineItemResourceFromJSON(json: any): AdminOrderLineItemResource {
116
+ return AdminOrderLineItemResourceFromJSONTyped(json, false);
117
+ }
118
+
119
+ export function AdminOrderLineItemResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminOrderLineItemResource {
120
+ if (json == null) {
121
+ return json;
122
+ }
123
+ return {
124
+
125
+ 'id': json['id'],
126
+ 'quantity': json['quantity'],
127
+ 'productPrice': json['productPrice'],
128
+ 'labelId': json['labelId'] == null ? undefined : json['labelId'],
129
+ 'productDiscount': json['productDiscount'],
130
+ 'totalDiscount': json['totalDiscount'],
131
+ 'lineSubtotal': json['lineSubtotal'],
132
+ 'discounts': json['discounts'],
133
+ 'productChild': ProductChildLineItemLiteResourceFromJSON(json['productChild']),
134
+ 'quantityFulfilled': json['quantityFulfilled'],
135
+ 'returnsQuantity': json['returnsQuantity'],
136
+ };
137
+ }
138
+
139
+ export function AdminOrderLineItemResourceToJSON(json: any): AdminOrderLineItemResource {
140
+ return AdminOrderLineItemResourceToJSONTyped(json, false);
141
+ }
142
+
143
+ export function AdminOrderLineItemResourceToJSONTyped(value?: AdminOrderLineItemResource | null, ignoreDiscriminator: boolean = false): any {
144
+ if (value == null) {
145
+ return value;
146
+ }
147
+
148
+ return {
149
+
150
+ 'id': value['id'],
151
+ 'quantity': value['quantity'],
152
+ 'productPrice': value['productPrice'],
153
+ 'labelId': value['labelId'],
154
+ 'productDiscount': value['productDiscount'],
155
+ 'totalDiscount': value['totalDiscount'],
156
+ 'lineSubtotal': value['lineSubtotal'],
157
+ 'discounts': value['discounts'],
158
+ 'productChild': ProductChildLineItemLiteResourceToJSON(value['productChild']),
159
+ 'quantityFulfilled': value['quantityFulfilled'],
160
+ 'returnsQuantity': value['returnsQuantity'],
161
+ };
162
+ }
163
+