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