@teemill/orders 1.5.5 → 1.6.1

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 (103) hide show
  1. package/.openapi-generator/FILES +7 -25
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +3 -3
  4. package/api.ts +1526 -0
  5. package/base.ts +86 -0
  6. package/common.ts +150 -0
  7. package/configuration.ts +110 -0
  8. package/dist/api.d.ts +1103 -0
  9. package/dist/api.js +632 -0
  10. package/dist/base.d.ts +66 -0
  11. package/dist/base.js +65 -0
  12. package/dist/common.d.ts +65 -0
  13. package/dist/common.js +161 -0
  14. package/dist/configuration.d.ts +91 -0
  15. package/dist/configuration.js +43 -0
  16. package/dist/esm/api.d.ts +1103 -0
  17. package/dist/esm/api.js +625 -0
  18. package/dist/esm/base.d.ts +66 -0
  19. package/dist/esm/base.js +60 -0
  20. package/dist/esm/common.d.ts +65 -0
  21. package/dist/esm/common.js +149 -0
  22. package/dist/esm/configuration.d.ts +91 -0
  23. package/dist/esm/configuration.js +39 -0
  24. package/dist/{models/Status.d.ts → esm/index.d.ts} +3 -16
  25. package/dist/esm/index.js +15 -0
  26. package/dist/index.d.ts +13 -3
  27. package/dist/index.js +15 -5
  28. package/git_push.sh +57 -0
  29. package/{src/models/Status.ts → index.ts} +3 -26
  30. package/package.json +18 -4
  31. package/tsconfig.esm.json +7 -0
  32. package/tsconfig.json +4 -6
  33. package/dist/apis/OrdersApi.d.ts +0 -100
  34. package/dist/apis/OrdersApi.js +0 -464
  35. package/dist/apis/index.d.ts +0 -1
  36. package/dist/apis/index.js +0 -19
  37. package/dist/models/Address.d.ts +0 -73
  38. package/dist/models/Address.js +0 -68
  39. package/dist/models/ApiError.d.ts +0 -37
  40. package/dist/models/ApiError.js +0 -53
  41. package/dist/models/ConfirmOrderFulfillment.d.ts +0 -37
  42. package/dist/models/ConfirmOrderFulfillment.js +0 -53
  43. package/dist/models/ConfirmOrderRequest.d.ts +0 -32
  44. package/dist/models/ConfirmOrderRequest.js +0 -51
  45. package/dist/models/ConfirmOrderValidationError.d.ts +0 -47
  46. package/dist/models/ConfirmOrderValidationError.js +0 -62
  47. package/dist/models/ContactInformation.d.ts +0 -37
  48. package/dist/models/ContactInformation.js +0 -53
  49. package/dist/models/DeliveryEstimates.d.ts +0 -37
  50. package/dist/models/DeliveryEstimates.js +0 -52
  51. package/dist/models/ExportOrders202Response.d.ts +0 -31
  52. package/dist/models/ExportOrders202Response.js +0 -50
  53. package/dist/models/Fulfillment.d.ts +0 -71
  54. package/dist/models/Fulfillment.js +0 -66
  55. package/dist/models/FulfillmentItem.d.ts +0 -43
  56. package/dist/models/FulfillmentItem.js +0 -54
  57. package/dist/models/Order.d.ts +0 -135
  58. package/dist/models/Order.js +0 -92
  59. package/dist/models/OrderItem.d.ts +0 -75
  60. package/dist/models/OrderItem.js +0 -64
  61. package/dist/models/OrderItemTaxPrice.d.ts +0 -37
  62. package/dist/models/OrderItemTaxPrice.js +0 -52
  63. package/dist/models/OrderTracking.d.ts +0 -43
  64. package/dist/models/OrderTracking.js +0 -54
  65. package/dist/models/OrdersResponse.d.ts +0 -38
  66. package/dist/models/OrdersResponse.js +0 -53
  67. package/dist/models/Origin.d.ts +0 -37
  68. package/dist/models/Origin.js +0 -52
  69. package/dist/models/Price.d.ts +0 -37
  70. package/dist/models/Price.js +0 -52
  71. package/dist/models/ShippingMethod.d.ts +0 -75
  72. package/dist/models/ShippingMethod.js +0 -66
  73. package/dist/models/Status.js +0 -39
  74. package/dist/models/StatusHistoryItem.d.ts +0 -38
  75. package/dist/models/StatusHistoryItem.js +0 -53
  76. package/dist/models/index.d.ts +0 -20
  77. package/dist/models/index.js +0 -38
  78. package/dist/runtime.d.ts +0 -187
  79. package/dist/runtime.js +0 -565
  80. package/src/apis/OrdersApi.ts +0 -443
  81. package/src/apis/index.ts +0 -3
  82. package/src/index.ts +0 -5
  83. package/src/models/Address.ts +0 -125
  84. package/src/models/ApiError.ts +0 -74
  85. package/src/models/ConfirmOrderFulfillment.ts +0 -75
  86. package/src/models/ConfirmOrderRequest.ts +0 -73
  87. package/src/models/ConfirmOrderValidationError.ts +0 -88
  88. package/src/models/ContactInformation.ts +0 -74
  89. package/src/models/DeliveryEstimates.ts +0 -73
  90. package/src/models/ExportOrders202Response.ts +0 -65
  91. package/src/models/Fulfillment.ts +0 -138
  92. package/src/models/FulfillmentItem.ts +0 -81
  93. package/src/models/Order.ts +0 -244
  94. package/src/models/OrderItem.ts +0 -132
  95. package/src/models/OrderItemTaxPrice.ts +0 -73
  96. package/src/models/OrderTracking.ts +0 -81
  97. package/src/models/OrdersResponse.ts +0 -80
  98. package/src/models/Origin.ts +0 -73
  99. package/src/models/Price.ts +0 -73
  100. package/src/models/ShippingMethod.ts +0 -134
  101. package/src/models/StatusHistoryItem.ts +0 -80
  102. package/src/models/index.ts +0 -22
  103. package/src/runtime.ts +0 -441
@@ -1,75 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Orders API
5
- * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
6
- *
7
- * The version of the OpenAPI document: 1.5.5
8
- * Contact: hello@teemill.com
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 { exists, mapValues } from '../runtime';
16
- /**
17
- *
18
- * @export
19
- * @interface ConfirmOrderFulfillment
20
- */
21
- export interface ConfirmOrderFulfillment {
22
- /**
23
- * Unique object identifier
24
- * @type {string}
25
- * @memberof ConfirmOrderFulfillment
26
- */
27
- fulfillmentId: string;
28
- /**
29
- * Unique object identifier
30
- * @type {string}
31
- * @memberof ConfirmOrderFulfillment
32
- */
33
- shippingMethodId: string;
34
- }
35
-
36
- /**
37
- * Check if a given object implements the ConfirmOrderFulfillment interface.
38
- */
39
- export function instanceOfConfirmOrderFulfillment(value: object): boolean {
40
- let isInstance = true;
41
- isInstance = isInstance && "fulfillmentId" in value;
42
- isInstance = isInstance && "shippingMethodId" in value;
43
-
44
- return isInstance;
45
- }
46
-
47
- export function ConfirmOrderFulfillmentFromJSON(json: any): ConfirmOrderFulfillment {
48
- return ConfirmOrderFulfillmentFromJSONTyped(json, false);
49
- }
50
-
51
- export function ConfirmOrderFulfillmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfirmOrderFulfillment {
52
- if ((json === undefined) || (json === null)) {
53
- return json;
54
- }
55
- return {
56
-
57
- 'fulfillmentId': json['fulfillmentId'],
58
- 'shippingMethodId': json['shippingMethodId'],
59
- };
60
- }
61
-
62
- export function ConfirmOrderFulfillmentToJSON(value?: ConfirmOrderFulfillment | null): any {
63
- if (value === undefined) {
64
- return undefined;
65
- }
66
- if (value === null) {
67
- return null;
68
- }
69
- return {
70
-
71
- 'fulfillmentId': value.fulfillmentId,
72
- 'shippingMethodId': value.shippingMethodId,
73
- };
74
- }
75
-
@@ -1,73 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Orders API
5
- * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
6
- *
7
- * The version of the OpenAPI document: 1.5.5
8
- * Contact: hello@teemill.com
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 { exists, mapValues } from '../runtime';
16
- import type { ConfirmOrderFulfillment } from './ConfirmOrderFulfillment';
17
- import {
18
- ConfirmOrderFulfillmentFromJSON,
19
- ConfirmOrderFulfillmentFromJSONTyped,
20
- ConfirmOrderFulfillmentToJSON,
21
- } from './ConfirmOrderFulfillment';
22
-
23
- /**
24
- *
25
- * @export
26
- * @interface ConfirmOrderRequest
27
- */
28
- export interface ConfirmOrderRequest {
29
- /**
30
- *
31
- * @type {Array<ConfirmOrderFulfillment>}
32
- * @memberof ConfirmOrderRequest
33
- */
34
- fulfillments: Array<ConfirmOrderFulfillment>;
35
- }
36
-
37
- /**
38
- * Check if a given object implements the ConfirmOrderRequest interface.
39
- */
40
- export function instanceOfConfirmOrderRequest(value: object): boolean {
41
- let isInstance = true;
42
- isInstance = isInstance && "fulfillments" in value;
43
-
44
- return isInstance;
45
- }
46
-
47
- export function ConfirmOrderRequestFromJSON(json: any): ConfirmOrderRequest {
48
- return ConfirmOrderRequestFromJSONTyped(json, false);
49
- }
50
-
51
- export function ConfirmOrderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfirmOrderRequest {
52
- if ((json === undefined) || (json === null)) {
53
- return json;
54
- }
55
- return {
56
-
57
- 'fulfillments': ((json['fulfillments'] as Array<any>).map(ConfirmOrderFulfillmentFromJSON)),
58
- };
59
- }
60
-
61
- export function ConfirmOrderRequestToJSON(value?: ConfirmOrderRequest | null): any {
62
- if (value === undefined) {
63
- return undefined;
64
- }
65
- if (value === null) {
66
- return null;
67
- }
68
- return {
69
-
70
- 'fulfillments': ((value.fulfillments as Array<any>).map(ConfirmOrderFulfillmentToJSON)),
71
- };
72
- }
73
-
@@ -1,88 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Orders API
5
- * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
6
- *
7
- * The version of the OpenAPI document: 1.5.5
8
- * Contact: hello@teemill.com
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 { exists, mapValues } from '../runtime';
16
- /**
17
- *
18
- * @export
19
- * @interface ConfirmOrderValidationError
20
- */
21
- export interface ConfirmOrderValidationError {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof ConfirmOrderValidationError
26
- */
27
- code: ConfirmOrderValidationErrorCodeEnum;
28
- /**
29
- *
30
- * @type {string}
31
- * @memberof ConfirmOrderValidationError
32
- */
33
- message: string;
34
- }
35
-
36
-
37
- /**
38
- * @export
39
- */
40
- export const ConfirmOrderValidationErrorCodeEnum = {
41
- BadRequest: 'BAD_REQUEST',
42
- PaymentFailed: 'PAYMENT_FAILED',
43
- Conflict: 'CONFLICT',
44
- ActionRequired: 'ACTION_REQUIRED'
45
- } as const;
46
- export type ConfirmOrderValidationErrorCodeEnum = typeof ConfirmOrderValidationErrorCodeEnum[keyof typeof ConfirmOrderValidationErrorCodeEnum];
47
-
48
-
49
- /**
50
- * Check if a given object implements the ConfirmOrderValidationError interface.
51
- */
52
- export function instanceOfConfirmOrderValidationError(value: object): boolean {
53
- let isInstance = true;
54
- isInstance = isInstance && "code" in value;
55
- isInstance = isInstance && "message" in value;
56
-
57
- return isInstance;
58
- }
59
-
60
- export function ConfirmOrderValidationErrorFromJSON(json: any): ConfirmOrderValidationError {
61
- return ConfirmOrderValidationErrorFromJSONTyped(json, false);
62
- }
63
-
64
- export function ConfirmOrderValidationErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfirmOrderValidationError {
65
- if ((json === undefined) || (json === null)) {
66
- return json;
67
- }
68
- return {
69
-
70
- 'code': json['code'],
71
- 'message': json['message'],
72
- };
73
- }
74
-
75
- export function ConfirmOrderValidationErrorToJSON(value?: ConfirmOrderValidationError | null): any {
76
- if (value === undefined) {
77
- return undefined;
78
- }
79
- if (value === null) {
80
- return null;
81
- }
82
- return {
83
-
84
- 'code': value.code,
85
- 'message': value.message,
86
- };
87
- }
88
-
@@ -1,74 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Orders API
5
- * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
6
- *
7
- * The version of the OpenAPI document: 1.5.5
8
- * Contact: hello@teemill.com
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 { exists, mapValues } from '../runtime';
16
- /**
17
- * Order recipient contact information, used only for courier tracking/updates.
18
- * @export
19
- * @interface ContactInformation
20
- */
21
- export interface ContactInformation {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof ContactInformation
26
- */
27
- email: string;
28
- /**
29
- *
30
- * @type {string}
31
- * @memberof ContactInformation
32
- */
33
- phone?: string | null;
34
- }
35
-
36
- /**
37
- * Check if a given object implements the ContactInformation interface.
38
- */
39
- export function instanceOfContactInformation(value: object): boolean {
40
- let isInstance = true;
41
- isInstance = isInstance && "email" in value;
42
-
43
- return isInstance;
44
- }
45
-
46
- export function ContactInformationFromJSON(json: any): ContactInformation {
47
- return ContactInformationFromJSONTyped(json, false);
48
- }
49
-
50
- export function ContactInformationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContactInformation {
51
- if ((json === undefined) || (json === null)) {
52
- return json;
53
- }
54
- return {
55
-
56
- 'email': json['email'],
57
- 'phone': !exists(json, 'phone') ? undefined : json['phone'],
58
- };
59
- }
60
-
61
- export function ContactInformationToJSON(value?: ContactInformation | null): any {
62
- if (value === undefined) {
63
- return undefined;
64
- }
65
- if (value === null) {
66
- return null;
67
- }
68
- return {
69
-
70
- 'email': value.email,
71
- 'phone': value.phone,
72
- };
73
- }
74
-
@@ -1,73 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Orders API
5
- * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
6
- *
7
- * The version of the OpenAPI document: 1.5.5
8
- * Contact: hello@teemill.com
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 { exists, mapValues } from '../runtime';
16
- /**
17
- *
18
- * @export
19
- * @interface DeliveryEstimates
20
- */
21
- export interface DeliveryEstimates {
22
- /**
23
- * ISO 8601 Timestamp
24
- * @type {Date}
25
- * @memberof DeliveryEstimates
26
- */
27
- min?: Date;
28
- /**
29
- * ISO 8601 Timestamp
30
- * @type {Date}
31
- * @memberof DeliveryEstimates
32
- */
33
- max?: Date;
34
- }
35
-
36
- /**
37
- * Check if a given object implements the DeliveryEstimates interface.
38
- */
39
- export function instanceOfDeliveryEstimates(value: object): boolean {
40
- let isInstance = true;
41
-
42
- return isInstance;
43
- }
44
-
45
- export function DeliveryEstimatesFromJSON(json: any): DeliveryEstimates {
46
- return DeliveryEstimatesFromJSONTyped(json, false);
47
- }
48
-
49
- export function DeliveryEstimatesFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeliveryEstimates {
50
- if ((json === undefined) || (json === null)) {
51
- return json;
52
- }
53
- return {
54
-
55
- 'min': !exists(json, 'min') ? undefined : (new Date(json['min'])),
56
- 'max': !exists(json, 'max') ? undefined : (new Date(json['max'])),
57
- };
58
- }
59
-
60
- export function DeliveryEstimatesToJSON(value?: DeliveryEstimates | null): any {
61
- if (value === undefined) {
62
- return undefined;
63
- }
64
- if (value === null) {
65
- return null;
66
- }
67
- return {
68
-
69
- 'min': value.min === undefined ? undefined : (value.min.toISOString()),
70
- 'max': value.max === undefined ? undefined : (value.max.toISOString()),
71
- };
72
- }
73
-
@@ -1,65 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Orders API
5
- * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
6
- *
7
- * The version of the OpenAPI document: 1.5.5
8
- * Contact: hello@teemill.com
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 { exists, mapValues } from '../runtime';
16
- /**
17
- *
18
- * @export
19
- * @interface ExportOrders202Response
20
- */
21
- export interface ExportOrders202Response {
22
- /**
23
- * A message describing the export status
24
- * @type {string}
25
- * @memberof ExportOrders202Response
26
- */
27
- message?: string;
28
- }
29
-
30
- /**
31
- * Check if a given object implements the ExportOrders202Response interface.
32
- */
33
- export function instanceOfExportOrders202Response(value: object): boolean {
34
- let isInstance = true;
35
-
36
- return isInstance;
37
- }
38
-
39
- export function ExportOrders202ResponseFromJSON(json: any): ExportOrders202Response {
40
- return ExportOrders202ResponseFromJSONTyped(json, false);
41
- }
42
-
43
- export function ExportOrders202ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExportOrders202Response {
44
- if ((json === undefined) || (json === null)) {
45
- return json;
46
- }
47
- return {
48
-
49
- 'message': !exists(json, 'message') ? undefined : json['message'],
50
- };
51
- }
52
-
53
- export function ExportOrders202ResponseToJSON(value?: ExportOrders202Response | null): any {
54
- if (value === undefined) {
55
- return undefined;
56
- }
57
- if (value === null) {
58
- return null;
59
- }
60
- return {
61
-
62
- 'message': value.message,
63
- };
64
- }
65
-
@@ -1,138 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Orders API
5
- * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
6
- *
7
- * The version of the OpenAPI document: 1.5.5
8
- * Contact: hello@teemill.com
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 { exists, mapValues } from '../runtime';
16
- import type { FulfillmentItem } from './FulfillmentItem';
17
- import {
18
- FulfillmentItemFromJSON,
19
- FulfillmentItemFromJSONTyped,
20
- FulfillmentItemToJSON,
21
- } from './FulfillmentItem';
22
- import type { OrderTracking } from './OrderTracking';
23
- import {
24
- OrderTrackingFromJSON,
25
- OrderTrackingFromJSONTyped,
26
- OrderTrackingToJSON,
27
- } from './OrderTracking';
28
- import type { ShippingMethod } from './ShippingMethod';
29
- import {
30
- ShippingMethodFromJSON,
31
- ShippingMethodFromJSONTyped,
32
- ShippingMethodToJSON,
33
- } from './ShippingMethod';
34
- import type { Status } from './Status';
35
- import {
36
- StatusFromJSON,
37
- StatusFromJSONTyped,
38
- StatusToJSON,
39
- } from './Status';
40
-
41
- /**
42
- *
43
- * @export
44
- * @interface Fulfillment
45
- */
46
- export interface Fulfillment {
47
- /**
48
- * Unique object identifier
49
- * @type {string}
50
- * @memberof Fulfillment
51
- */
52
- id?: string;
53
- /**
54
- *
55
- * @type {Status}
56
- * @memberof Fulfillment
57
- */
58
- status?: Status;
59
- /**
60
- *
61
- * @type {Array<FulfillmentItem>}
62
- * @memberof Fulfillment
63
- */
64
- items?: Array<FulfillmentItem>;
65
- /**
66
- *
67
- * @type {OrderTracking}
68
- * @memberof Fulfillment
69
- */
70
- tracking?: OrderTracking | null;
71
- /**
72
- *
73
- * @type {ShippingMethod}
74
- * @memberof Fulfillment
75
- */
76
- shippingMethod?: ShippingMethod;
77
- /**
78
- * Shipping methods available for this fulfillment. One of these should be used to confirm the fulfillment.
79
- * @type {Array<ShippingMethod>}
80
- * @memberof Fulfillment
81
- */
82
- availableShippingMethods?: Array<ShippingMethod>;
83
- /**
84
- * Weight of the package being shipped in grams
85
- * @type {number}
86
- * @memberof Fulfillment
87
- */
88
- packageWeight?: number;
89
- }
90
-
91
- /**
92
- * Check if a given object implements the Fulfillment interface.
93
- */
94
- export function instanceOfFulfillment(value: object): boolean {
95
- let isInstance = true;
96
-
97
- return isInstance;
98
- }
99
-
100
- export function FulfillmentFromJSON(json: any): Fulfillment {
101
- return FulfillmentFromJSONTyped(json, false);
102
- }
103
-
104
- export function FulfillmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Fulfillment {
105
- if ((json === undefined) || (json === null)) {
106
- return json;
107
- }
108
- return {
109
-
110
- 'id': !exists(json, 'id') ? undefined : json['id'],
111
- 'status': !exists(json, 'status') ? undefined : StatusFromJSON(json['status']),
112
- 'items': !exists(json, 'items') ? undefined : ((json['items'] as Array<any>).map(FulfillmentItemFromJSON)),
113
- 'tracking': !exists(json, 'tracking') ? undefined : OrderTrackingFromJSON(json['tracking']),
114
- 'shippingMethod': !exists(json, 'shippingMethod') ? undefined : ShippingMethodFromJSON(json['shippingMethod']),
115
- 'availableShippingMethods': !exists(json, 'availableShippingMethods') ? undefined : ((json['availableShippingMethods'] as Array<any>).map(ShippingMethodFromJSON)),
116
- 'packageWeight': !exists(json, 'packageWeight') ? undefined : json['packageWeight'],
117
- };
118
- }
119
-
120
- export function FulfillmentToJSON(value?: Fulfillment | null): any {
121
- if (value === undefined) {
122
- return undefined;
123
- }
124
- if (value === null) {
125
- return null;
126
- }
127
- return {
128
-
129
- 'id': value.id,
130
- 'status': StatusToJSON(value.status),
131
- 'items': value.items === undefined ? undefined : ((value.items as Array<any>).map(FulfillmentItemToJSON)),
132
- 'tracking': OrderTrackingToJSON(value.tracking),
133
- 'shippingMethod': ShippingMethodToJSON(value.shippingMethod),
134
- 'availableShippingMethods': value.availableShippingMethods === undefined ? undefined : ((value.availableShippingMethods as Array<any>).map(ShippingMethodToJSON)),
135
- 'packageWeight': value.packageWeight,
136
- };
137
- }
138
-
@@ -1,81 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Orders API
5
- * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
6
- *
7
- * The version of the OpenAPI document: 1.5.5
8
- * Contact: hello@teemill.com
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 { exists, mapValues } from '../runtime';
16
- /**
17
- *
18
- * @export
19
- * @interface FulfillmentItem
20
- */
21
- export interface FulfillmentItem {
22
- /**
23
- * Unique object identifier
24
- * @type {string}
25
- * @memberof FulfillmentItem
26
- */
27
- id?: string;
28
- /**
29
- * Unique object identifier
30
- * @type {string}
31
- * @memberof FulfillmentItem
32
- */
33
- itemId?: string;
34
- /**
35
- * Number of this item being fulfilled
36
- * @type {number}
37
- * @memberof FulfillmentItem
38
- */
39
- quantity?: number;
40
- }
41
-
42
- /**
43
- * Check if a given object implements the FulfillmentItem interface.
44
- */
45
- export function instanceOfFulfillmentItem(value: object): boolean {
46
- let isInstance = true;
47
-
48
- return isInstance;
49
- }
50
-
51
- export function FulfillmentItemFromJSON(json: any): FulfillmentItem {
52
- return FulfillmentItemFromJSONTyped(json, false);
53
- }
54
-
55
- export function FulfillmentItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): FulfillmentItem {
56
- if ((json === undefined) || (json === null)) {
57
- return json;
58
- }
59
- return {
60
-
61
- 'id': !exists(json, 'id') ? undefined : json['id'],
62
- 'itemId': !exists(json, 'itemId') ? undefined : json['itemId'],
63
- 'quantity': !exists(json, 'quantity') ? undefined : json['quantity'],
64
- };
65
- }
66
-
67
- export function FulfillmentItemToJSON(value?: FulfillmentItem | null): any {
68
- if (value === undefined) {
69
- return undefined;
70
- }
71
- if (value === null) {
72
- return null;
73
- }
74
- return {
75
-
76
- 'id': value.id,
77
- 'itemId': value.itemId,
78
- 'quantity': value.quantity,
79
- };
80
- }
81
-