UNPKG

2.74 kBJavaScriptView Raw
1/*******************************************************************************
2 *
3 * Copyright 2018 Adobe. All rights reserved.
4 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. You may obtain a copy
6 * of the License at http://www.apache.org/licenses/LICENSE-2.0
7 *
8 * Unless required by applicable law or agreed to in writing, software distributed under
9 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
10 * OF ANY KIND, either express or implied. See the License for the specific language
11 * governing permissions and limitations under the License.
12 *
13 ******************************************************************************/
14
15/**
16 * Auto generated code based on Swagger definition.
17 * Dot not edit manually. Manual changes will be overridden.
18 *
19 * @version 1.1.2
20 */
21
22class InventoryItem {
23
24 /**
25 * Constructs a InventoryItem based on its enclosed builder.
26 * @constructor
27 * @param {Builder} builder the InventoryItem builder
28 */
29 constructor(builder) {
30
31 /**
32 * The product available quantity for this inventory.
33 * @type {integer}
34 */
35 this.availableQuantity = builder.availableQuantity;
36
37 /**
38 * The next expected delivery date for this inventory.
39 * @type {string}
40 */
41 this.expectedDeliveryDate = undefined;
42
43 /**
44 * The inventory identifier.
45 * @type {string}
46 */
47 this.id = builder.id;
48
49 /**
50 * The product identifier.
51 * @type {string}
52 */
53 this.productId = builder.productId;
54
55 /**
56 * The period in days when this inventory is restocked.
57 * @type {integer}
58 */
59 this.restockDaysPeriod = undefined;
60
61 /**
62 * The scope for the inventory (i.e store or channel).
63 * @type {string}
64 */
65 this.scope = undefined;
66 }
67
68 /**
69 * Builds a InventoryItem based on API required properties.
70 */
71 static get Builder() {
72 class Builder {
73
74 withAvailableQuantity(availableQuantity) {
75 this.availableQuantity = availableQuantity;
76 return this;
77 }
78
79 withId(id) {
80 this.id = id;
81 return this;
82 }
83
84 withProductId(productId) {
85 this.productId = productId;
86 return this;
87 }
88
89 build() {
90 return new InventoryItem(this);
91 }
92 }
93 return Builder;
94 }
95}
96module.exports.InventoryItem = InventoryItem;