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 | const Customer = require('./Customer.js').Customer;
|
23 | const Cart = require('./Cart.js').Cart;
|
24 |
|
25 | class LoginResult {
|
26 |
|
27 | /**
|
28 | * Constructs a LoginResult based on its enclosed builder.
|
29 | * @constructor
|
30 | * @param {Builder} builder the LoginResult builder
|
31 | */
|
32 | constructor(builder) {
|
33 | /**
|
34 | * The customer info returned by the login process
|
35 | * @type {Customer}
|
36 | */
|
37 | this.customer = builder.customer;
|
38 |
|
39 | /**
|
40 | * The current or merged cart created during the login process
|
41 | * @type {Cart}
|
42 | */
|
43 | this.cart = undefined;
|
44 |
|
45 | }
|
46 |
|
47 | /**
|
48 | * Builds a LoginResult based on API required properties.
|
49 | */
|
50 | static get Builder() {
|
51 | class Builder {
|
52 | withCustomer(customer) {
|
53 | this.customer = customer;
|
54 | return this;
|
55 | }
|
56 |
|
57 | build() {
|
58 | return new LoginResult(this);
|
59 | }
|
60 | }
|
61 | return Builder;
|
62 | }
|
63 | }
|
64 | module.exports.LoginResult = LoginResult;
|