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 |
|
22 | class Category {
|
23 |
|
24 | /**
|
25 | * Constructs a Category based on its enclosed builder.
|
26 | * @constructor
|
27 | * @param {Builder} builder the Category builder
|
28 | */
|
29 | constructor(builder) {
|
30 |
|
31 | /**
|
32 | * The list of subcategories for this category. Depending on the backend system, the returned items may only have their ids being set.
|
33 | * @type {Category[]}
|
34 | */
|
35 | this.children = undefined;
|
36 |
|
37 | /**
|
38 | * The date-time when this object was created. The JSON representation must be in RFC339 / ISO8601 format
|
39 | * @type {string}
|
40 | */
|
41 | this.createdAt = undefined;
|
42 |
|
43 | /**
|
44 | * The description of the category.
|
45 | * @type {string}
|
46 | */
|
47 | this.description = undefined;
|
48 |
|
49 | /**
|
50 | * The internal unique ID of the category in the commerce backend system.
|
51 | * @type {string}
|
52 | */
|
53 | this.id = builder.id;
|
54 |
|
55 | /**
|
56 | * The date-time when this object was last modified. The JSON representation must be in RFC339 / ISO8601 format
|
57 | * @type {string}
|
58 | */
|
59 | this.lastModifiedAt = undefined;
|
60 |
|
61 | /**
|
62 | * The id of the main parent category (if this category has multiple parents).
|
63 | * @type {string}
|
64 | */
|
65 | this.mainParentId = undefined;
|
66 |
|
67 | /**
|
68 | * The name of the category.
|
69 | * @type {string}
|
70 | */
|
71 | this.name = undefined;
|
72 |
|
73 | /**
|
74 | * The list of parent categories for this category. Depending on the backend system, the returned items may only have their ids being set.
|
75 | * @type {Category[]}
|
76 | */
|
77 | this.parents = undefined;
|
78 | }
|
79 |
|
80 | /**
|
81 | * Builds a Category based on API required properties.
|
82 | */
|
83 | static get Builder() {
|
84 | class Builder {
|
85 |
|
86 | withId(id) {
|
87 | this.id = id;
|
88 | return this;
|
89 | }
|
90 |
|
91 | build() {
|
92 | return new Category(this);
|
93 | }
|
94 | }
|
95 | return Builder;
|
96 | }
|
97 | }
|
98 | module.exports.Category = Category;
|