UNPKG

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