@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.
- package/README.md +176 -0
- package/dist/ApiClient.js +703 -0
- package/dist/api/BankAccountApi.js +115 -0
- package/dist/api/CustomerApi.js +199 -0
- package/dist/api/InvoiceApi.js +233 -0
- package/dist/index.js +139 -0
- package/dist/model/BankAccount.js +178 -0
- package/dist/model/BankAccountData.js +130 -0
- package/dist/model/Currency.js +160 -0
- package/dist/model/CurrencyData.js +130 -0
- package/dist/model/Customer.js +307 -0
- package/dist/model/CustomerData.js +130 -0
- package/dist/model/DetailedInvoice.js +146 -0
- package/dist/model/Invoice.js +389 -0
- package/dist/model/InvoiceData.js +130 -0
- package/dist/model/InvoicePosition.js +238 -0
- package/dist/model/NewBankAccount.js +140 -0
- package/dist/model/NewCustomer.js +269 -0
- package/dist/model/NewInvoice.js +164 -0
- package/dist/model/NewInvoicePosition.js +196 -0
- package/dist/model/Salutation.js +68 -0
- package/package.json +46 -0
package/dist/index.js
ADDED
@@ -0,0 +1,139 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "ApiClient", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function get() {
|
9
|
+
return _ApiClient["default"];
|
10
|
+
}
|
11
|
+
});
|
12
|
+
Object.defineProperty(exports, "BankAccount", {
|
13
|
+
enumerable: true,
|
14
|
+
get: function get() {
|
15
|
+
return _BankAccount["default"];
|
16
|
+
}
|
17
|
+
});
|
18
|
+
Object.defineProperty(exports, "BankAccountApi", {
|
19
|
+
enumerable: true,
|
20
|
+
get: function get() {
|
21
|
+
return _BankAccountApi["default"];
|
22
|
+
}
|
23
|
+
});
|
24
|
+
Object.defineProperty(exports, "BankAccountData", {
|
25
|
+
enumerable: true,
|
26
|
+
get: function get() {
|
27
|
+
return _BankAccountData["default"];
|
28
|
+
}
|
29
|
+
});
|
30
|
+
Object.defineProperty(exports, "Currency", {
|
31
|
+
enumerable: true,
|
32
|
+
get: function get() {
|
33
|
+
return _Currency["default"];
|
34
|
+
}
|
35
|
+
});
|
36
|
+
Object.defineProperty(exports, "CurrencyData", {
|
37
|
+
enumerable: true,
|
38
|
+
get: function get() {
|
39
|
+
return _CurrencyData["default"];
|
40
|
+
}
|
41
|
+
});
|
42
|
+
Object.defineProperty(exports, "Customer", {
|
43
|
+
enumerable: true,
|
44
|
+
get: function get() {
|
45
|
+
return _Customer["default"];
|
46
|
+
}
|
47
|
+
});
|
48
|
+
Object.defineProperty(exports, "CustomerApi", {
|
49
|
+
enumerable: true,
|
50
|
+
get: function get() {
|
51
|
+
return _CustomerApi["default"];
|
52
|
+
}
|
53
|
+
});
|
54
|
+
Object.defineProperty(exports, "CustomerData", {
|
55
|
+
enumerable: true,
|
56
|
+
get: function get() {
|
57
|
+
return _CustomerData["default"];
|
58
|
+
}
|
59
|
+
});
|
60
|
+
Object.defineProperty(exports, "DetailedInvoice", {
|
61
|
+
enumerable: true,
|
62
|
+
get: function get() {
|
63
|
+
return _DetailedInvoice["default"];
|
64
|
+
}
|
65
|
+
});
|
66
|
+
Object.defineProperty(exports, "Invoice", {
|
67
|
+
enumerable: true,
|
68
|
+
get: function get() {
|
69
|
+
return _Invoice["default"];
|
70
|
+
}
|
71
|
+
});
|
72
|
+
Object.defineProperty(exports, "InvoiceApi", {
|
73
|
+
enumerable: true,
|
74
|
+
get: function get() {
|
75
|
+
return _InvoiceApi["default"];
|
76
|
+
}
|
77
|
+
});
|
78
|
+
Object.defineProperty(exports, "InvoiceData", {
|
79
|
+
enumerable: true,
|
80
|
+
get: function get() {
|
81
|
+
return _InvoiceData["default"];
|
82
|
+
}
|
83
|
+
});
|
84
|
+
Object.defineProperty(exports, "InvoicePosition", {
|
85
|
+
enumerable: true,
|
86
|
+
get: function get() {
|
87
|
+
return _InvoicePosition["default"];
|
88
|
+
}
|
89
|
+
});
|
90
|
+
Object.defineProperty(exports, "NewBankAccount", {
|
91
|
+
enumerable: true,
|
92
|
+
get: function get() {
|
93
|
+
return _NewBankAccount["default"];
|
94
|
+
}
|
95
|
+
});
|
96
|
+
Object.defineProperty(exports, "NewCustomer", {
|
97
|
+
enumerable: true,
|
98
|
+
get: function get() {
|
99
|
+
return _NewCustomer["default"];
|
100
|
+
}
|
101
|
+
});
|
102
|
+
Object.defineProperty(exports, "NewInvoice", {
|
103
|
+
enumerable: true,
|
104
|
+
get: function get() {
|
105
|
+
return _NewInvoice["default"];
|
106
|
+
}
|
107
|
+
});
|
108
|
+
Object.defineProperty(exports, "NewInvoicePosition", {
|
109
|
+
enumerable: true,
|
110
|
+
get: function get() {
|
111
|
+
return _NewInvoicePosition["default"];
|
112
|
+
}
|
113
|
+
});
|
114
|
+
Object.defineProperty(exports, "Salutation", {
|
115
|
+
enumerable: true,
|
116
|
+
get: function get() {
|
117
|
+
return _Salutation["default"];
|
118
|
+
}
|
119
|
+
});
|
120
|
+
var _ApiClient = _interopRequireDefault(require("./ApiClient"));
|
121
|
+
var _BankAccount = _interopRequireDefault(require("./model/BankAccount"));
|
122
|
+
var _BankAccountData = _interopRequireDefault(require("./model/BankAccountData"));
|
123
|
+
var _Currency = _interopRequireDefault(require("./model/Currency"));
|
124
|
+
var _CurrencyData = _interopRequireDefault(require("./model/CurrencyData"));
|
125
|
+
var _Customer = _interopRequireDefault(require("./model/Customer"));
|
126
|
+
var _CustomerData = _interopRequireDefault(require("./model/CustomerData"));
|
127
|
+
var _DetailedInvoice = _interopRequireDefault(require("./model/DetailedInvoice"));
|
128
|
+
var _Invoice = _interopRequireDefault(require("./model/Invoice"));
|
129
|
+
var _InvoiceData = _interopRequireDefault(require("./model/InvoiceData"));
|
130
|
+
var _InvoicePosition = _interopRequireDefault(require("./model/InvoicePosition"));
|
131
|
+
var _NewBankAccount = _interopRequireDefault(require("./model/NewBankAccount"));
|
132
|
+
var _NewCustomer = _interopRequireDefault(require("./model/NewCustomer"));
|
133
|
+
var _NewInvoice = _interopRequireDefault(require("./model/NewInvoice"));
|
134
|
+
var _NewInvoicePosition = _interopRequireDefault(require("./model/NewInvoicePosition"));
|
135
|
+
var _Salutation = _interopRequireDefault(require("./model/Salutation"));
|
136
|
+
var _BankAccountApi = _interopRequireDefault(require("./api/BankAccountApi"));
|
137
|
+
var _CustomerApi = _interopRequireDefault(require("./api/CustomerApi"));
|
138
|
+
var _InvoiceApi = _interopRequireDefault(require("./api/InvoiceApi"));
|
139
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
@@ -0,0 +1,178 @@
|
|
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 BankAccount model module.
|
31
|
+
* @module model/BankAccount
|
32
|
+
* @version 0.1.1
|
33
|
+
*/
|
34
|
+
var BankAccount = /*#__PURE__*/function () {
|
35
|
+
/**
|
36
|
+
* Constructs a new <code>BankAccount</code>.
|
37
|
+
* @alias module:model/BankAccount
|
38
|
+
* @param bankAccountId {String}
|
39
|
+
* @param tenantId {String}
|
40
|
+
* @param bankName {String}
|
41
|
+
* @param iban {String}
|
42
|
+
* @param bic {String}
|
43
|
+
* @param lastChange {Date}
|
44
|
+
*/
|
45
|
+
function BankAccount(bankAccountId, tenantId, bankName, iban, bic, lastChange) {
|
46
|
+
_classCallCheck(this, BankAccount);
|
47
|
+
BankAccount.initialize(this, bankAccountId, tenantId, bankName, iban, bic, lastChange);
|
48
|
+
}
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Initializes the fields of this object.
|
52
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
53
|
+
* Only for internal use.
|
54
|
+
*/
|
55
|
+
return _createClass(BankAccount, null, [{
|
56
|
+
key: "initialize",
|
57
|
+
value: function initialize(obj, bankAccountId, tenantId, bankName, iban, bic, lastChange) {
|
58
|
+
obj['bankAccountId'] = bankAccountId;
|
59
|
+
obj['tenantId'] = tenantId;
|
60
|
+
obj['bankName'] = bankName;
|
61
|
+
obj['iban'] = iban;
|
62
|
+
obj['bic'] = bic;
|
63
|
+
obj['lastChange'] = lastChange;
|
64
|
+
}
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Constructs a <code>BankAccount</code> from a plain JavaScript object, optionally creating a new instance.
|
68
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
69
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
70
|
+
* @param {module:model/BankAccount} obj Optional instance to populate.
|
71
|
+
* @return {module:model/BankAccount} The populated <code>BankAccount</code> instance.
|
72
|
+
*/
|
73
|
+
}, {
|
74
|
+
key: "constructFromObject",
|
75
|
+
value: function constructFromObject(data, obj) {
|
76
|
+
if (data) {
|
77
|
+
obj = obj || new BankAccount();
|
78
|
+
if (data.hasOwnProperty('bankAccountId')) {
|
79
|
+
obj['bankAccountId'] = _ApiClient["default"].convertToType(data['bankAccountId'], 'String');
|
80
|
+
}
|
81
|
+
if (data.hasOwnProperty('tenantId')) {
|
82
|
+
obj['tenantId'] = _ApiClient["default"].convertToType(data['tenantId'], 'String');
|
83
|
+
}
|
84
|
+
if (data.hasOwnProperty('bankName')) {
|
85
|
+
obj['bankName'] = _ApiClient["default"].convertToType(data['bankName'], 'String');
|
86
|
+
}
|
87
|
+
if (data.hasOwnProperty('iban')) {
|
88
|
+
obj['iban'] = _ApiClient["default"].convertToType(data['iban'], 'String');
|
89
|
+
}
|
90
|
+
if (data.hasOwnProperty('bic')) {
|
91
|
+
obj['bic'] = _ApiClient["default"].convertToType(data['bic'], 'String');
|
92
|
+
}
|
93
|
+
if (data.hasOwnProperty('lastChange')) {
|
94
|
+
obj['lastChange'] = _ApiClient["default"].convertToType(data['lastChange'], 'Date');
|
95
|
+
}
|
96
|
+
}
|
97
|
+
return obj;
|
98
|
+
}
|
99
|
+
|
100
|
+
/**
|
101
|
+
* Validates the JSON data with respect to <code>BankAccount</code>.
|
102
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
103
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>BankAccount</code>.
|
104
|
+
*/
|
105
|
+
}, {
|
106
|
+
key: "validateJSON",
|
107
|
+
value: function validateJSON(data) {
|
108
|
+
// check to make sure all required properties are present in the JSON string
|
109
|
+
var _iterator = _createForOfIteratorHelper(BankAccount.RequiredProperties),
|
110
|
+
_step;
|
111
|
+
try {
|
112
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
113
|
+
var property = _step.value;
|
114
|
+
if (!data.hasOwnProperty(property)) {
|
115
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
116
|
+
}
|
117
|
+
}
|
118
|
+
// ensure the json data is a string
|
119
|
+
} catch (err) {
|
120
|
+
_iterator.e(err);
|
121
|
+
} finally {
|
122
|
+
_iterator.f();
|
123
|
+
}
|
124
|
+
if (data['bankAccountId'] && !(typeof data['bankAccountId'] === 'string' || data['bankAccountId'] instanceof String)) {
|
125
|
+
throw new Error("Expected the field `bankAccountId` to be a primitive type in the JSON string but got " + data['bankAccountId']);
|
126
|
+
}
|
127
|
+
// ensure the json data is a string
|
128
|
+
if (data['tenantId'] && !(typeof data['tenantId'] === 'string' || data['tenantId'] instanceof String)) {
|
129
|
+
throw new Error("Expected the field `tenantId` to be a primitive type in the JSON string but got " + data['tenantId']);
|
130
|
+
}
|
131
|
+
// ensure the json data is a string
|
132
|
+
if (data['bankName'] && !(typeof data['bankName'] === 'string' || data['bankName'] instanceof String)) {
|
133
|
+
throw new Error("Expected the field `bankName` to be a primitive type in the JSON string but got " + data['bankName']);
|
134
|
+
}
|
135
|
+
// ensure the json data is a string
|
136
|
+
if (data['iban'] && !(typeof data['iban'] === 'string' || data['iban'] instanceof String)) {
|
137
|
+
throw new Error("Expected the field `iban` to be a primitive type in the JSON string but got " + data['iban']);
|
138
|
+
}
|
139
|
+
// ensure the json data is a string
|
140
|
+
if (data['bic'] && !(typeof data['bic'] === 'string' || data['bic'] instanceof String)) {
|
141
|
+
throw new Error("Expected the field `bic` to be a primitive type in the JSON string but got " + data['bic']);
|
142
|
+
}
|
143
|
+
return true;
|
144
|
+
}
|
145
|
+
}]);
|
146
|
+
}();
|
147
|
+
BankAccount.RequiredProperties = ["bankAccountId", "tenantId", "bankName", "iban", "bic", "lastChange"];
|
148
|
+
|
149
|
+
/**
|
150
|
+
* @member {String} bankAccountId
|
151
|
+
*/
|
152
|
+
BankAccount.prototype['bankAccountId'] = undefined;
|
153
|
+
|
154
|
+
/**
|
155
|
+
* @member {String} tenantId
|
156
|
+
*/
|
157
|
+
BankAccount.prototype['tenantId'] = undefined;
|
158
|
+
|
159
|
+
/**
|
160
|
+
* @member {String} bankName
|
161
|
+
*/
|
162
|
+
BankAccount.prototype['bankName'] = undefined;
|
163
|
+
|
164
|
+
/**
|
165
|
+
* @member {String} iban
|
166
|
+
*/
|
167
|
+
BankAccount.prototype['iban'] = undefined;
|
168
|
+
|
169
|
+
/**
|
170
|
+
* @member {String} bic
|
171
|
+
*/
|
172
|
+
BankAccount.prototype['bic'] = undefined;
|
173
|
+
|
174
|
+
/**
|
175
|
+
* @member {Date} lastChange
|
176
|
+
*/
|
177
|
+
BankAccount.prototype['lastChange'] = undefined;
|
178
|
+
var _default = exports["default"] = BankAccount;
|
@@ -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 _BankAccount = _interopRequireDefault(require("./BankAccount"));
|
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 BankAccountData model module.
|
32
|
+
* @module model/BankAccountData
|
33
|
+
* @version 0.1.1
|
34
|
+
*/
|
35
|
+
var BankAccountData = /*#__PURE__*/function () {
|
36
|
+
/**
|
37
|
+
* Constructs a new <code>BankAccountData</code>.
|
38
|
+
* @alias module:model/BankAccountData
|
39
|
+
* @param data {Array.<module:model/BankAccount>}
|
40
|
+
*/
|
41
|
+
function BankAccountData(data) {
|
42
|
+
_classCallCheck(this, BankAccountData);
|
43
|
+
BankAccountData.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(BankAccountData, null, [{
|
52
|
+
key: "initialize",
|
53
|
+
value: function initialize(obj, data) {
|
54
|
+
obj['data'] = data;
|
55
|
+
}
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Constructs a <code>BankAccountData</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/BankAccountData} obj Optional instance to populate.
|
62
|
+
* @return {module:model/BankAccountData} The populated <code>BankAccountData</code> instance.
|
63
|
+
*/
|
64
|
+
}, {
|
65
|
+
key: "constructFromObject",
|
66
|
+
value: function constructFromObject(data, obj) {
|
67
|
+
if (data) {
|
68
|
+
obj = obj || new BankAccountData();
|
69
|
+
if (data.hasOwnProperty('data')) {
|
70
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_BankAccount["default"]]);
|
71
|
+
}
|
72
|
+
}
|
73
|
+
return obj;
|
74
|
+
}
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Validates the JSON data with respect to <code>BankAccountData</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>BankAccountData</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(BankAccountData.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
|
+
_BankAccount["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
|
+
BankAccountData.RequiredProperties = ["data"];
|
125
|
+
|
126
|
+
/**
|
127
|
+
* @member {Array.<module:model/BankAccount>} data
|
128
|
+
*/
|
129
|
+
BankAccountData.prototype['data'] = undefined;
|
130
|
+
var _default = exports["default"] = BankAccountData;
|
@@ -0,0 +1,160 @@
|
|
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 Currency model module.
|
31
|
+
* @module model/Currency
|
32
|
+
* @version 0.1.1
|
33
|
+
*/
|
34
|
+
var Currency = /*#__PURE__*/function () {
|
35
|
+
/**
|
36
|
+
* Constructs a new <code>Currency</code>.
|
37
|
+
* @alias module:model/Currency
|
38
|
+
* @param currencyId {String}
|
39
|
+
* @param name {String}
|
40
|
+
* @param symbol {String}
|
41
|
+
* @param internalDecimalPlace {Number}
|
42
|
+
* @param officialDecimalPlace {Number}
|
43
|
+
*/
|
44
|
+
function Currency(currencyId, name, symbol, internalDecimalPlace, officialDecimalPlace) {
|
45
|
+
_classCallCheck(this, Currency);
|
46
|
+
Currency.initialize(this, currencyId, name, symbol, internalDecimalPlace, officialDecimalPlace);
|
47
|
+
}
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Initializes the fields of this object.
|
51
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
52
|
+
* Only for internal use.
|
53
|
+
*/
|
54
|
+
return _createClass(Currency, null, [{
|
55
|
+
key: "initialize",
|
56
|
+
value: function initialize(obj, currencyId, name, symbol, internalDecimalPlace, officialDecimalPlace) {
|
57
|
+
obj['currency_id'] = currencyId;
|
58
|
+
obj['name'] = name;
|
59
|
+
obj['symbol'] = symbol;
|
60
|
+
obj['internal_decimal_place'] = internalDecimalPlace;
|
61
|
+
obj['official_decimal_place'] = officialDecimalPlace;
|
62
|
+
}
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Constructs a <code>Currency</code> from a plain JavaScript object, optionally creating a new instance.
|
66
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
67
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
68
|
+
* @param {module:model/Currency} obj Optional instance to populate.
|
69
|
+
* @return {module:model/Currency} The populated <code>Currency</code> instance.
|
70
|
+
*/
|
71
|
+
}, {
|
72
|
+
key: "constructFromObject",
|
73
|
+
value: function constructFromObject(data, obj) {
|
74
|
+
if (data) {
|
75
|
+
obj = obj || new Currency();
|
76
|
+
if (data.hasOwnProperty('currency_id')) {
|
77
|
+
obj['currency_id'] = _ApiClient["default"].convertToType(data['currency_id'], 'String');
|
78
|
+
}
|
79
|
+
if (data.hasOwnProperty('name')) {
|
80
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
81
|
+
}
|
82
|
+
if (data.hasOwnProperty('symbol')) {
|
83
|
+
obj['symbol'] = _ApiClient["default"].convertToType(data['symbol'], 'String');
|
84
|
+
}
|
85
|
+
if (data.hasOwnProperty('internal_decimal_place')) {
|
86
|
+
obj['internal_decimal_place'] = _ApiClient["default"].convertToType(data['internal_decimal_place'], 'Number');
|
87
|
+
}
|
88
|
+
if (data.hasOwnProperty('official_decimal_place')) {
|
89
|
+
obj['official_decimal_place'] = _ApiClient["default"].convertToType(data['official_decimal_place'], 'Number');
|
90
|
+
}
|
91
|
+
}
|
92
|
+
return obj;
|
93
|
+
}
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Validates the JSON data with respect to <code>Currency</code>.
|
97
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
98
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Currency</code>.
|
99
|
+
*/
|
100
|
+
}, {
|
101
|
+
key: "validateJSON",
|
102
|
+
value: function validateJSON(data) {
|
103
|
+
// check to make sure all required properties are present in the JSON string
|
104
|
+
var _iterator = _createForOfIteratorHelper(Currency.RequiredProperties),
|
105
|
+
_step;
|
106
|
+
try {
|
107
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
108
|
+
var property = _step.value;
|
109
|
+
if (!data.hasOwnProperty(property)) {
|
110
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
111
|
+
}
|
112
|
+
}
|
113
|
+
// ensure the json data is a string
|
114
|
+
} catch (err) {
|
115
|
+
_iterator.e(err);
|
116
|
+
} finally {
|
117
|
+
_iterator.f();
|
118
|
+
}
|
119
|
+
if (data['currency_id'] && !(typeof data['currency_id'] === 'string' || data['currency_id'] instanceof String)) {
|
120
|
+
throw new Error("Expected the field `currency_id` to be a primitive type in the JSON string but got " + data['currency_id']);
|
121
|
+
}
|
122
|
+
// ensure the json data is a string
|
123
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
124
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
125
|
+
}
|
126
|
+
// ensure the json data is a string
|
127
|
+
if (data['symbol'] && !(typeof data['symbol'] === 'string' || data['symbol'] instanceof String)) {
|
128
|
+
throw new Error("Expected the field `symbol` to be a primitive type in the JSON string but got " + data['symbol']);
|
129
|
+
}
|
130
|
+
return true;
|
131
|
+
}
|
132
|
+
}]);
|
133
|
+
}();
|
134
|
+
Currency.RequiredProperties = ["currency_id", "name", "symbol", "internal_decimal_place", "official_decimal_place"];
|
135
|
+
|
136
|
+
/**
|
137
|
+
* @member {String} currency_id
|
138
|
+
*/
|
139
|
+
Currency.prototype['currency_id'] = undefined;
|
140
|
+
|
141
|
+
/**
|
142
|
+
* @member {String} name
|
143
|
+
*/
|
144
|
+
Currency.prototype['name'] = undefined;
|
145
|
+
|
146
|
+
/**
|
147
|
+
* @member {String} symbol
|
148
|
+
*/
|
149
|
+
Currency.prototype['symbol'] = undefined;
|
150
|
+
|
151
|
+
/**
|
152
|
+
* @member {Number} internal_decimal_place
|
153
|
+
*/
|
154
|
+
Currency.prototype['internal_decimal_place'] = undefined;
|
155
|
+
|
156
|
+
/**
|
157
|
+
* @member {Number} official_decimal_place
|
158
|
+
*/
|
159
|
+
Currency.prototype['official_decimal_place'] = undefined;
|
160
|
+
var _default = exports["default"] = Currency;
|