@p7m/billing-backend 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,238 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
+ * Billing Backend
19
+ * # API for managing billing of customers The purpose of this API is to manage customers, articles, recurring billing, and payments. The caller has to be authenticated with the system and provide a JWT token in the Authorization header of the HTTP request. When using the API you typically get this token by authenticating first with OAuth 2.0. When you are trying this API using the Swagger interface, you need to click the `Authorize` button and then again the Authorize button in the pop-up that gets opened.
20
+ *
21
+ * The version of the OpenAPI document: 0.1.1
22
+ * Contact: tech@p7m.de
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The InvoicePosition model module.
31
+ * @module model/InvoicePosition
32
+ * @version 0.1.1
33
+ */
34
+ var InvoicePosition = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>InvoicePosition</code>.
37
+ * @alias module:model/InvoicePosition
38
+ * @param invoicePositionId {String}
39
+ * @param tenantId {String}
40
+ * @param invoiceId {String}
41
+ * @param positionNumber {Number}
42
+ * @param productCode {String}
43
+ * @param description {Array.<String>}
44
+ * @param quantityThousandth {Number}
45
+ * @param unitPrice {Number}
46
+ * @param allPrice {Number}
47
+ * @param vatRatePerMil {Number}
48
+ * @param serviceStart {Date}
49
+ * @param serviceEnd {Date}
50
+ */
51
+ function InvoicePosition(invoicePositionId, tenantId, invoiceId, positionNumber, productCode, description, quantityThousandth, unitPrice, allPrice, vatRatePerMil, serviceStart, serviceEnd) {
52
+ _classCallCheck(this, InvoicePosition);
53
+ InvoicePosition.initialize(this, invoicePositionId, tenantId, invoiceId, positionNumber, productCode, description, quantityThousandth, unitPrice, allPrice, vatRatePerMil, serviceStart, serviceEnd);
54
+ }
55
+
56
+ /**
57
+ * Initializes the fields of this object.
58
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
59
+ * Only for internal use.
60
+ */
61
+ return _createClass(InvoicePosition, null, [{
62
+ key: "initialize",
63
+ value: function initialize(obj, invoicePositionId, tenantId, invoiceId, positionNumber, productCode, description, quantityThousandth, unitPrice, allPrice, vatRatePerMil, serviceStart, serviceEnd) {
64
+ obj['invoicePositionId'] = invoicePositionId;
65
+ obj['tenantId'] = tenantId;
66
+ obj['invoiceId'] = invoiceId;
67
+ obj['positionNumber'] = positionNumber;
68
+ obj['productCode'] = productCode;
69
+ obj['description'] = description;
70
+ obj['quantityThousandth'] = quantityThousandth;
71
+ obj['unitPrice'] = unitPrice;
72
+ obj['allPrice'] = allPrice;
73
+ obj['vatRatePerMil'] = vatRatePerMil;
74
+ obj['serviceStart'] = serviceStart;
75
+ obj['serviceEnd'] = serviceEnd;
76
+ }
77
+
78
+ /**
79
+ * Constructs a <code>InvoicePosition</code> from a plain JavaScript object, optionally creating a new instance.
80
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
81
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
82
+ * @param {module:model/InvoicePosition} obj Optional instance to populate.
83
+ * @return {module:model/InvoicePosition} The populated <code>InvoicePosition</code> instance.
84
+ */
85
+ }, {
86
+ key: "constructFromObject",
87
+ value: function constructFromObject(data, obj) {
88
+ if (data) {
89
+ obj = obj || new InvoicePosition();
90
+ if (data.hasOwnProperty('invoicePositionId')) {
91
+ obj['invoicePositionId'] = _ApiClient["default"].convertToType(data['invoicePositionId'], 'String');
92
+ }
93
+ if (data.hasOwnProperty('tenantId')) {
94
+ obj['tenantId'] = _ApiClient["default"].convertToType(data['tenantId'], 'String');
95
+ }
96
+ if (data.hasOwnProperty('invoiceId')) {
97
+ obj['invoiceId'] = _ApiClient["default"].convertToType(data['invoiceId'], 'String');
98
+ }
99
+ if (data.hasOwnProperty('positionNumber')) {
100
+ obj['positionNumber'] = _ApiClient["default"].convertToType(data['positionNumber'], 'Number');
101
+ }
102
+ if (data.hasOwnProperty('productCode')) {
103
+ obj['productCode'] = _ApiClient["default"].convertToType(data['productCode'], 'String');
104
+ }
105
+ if (data.hasOwnProperty('description')) {
106
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], ['String']);
107
+ }
108
+ if (data.hasOwnProperty('quantityThousandth')) {
109
+ obj['quantityThousandth'] = _ApiClient["default"].convertToType(data['quantityThousandth'], 'Number');
110
+ }
111
+ if (data.hasOwnProperty('unitPrice')) {
112
+ obj['unitPrice'] = _ApiClient["default"].convertToType(data['unitPrice'], 'Number');
113
+ }
114
+ if (data.hasOwnProperty('allPrice')) {
115
+ obj['allPrice'] = _ApiClient["default"].convertToType(data['allPrice'], 'Number');
116
+ }
117
+ if (data.hasOwnProperty('vatRatePerMil')) {
118
+ obj['vatRatePerMil'] = _ApiClient["default"].convertToType(data['vatRatePerMil'], 'Number');
119
+ }
120
+ if (data.hasOwnProperty('serviceStart')) {
121
+ obj['serviceStart'] = _ApiClient["default"].convertToType(data['serviceStart'], 'Date');
122
+ }
123
+ if (data.hasOwnProperty('serviceEnd')) {
124
+ obj['serviceEnd'] = _ApiClient["default"].convertToType(data['serviceEnd'], 'Date');
125
+ }
126
+ }
127
+ return obj;
128
+ }
129
+
130
+ /**
131
+ * Validates the JSON data with respect to <code>InvoicePosition</code>.
132
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
133
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>InvoicePosition</code>.
134
+ */
135
+ }, {
136
+ key: "validateJSON",
137
+ value: function validateJSON(data) {
138
+ // check to make sure all required properties are present in the JSON string
139
+ var _iterator = _createForOfIteratorHelper(InvoicePosition.RequiredProperties),
140
+ _step;
141
+ try {
142
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
143
+ var property = _step.value;
144
+ if (!data.hasOwnProperty(property)) {
145
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
146
+ }
147
+ }
148
+ // ensure the json data is a string
149
+ } catch (err) {
150
+ _iterator.e(err);
151
+ } finally {
152
+ _iterator.f();
153
+ }
154
+ if (data['invoicePositionId'] && !(typeof data['invoicePositionId'] === 'string' || data['invoicePositionId'] instanceof String)) {
155
+ throw new Error("Expected the field `invoicePositionId` to be a primitive type in the JSON string but got " + data['invoicePositionId']);
156
+ }
157
+ // ensure the json data is a string
158
+ if (data['tenantId'] && !(typeof data['tenantId'] === 'string' || data['tenantId'] instanceof String)) {
159
+ throw new Error("Expected the field `tenantId` to be a primitive type in the JSON string but got " + data['tenantId']);
160
+ }
161
+ // ensure the json data is a string
162
+ if (data['invoiceId'] && !(typeof data['invoiceId'] === 'string' || data['invoiceId'] instanceof String)) {
163
+ throw new Error("Expected the field `invoiceId` to be a primitive type in the JSON string but got " + data['invoiceId']);
164
+ }
165
+ // ensure the json data is a string
166
+ if (data['productCode'] && !(typeof data['productCode'] === 'string' || data['productCode'] instanceof String)) {
167
+ throw new Error("Expected the field `productCode` to be a primitive type in the JSON string but got " + data['productCode']);
168
+ }
169
+ // ensure the json data is an array
170
+ if (!Array.isArray(data['description'])) {
171
+ throw new Error("Expected the field `description` to be an array in the JSON data but got " + data['description']);
172
+ }
173
+ return true;
174
+ }
175
+ }]);
176
+ }();
177
+ InvoicePosition.RequiredProperties = ["invoicePositionId", "tenantId", "invoiceId", "positionNumber", "productCode", "description", "quantityThousandth", "unitPrice", "allPrice", "vatRatePerMil", "serviceStart", "serviceEnd"];
178
+
179
+ /**
180
+ * @member {String} invoicePositionId
181
+ */
182
+ InvoicePosition.prototype['invoicePositionId'] = undefined;
183
+
184
+ /**
185
+ * @member {String} tenantId
186
+ */
187
+ InvoicePosition.prototype['tenantId'] = undefined;
188
+
189
+ /**
190
+ * @member {String} invoiceId
191
+ */
192
+ InvoicePosition.prototype['invoiceId'] = undefined;
193
+
194
+ /**
195
+ * @member {Number} positionNumber
196
+ */
197
+ InvoicePosition.prototype['positionNumber'] = undefined;
198
+
199
+ /**
200
+ * @member {String} productCode
201
+ */
202
+ InvoicePosition.prototype['productCode'] = undefined;
203
+
204
+ /**
205
+ * @member {Array.<String>} description
206
+ */
207
+ InvoicePosition.prototype['description'] = undefined;
208
+
209
+ /**
210
+ * @member {Number} quantityThousandth
211
+ */
212
+ InvoicePosition.prototype['quantityThousandth'] = undefined;
213
+
214
+ /**
215
+ * @member {Number} unitPrice
216
+ */
217
+ InvoicePosition.prototype['unitPrice'] = undefined;
218
+
219
+ /**
220
+ * @member {Number} allPrice
221
+ */
222
+ InvoicePosition.prototype['allPrice'] = undefined;
223
+
224
+ /**
225
+ * @member {Number} vatRatePerMil
226
+ */
227
+ InvoicePosition.prototype['vatRatePerMil'] = undefined;
228
+
229
+ /**
230
+ * @member {Date} serviceStart
231
+ */
232
+ InvoicePosition.prototype['serviceStart'] = undefined;
233
+
234
+ /**
235
+ * @member {Date} serviceEnd
236
+ */
237
+ InvoicePosition.prototype['serviceEnd'] = undefined;
238
+ var _default = exports["default"] = InvoicePosition;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
+ * Billing Backend
19
+ * # API for managing billing of customers The purpose of this API is to manage customers, articles, recurring billing, and payments. The caller has to be authenticated with the system and provide a JWT token in the Authorization header of the HTTP request. When using the API you typically get this token by authenticating first with OAuth 2.0. When you are trying this API using the Swagger interface, you need to click the `Authorize` button and then again the Authorize button in the pop-up that gets opened.
20
+ *
21
+ * The version of the OpenAPI document: 0.1.1
22
+ * Contact: tech@p7m.de
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The NewBankAccount model module.
31
+ * @module model/NewBankAccount
32
+ * @version 0.1.1
33
+ */
34
+ var NewBankAccount = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>NewBankAccount</code>.
37
+ * @alias module:model/NewBankAccount
38
+ * @param bankName {String}
39
+ * @param iban {String}
40
+ * @param bic {String}
41
+ */
42
+ function NewBankAccount(bankName, iban, bic) {
43
+ _classCallCheck(this, NewBankAccount);
44
+ NewBankAccount.initialize(this, bankName, iban, bic);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(NewBankAccount, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, bankName, iban, bic) {
55
+ obj['bankName'] = bankName;
56
+ obj['iban'] = iban;
57
+ obj['bic'] = bic;
58
+ }
59
+
60
+ /**
61
+ * Constructs a <code>NewBankAccount</code> from a plain JavaScript object, optionally creating a new instance.
62
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
63
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
64
+ * @param {module:model/NewBankAccount} obj Optional instance to populate.
65
+ * @return {module:model/NewBankAccount} The populated <code>NewBankAccount</code> instance.
66
+ */
67
+ }, {
68
+ key: "constructFromObject",
69
+ value: function constructFromObject(data, obj) {
70
+ if (data) {
71
+ obj = obj || new NewBankAccount();
72
+ if (data.hasOwnProperty('bankName')) {
73
+ obj['bankName'] = _ApiClient["default"].convertToType(data['bankName'], 'String');
74
+ }
75
+ if (data.hasOwnProperty('iban')) {
76
+ obj['iban'] = _ApiClient["default"].convertToType(data['iban'], 'String');
77
+ }
78
+ if (data.hasOwnProperty('bic')) {
79
+ obj['bic'] = _ApiClient["default"].convertToType(data['bic'], 'String');
80
+ }
81
+ }
82
+ return obj;
83
+ }
84
+
85
+ /**
86
+ * Validates the JSON data with respect to <code>NewBankAccount</code>.
87
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
88
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>NewBankAccount</code>.
89
+ */
90
+ }, {
91
+ key: "validateJSON",
92
+ value: function validateJSON(data) {
93
+ // check to make sure all required properties are present in the JSON string
94
+ var _iterator = _createForOfIteratorHelper(NewBankAccount.RequiredProperties),
95
+ _step;
96
+ try {
97
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
98
+ var property = _step.value;
99
+ if (!data.hasOwnProperty(property)) {
100
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
101
+ }
102
+ }
103
+ // ensure the json data is a string
104
+ } catch (err) {
105
+ _iterator.e(err);
106
+ } finally {
107
+ _iterator.f();
108
+ }
109
+ if (data['bankName'] && !(typeof data['bankName'] === 'string' || data['bankName'] instanceof String)) {
110
+ throw new Error("Expected the field `bankName` to be a primitive type in the JSON string but got " + data['bankName']);
111
+ }
112
+ // ensure the json data is a string
113
+ if (data['iban'] && !(typeof data['iban'] === 'string' || data['iban'] instanceof String)) {
114
+ throw new Error("Expected the field `iban` to be a primitive type in the JSON string but got " + data['iban']);
115
+ }
116
+ // ensure the json data is a string
117
+ if (data['bic'] && !(typeof data['bic'] === 'string' || data['bic'] instanceof String)) {
118
+ throw new Error("Expected the field `bic` to be a primitive type in the JSON string but got " + data['bic']);
119
+ }
120
+ return true;
121
+ }
122
+ }]);
123
+ }();
124
+ NewBankAccount.RequiredProperties = ["bankName", "iban", "bic"];
125
+
126
+ /**
127
+ * @member {String} bankName
128
+ */
129
+ NewBankAccount.prototype['bankName'] = undefined;
130
+
131
+ /**
132
+ * @member {String} iban
133
+ */
134
+ NewBankAccount.prototype['iban'] = undefined;
135
+
136
+ /**
137
+ * @member {String} bic
138
+ */
139
+ NewBankAccount.prototype['bic'] = undefined;
140
+ var _default = exports["default"] = NewBankAccount;
@@ -0,0 +1,269 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _Salutation = _interopRequireDefault(require("./Salutation"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
12
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
13
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
+ * Billing Backend
20
+ * # API for managing billing of customers The purpose of this API is to manage customers, articles, recurring billing, and payments. The caller has to be authenticated with the system and provide a JWT token in the Authorization header of the HTTP request. When using the API you typically get this token by authenticating first with OAuth 2.0. When you are trying this API using the Swagger interface, you need to click the `Authorize` button and then again the Authorize button in the pop-up that gets opened.
21
+ *
22
+ * The version of the OpenAPI document: 0.1.1
23
+ * Contact: tech@p7m.de
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The NewCustomer model module.
32
+ * @module model/NewCustomer
33
+ * @version 0.1.1
34
+ */
35
+ var NewCustomer = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>NewCustomer</code>.
38
+ * @alias module:model/NewCustomer
39
+ * @param visibleCustomerId {Number}
40
+ * @param salutation {module:model/Salutation}
41
+ * @param companyName {String}
42
+ * @param givenName {String}
43
+ * @param familyName {String}
44
+ * @param deliveryInstructions {String}
45
+ * @param address {String}
46
+ * @param addressExtra {String}
47
+ * @param zip {String}
48
+ * @param town {String}
49
+ * @param country {String}
50
+ * @param gracePeriod {Number}
51
+ * @param usedBankAccounts {Array.<String>}
52
+ */
53
+ function NewCustomer(visibleCustomerId, salutation, companyName, givenName, familyName, deliveryInstructions, address, addressExtra, zip, town, country, gracePeriod, usedBankAccounts) {
54
+ _classCallCheck(this, NewCustomer);
55
+ NewCustomer.initialize(this, visibleCustomerId, salutation, companyName, givenName, familyName, deliveryInstructions, address, addressExtra, zip, town, country, gracePeriod, usedBankAccounts);
56
+ }
57
+
58
+ /**
59
+ * Initializes the fields of this object.
60
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
61
+ * Only for internal use.
62
+ */
63
+ return _createClass(NewCustomer, null, [{
64
+ key: "initialize",
65
+ value: function initialize(obj, visibleCustomerId, salutation, companyName, givenName, familyName, deliveryInstructions, address, addressExtra, zip, town, country, gracePeriod, usedBankAccounts) {
66
+ obj['visibleCustomerId'] = visibleCustomerId;
67
+ obj['salutation'] = salutation;
68
+ obj['companyName'] = companyName;
69
+ obj['givenName'] = givenName;
70
+ obj['familyName'] = familyName;
71
+ obj['deliveryInstructions'] = deliveryInstructions;
72
+ obj['address'] = address;
73
+ obj['addressExtra'] = addressExtra;
74
+ obj['zip'] = zip;
75
+ obj['town'] = town;
76
+ obj['country'] = country;
77
+ obj['gracePeriod'] = gracePeriod;
78
+ obj['usedBankAccounts'] = usedBankAccounts;
79
+ }
80
+
81
+ /**
82
+ * Constructs a <code>NewCustomer</code> from a plain JavaScript object, optionally creating a new instance.
83
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
84
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
85
+ * @param {module:model/NewCustomer} obj Optional instance to populate.
86
+ * @return {module:model/NewCustomer} The populated <code>NewCustomer</code> instance.
87
+ */
88
+ }, {
89
+ key: "constructFromObject",
90
+ value: function constructFromObject(data, obj) {
91
+ if (data) {
92
+ obj = obj || new NewCustomer();
93
+ if (data.hasOwnProperty('visibleCustomerId')) {
94
+ obj['visibleCustomerId'] = _ApiClient["default"].convertToType(data['visibleCustomerId'], 'Number');
95
+ }
96
+ if (data.hasOwnProperty('salutation')) {
97
+ obj['salutation'] = _Salutation["default"].constructFromObject(data['salutation']);
98
+ }
99
+ if (data.hasOwnProperty('companyName')) {
100
+ obj['companyName'] = _ApiClient["default"].convertToType(data['companyName'], 'String');
101
+ }
102
+ if (data.hasOwnProperty('givenName')) {
103
+ obj['givenName'] = _ApiClient["default"].convertToType(data['givenName'], 'String');
104
+ }
105
+ if (data.hasOwnProperty('familyName')) {
106
+ obj['familyName'] = _ApiClient["default"].convertToType(data['familyName'], 'String');
107
+ }
108
+ if (data.hasOwnProperty('deliveryInstructions')) {
109
+ obj['deliveryInstructions'] = _ApiClient["default"].convertToType(data['deliveryInstructions'], 'String');
110
+ }
111
+ if (data.hasOwnProperty('address')) {
112
+ obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
113
+ }
114
+ if (data.hasOwnProperty('addressExtra')) {
115
+ obj['addressExtra'] = _ApiClient["default"].convertToType(data['addressExtra'], 'String');
116
+ }
117
+ if (data.hasOwnProperty('zip')) {
118
+ obj['zip'] = _ApiClient["default"].convertToType(data['zip'], 'String');
119
+ }
120
+ if (data.hasOwnProperty('town')) {
121
+ obj['town'] = _ApiClient["default"].convertToType(data['town'], 'String');
122
+ }
123
+ if (data.hasOwnProperty('country')) {
124
+ obj['country'] = _ApiClient["default"].convertToType(data['country'], 'String');
125
+ }
126
+ if (data.hasOwnProperty('gracePeriod')) {
127
+ obj['gracePeriod'] = _ApiClient["default"].convertToType(data['gracePeriod'], 'Number');
128
+ }
129
+ if (data.hasOwnProperty('usedBankAccounts')) {
130
+ obj['usedBankAccounts'] = _ApiClient["default"].convertToType(data['usedBankAccounts'], ['String']);
131
+ }
132
+ }
133
+ return obj;
134
+ }
135
+
136
+ /**
137
+ * Validates the JSON data with respect to <code>NewCustomer</code>.
138
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
139
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>NewCustomer</code>.
140
+ */
141
+ }, {
142
+ key: "validateJSON",
143
+ value: function validateJSON(data) {
144
+ // check to make sure all required properties are present in the JSON string
145
+ var _iterator = _createForOfIteratorHelper(NewCustomer.RequiredProperties),
146
+ _step;
147
+ try {
148
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
149
+ var property = _step.value;
150
+ if (!data.hasOwnProperty(property)) {
151
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
152
+ }
153
+ }
154
+ // ensure the json data is a string
155
+ } catch (err) {
156
+ _iterator.e(err);
157
+ } finally {
158
+ _iterator.f();
159
+ }
160
+ if (data['companyName'] && !(typeof data['companyName'] === 'string' || data['companyName'] instanceof String)) {
161
+ throw new Error("Expected the field `companyName` to be a primitive type in the JSON string but got " + data['companyName']);
162
+ }
163
+ // ensure the json data is a string
164
+ if (data['givenName'] && !(typeof data['givenName'] === 'string' || data['givenName'] instanceof String)) {
165
+ throw new Error("Expected the field `givenName` to be a primitive type in the JSON string but got " + data['givenName']);
166
+ }
167
+ // ensure the json data is a string
168
+ if (data['familyName'] && !(typeof data['familyName'] === 'string' || data['familyName'] instanceof String)) {
169
+ throw new Error("Expected the field `familyName` to be a primitive type in the JSON string but got " + data['familyName']);
170
+ }
171
+ // ensure the json data is a string
172
+ if (data['deliveryInstructions'] && !(typeof data['deliveryInstructions'] === 'string' || data['deliveryInstructions'] instanceof String)) {
173
+ throw new Error("Expected the field `deliveryInstructions` to be a primitive type in the JSON string but got " + data['deliveryInstructions']);
174
+ }
175
+ // ensure the json data is a string
176
+ if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
177
+ throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
178
+ }
179
+ // ensure the json data is a string
180
+ if (data['addressExtra'] && !(typeof data['addressExtra'] === 'string' || data['addressExtra'] instanceof String)) {
181
+ throw new Error("Expected the field `addressExtra` to be a primitive type in the JSON string but got " + data['addressExtra']);
182
+ }
183
+ // ensure the json data is a string
184
+ if (data['zip'] && !(typeof data['zip'] === 'string' || data['zip'] instanceof String)) {
185
+ throw new Error("Expected the field `zip` to be a primitive type in the JSON string but got " + data['zip']);
186
+ }
187
+ // ensure the json data is a string
188
+ if (data['town'] && !(typeof data['town'] === 'string' || data['town'] instanceof String)) {
189
+ throw new Error("Expected the field `town` to be a primitive type in the JSON string but got " + data['town']);
190
+ }
191
+ // ensure the json data is a string
192
+ if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
193
+ throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
194
+ }
195
+ // ensure the json data is an array
196
+ if (!Array.isArray(data['usedBankAccounts'])) {
197
+ throw new Error("Expected the field `usedBankAccounts` to be an array in the JSON data but got " + data['usedBankAccounts']);
198
+ }
199
+ return true;
200
+ }
201
+ }]);
202
+ }();
203
+ NewCustomer.RequiredProperties = ["visibleCustomerId", "salutation", "companyName", "givenName", "familyName", "deliveryInstructions", "address", "addressExtra", "zip", "town", "country", "gracePeriod", "usedBankAccounts"];
204
+
205
+ /**
206
+ * @member {Number} visibleCustomerId
207
+ */
208
+ NewCustomer.prototype['visibleCustomerId'] = undefined;
209
+
210
+ /**
211
+ * @member {module:model/Salutation} salutation
212
+ */
213
+ NewCustomer.prototype['salutation'] = undefined;
214
+
215
+ /**
216
+ * @member {String} companyName
217
+ */
218
+ NewCustomer.prototype['companyName'] = undefined;
219
+
220
+ /**
221
+ * @member {String} givenName
222
+ */
223
+ NewCustomer.prototype['givenName'] = undefined;
224
+
225
+ /**
226
+ * @member {String} familyName
227
+ */
228
+ NewCustomer.prototype['familyName'] = undefined;
229
+
230
+ /**
231
+ * @member {String} deliveryInstructions
232
+ */
233
+ NewCustomer.prototype['deliveryInstructions'] = undefined;
234
+
235
+ /**
236
+ * @member {String} address
237
+ */
238
+ NewCustomer.prototype['address'] = undefined;
239
+
240
+ /**
241
+ * @member {String} addressExtra
242
+ */
243
+ NewCustomer.prototype['addressExtra'] = undefined;
244
+
245
+ /**
246
+ * @member {String} zip
247
+ */
248
+ NewCustomer.prototype['zip'] = undefined;
249
+
250
+ /**
251
+ * @member {String} town
252
+ */
253
+ NewCustomer.prototype['town'] = undefined;
254
+
255
+ /**
256
+ * @member {String} country
257
+ */
258
+ NewCustomer.prototype['country'] = undefined;
259
+
260
+ /**
261
+ * @member {Number} gracePeriod
262
+ */
263
+ NewCustomer.prototype['gracePeriod'] = undefined;
264
+
265
+ /**
266
+ * @member {Array.<String>} usedBankAccounts
267
+ */
268
+ NewCustomer.prototype['usedBankAccounts'] = undefined;
269
+ var _default = exports["default"] = NewCustomer;