@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,130 @@
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 _Currency = _interopRequireDefault(require("./Currency"));
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 CurrencyData model module.
32
+ * @module model/CurrencyData
33
+ * @version 0.1.1
34
+ */
35
+ var CurrencyData = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>CurrencyData</code>.
38
+ * @alias module:model/CurrencyData
39
+ * @param data {Array.<module:model/Currency>}
40
+ */
41
+ function CurrencyData(data) {
42
+ _classCallCheck(this, CurrencyData);
43
+ CurrencyData.initialize(this, data);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(CurrencyData, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, data) {
54
+ obj['data'] = data;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>CurrencyData</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/CurrencyData} obj Optional instance to populate.
62
+ * @return {module:model/CurrencyData} The populated <code>CurrencyData</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new CurrencyData();
69
+ if (data.hasOwnProperty('data')) {
70
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_Currency["default"]]);
71
+ }
72
+ }
73
+ return obj;
74
+ }
75
+
76
+ /**
77
+ * Validates the JSON data with respect to <code>CurrencyData</code>.
78
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
79
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CurrencyData</code>.
80
+ */
81
+ }, {
82
+ key: "validateJSON",
83
+ value: function validateJSON(data) {
84
+ // check to make sure all required properties are present in the JSON string
85
+ var _iterator = _createForOfIteratorHelper(CurrencyData.RequiredProperties),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var property = _step.value;
90
+ if (!data.hasOwnProperty(property)) {
91
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
92
+ }
93
+ }
94
+ } catch (err) {
95
+ _iterator.e(err);
96
+ } finally {
97
+ _iterator.f();
98
+ }
99
+ if (data['data']) {
100
+ // data not null
101
+ // ensure the json data is an array
102
+ if (!Array.isArray(data['data'])) {
103
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
104
+ }
105
+ // validate the optional field `data` (array)
106
+ var _iterator2 = _createForOfIteratorHelper(data['data']),
107
+ _step2;
108
+ try {
109
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
110
+ var item = _step2.value;
111
+ _Currency["default"].validateJSON(item);
112
+ }
113
+ } catch (err) {
114
+ _iterator2.e(err);
115
+ } finally {
116
+ _iterator2.f();
117
+ }
118
+ ;
119
+ }
120
+ return true;
121
+ }
122
+ }]);
123
+ }();
124
+ CurrencyData.RequiredProperties = ["data"];
125
+
126
+ /**
127
+ * @member {Array.<module:model/Currency>} data
128
+ */
129
+ CurrencyData.prototype['data'] = undefined;
130
+ var _default = exports["default"] = CurrencyData;
@@ -0,0 +1,307 @@
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 Customer model module.
32
+ * @module model/Customer
33
+ * @version 0.1.1
34
+ */
35
+ var Customer = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>Customer</code>.
38
+ * @alias module:model/Customer
39
+ * @param customerId {String}
40
+ * @param tenantId {String}
41
+ * @param visibleCustomerId {Number}
42
+ * @param salutation {module:model/Salutation}
43
+ * @param companyName {String}
44
+ * @param givenName {String}
45
+ * @param familyName {String}
46
+ * @param deliveryInstructions {String}
47
+ * @param address {String}
48
+ * @param addressExtra {String}
49
+ * @param zip {String}
50
+ * @param town {String}
51
+ * @param country {String}
52
+ * @param gracePeriod {Number}
53
+ * @param usedBankAccounts {Array.<String>}
54
+ * @param lastChange {Date}
55
+ */
56
+ function Customer(customerId, tenantId, visibleCustomerId, salutation, companyName, givenName, familyName, deliveryInstructions, address, addressExtra, zip, town, country, gracePeriod, usedBankAccounts, lastChange) {
57
+ _classCallCheck(this, Customer);
58
+ Customer.initialize(this, customerId, tenantId, visibleCustomerId, salutation, companyName, givenName, familyName, deliveryInstructions, address, addressExtra, zip, town, country, gracePeriod, usedBankAccounts, lastChange);
59
+ }
60
+
61
+ /**
62
+ * Initializes the fields of this object.
63
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
64
+ * Only for internal use.
65
+ */
66
+ return _createClass(Customer, null, [{
67
+ key: "initialize",
68
+ value: function initialize(obj, customerId, tenantId, visibleCustomerId, salutation, companyName, givenName, familyName, deliveryInstructions, address, addressExtra, zip, town, country, gracePeriod, usedBankAccounts, lastChange) {
69
+ obj['customerId'] = customerId;
70
+ obj['tenantId'] = tenantId;
71
+ obj['visibleCustomerId'] = visibleCustomerId;
72
+ obj['salutation'] = salutation;
73
+ obj['companyName'] = companyName;
74
+ obj['givenName'] = givenName;
75
+ obj['familyName'] = familyName;
76
+ obj['deliveryInstructions'] = deliveryInstructions;
77
+ obj['address'] = address;
78
+ obj['addressExtra'] = addressExtra;
79
+ obj['zip'] = zip;
80
+ obj['town'] = town;
81
+ obj['country'] = country;
82
+ obj['gracePeriod'] = gracePeriod;
83
+ obj['usedBankAccounts'] = usedBankAccounts;
84
+ obj['lastChange'] = lastChange;
85
+ }
86
+
87
+ /**
88
+ * Constructs a <code>Customer</code> from a plain JavaScript object, optionally creating a new instance.
89
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
90
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
91
+ * @param {module:model/Customer} obj Optional instance to populate.
92
+ * @return {module:model/Customer} The populated <code>Customer</code> instance.
93
+ */
94
+ }, {
95
+ key: "constructFromObject",
96
+ value: function constructFromObject(data, obj) {
97
+ if (data) {
98
+ obj = obj || new Customer();
99
+ if (data.hasOwnProperty('customerId')) {
100
+ obj['customerId'] = _ApiClient["default"].convertToType(data['customerId'], 'String');
101
+ }
102
+ if (data.hasOwnProperty('tenantId')) {
103
+ obj['tenantId'] = _ApiClient["default"].convertToType(data['tenantId'], 'String');
104
+ }
105
+ if (data.hasOwnProperty('visibleCustomerId')) {
106
+ obj['visibleCustomerId'] = _ApiClient["default"].convertToType(data['visibleCustomerId'], 'Number');
107
+ }
108
+ if (data.hasOwnProperty('salutation')) {
109
+ obj['salutation'] = _Salutation["default"].constructFromObject(data['salutation']);
110
+ }
111
+ if (data.hasOwnProperty('companyName')) {
112
+ obj['companyName'] = _ApiClient["default"].convertToType(data['companyName'], 'String');
113
+ }
114
+ if (data.hasOwnProperty('givenName')) {
115
+ obj['givenName'] = _ApiClient["default"].convertToType(data['givenName'], 'String');
116
+ }
117
+ if (data.hasOwnProperty('familyName')) {
118
+ obj['familyName'] = _ApiClient["default"].convertToType(data['familyName'], 'String');
119
+ }
120
+ if (data.hasOwnProperty('deliveryInstructions')) {
121
+ obj['deliveryInstructions'] = _ApiClient["default"].convertToType(data['deliveryInstructions'], 'String');
122
+ }
123
+ if (data.hasOwnProperty('address')) {
124
+ obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
125
+ }
126
+ if (data.hasOwnProperty('addressExtra')) {
127
+ obj['addressExtra'] = _ApiClient["default"].convertToType(data['addressExtra'], 'String');
128
+ }
129
+ if (data.hasOwnProperty('zip')) {
130
+ obj['zip'] = _ApiClient["default"].convertToType(data['zip'], 'String');
131
+ }
132
+ if (data.hasOwnProperty('town')) {
133
+ obj['town'] = _ApiClient["default"].convertToType(data['town'], 'String');
134
+ }
135
+ if (data.hasOwnProperty('country')) {
136
+ obj['country'] = _ApiClient["default"].convertToType(data['country'], 'String');
137
+ }
138
+ if (data.hasOwnProperty('gracePeriod')) {
139
+ obj['gracePeriod'] = _ApiClient["default"].convertToType(data['gracePeriod'], 'Number');
140
+ }
141
+ if (data.hasOwnProperty('usedBankAccounts')) {
142
+ obj['usedBankAccounts'] = _ApiClient["default"].convertToType(data['usedBankAccounts'], ['String']);
143
+ }
144
+ if (data.hasOwnProperty('lastChange')) {
145
+ obj['lastChange'] = _ApiClient["default"].convertToType(data['lastChange'], 'Date');
146
+ }
147
+ }
148
+ return obj;
149
+ }
150
+
151
+ /**
152
+ * Validates the JSON data with respect to <code>Customer</code>.
153
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
154
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Customer</code>.
155
+ */
156
+ }, {
157
+ key: "validateJSON",
158
+ value: function validateJSON(data) {
159
+ // check to make sure all required properties are present in the JSON string
160
+ var _iterator = _createForOfIteratorHelper(Customer.RequiredProperties),
161
+ _step;
162
+ try {
163
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
164
+ var property = _step.value;
165
+ if (!data.hasOwnProperty(property)) {
166
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
167
+ }
168
+ }
169
+ // ensure the json data is a string
170
+ } catch (err) {
171
+ _iterator.e(err);
172
+ } finally {
173
+ _iterator.f();
174
+ }
175
+ if (data['customerId'] && !(typeof data['customerId'] === 'string' || data['customerId'] instanceof String)) {
176
+ throw new Error("Expected the field `customerId` to be a primitive type in the JSON string but got " + data['customerId']);
177
+ }
178
+ // ensure the json data is a string
179
+ if (data['tenantId'] && !(typeof data['tenantId'] === 'string' || data['tenantId'] instanceof String)) {
180
+ throw new Error("Expected the field `tenantId` to be a primitive type in the JSON string but got " + data['tenantId']);
181
+ }
182
+ // ensure the json data is a string
183
+ if (data['companyName'] && !(typeof data['companyName'] === 'string' || data['companyName'] instanceof String)) {
184
+ throw new Error("Expected the field `companyName` to be a primitive type in the JSON string but got " + data['companyName']);
185
+ }
186
+ // ensure the json data is a string
187
+ if (data['givenName'] && !(typeof data['givenName'] === 'string' || data['givenName'] instanceof String)) {
188
+ throw new Error("Expected the field `givenName` to be a primitive type in the JSON string but got " + data['givenName']);
189
+ }
190
+ // ensure the json data is a string
191
+ if (data['familyName'] && !(typeof data['familyName'] === 'string' || data['familyName'] instanceof String)) {
192
+ throw new Error("Expected the field `familyName` to be a primitive type in the JSON string but got " + data['familyName']);
193
+ }
194
+ // ensure the json data is a string
195
+ if (data['deliveryInstructions'] && !(typeof data['deliveryInstructions'] === 'string' || data['deliveryInstructions'] instanceof String)) {
196
+ throw new Error("Expected the field `deliveryInstructions` to be a primitive type in the JSON string but got " + data['deliveryInstructions']);
197
+ }
198
+ // ensure the json data is a string
199
+ if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
200
+ throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
201
+ }
202
+ // ensure the json data is a string
203
+ if (data['addressExtra'] && !(typeof data['addressExtra'] === 'string' || data['addressExtra'] instanceof String)) {
204
+ throw new Error("Expected the field `addressExtra` to be a primitive type in the JSON string but got " + data['addressExtra']);
205
+ }
206
+ // ensure the json data is a string
207
+ if (data['zip'] && !(typeof data['zip'] === 'string' || data['zip'] instanceof String)) {
208
+ throw new Error("Expected the field `zip` to be a primitive type in the JSON string but got " + data['zip']);
209
+ }
210
+ // ensure the json data is a string
211
+ if (data['town'] && !(typeof data['town'] === 'string' || data['town'] instanceof String)) {
212
+ throw new Error("Expected the field `town` to be a primitive type in the JSON string but got " + data['town']);
213
+ }
214
+ // ensure the json data is a string
215
+ if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
216
+ throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
217
+ }
218
+ // ensure the json data is an array
219
+ if (!Array.isArray(data['usedBankAccounts'])) {
220
+ throw new Error("Expected the field `usedBankAccounts` to be an array in the JSON data but got " + data['usedBankAccounts']);
221
+ }
222
+ return true;
223
+ }
224
+ }]);
225
+ }();
226
+ Customer.RequiredProperties = ["customerId", "tenantId", "visibleCustomerId", "salutation", "companyName", "givenName", "familyName", "deliveryInstructions", "address", "addressExtra", "zip", "town", "country", "gracePeriod", "usedBankAccounts", "lastChange"];
227
+
228
+ /**
229
+ * @member {String} customerId
230
+ */
231
+ Customer.prototype['customerId'] = undefined;
232
+
233
+ /**
234
+ * @member {String} tenantId
235
+ */
236
+ Customer.prototype['tenantId'] = undefined;
237
+
238
+ /**
239
+ * @member {Number} visibleCustomerId
240
+ */
241
+ Customer.prototype['visibleCustomerId'] = undefined;
242
+
243
+ /**
244
+ * @member {module:model/Salutation} salutation
245
+ */
246
+ Customer.prototype['salutation'] = undefined;
247
+
248
+ /**
249
+ * @member {String} companyName
250
+ */
251
+ Customer.prototype['companyName'] = undefined;
252
+
253
+ /**
254
+ * @member {String} givenName
255
+ */
256
+ Customer.prototype['givenName'] = undefined;
257
+
258
+ /**
259
+ * @member {String} familyName
260
+ */
261
+ Customer.prototype['familyName'] = undefined;
262
+
263
+ /**
264
+ * @member {String} deliveryInstructions
265
+ */
266
+ Customer.prototype['deliveryInstructions'] = undefined;
267
+
268
+ /**
269
+ * @member {String} address
270
+ */
271
+ Customer.prototype['address'] = undefined;
272
+
273
+ /**
274
+ * @member {String} addressExtra
275
+ */
276
+ Customer.prototype['addressExtra'] = undefined;
277
+
278
+ /**
279
+ * @member {String} zip
280
+ */
281
+ Customer.prototype['zip'] = undefined;
282
+
283
+ /**
284
+ * @member {String} town
285
+ */
286
+ Customer.prototype['town'] = undefined;
287
+
288
+ /**
289
+ * @member {String} country
290
+ */
291
+ Customer.prototype['country'] = undefined;
292
+
293
+ /**
294
+ * @member {Number} gracePeriod
295
+ */
296
+ Customer.prototype['gracePeriod'] = undefined;
297
+
298
+ /**
299
+ * @member {Array.<String>} usedBankAccounts
300
+ */
301
+ Customer.prototype['usedBankAccounts'] = undefined;
302
+
303
+ /**
304
+ * @member {Date} lastChange
305
+ */
306
+ Customer.prototype['lastChange'] = undefined;
307
+ var _default = exports["default"] = Customer;
@@ -0,0 +1,130 @@
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 _Customer = _interopRequireDefault(require("./Customer"));
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 CustomerData model module.
32
+ * @module model/CustomerData
33
+ * @version 0.1.1
34
+ */
35
+ var CustomerData = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>CustomerData</code>.
38
+ * @alias module:model/CustomerData
39
+ * @param data {Array.<module:model/Customer>}
40
+ */
41
+ function CustomerData(data) {
42
+ _classCallCheck(this, CustomerData);
43
+ CustomerData.initialize(this, data);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(CustomerData, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, data) {
54
+ obj['data'] = data;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>CustomerData</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/CustomerData} obj Optional instance to populate.
62
+ * @return {module:model/CustomerData} The populated <code>CustomerData</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new CustomerData();
69
+ if (data.hasOwnProperty('data')) {
70
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_Customer["default"]]);
71
+ }
72
+ }
73
+ return obj;
74
+ }
75
+
76
+ /**
77
+ * Validates the JSON data with respect to <code>CustomerData</code>.
78
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
79
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomerData</code>.
80
+ */
81
+ }, {
82
+ key: "validateJSON",
83
+ value: function validateJSON(data) {
84
+ // check to make sure all required properties are present in the JSON string
85
+ var _iterator = _createForOfIteratorHelper(CustomerData.RequiredProperties),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var property = _step.value;
90
+ if (!data.hasOwnProperty(property)) {
91
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
92
+ }
93
+ }
94
+ } catch (err) {
95
+ _iterator.e(err);
96
+ } finally {
97
+ _iterator.f();
98
+ }
99
+ if (data['data']) {
100
+ // data not null
101
+ // ensure the json data is an array
102
+ if (!Array.isArray(data['data'])) {
103
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
104
+ }
105
+ // validate the optional field `data` (array)
106
+ var _iterator2 = _createForOfIteratorHelper(data['data']),
107
+ _step2;
108
+ try {
109
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
110
+ var item = _step2.value;
111
+ _Customer["default"].validateJSON(item);
112
+ }
113
+ } catch (err) {
114
+ _iterator2.e(err);
115
+ } finally {
116
+ _iterator2.f();
117
+ }
118
+ ;
119
+ }
120
+ return true;
121
+ }
122
+ }]);
123
+ }();
124
+ CustomerData.RequiredProperties = ["data"];
125
+
126
+ /**
127
+ * @member {Array.<module:model/Customer>} data
128
+ */
129
+ CustomerData.prototype['data'] = undefined;
130
+ var _default = exports["default"] = CustomerData;