@emilgroup/payment-sdk 1.4.1-beta.4 → 1.4.1-beta.40
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/.openapi-generator/FILES +15 -7
- package/README.md +2 -2
- package/api/bank-accounts-api.ts +501 -89
- package/api/bank-transaction-api.ts +303 -97
- package/api/{default-api.ts → health-check-api.ts} +23 -19
- package/api/payment-methods-api.ts +62 -243
- package/api/payment-reminders-api.ts +58 -100
- package/api/payment-setup-api.ts +18 -10
- package/api/payments-api.ts +73 -136
- package/api/refunds-api.ts +436 -0
- package/api/tenant-bank-account-api.ts +100 -102
- package/api/webhooks-api.ts +18 -14
- package/api.ts +6 -4
- package/base.ts +23 -11
- package/common.ts +4 -4
- package/configuration.ts +2 -2
- package/dist/api/bank-accounts-api.d.ts +293 -70
- package/dist/api/bank-accounts-api.js +433 -63
- package/dist/api/bank-transaction-api.d.ts +193 -83
- package/dist/api/bank-transaction-api.js +253 -66
- package/dist/api/health-check-api.d.ts +70 -0
- package/dist/api/{default-api.js → health-check-api.js} +32 -28
- package/dist/api/payment-methods-api.d.ts +52 -152
- package/dist/api/payment-methods-api.js +49 -179
- package/dist/api/payment-reminders-api.d.ts +53 -80
- package/dist/api/payment-reminders-api.js +45 -63
- package/dist/api/payment-setup-api.d.ts +18 -10
- package/dist/api/payment-setup-api.js +18 -10
- package/dist/api/payments-api.d.ts +63 -99
- package/dist/api/payments-api.js +56 -86
- package/dist/api/refunds-api.d.ts +251 -0
- package/dist/api/refunds-api.js +439 -0
- package/dist/api/tenant-bank-account-api.d.ts +94 -89
- package/dist/api/tenant-bank-account-api.js +72 -64
- package/dist/api/webhooks-api.d.ts +18 -14
- package/dist/api/webhooks-api.js +16 -12
- package/dist/api.d.ts +4 -3
- package/dist/api.js +4 -3
- package/dist/base.d.ts +7 -4
- package/dist/base.js +32 -23
- package/dist/common.d.ts +4 -4
- package/dist/common.js +2 -2
- package/dist/configuration.d.ts +2 -2
- package/dist/configuration.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/models/{bank-transaction-response-class.d.ts → bank-transaction-class-without-expand-properties.d.ts} +32 -34
- package/dist/models/{bank-transaction-response-class.js → bank-transaction-class-without-expand-properties.js} +2 -2
- package/dist/models/create-bank-account-request-dto.d.ts +42 -0
- package/dist/models/{get-request-dto.js → create-bank-account-request-dto.js} +2 -2
- package/dist/models/create-payment-reminder-request-dto.d.ts +2 -2
- package/dist/models/create-payment-reminder-request-dto.js +2 -2
- package/dist/models/create-payment-request-dto.d.ts +4 -4
- package/dist/models/create-payment-request-dto.js +2 -2
- package/dist/models/create-refund-request-dto.d.ts +24 -0
- package/dist/models/{get-bank-transactions-response-class.js → create-refund-request-dto.js} +2 -2
- package/dist/models/create-tenant-bank-account-request-dto.d.ts +2 -2
- package/dist/models/create-tenant-bank-account-request-dto.js +2 -2
- package/dist/models/create-tenant-bank-account-response-class.d.ts +25 -0
- package/dist/models/{list-bank-transactions-response-class.js → create-tenant-bank-account-response-class.js} +2 -2
- package/dist/models/deactivate-payment-reminder-request-dto.d.ts +2 -2
- package/dist/models/deactivate-payment-reminder-request-dto.js +2 -2
- package/dist/models/get-tenant-bank-account-response-class.d.ts +6 -6
- package/dist/models/get-tenant-bank-account-response-class.js +2 -2
- package/dist/models/index.d.ts +13 -6
- package/dist/models/index.js +13 -6
- package/dist/models/inline-response200.d.ts +2 -2
- package/dist/models/inline-response200.js +2 -2
- package/dist/models/inline-response503.d.ts +2 -2
- package/dist/models/inline-response503.js +2 -2
- package/dist/models/link-bank-transaction-request-dto-rest.d.ts +24 -0
- package/dist/models/link-bank-transaction-request-dto-rest.js +15 -0
- package/dist/models/list-tenant-bank-account-response-class.d.ts +31 -0
- package/dist/models/list-tenant-bank-account-response-class.js +15 -0
- package/dist/models/set-primary-bank-account-request-dto-rest.d.ts +24 -0
- package/dist/models/set-primary-bank-account-request-dto-rest.js +15 -0
- package/dist/models/tenant-bank-account-class-without-expand-properties.d.ts +78 -0
- package/dist/models/tenant-bank-account-class-without-expand-properties.js +15 -0
- package/dist/models/tenant-bank-account-class.d.ts +85 -0
- package/dist/models/tenant-bank-account-class.js +15 -0
- package/dist/models/unlink-bank-transaction-request-dto-rest.d.ts +24 -0
- package/dist/models/unlink-bank-transaction-request-dto-rest.js +15 -0
- package/dist/models/update-bank-account-request-dto-rest.d.ts +30 -0
- package/dist/models/update-bank-account-request-dto-rest.js +15 -0
- package/dist/models/update-bank-account-request-dto.d.ts +36 -0
- package/dist/models/update-bank-account-request-dto.js +15 -0
- package/dist/models/update-tenant-bank-account-response-class.d.ts +25 -0
- package/dist/models/update-tenant-bank-account-response-class.js +15 -0
- package/dist/models/update-tenant-bank-account-rest-request-dto.d.ts +2 -2
- package/dist/models/update-tenant-bank-account-rest-request-dto.js +2 -2
- package/dist/models/validate-pspconfig-request-dto.d.ts +2 -2
- package/dist/models/validate-pspconfig-request-dto.js +2 -2
- package/index.ts +2 -2
- package/models/{bank-transaction-response-class.ts → bank-transaction-class-without-expand-properties.ts} +32 -34
- package/models/create-bank-account-request-dto.ts +48 -0
- package/models/create-payment-reminder-request-dto.ts +2 -2
- package/models/create-payment-request-dto.ts +4 -4
- package/models/create-refund-request-dto.ts +30 -0
- package/models/create-tenant-bank-account-request-dto.ts +2 -2
- package/models/create-tenant-bank-account-response-class.ts +31 -0
- package/models/deactivate-payment-reminder-request-dto.ts +2 -2
- package/models/get-tenant-bank-account-response-class.ts +6 -6
- package/models/index.ts +13 -6
- package/models/inline-response200.ts +2 -2
- package/models/inline-response503.ts +2 -2
- package/models/link-bank-transaction-request-dto-rest.ts +30 -0
- package/models/list-tenant-bank-account-response-class.ts +37 -0
- package/models/set-primary-bank-account-request-dto-rest.ts +30 -0
- package/models/{tenant-bank-account-response-class.ts → tenant-bank-account-class-without-expand-properties.ts} +24 -12
- package/models/tenant-bank-account-class.ts +91 -0
- package/models/unlink-bank-transaction-request-dto-rest.ts +30 -0
- package/models/update-bank-account-request-dto-rest.ts +36 -0
- package/models/update-bank-account-request-dto.ts +42 -0
- package/models/update-tenant-bank-account-response-class.ts +31 -0
- package/models/update-tenant-bank-account-rest-request-dto.ts +2 -2
- package/models/validate-pspconfig-request-dto.ts +2 -2
- package/package.json +1 -1
- package/dist/api/default-api.d.ts +0 -66
- package/dist/models/get-bank-transactions-response-class.d.ts +0 -25
- package/dist/models/get-request-dto.d.ts +0 -30
- package/dist/models/list-bank-transactions-response-class.d.ts +0 -31
- package/dist/models/tenant-bank-account-response-class.d.ts +0 -66
- package/dist/models/tenant-bank-account-response-class.js +0 -15
- package/dist/models/transaction-class.d.ts +0 -54
- package/dist/models/transaction-class.js +0 -15
- package/models/get-bank-transactions-response-class.ts +0 -31
- package/models/get-request-dto.ts +0 -36
- package/models/list-bank-transactions-response-class.ts +0 -37
- package/models/transaction-class.ts +0 -60
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Emil Payment Service
|
|
6
|
+
* This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
78
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
79
|
+
};
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
exports.RefundsApi = exports.RefundsApiFactory = exports.RefundsApiFp = exports.RefundsApiAxiosParamCreator = void 0;
|
|
82
|
+
var axios_1 = __importDefault(require("axios"));
|
|
83
|
+
// Some imports not used depending on template conditions
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
var common_1 = require("../common");
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
var base_1 = require("../base");
|
|
88
|
+
/**
|
|
89
|
+
* RefundsApi - axios parameter creator
|
|
90
|
+
* @export
|
|
91
|
+
*/
|
|
92
|
+
var RefundsApiAxiosParamCreator = function (configuration) {
|
|
93
|
+
var _this = this;
|
|
94
|
+
return {
|
|
95
|
+
/**
|
|
96
|
+
* This will create a refund in the database.
|
|
97
|
+
* @summary Create the refund
|
|
98
|
+
* @param {CreateRefundRequestDto} createRefundRequestDto
|
|
99
|
+
* @param {string} [authorization] Bearer Token
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
*/
|
|
103
|
+
createRefund: function (createRefundRequestDto, authorization, options) {
|
|
104
|
+
if (options === void 0) { options = {}; }
|
|
105
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
106
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
107
|
+
return __generator(this, function (_a) {
|
|
108
|
+
switch (_a.label) {
|
|
109
|
+
case 0:
|
|
110
|
+
// verify required parameter 'createRefundRequestDto' is not null or undefined
|
|
111
|
+
(0, common_1.assertParamExists)('createRefund', 'createRefundRequestDto', createRefundRequestDto);
|
|
112
|
+
localVarPath = "/paymentservice/v1/refunds";
|
|
113
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
114
|
+
if (configuration) {
|
|
115
|
+
baseOptions = configuration.baseOptions;
|
|
116
|
+
baseAccessToken = configuration.accessToken;
|
|
117
|
+
}
|
|
118
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
119
|
+
localVarHeaderParameter = {};
|
|
120
|
+
localVarQueryParameter = {};
|
|
121
|
+
// authentication bearer required
|
|
122
|
+
// http bearer authentication required
|
|
123
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
124
|
+
case 1:
|
|
125
|
+
// authentication bearer required
|
|
126
|
+
// http bearer authentication required
|
|
127
|
+
_a.sent();
|
|
128
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
129
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
130
|
+
}
|
|
131
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
132
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
133
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
134
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
135
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createRefundRequestDto, localVarRequestOptions, configuration);
|
|
136
|
+
return [2 /*return*/, {
|
|
137
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
138
|
+
options: localVarRequestOptions,
|
|
139
|
+
}];
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
/**
|
|
145
|
+
* Retrieves the details of the refund that was previously created. Supply the unique refund code that was returned when you created it and Emil Api will return the corresponding refund information.
|
|
146
|
+
* @summary Retrieve the refund
|
|
147
|
+
* @param {string} code
|
|
148
|
+
* @param {string} [authorization] Bearer Token
|
|
149
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: refundItems<i>
|
|
150
|
+
* @param {*} [options] Override http request option.
|
|
151
|
+
* @throws {RequiredError}
|
|
152
|
+
*/
|
|
153
|
+
getRefund: function (code, authorization, expand, options) {
|
|
154
|
+
if (options === void 0) { options = {}; }
|
|
155
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
156
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
157
|
+
return __generator(this, function (_a) {
|
|
158
|
+
switch (_a.label) {
|
|
159
|
+
case 0:
|
|
160
|
+
// verify required parameter 'code' is not null or undefined
|
|
161
|
+
(0, common_1.assertParamExists)('getRefund', 'code', code);
|
|
162
|
+
localVarPath = "/paymentservice/v1/refunds/{code}"
|
|
163
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
164
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
165
|
+
if (configuration) {
|
|
166
|
+
baseOptions = configuration.baseOptions;
|
|
167
|
+
baseAccessToken = configuration.accessToken;
|
|
168
|
+
}
|
|
169
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
170
|
+
localVarHeaderParameter = {};
|
|
171
|
+
localVarQueryParameter = {};
|
|
172
|
+
// authentication bearer required
|
|
173
|
+
// http bearer authentication required
|
|
174
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
175
|
+
case 1:
|
|
176
|
+
// authentication bearer required
|
|
177
|
+
// http bearer authentication required
|
|
178
|
+
_a.sent();
|
|
179
|
+
if (expand !== undefined) {
|
|
180
|
+
localVarQueryParameter['expand'] = expand;
|
|
181
|
+
}
|
|
182
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
183
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
184
|
+
}
|
|
185
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
186
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
187
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
188
|
+
return [2 /*return*/, {
|
|
189
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
190
|
+
options: localVarRequestOptions,
|
|
191
|
+
}];
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
},
|
|
196
|
+
/**
|
|
197
|
+
* Returns a list of refunds you have previously created. The refunds are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
198
|
+
* @summary List refunds
|
|
199
|
+
* @param {string} [authorization] Bearer Token
|
|
200
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, id, status, reason, psp, accountCode, invoiceCode</i>
|
|
201
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, id, status, reason, psp, accountCode, invoiceCode</i>
|
|
202
|
+
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: id, createdAt, updatedAt, amount, psp, accountCode, invoiceCode, reason, status</i>
|
|
203
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, updatedAt, amount</i>
|
|
204
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: refundItems<i>
|
|
205
|
+
* @param {*} [options] Override http request option.
|
|
206
|
+
* @throws {RequiredError}
|
|
207
|
+
*/
|
|
208
|
+
listRefunds: function (authorization, filter, filters, search, order, expand, options) {
|
|
209
|
+
if (options === void 0) { options = {}; }
|
|
210
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
211
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
212
|
+
return __generator(this, function (_a) {
|
|
213
|
+
switch (_a.label) {
|
|
214
|
+
case 0:
|
|
215
|
+
localVarPath = "/paymentservice/v1/refunds";
|
|
216
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
217
|
+
if (configuration) {
|
|
218
|
+
baseOptions = configuration.baseOptions;
|
|
219
|
+
baseAccessToken = configuration.accessToken;
|
|
220
|
+
}
|
|
221
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
222
|
+
localVarHeaderParameter = {};
|
|
223
|
+
localVarQueryParameter = {};
|
|
224
|
+
// authentication bearer required
|
|
225
|
+
// http bearer authentication required
|
|
226
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
227
|
+
case 1:
|
|
228
|
+
// authentication bearer required
|
|
229
|
+
// http bearer authentication required
|
|
230
|
+
_a.sent();
|
|
231
|
+
if (filter !== undefined) {
|
|
232
|
+
localVarQueryParameter['filter'] = filter;
|
|
233
|
+
}
|
|
234
|
+
if (filters !== undefined) {
|
|
235
|
+
localVarQueryParameter['filters'] = filters;
|
|
236
|
+
}
|
|
237
|
+
if (search !== undefined) {
|
|
238
|
+
localVarQueryParameter['search'] = search;
|
|
239
|
+
}
|
|
240
|
+
if (order !== undefined) {
|
|
241
|
+
localVarQueryParameter['order'] = order;
|
|
242
|
+
}
|
|
243
|
+
if (expand !== undefined) {
|
|
244
|
+
localVarQueryParameter['expand'] = expand;
|
|
245
|
+
}
|
|
246
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
247
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
248
|
+
}
|
|
249
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
250
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
251
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
252
|
+
return [2 /*return*/, {
|
|
253
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
254
|
+
options: localVarRequestOptions,
|
|
255
|
+
}];
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
exports.RefundsApiAxiosParamCreator = RefundsApiAxiosParamCreator;
|
|
263
|
+
/**
|
|
264
|
+
* RefundsApi - functional programming interface
|
|
265
|
+
* @export
|
|
266
|
+
*/
|
|
267
|
+
var RefundsApiFp = function (configuration) {
|
|
268
|
+
var localVarAxiosParamCreator = (0, exports.RefundsApiAxiosParamCreator)(configuration);
|
|
269
|
+
return {
|
|
270
|
+
/**
|
|
271
|
+
* This will create a refund in the database.
|
|
272
|
+
* @summary Create the refund
|
|
273
|
+
* @param {CreateRefundRequestDto} createRefundRequestDto
|
|
274
|
+
* @param {string} [authorization] Bearer Token
|
|
275
|
+
* @param {*} [options] Override http request option.
|
|
276
|
+
* @throws {RequiredError}
|
|
277
|
+
*/
|
|
278
|
+
createRefund: function (createRefundRequestDto, authorization, options) {
|
|
279
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
280
|
+
var localVarAxiosArgs;
|
|
281
|
+
return __generator(this, function (_a) {
|
|
282
|
+
switch (_a.label) {
|
|
283
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createRefund(createRefundRequestDto, authorization, options)];
|
|
284
|
+
case 1:
|
|
285
|
+
localVarAxiosArgs = _a.sent();
|
|
286
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
},
|
|
291
|
+
/**
|
|
292
|
+
* Retrieves the details of the refund that was previously created. Supply the unique refund code that was returned when you created it and Emil Api will return the corresponding refund information.
|
|
293
|
+
* @summary Retrieve the refund
|
|
294
|
+
* @param {string} code
|
|
295
|
+
* @param {string} [authorization] Bearer Token
|
|
296
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: refundItems<i>
|
|
297
|
+
* @param {*} [options] Override http request option.
|
|
298
|
+
* @throws {RequiredError}
|
|
299
|
+
*/
|
|
300
|
+
getRefund: function (code, authorization, expand, options) {
|
|
301
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
302
|
+
var localVarAxiosArgs;
|
|
303
|
+
return __generator(this, function (_a) {
|
|
304
|
+
switch (_a.label) {
|
|
305
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getRefund(code, authorization, expand, options)];
|
|
306
|
+
case 1:
|
|
307
|
+
localVarAxiosArgs = _a.sent();
|
|
308
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
},
|
|
313
|
+
/**
|
|
314
|
+
* Returns a list of refunds you have previously created. The refunds are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
315
|
+
* @summary List refunds
|
|
316
|
+
* @param {string} [authorization] Bearer Token
|
|
317
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, id, status, reason, psp, accountCode, invoiceCode</i>
|
|
318
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, id, status, reason, psp, accountCode, invoiceCode</i>
|
|
319
|
+
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: id, createdAt, updatedAt, amount, psp, accountCode, invoiceCode, reason, status</i>
|
|
320
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, updatedAt, amount</i>
|
|
321
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: refundItems<i>
|
|
322
|
+
* @param {*} [options] Override http request option.
|
|
323
|
+
* @throws {RequiredError}
|
|
324
|
+
*/
|
|
325
|
+
listRefunds: function (authorization, filter, filters, search, order, expand, options) {
|
|
326
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
327
|
+
var localVarAxiosArgs;
|
|
328
|
+
return __generator(this, function (_a) {
|
|
329
|
+
switch (_a.label) {
|
|
330
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listRefunds(authorization, filter, filters, search, order, expand, options)];
|
|
331
|
+
case 1:
|
|
332
|
+
localVarAxiosArgs = _a.sent();
|
|
333
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
},
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
exports.RefundsApiFp = RefundsApiFp;
|
|
341
|
+
/**
|
|
342
|
+
* RefundsApi - factory interface
|
|
343
|
+
* @export
|
|
344
|
+
*/
|
|
345
|
+
var RefundsApiFactory = function (configuration, basePath, axios) {
|
|
346
|
+
var localVarFp = (0, exports.RefundsApiFp)(configuration);
|
|
347
|
+
return {
|
|
348
|
+
/**
|
|
349
|
+
* This will create a refund in the database.
|
|
350
|
+
* @summary Create the refund
|
|
351
|
+
* @param {CreateRefundRequestDto} createRefundRequestDto
|
|
352
|
+
* @param {string} [authorization] Bearer Token
|
|
353
|
+
* @param {*} [options] Override http request option.
|
|
354
|
+
* @throws {RequiredError}
|
|
355
|
+
*/
|
|
356
|
+
createRefund: function (createRefundRequestDto, authorization, options) {
|
|
357
|
+
return localVarFp.createRefund(createRefundRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
358
|
+
},
|
|
359
|
+
/**
|
|
360
|
+
* Retrieves the details of the refund that was previously created. Supply the unique refund code that was returned when you created it and Emil Api will return the corresponding refund information.
|
|
361
|
+
* @summary Retrieve the refund
|
|
362
|
+
* @param {string} code
|
|
363
|
+
* @param {string} [authorization] Bearer Token
|
|
364
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: refundItems<i>
|
|
365
|
+
* @param {*} [options] Override http request option.
|
|
366
|
+
* @throws {RequiredError}
|
|
367
|
+
*/
|
|
368
|
+
getRefund: function (code, authorization, expand, options) {
|
|
369
|
+
return localVarFp.getRefund(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
|
|
370
|
+
},
|
|
371
|
+
/**
|
|
372
|
+
* Returns a list of refunds you have previously created. The refunds are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
373
|
+
* @summary List refunds
|
|
374
|
+
* @param {string} [authorization] Bearer Token
|
|
375
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, id, status, reason, psp, accountCode, invoiceCode</i>
|
|
376
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, id, status, reason, psp, accountCode, invoiceCode</i>
|
|
377
|
+
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: id, createdAt, updatedAt, amount, psp, accountCode, invoiceCode, reason, status</i>
|
|
378
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, updatedAt, amount</i>
|
|
379
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: refundItems<i>
|
|
380
|
+
* @param {*} [options] Override http request option.
|
|
381
|
+
* @throws {RequiredError}
|
|
382
|
+
*/
|
|
383
|
+
listRefunds: function (authorization, filter, filters, search, order, expand, options) {
|
|
384
|
+
return localVarFp.listRefunds(authorization, filter, filters, search, order, expand, options).then(function (request) { return request(axios, basePath); });
|
|
385
|
+
},
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
exports.RefundsApiFactory = RefundsApiFactory;
|
|
389
|
+
/**
|
|
390
|
+
* RefundsApi - object-oriented interface
|
|
391
|
+
* @export
|
|
392
|
+
* @class RefundsApi
|
|
393
|
+
* @extends {BaseAPI}
|
|
394
|
+
*/
|
|
395
|
+
var RefundsApi = /** @class */ (function (_super) {
|
|
396
|
+
__extends(RefundsApi, _super);
|
|
397
|
+
function RefundsApi() {
|
|
398
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* This will create a refund in the database.
|
|
402
|
+
* @summary Create the refund
|
|
403
|
+
* @param {RefundsApiCreateRefundRequest} requestParameters Request parameters.
|
|
404
|
+
* @param {*} [options] Override http request option.
|
|
405
|
+
* @throws {RequiredError}
|
|
406
|
+
* @memberof RefundsApi
|
|
407
|
+
*/
|
|
408
|
+
RefundsApi.prototype.createRefund = function (requestParameters, options) {
|
|
409
|
+
var _this = this;
|
|
410
|
+
return (0, exports.RefundsApiFp)(this.configuration).createRefund(requestParameters.createRefundRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
411
|
+
};
|
|
412
|
+
/**
|
|
413
|
+
* Retrieves the details of the refund that was previously created. Supply the unique refund code that was returned when you created it and Emil Api will return the corresponding refund information.
|
|
414
|
+
* @summary Retrieve the refund
|
|
415
|
+
* @param {RefundsApiGetRefundRequest} requestParameters Request parameters.
|
|
416
|
+
* @param {*} [options] Override http request option.
|
|
417
|
+
* @throws {RequiredError}
|
|
418
|
+
* @memberof RefundsApi
|
|
419
|
+
*/
|
|
420
|
+
RefundsApi.prototype.getRefund = function (requestParameters, options) {
|
|
421
|
+
var _this = this;
|
|
422
|
+
return (0, exports.RefundsApiFp)(this.configuration).getRefund(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
423
|
+
};
|
|
424
|
+
/**
|
|
425
|
+
* Returns a list of refunds you have previously created. The refunds are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
426
|
+
* @summary List refunds
|
|
427
|
+
* @param {RefundsApiListRefundsRequest} requestParameters Request parameters.
|
|
428
|
+
* @param {*} [options] Override http request option.
|
|
429
|
+
* @throws {RequiredError}
|
|
430
|
+
* @memberof RefundsApi
|
|
431
|
+
*/
|
|
432
|
+
RefundsApi.prototype.listRefunds = function (requestParameters, options) {
|
|
433
|
+
var _this = this;
|
|
434
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
435
|
+
return (0, exports.RefundsApiFp)(this.configuration).listRefunds(requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
436
|
+
};
|
|
437
|
+
return RefundsApi;
|
|
438
|
+
}(base_1.BaseAPI));
|
|
439
|
+
exports.RefundsApi = RefundsApi;
|