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.0.0
|
20 | */
|
21 |
|
22 | class Customer {
|
23 |
|
24 | /**
|
25 | * Constructs a Customer based on its enclosed builder.
|
26 | * @constructor
|
27 | * @param {Builder} builder the Customer builder
|
28 | */
|
29 | constructor(builder) {
|
30 | /**
|
31 | * The date-time when this object was created. The JSON representation must be in RFC339 / ISO8601 format
|
32 | * @type {string}
|
33 | */
|
34 | this.createdAt = undefined;
|
35 |
|
36 | /**
|
37 | * The date-time when this object was last modified. The JSON representation must be in RFC339 / ISO8601 format
|
38 | * @type {string}
|
39 | */
|
40 | this.lastModifiedAt = undefined;
|
41 |
|
42 | /**
|
43 | * The unique id of this customer
|
44 | * @type {string}
|
45 | */
|
46 | this.id = builder.id;
|
47 |
|
48 | /**
|
49 | * The customer's email address
|
50 | * @type {string}
|
51 | */
|
52 | this.email = builder.email;
|
53 |
|
54 | /**
|
55 | * The firstname of this customer
|
56 | * @type {string}
|
57 | */
|
58 | this.firstName = builder.firstName;
|
59 |
|
60 | /**
|
61 | * The lastname of this customer
|
62 | * @type {string}
|
63 | */
|
64 | this.lastName = builder.lastName;
|
65 |
|
66 | }
|
67 |
|
68 | /**
|
69 | * Builds a Customer based on API required properties.
|
70 | */
|
71 | static get Builder() {
|
72 | class Builder {
|
73 | withEmail(email) {
|
74 | this.email = email;
|
75 | return this;
|
76 | }
|
77 |
|
78 | withFirstName(firstName) {
|
79 | this.firstName = firstName;
|
80 | return this;
|
81 | }
|
82 |
|
83 | withId(id) {
|
84 | this.id = id;
|
85 | return this;
|
86 | }
|
87 |
|
88 | withLastName(lastName) {
|
89 | this.lastName = lastName;
|
90 | return this;
|
91 | }
|
92 |
|
93 | build() {
|
94 | return new Customer(this);
|
95 | }
|
96 | }
|
97 | return Builder;
|
98 | }
|
99 | }
|
100 | module.exports.Customer = Customer;
|