@emilgroup/payment-sdk 1.0.0 → 1.4.1-beta.0

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.
Files changed (178) hide show
  1. package/.openapi-generator/FILES +15 -30
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +21 -25
  4. package/api/bank-transaction-api.ts +657 -0
  5. package/api/default-api.ts +1 -1
  6. package/api/payment-methods-api.ts +42 -46
  7. package/api/payment-reminders-api.ts +17 -19
  8. package/api/payment-setup-api.ts +29 -37
  9. package/api/payments-api.ts +30 -32
  10. package/api/refunds-api.ts +462 -0
  11. package/api/tenant-bank-account-api.ts +651 -0
  12. package/api/webhooks-api.ts +1 -1
  13. package/api.ts +7 -3
  14. package/base.ts +2 -1
  15. package/common.ts +2 -2
  16. package/configuration.ts +1 -1
  17. package/dist/api/bank-accounts-api.d.ts +17 -19
  18. package/dist/api/bank-accounts-api.js +16 -16
  19. package/dist/api/bank-transaction-api.d.ts +371 -0
  20. package/dist/api/bank-transaction-api.js +632 -0
  21. package/dist/api/default-api.d.ts +1 -1
  22. package/dist/api/default-api.js +1 -1
  23. package/dist/api/payment-methods-api.d.ts +32 -36
  24. package/dist/api/payment-methods-api.js +32 -28
  25. package/dist/api/payment-reminders-api.d.ts +21 -22
  26. package/dist/api/payment-reminders-api.js +8 -8
  27. package/dist/api/payment-setup-api.d.ts +19 -23
  28. package/dist/api/payment-setup-api.js +25 -25
  29. package/dist/api/payments-api.d.ts +26 -29
  30. package/dist/api/payments-api.js +20 -16
  31. package/dist/api/refunds-api.d.ts +260 -0
  32. package/dist/api/refunds-api.js +443 -0
  33. package/dist/api/tenant-bank-account-api.d.ts +361 -0
  34. package/dist/api/tenant-bank-account-api.js +616 -0
  35. package/dist/api/webhooks-api.d.ts +1 -1
  36. package/dist/api/webhooks-api.js +1 -1
  37. package/dist/api.d.ts +4 -2
  38. package/dist/api.js +4 -2
  39. package/dist/base.d.ts +1 -1
  40. package/dist/base.js +2 -1
  41. package/dist/common.d.ts +2 -2
  42. package/dist/common.js +1 -1
  43. package/dist/configuration.d.ts +1 -1
  44. package/dist/configuration.js +1 -1
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/models/bank-transaction-response-class.d.ts +122 -0
  48. package/dist/models/{bank-account-class.js → bank-transaction-response-class.js} +1 -1
  49. package/dist/models/create-payment-reminder-request-dto.d.ts +1 -1
  50. package/dist/models/create-payment-reminder-request-dto.js +1 -1
  51. package/dist/models/create-payment-request-dto.d.ts +3 -3
  52. package/dist/models/create-payment-request-dto.js +1 -1
  53. package/dist/models/{sepa-direct-dto.d.ts → create-refund-request-dto.d.ts} +6 -6
  54. package/dist/models/{complete-braintree-payment-setup-request-dto.js → create-refund-request-dto.js} +1 -1
  55. package/dist/models/{validate-pspconfig-response-class.d.ts → create-refund-response-class.d.ts} +8 -7
  56. package/dist/models/{billing-profile-dto.js → create-refund-response-class.js} +1 -1
  57. package/dist/models/{billing-profile-limited-response-dto.d.ts → create-tenant-bank-account-request-dto.d.ts} +15 -27
  58. package/dist/models/{billing-profile-limited-response-dto.js → create-tenant-bank-account-request-dto.js} +1 -1
  59. package/dist/models/deactivate-payment-reminder-request-dto.d.ts +1 -1
  60. package/dist/models/deactivate-payment-reminder-request-dto.js +1 -1
  61. package/dist/models/{get-payment-method-response-class.d.ts → get-bank-transactions-response-class.d.ts} +8 -8
  62. package/dist/models/get-bank-transactions-response-class.js +15 -0
  63. package/dist/models/{get-payment-response-class.d.ts → get-refund-response-class.d.ts} +8 -8
  64. package/dist/models/get-refund-response-class.js +15 -0
  65. package/dist/models/get-request-dto.d.ts +2 -2
  66. package/dist/models/get-request-dto.js +1 -1
  67. package/dist/models/{create-bank-account-request-dto.d.ts → get-tenant-bank-account-response-class.d.ts} +8 -13
  68. package/dist/models/get-tenant-bank-account-response-class.js +15 -0
  69. package/dist/models/index.d.ts +12 -29
  70. package/dist/models/index.js +12 -29
  71. package/dist/models/inline-response200.d.ts +7 -7
  72. package/dist/models/inline-response200.js +1 -1
  73. package/dist/models/inline-response503.d.ts +7 -7
  74. package/dist/models/inline-response503.js +1 -1
  75. package/dist/models/{list-payment-methods-response-class.d.ts → list-bank-transactions-response-class.d.ts} +9 -9
  76. package/dist/models/list-bank-transactions-response-class.js +15 -0
  77. package/dist/models/{list-payments-response-class.d.ts → list-refunds-response-class.d.ts} +9 -9
  78. package/dist/models/list-refunds-response-class.js +15 -0
  79. package/dist/models/refund-class.d.ts +104 -0
  80. package/dist/models/refund-class.js +28 -0
  81. package/dist/models/{payment-method-class.d.ts → tenant-bank-account-response-class.d.ts} +25 -19
  82. package/dist/models/tenant-bank-account-response-class.js +15 -0
  83. package/dist/models/transaction-class.d.ts +1 -1
  84. package/dist/models/transaction-class.js +1 -1
  85. package/dist/models/{symphony-profile-limited-response-dto.d.ts → update-tenant-bank-account-rest-request-dto.d.ts} +12 -18
  86. package/dist/models/update-tenant-bank-account-rest-request-dto.js +15 -0
  87. package/dist/models/validate-pspconfig-request-dto.d.ts +2 -9
  88. package/dist/models/validate-pspconfig-request-dto.js +1 -8
  89. package/git_push.sh +1 -1
  90. package/index.ts +1 -1
  91. package/models/bank-transaction-response-class.ts +128 -0
  92. package/models/create-payment-reminder-request-dto.ts +1 -1
  93. package/models/create-payment-request-dto.ts +3 -3
  94. package/models/{sepa-direct-dto.ts → create-refund-request-dto.ts} +6 -6
  95. package/models/{validate-pspconfig-response-class.ts → create-refund-response-class.ts} +8 -7
  96. package/models/{billing-profile-limited-response-dto.ts → create-tenant-bank-account-request-dto.ts} +15 -27
  97. package/models/deactivate-payment-reminder-request-dto.ts +1 -1
  98. package/models/{get-payment-method-response-class.ts → get-bank-transactions-response-class.ts} +8 -8
  99. package/models/{get-payment-response-class.ts → get-refund-response-class.ts} +8 -8
  100. package/models/get-request-dto.ts +2 -2
  101. package/models/{create-bank-account-request-dto.ts → get-tenant-bank-account-response-class.ts} +8 -13
  102. package/models/index.ts +12 -29
  103. package/models/inline-response200.ts +7 -7
  104. package/models/inline-response503.ts +7 -7
  105. package/models/{list-payment-methods-response-class.ts → list-bank-transactions-response-class.ts} +9 -9
  106. package/models/{list-payments-response-class.ts → list-refunds-response-class.ts} +9 -9
  107. package/models/refund-class.ts +114 -0
  108. package/models/{payment-method-class.ts → tenant-bank-account-response-class.ts} +25 -19
  109. package/models/transaction-class.ts +1 -1
  110. package/models/{symphony-profile-limited-response-dto.ts → update-tenant-bank-account-rest-request-dto.ts} +12 -18
  111. package/models/validate-pspconfig-request-dto.ts +2 -12
  112. package/package.json +1 -2
  113. package/api/payment-service-providers-api.ts +0 -161
  114. package/dist/api/payment-service-providers-api.d.ts +0 -93
  115. package/dist/api/payment-service-providers-api.js +0 -220
  116. package/dist/models/bank-account-class.d.ts +0 -54
  117. package/dist/models/billing-profile-dto.d.ts +0 -38
  118. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +0 -48
  119. package/dist/models/complete-payment-setup-request-dto.d.ts +0 -32
  120. package/dist/models/complete-payment-setup-request-dto.js +0 -15
  121. package/dist/models/complete-payment-setup-response-class.d.ts +0 -25
  122. package/dist/models/complete-payment-setup-response-class.js +0 -15
  123. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +0 -60
  124. package/dist/models/complete-stripe-payment-setup-request-dto.js +0 -15
  125. package/dist/models/create-bank-account-request-dto.js +0 -15
  126. package/dist/models/create-payment-method-response-class.d.ts +0 -25
  127. package/dist/models/create-payment-method-response-class.js +0 -15
  128. package/dist/models/create-payment-response-class.d.ts +0 -25
  129. package/dist/models/create-payment-response-class.js +0 -15
  130. package/dist/models/create-psp-payment-method-request-dto.d.ts +0 -61
  131. package/dist/models/create-psp-payment-method-request-dto.js +0 -32
  132. package/dist/models/get-payment-method-response-class.js +0 -15
  133. package/dist/models/get-payment-response-class.js +0 -15
  134. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +0 -30
  135. package/dist/models/initiate-braintree-payment-setup-request-dto.js +0 -15
  136. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +0 -24
  137. package/dist/models/initiate-braintree-payment-setup-response-class.js +0 -15
  138. package/dist/models/initiate-payment-setup-request-dto.d.ts +0 -44
  139. package/dist/models/initiate-payment-setup-request-dto.js +0 -15
  140. package/dist/models/initiate-payment-setup-response-class.d.ts +0 -32
  141. package/dist/models/initiate-payment-setup-response-class.js +0 -15
  142. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +0 -30
  143. package/dist/models/initiate-stripe-payment-setup-request-dto.js +0 -15
  144. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +0 -30
  145. package/dist/models/initiate-stripe-payment-setup-response-class.js +0 -15
  146. package/dist/models/list-bank-accounts-response-class.d.ts +0 -31
  147. package/dist/models/list-bank-accounts-response-class.js +0 -15
  148. package/dist/models/list-payment-methods-response-class.js +0 -15
  149. package/dist/models/list-payment-reminders-response-class.d.ts +0 -31
  150. package/dist/models/list-payment-reminders-response-class.js +0 -15
  151. package/dist/models/list-payments-response-class.js +0 -15
  152. package/dist/models/payment-class.d.ts +0 -103
  153. package/dist/models/payment-class.js +0 -15
  154. package/dist/models/payment-method-class.js +0 -15
  155. package/dist/models/payment-reminder-class.d.ts +0 -112
  156. package/dist/models/payment-reminder-class.js +0 -36
  157. package/dist/models/sepa-direct-dto.js +0 -15
  158. package/dist/models/symphony-profile-limited-response-dto.js +0 -15
  159. package/dist/models/validate-pspconfig-response-class.js +0 -15
  160. package/models/bank-account-class.ts +0 -60
  161. package/models/billing-profile-dto.ts +0 -44
  162. package/models/complete-braintree-payment-setup-request-dto.ts +0 -54
  163. package/models/complete-payment-setup-request-dto.ts +0 -38
  164. package/models/complete-payment-setup-response-class.ts +0 -31
  165. package/models/complete-stripe-payment-setup-request-dto.ts +0 -66
  166. package/models/create-payment-method-response-class.ts +0 -31
  167. package/models/create-payment-response-class.ts +0 -31
  168. package/models/create-psp-payment-method-request-dto.ts +0 -70
  169. package/models/initiate-braintree-payment-setup-request-dto.ts +0 -36
  170. package/models/initiate-braintree-payment-setup-response-class.ts +0 -30
  171. package/models/initiate-payment-setup-request-dto.ts +0 -50
  172. package/models/initiate-payment-setup-response-class.ts +0 -38
  173. package/models/initiate-stripe-payment-setup-request-dto.ts +0 -36
  174. package/models/initiate-stripe-payment-setup-response-class.ts +0 -36
  175. package/models/list-bank-accounts-response-class.ts +0 -37
  176. package/models/list-payment-reminders-response-class.ts +0 -37
  177. package/models/payment-class.ts +0 -109
  178. package/models/payment-reminder-class.ts +0 -122
@@ -0,0 +1,443 @@
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: z
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
+ *
97
+ * @param {CreateRefundRequestDto} createRefundRequestDto
98
+ * @param {string} [authorization] Bearer Token
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ createRefund: function (createRefundRequestDto, authorization, options) {
103
+ if (options === void 0) { options = {}; }
104
+ return __awaiter(_this, void 0, void 0, function () {
105
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
106
+ return __generator(this, function (_a) {
107
+ switch (_a.label) {
108
+ case 0:
109
+ // verify required parameter 'createRefundRequestDto' is not null or undefined
110
+ (0, common_1.assertParamExists)('createRefund', 'createRefundRequestDto', createRefundRequestDto);
111
+ localVarPath = "/paymentservice/v1/refunds";
112
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
113
+ if (configuration) {
114
+ baseOptions = configuration.baseOptions;
115
+ baseAccessToken = configuration.accessToken;
116
+ }
117
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
118
+ localVarHeaderParameter = {};
119
+ localVarQueryParameter = {};
120
+ // authentication bearer required
121
+ // http bearer authentication required
122
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
123
+ case 1:
124
+ // authentication bearer required
125
+ // http bearer authentication required
126
+ _a.sent();
127
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
128
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
129
+ }
130
+ localVarHeaderParameter['Content-Type'] = 'application/json';
131
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
132
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
133
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
134
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createRefundRequestDto, localVarRequestOptions, configuration);
135
+ return [2 /*return*/, {
136
+ url: (0, common_1.toPathString)(localVarUrlObj),
137
+ options: localVarRequestOptions,
138
+ }];
139
+ }
140
+ });
141
+ });
142
+ },
143
+ /**
144
+ *
145
+ * @param {string} code
146
+ * @param {string} code2 Unique identifier for the object.
147
+ * @param {string} expand Fields to expand response by
148
+ * @param {string} [authorization] Bearer Token
149
+ * @param {*} [options] Override http request option.
150
+ * @throws {RequiredError}
151
+ */
152
+ getRefund: function (code, code2, expand, authorization, options) {
153
+ if (options === void 0) { options = {}; }
154
+ return __awaiter(_this, void 0, void 0, function () {
155
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
156
+ return __generator(this, function (_a) {
157
+ switch (_a.label) {
158
+ case 0:
159
+ // verify required parameter 'code' is not null or undefined
160
+ (0, common_1.assertParamExists)('getRefund', 'code', code);
161
+ // verify required parameter 'code2' is not null or undefined
162
+ (0, common_1.assertParamExists)('getRefund', 'code2', code2);
163
+ // verify required parameter 'expand' is not null or undefined
164
+ (0, common_1.assertParamExists)('getRefund', 'expand', expand);
165
+ localVarPath = "/paymentservice/v1/refunds/{code}"
166
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
167
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ baseAccessToken = configuration.accessToken;
171
+ }
172
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
173
+ localVarHeaderParameter = {};
174
+ localVarQueryParameter = {};
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
178
+ case 1:
179
+ // authentication bearer required
180
+ // http bearer authentication required
181
+ _a.sent();
182
+ if (code2 !== undefined) {
183
+ localVarQueryParameter['code'] = code2;
184
+ }
185
+ if (expand !== undefined) {
186
+ localVarQueryParameter['expand'] = expand;
187
+ }
188
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
189
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
190
+ }
191
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
192
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
193
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
194
+ return [2 /*return*/, {
195
+ url: (0, common_1.toPathString)(localVarUrlObj),
196
+ options: localVarRequestOptions,
197
+ }];
198
+ }
199
+ });
200
+ });
201
+ },
202
+ /**
203
+ *
204
+ * @param {string} [authorization] Bearer Token
205
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
206
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
207
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
208
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
209
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
210
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ */
214
+ listRefunds: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
215
+ if (options === void 0) { options = {}; }
216
+ return __awaiter(_this, void 0, void 0, function () {
217
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
218
+ return __generator(this, function (_a) {
219
+ switch (_a.label) {
220
+ case 0:
221
+ localVarPath = "/paymentservice/v1/refunds";
222
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
223
+ if (configuration) {
224
+ baseOptions = configuration.baseOptions;
225
+ baseAccessToken = configuration.accessToken;
226
+ }
227
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
228
+ localVarHeaderParameter = {};
229
+ localVarQueryParameter = {};
230
+ // authentication bearer required
231
+ // http bearer authentication required
232
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
233
+ case 1:
234
+ // authentication bearer required
235
+ // http bearer authentication required
236
+ _a.sent();
237
+ if (pageSize !== undefined) {
238
+ localVarQueryParameter['pageSize'] = pageSize;
239
+ }
240
+ if (pageToken !== undefined) {
241
+ localVarQueryParameter['pageToken'] = pageToken;
242
+ }
243
+ if (filter !== undefined) {
244
+ localVarQueryParameter['filter'] = filter;
245
+ }
246
+ if (search !== undefined) {
247
+ localVarQueryParameter['search'] = search;
248
+ }
249
+ if (order !== undefined) {
250
+ localVarQueryParameter['order'] = order;
251
+ }
252
+ if (expand !== undefined) {
253
+ localVarQueryParameter['expand'] = expand;
254
+ }
255
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
256
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
257
+ }
258
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
259
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
260
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
261
+ return [2 /*return*/, {
262
+ url: (0, common_1.toPathString)(localVarUrlObj),
263
+ options: localVarRequestOptions,
264
+ }];
265
+ }
266
+ });
267
+ });
268
+ },
269
+ };
270
+ };
271
+ exports.RefundsApiAxiosParamCreator = RefundsApiAxiosParamCreator;
272
+ /**
273
+ * RefundsApi - functional programming interface
274
+ * @export
275
+ */
276
+ var RefundsApiFp = function (configuration) {
277
+ var localVarAxiosParamCreator = (0, exports.RefundsApiAxiosParamCreator)(configuration);
278
+ return {
279
+ /**
280
+ *
281
+ * @param {CreateRefundRequestDto} createRefundRequestDto
282
+ * @param {string} [authorization] Bearer Token
283
+ * @param {*} [options] Override http request option.
284
+ * @throws {RequiredError}
285
+ */
286
+ createRefund: function (createRefundRequestDto, authorization, options) {
287
+ return __awaiter(this, void 0, void 0, function () {
288
+ var localVarAxiosArgs;
289
+ return __generator(this, function (_a) {
290
+ switch (_a.label) {
291
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createRefund(createRefundRequestDto, authorization, options)];
292
+ case 1:
293
+ localVarAxiosArgs = _a.sent();
294
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
295
+ }
296
+ });
297
+ });
298
+ },
299
+ /**
300
+ *
301
+ * @param {string} code
302
+ * @param {string} code2 Unique identifier for the object.
303
+ * @param {string} expand Fields to expand response by
304
+ * @param {string} [authorization] Bearer Token
305
+ * @param {*} [options] Override http request option.
306
+ * @throws {RequiredError}
307
+ */
308
+ getRefund: function (code, code2, expand, authorization, options) {
309
+ return __awaiter(this, void 0, void 0, function () {
310
+ var localVarAxiosArgs;
311
+ return __generator(this, function (_a) {
312
+ switch (_a.label) {
313
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getRefund(code, code2, expand, authorization, options)];
314
+ case 1:
315
+ localVarAxiosArgs = _a.sent();
316
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
317
+ }
318
+ });
319
+ });
320
+ },
321
+ /**
322
+ *
323
+ * @param {string} [authorization] Bearer Token
324
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
325
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
326
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
327
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
328
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
329
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
330
+ * @param {*} [options] Override http request option.
331
+ * @throws {RequiredError}
332
+ */
333
+ listRefunds: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
334
+ return __awaiter(this, void 0, void 0, function () {
335
+ var localVarAxiosArgs;
336
+ return __generator(this, function (_a) {
337
+ switch (_a.label) {
338
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listRefunds(authorization, pageSize, pageToken, filter, search, order, expand, options)];
339
+ case 1:
340
+ localVarAxiosArgs = _a.sent();
341
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
342
+ }
343
+ });
344
+ });
345
+ },
346
+ };
347
+ };
348
+ exports.RefundsApiFp = RefundsApiFp;
349
+ /**
350
+ * RefundsApi - factory interface
351
+ * @export
352
+ */
353
+ var RefundsApiFactory = function (configuration, basePath, axios) {
354
+ var localVarFp = (0, exports.RefundsApiFp)(configuration);
355
+ return {
356
+ /**
357
+ *
358
+ * @param {CreateRefundRequestDto} createRefundRequestDto
359
+ * @param {string} [authorization] Bearer Token
360
+ * @param {*} [options] Override http request option.
361
+ * @throws {RequiredError}
362
+ */
363
+ createRefund: function (createRefundRequestDto, authorization, options) {
364
+ return localVarFp.createRefund(createRefundRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
365
+ },
366
+ /**
367
+ *
368
+ * @param {string} code
369
+ * @param {string} code2 Unique identifier for the object.
370
+ * @param {string} expand Fields to expand response by
371
+ * @param {string} [authorization] Bearer Token
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ getRefund: function (code, code2, expand, authorization, options) {
376
+ return localVarFp.getRefund(code, code2, expand, authorization, options).then(function (request) { return request(axios, basePath); });
377
+ },
378
+ /**
379
+ *
380
+ * @param {string} [authorization] Bearer Token
381
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
382
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
383
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
384
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
385
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
386
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
387
+ * @param {*} [options] Override http request option.
388
+ * @throws {RequiredError}
389
+ */
390
+ listRefunds: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
391
+ return localVarFp.listRefunds(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
392
+ },
393
+ };
394
+ };
395
+ exports.RefundsApiFactory = RefundsApiFactory;
396
+ /**
397
+ * RefundsApi - object-oriented interface
398
+ * @export
399
+ * @class RefundsApi
400
+ * @extends {BaseAPI}
401
+ */
402
+ var RefundsApi = /** @class */ (function (_super) {
403
+ __extends(RefundsApi, _super);
404
+ function RefundsApi() {
405
+ return _super !== null && _super.apply(this, arguments) || this;
406
+ }
407
+ /**
408
+ *
409
+ * @param {RefundsApiCreateRefundRequest} requestParameters Request parameters.
410
+ * @param {*} [options] Override http request option.
411
+ * @throws {RequiredError}
412
+ * @memberof RefundsApi
413
+ */
414
+ RefundsApi.prototype.createRefund = function (requestParameters, options) {
415
+ var _this = this;
416
+ return (0, exports.RefundsApiFp)(this.configuration).createRefund(requestParameters.createRefundRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
417
+ };
418
+ /**
419
+ *
420
+ * @param {RefundsApiGetRefundRequest} requestParameters Request parameters.
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ * @memberof RefundsApi
424
+ */
425
+ RefundsApi.prototype.getRefund = function (requestParameters, options) {
426
+ var _this = this;
427
+ return (0, exports.RefundsApiFp)(this.configuration).getRefund(requestParameters.code, requestParameters.code2, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
428
+ };
429
+ /**
430
+ *
431
+ * @param {RefundsApiListRefundsRequest} requestParameters Request parameters.
432
+ * @param {*} [options] Override http request option.
433
+ * @throws {RequiredError}
434
+ * @memberof RefundsApi
435
+ */
436
+ RefundsApi.prototype.listRefunds = function (requestParameters, options) {
437
+ var _this = this;
438
+ if (requestParameters === void 0) { requestParameters = {}; }
439
+ return (0, exports.RefundsApiFp)(this.configuration).listRefunds(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
440
+ };
441
+ return RefundsApi;
442
+ }(base_1.BaseAPI));
443
+ exports.RefundsApi = RefundsApi;