UNPKG

1.96 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.0.0
20 */
21
22const MoneyValue = require('./MoneyValue.js').MoneyValue;
23const TaxPortion = require('./TaxPortion.js').TaxPortion;
24
25class TaxInfo {
26
27 /**
28 * Constructs a TaxInfo based on its enclosed builder.
29 * @constructor
30 * @param {Builder} builder the TaxInfo builder
31 */
32 constructor(builder) {
33 /**
34 * The value of the tax info, which is the total value of the tax portions.
35 * @type {MoneyValue}
36 */
37 this.value = builder.value;
38
39 /**
40 * The portions for this tax.
41 * @type {TaxPortion[]}
42 */
43 this.portions = undefined;
44
45 }
46
47 /**
48 * Builds a TaxInfo based on API required properties.
49 */
50 static get Builder() {
51 class Builder {
52 withValue(value) {
53 this.value = value;
54 return this;
55 }
56
57 build() {
58 return new TaxInfo(this);
59 }
60 }
61 return Builder;
62 }
63}
64module.exports.TaxInfo = TaxInfo;