@randock/nameshift-api-client 0.0.354 → 0.0.355
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 +6 -0
- package/README.md +3 -3
- package/dist/apis/AccountsApi.d.ts +75 -1
- package/dist/apis/AccountsApi.js +300 -1
- package/dist/models/AccountPaymentDto.d.ts +100 -0
- package/dist/models/AccountPaymentDto.js +101 -0
- package/dist/models/AccountPaymentMethodDto.d.ts +80 -0
- package/dist/models/AccountPaymentMethodDto.js +83 -0
- package/dist/models/AccountPaymentMethodProfileDto.d.ts +71 -0
- package/dist/models/AccountPaymentMethodProfileDto.js +80 -0
- package/dist/models/AuctionConfigurationDto.d.ts +7 -0
- package/dist/models/AuctionConfigurationDto.js +5 -0
- package/dist/models/BuyerNotificationDto.d.ts +1 -0
- package/dist/models/BuyerNotificationDto.js +1 -0
- package/dist/models/BuyerNotificationListItemDto.d.ts +1 -0
- package/dist/models/BuyerNotificationListItemDto.js +1 -0
- package/dist/models/CreateAccountPaymentInput.d.ts +51 -0
- package/dist/models/CreateAccountPaymentInput.js +62 -0
- package/dist/models/CreateAccountPaymentManualTransactionInput.d.ts +58 -0
- package/dist/models/CreateAccountPaymentManualTransactionInput.js +65 -0
- package/dist/models/DomainAuctionDto.d.ts +6 -0
- package/dist/models/DomainAuctionDto.js +4 -0
- package/dist/models/IntersectionDomainDtoWithAccountDto.d.ts +6 -0
- package/dist/models/IntersectionDomainDtoWithAccountDto.js +4 -0
- package/dist/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.d.ts +6 -0
- package/dist/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.js +4 -0
- package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.d.ts +6 -0
- package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.js +4 -0
- package/dist/models/IntersectionDomainDtoWithSeoMetricsDto.d.ts +6 -0
- package/dist/models/IntersectionDomainDtoWithSeoMetricsDto.js +4 -0
- package/dist/models/PayAccountPaymentInput.d.ts +32 -0
- package/dist/models/PayAccountPaymentInput.js +51 -0
- package/dist/models/StartAuctionInput.d.ts +6 -13
- package/dist/models/StartAuctionInput.js +2 -5
- package/dist/models/UpdateAuctionConfigurationDto.d.ts +7 -0
- package/dist/models/UpdateAuctionConfigurationDto.js +3 -0
- package/dist/models/UserNotificationDto.d.ts +1 -0
- package/dist/models/UserNotificationDto.js +1 -0
- package/dist/models/UserNotificationListItemDto.d.ts +1 -0
- package/dist/models/UserNotificationListItemDto.js +1 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +319 -0
- package/src/models/AccountPaymentDto.ts +189 -0
- package/src/models/AccountPaymentMethodDto.ts +138 -0
- package/src/models/AccountPaymentMethodProfileDto.ts +130 -0
- package/src/models/AuctionConfigurationDto.ts +16 -0
- package/src/models/BuyerNotificationDto.ts +1 -0
- package/src/models/BuyerNotificationListItemDto.ts +1 -0
- package/src/models/CreateAccountPaymentInput.ts +92 -0
- package/src/models/CreateAccountPaymentManualTransactionInput.ts +101 -0
- package/src/models/DomainAuctionDto.ts +9 -0
- package/src/models/IntersectionDomainDtoWithAccountDto.ts +9 -0
- package/src/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.ts +9 -0
- package/src/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.ts +9 -0
- package/src/models/IntersectionDomainDtoWithSeoMetricsDto.ts +9 -0
- package/src/models/PayAccountPaymentInput.ts +66 -0
- package/src/models/StartAuctionInput.ts +8 -24
- package/src/models/UpdateAuctionConfigurationDto.ts +15 -0
- package/src/models/UserNotificationDto.ts +1 -0
- package/src/models/UserNotificationListItemDto.ts +1 -0
- package/src/models/index.ts +6 -0
package/src/apis/AccountsApi.ts
CHANGED
|
@@ -16,13 +16,19 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
AccountOnboardingSessionDto,
|
|
19
|
+
AccountPaymentDto,
|
|
20
|
+
AccountPaymentMethodDto,
|
|
19
21
|
AccountSettingsDto,
|
|
20
22
|
AccountSettingsInput,
|
|
21
23
|
BadRequestException,
|
|
24
|
+
CreateAccountPaymentInput,
|
|
25
|
+
CreateAccountPaymentManualTransactionInput,
|
|
22
26
|
GetAllAffiliateCommissions200Response,
|
|
23
27
|
GetAllReferrals200Response,
|
|
24
28
|
MoneyDto,
|
|
25
29
|
NotFoundException,
|
|
30
|
+
ObjectId,
|
|
31
|
+
PayAccountPaymentInput,
|
|
26
32
|
PrivateAccountGetMeResponse,
|
|
27
33
|
SetPayoutProviderInput,
|
|
28
34
|
UpdateAccountBillingInformationInput,
|
|
@@ -31,12 +37,20 @@ import type {
|
|
|
31
37
|
import {
|
|
32
38
|
AccountOnboardingSessionDtoFromJSON,
|
|
33
39
|
AccountOnboardingSessionDtoToJSON,
|
|
40
|
+
AccountPaymentDtoFromJSON,
|
|
41
|
+
AccountPaymentDtoToJSON,
|
|
42
|
+
AccountPaymentMethodDtoFromJSON,
|
|
43
|
+
AccountPaymentMethodDtoToJSON,
|
|
34
44
|
AccountSettingsDtoFromJSON,
|
|
35
45
|
AccountSettingsDtoToJSON,
|
|
36
46
|
AccountSettingsInputFromJSON,
|
|
37
47
|
AccountSettingsInputToJSON,
|
|
38
48
|
BadRequestExceptionFromJSON,
|
|
39
49
|
BadRequestExceptionToJSON,
|
|
50
|
+
CreateAccountPaymentInputFromJSON,
|
|
51
|
+
CreateAccountPaymentInputToJSON,
|
|
52
|
+
CreateAccountPaymentManualTransactionInputFromJSON,
|
|
53
|
+
CreateAccountPaymentManualTransactionInputToJSON,
|
|
40
54
|
GetAllAffiliateCommissions200ResponseFromJSON,
|
|
41
55
|
GetAllAffiliateCommissions200ResponseToJSON,
|
|
42
56
|
GetAllReferrals200ResponseFromJSON,
|
|
@@ -45,6 +59,10 @@ import {
|
|
|
45
59
|
MoneyDtoToJSON,
|
|
46
60
|
NotFoundExceptionFromJSON,
|
|
47
61
|
NotFoundExceptionToJSON,
|
|
62
|
+
ObjectIdFromJSON,
|
|
63
|
+
ObjectIdToJSON,
|
|
64
|
+
PayAccountPaymentInputFromJSON,
|
|
65
|
+
PayAccountPaymentInputToJSON,
|
|
48
66
|
PrivateAccountGetMeResponseFromJSON,
|
|
49
67
|
PrivateAccountGetMeResponseToJSON,
|
|
50
68
|
SetPayoutProviderInputFromJSON,
|
|
@@ -55,6 +73,27 @@ import {
|
|
|
55
73
|
ValidationExceptionToJSON,
|
|
56
74
|
} from '../models/index';
|
|
57
75
|
|
|
76
|
+
export interface AccountsApiCreateAccountPaymentRequest {
|
|
77
|
+
accountId: string;
|
|
78
|
+
createAccountPaymentInput: CreateAccountPaymentInput;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface AccountsApiCreateAccountPaymentManualTransactionRequest {
|
|
82
|
+
accountId: string;
|
|
83
|
+
paymentId: string;
|
|
84
|
+
createAccountPaymentManualTransactionInput: CreateAccountPaymentManualTransactionInput;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface AccountsApiGetAccountPaymentRequest {
|
|
88
|
+
accountId: string;
|
|
89
|
+
paymentId: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface AccountsApiGetAccountPaymentMethodsRequest {
|
|
93
|
+
accountId: string;
|
|
94
|
+
gateway: GetAccountPaymentMethodsGatewayEnum;
|
|
95
|
+
}
|
|
96
|
+
|
|
58
97
|
export interface AccountsApiGetAccountPaymentProviderSessionRequest {
|
|
59
98
|
accountId: string;
|
|
60
99
|
}
|
|
@@ -79,6 +118,12 @@ export interface AccountsApiGetAllReferralsRequest {
|
|
|
79
118
|
sortBy?: Array<string>;
|
|
80
119
|
}
|
|
81
120
|
|
|
121
|
+
export interface AccountsApiPayAccountPaymentRequest {
|
|
122
|
+
accountId: string;
|
|
123
|
+
paymentId: string;
|
|
124
|
+
payAccountPaymentInput: PayAccountPaymentInput;
|
|
125
|
+
}
|
|
126
|
+
|
|
82
127
|
export interface AccountsApiPostBillingInformationRequest {
|
|
83
128
|
accountId: string;
|
|
84
129
|
updateAccountBillingInformationInput: UpdateAccountBillingInformationInput;
|
|
@@ -109,6 +154,116 @@ export interface AccountsApiUpdateSettingsRequest {
|
|
|
109
154
|
*/
|
|
110
155
|
export class AccountsApi extends runtime.BaseAPI {
|
|
111
156
|
|
|
157
|
+
/**
|
|
158
|
+
*
|
|
159
|
+
*/
|
|
160
|
+
async createAccountPaymentRaw(requestParameters: AccountsApiCreateAccountPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ObjectId>> {
|
|
161
|
+
if (requestParameters['accountId'] == null) {
|
|
162
|
+
throw new runtime.RequiredError(
|
|
163
|
+
'accountId',
|
|
164
|
+
'Required parameter "accountId" was null or undefined when calling createAccountPayment().'
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (requestParameters['createAccountPaymentInput'] == null) {
|
|
169
|
+
throw new runtime.RequiredError(
|
|
170
|
+
'createAccountPaymentInput',
|
|
171
|
+
'Required parameter "createAccountPaymentInput" was null or undefined when calling createAccountPayment().'
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const queryParameters: any = {};
|
|
176
|
+
|
|
177
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
178
|
+
|
|
179
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
180
|
+
|
|
181
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
182
|
+
const token = this.configuration.accessToken;
|
|
183
|
+
const tokenString = await token("bearer", []);
|
|
184
|
+
|
|
185
|
+
if (tokenString) {
|
|
186
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const response = await this.request({
|
|
190
|
+
path: `/private/accounts/{accountId}/payments`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
191
|
+
method: 'POST',
|
|
192
|
+
headers: headerParameters,
|
|
193
|
+
query: queryParameters,
|
|
194
|
+
body: CreateAccountPaymentInputToJSON(requestParameters['createAccountPaymentInput']),
|
|
195
|
+
}, initOverrides);
|
|
196
|
+
|
|
197
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ObjectIdFromJSON(jsonValue));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
*
|
|
202
|
+
*/
|
|
203
|
+
async createAccountPayment(requestParameters: AccountsApiCreateAccountPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectId> {
|
|
204
|
+
const response = await this.createAccountPaymentRaw(requestParameters, initOverrides);
|
|
205
|
+
return await response.value();
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Creates a new manual transaction for account payment with specified open invoice
|
|
210
|
+
* Create a new manual transaction for account payment invoice
|
|
211
|
+
*/
|
|
212
|
+
async createAccountPaymentManualTransactionRaw(requestParameters: AccountsApiCreateAccountPaymentManualTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
213
|
+
if (requestParameters['accountId'] == null) {
|
|
214
|
+
throw new runtime.RequiredError(
|
|
215
|
+
'accountId',
|
|
216
|
+
'Required parameter "accountId" was null or undefined when calling createAccountPaymentManualTransaction().'
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (requestParameters['paymentId'] == null) {
|
|
221
|
+
throw new runtime.RequiredError(
|
|
222
|
+
'paymentId',
|
|
223
|
+
'Required parameter "paymentId" was null or undefined when calling createAccountPaymentManualTransaction().'
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (requestParameters['createAccountPaymentManualTransactionInput'] == null) {
|
|
228
|
+
throw new runtime.RequiredError(
|
|
229
|
+
'createAccountPaymentManualTransactionInput',
|
|
230
|
+
'Required parameter "createAccountPaymentManualTransactionInput" was null or undefined when calling createAccountPaymentManualTransaction().'
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const queryParameters: any = {};
|
|
235
|
+
|
|
236
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
237
|
+
|
|
238
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
239
|
+
|
|
240
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
241
|
+
const token = this.configuration.accessToken;
|
|
242
|
+
const tokenString = await token("bearer", []);
|
|
243
|
+
|
|
244
|
+
if (tokenString) {
|
|
245
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
const response = await this.request({
|
|
249
|
+
path: `/private/accounts/{accountId}/payments/{paymentId}/transactions`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"paymentId"}}`, encodeURIComponent(String(requestParameters['paymentId']))),
|
|
250
|
+
method: 'POST',
|
|
251
|
+
headers: headerParameters,
|
|
252
|
+
query: queryParameters,
|
|
253
|
+
body: CreateAccountPaymentManualTransactionInputToJSON(requestParameters['createAccountPaymentManualTransactionInput']),
|
|
254
|
+
}, initOverrides);
|
|
255
|
+
|
|
256
|
+
return new runtime.VoidApiResponse(response);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Creates a new manual transaction for account payment with specified open invoice
|
|
261
|
+
* Create a new manual transaction for account payment invoice
|
|
262
|
+
*/
|
|
263
|
+
async createAccountPaymentManualTransaction(requestParameters: AccountsApiCreateAccountPaymentManualTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
264
|
+
await this.createAccountPaymentManualTransactionRaw(requestParameters, initOverrides);
|
|
265
|
+
}
|
|
266
|
+
|
|
112
267
|
/**
|
|
113
268
|
*
|
|
114
269
|
*/
|
|
@@ -142,6 +297,102 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
142
297
|
await this.deleteMeRaw(initOverrides);
|
|
143
298
|
}
|
|
144
299
|
|
|
300
|
+
/**
|
|
301
|
+
*
|
|
302
|
+
*/
|
|
303
|
+
async getAccountPaymentRaw(requestParameters: AccountsApiGetAccountPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountPaymentDto>> {
|
|
304
|
+
if (requestParameters['accountId'] == null) {
|
|
305
|
+
throw new runtime.RequiredError(
|
|
306
|
+
'accountId',
|
|
307
|
+
'Required parameter "accountId" was null or undefined when calling getAccountPayment().'
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (requestParameters['paymentId'] == null) {
|
|
312
|
+
throw new runtime.RequiredError(
|
|
313
|
+
'paymentId',
|
|
314
|
+
'Required parameter "paymentId" was null or undefined when calling getAccountPayment().'
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const queryParameters: any = {};
|
|
319
|
+
|
|
320
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
321
|
+
|
|
322
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
323
|
+
const token = this.configuration.accessToken;
|
|
324
|
+
const tokenString = await token("bearer", []);
|
|
325
|
+
|
|
326
|
+
if (tokenString) {
|
|
327
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
const response = await this.request({
|
|
331
|
+
path: `/private/accounts/{accountId}/payments/{paymentId}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"paymentId"}}`, encodeURIComponent(String(requestParameters['paymentId']))),
|
|
332
|
+
method: 'GET',
|
|
333
|
+
headers: headerParameters,
|
|
334
|
+
query: queryParameters,
|
|
335
|
+
}, initOverrides);
|
|
336
|
+
|
|
337
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccountPaymentDtoFromJSON(jsonValue));
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
*
|
|
342
|
+
*/
|
|
343
|
+
async getAccountPayment(requestParameters: AccountsApiGetAccountPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountPaymentDto> {
|
|
344
|
+
const response = await this.getAccountPaymentRaw(requestParameters, initOverrides);
|
|
345
|
+
return await response.value();
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
*
|
|
350
|
+
*/
|
|
351
|
+
async getAccountPaymentMethodsRaw(requestParameters: AccountsApiGetAccountPaymentMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AccountPaymentMethodDto>>> {
|
|
352
|
+
if (requestParameters['accountId'] == null) {
|
|
353
|
+
throw new runtime.RequiredError(
|
|
354
|
+
'accountId',
|
|
355
|
+
'Required parameter "accountId" was null or undefined when calling getAccountPaymentMethods().'
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if (requestParameters['gateway'] == null) {
|
|
360
|
+
throw new runtime.RequiredError(
|
|
361
|
+
'gateway',
|
|
362
|
+
'Required parameter "gateway" was null or undefined when calling getAccountPaymentMethods().'
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
const queryParameters: any = {};
|
|
367
|
+
|
|
368
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
369
|
+
|
|
370
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
371
|
+
const token = this.configuration.accessToken;
|
|
372
|
+
const tokenString = await token("bearer", []);
|
|
373
|
+
|
|
374
|
+
if (tokenString) {
|
|
375
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
const response = await this.request({
|
|
379
|
+
path: `/private/accounts/{accountId}/payment-methods/{gateway}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"gateway"}}`, encodeURIComponent(String(requestParameters['gateway']))),
|
|
380
|
+
method: 'GET',
|
|
381
|
+
headers: headerParameters,
|
|
382
|
+
query: queryParameters,
|
|
383
|
+
}, initOverrides);
|
|
384
|
+
|
|
385
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AccountPaymentMethodDtoFromJSON));
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
*
|
|
390
|
+
*/
|
|
391
|
+
async getAccountPaymentMethods(requestParameters: AccountsApiGetAccountPaymentMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AccountPaymentMethodDto>> {
|
|
392
|
+
const response = await this.getAccountPaymentMethodsRaw(requestParameters, initOverrides);
|
|
393
|
+
return await response.value();
|
|
394
|
+
}
|
|
395
|
+
|
|
145
396
|
/**
|
|
146
397
|
*
|
|
147
398
|
*/
|
|
@@ -406,6 +657,65 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
406
657
|
return await response.value();
|
|
407
658
|
}
|
|
408
659
|
|
|
660
|
+
/**
|
|
661
|
+
* Pays an account payment by confirming the payment intent using the specified payment method
|
|
662
|
+
* Pay an account payment
|
|
663
|
+
*/
|
|
664
|
+
async payAccountPaymentRaw(requestParameters: AccountsApiPayAccountPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
665
|
+
if (requestParameters['accountId'] == null) {
|
|
666
|
+
throw new runtime.RequiredError(
|
|
667
|
+
'accountId',
|
|
668
|
+
'Required parameter "accountId" was null or undefined when calling payAccountPayment().'
|
|
669
|
+
);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
if (requestParameters['paymentId'] == null) {
|
|
673
|
+
throw new runtime.RequiredError(
|
|
674
|
+
'paymentId',
|
|
675
|
+
'Required parameter "paymentId" was null or undefined when calling payAccountPayment().'
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
if (requestParameters['payAccountPaymentInput'] == null) {
|
|
680
|
+
throw new runtime.RequiredError(
|
|
681
|
+
'payAccountPaymentInput',
|
|
682
|
+
'Required parameter "payAccountPaymentInput" was null or undefined when calling payAccountPayment().'
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
const queryParameters: any = {};
|
|
687
|
+
|
|
688
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
689
|
+
|
|
690
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
691
|
+
|
|
692
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
693
|
+
const token = this.configuration.accessToken;
|
|
694
|
+
const tokenString = await token("bearer", []);
|
|
695
|
+
|
|
696
|
+
if (tokenString) {
|
|
697
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
const response = await this.request({
|
|
701
|
+
path: `/private/accounts/{accountId}/payments/{paymentId}/pay`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"paymentId"}}`, encodeURIComponent(String(requestParameters['paymentId']))),
|
|
702
|
+
method: 'POST',
|
|
703
|
+
headers: headerParameters,
|
|
704
|
+
query: queryParameters,
|
|
705
|
+
body: PayAccountPaymentInputToJSON(requestParameters['payAccountPaymentInput']),
|
|
706
|
+
}, initOverrides);
|
|
707
|
+
|
|
708
|
+
return new runtime.VoidApiResponse(response);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* Pays an account payment by confirming the payment intent using the specified payment method
|
|
713
|
+
* Pay an account payment
|
|
714
|
+
*/
|
|
715
|
+
async payAccountPayment(requestParameters: AccountsApiPayAccountPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
716
|
+
await this.payAccountPaymentRaw(requestParameters, initOverrides);
|
|
717
|
+
}
|
|
718
|
+
|
|
409
719
|
/**
|
|
410
720
|
*
|
|
411
721
|
*/
|
|
@@ -665,3 +975,12 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
665
975
|
}
|
|
666
976
|
|
|
667
977
|
}
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* @export
|
|
981
|
+
*/
|
|
982
|
+
export const GetAccountPaymentMethodsGatewayEnum = {
|
|
983
|
+
STRIPE: 'stripe',
|
|
984
|
+
NICKY: 'nicky'
|
|
985
|
+
} as const;
|
|
986
|
+
export type GetAccountPaymentMethodsGatewayEnum = typeof GetAccountPaymentMethodsGatewayEnum[keyof typeof GetAccountPaymentMethodsGatewayEnum];
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { AccountPaymentMethodProfileDto } from './AccountPaymentMethodProfileDto';
|
|
17
|
+
import {
|
|
18
|
+
AccountPaymentMethodProfileDtoFromJSON,
|
|
19
|
+
AccountPaymentMethodProfileDtoFromJSONTyped,
|
|
20
|
+
AccountPaymentMethodProfileDtoToJSON,
|
|
21
|
+
AccountPaymentMethodProfileDtoToJSONTyped,
|
|
22
|
+
} from './AccountPaymentMethodProfileDto';
|
|
23
|
+
import type { InvoiceItemDto } from './InvoiceItemDto';
|
|
24
|
+
import {
|
|
25
|
+
InvoiceItemDtoFromJSON,
|
|
26
|
+
InvoiceItemDtoFromJSONTyped,
|
|
27
|
+
InvoiceItemDtoToJSON,
|
|
28
|
+
InvoiceItemDtoToJSONTyped,
|
|
29
|
+
} from './InvoiceItemDto';
|
|
30
|
+
import type { InvoiceTransactionDto } from './InvoiceTransactionDto';
|
|
31
|
+
import {
|
|
32
|
+
InvoiceTransactionDtoFromJSON,
|
|
33
|
+
InvoiceTransactionDtoFromJSONTyped,
|
|
34
|
+
InvoiceTransactionDtoToJSON,
|
|
35
|
+
InvoiceTransactionDtoToJSONTyped,
|
|
36
|
+
} from './InvoiceTransactionDto';
|
|
37
|
+
import type { MoneyDto } from './MoneyDto';
|
|
38
|
+
import {
|
|
39
|
+
MoneyDtoFromJSON,
|
|
40
|
+
MoneyDtoFromJSONTyped,
|
|
41
|
+
MoneyDtoToJSON,
|
|
42
|
+
MoneyDtoToJSONTyped,
|
|
43
|
+
} from './MoneyDto';
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @interface AccountPaymentDto
|
|
49
|
+
*/
|
|
50
|
+
export interface AccountPaymentDto {
|
|
51
|
+
/**
|
|
52
|
+
* The uuid for this account payment.
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof AccountPaymentDto
|
|
55
|
+
*/
|
|
56
|
+
id: string;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {string}
|
|
60
|
+
* @memberof AccountPaymentDto
|
|
61
|
+
*/
|
|
62
|
+
status: AccountPaymentDtoStatusEnum;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {Array<AccountPaymentMethodProfileDto>}
|
|
66
|
+
* @memberof AccountPaymentDto
|
|
67
|
+
*/
|
|
68
|
+
paymentMethodProfiles: Array<AccountPaymentMethodProfileDto>;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {MoneyDto}
|
|
72
|
+
* @memberof AccountPaymentDto
|
|
73
|
+
*/
|
|
74
|
+
basePrice: MoneyDto;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @type {MoneyDto}
|
|
78
|
+
* @memberof AccountPaymentDto
|
|
79
|
+
*/
|
|
80
|
+
totalPrice: MoneyDto;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @type {MoneyDto}
|
|
84
|
+
* @memberof AccountPaymentDto
|
|
85
|
+
*/
|
|
86
|
+
totalTaxPrice: MoneyDto;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {Array<InvoiceItemDto>}
|
|
90
|
+
* @memberof AccountPaymentDto
|
|
91
|
+
*/
|
|
92
|
+
items: Array<InvoiceItemDto>;
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @type {Array<string>}
|
|
96
|
+
* @memberof AccountPaymentDto
|
|
97
|
+
*/
|
|
98
|
+
allowedPaymentMethods: Array<string>;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @type {InvoiceTransactionDto}
|
|
102
|
+
* @memberof AccountPaymentDto
|
|
103
|
+
*/
|
|
104
|
+
transaction: InvoiceTransactionDto;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @type {boolean}
|
|
108
|
+
* @memberof AccountPaymentDto
|
|
109
|
+
*/
|
|
110
|
+
hasPendingTransaction: boolean;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @export
|
|
116
|
+
*/
|
|
117
|
+
export const AccountPaymentDtoStatusEnum = {
|
|
118
|
+
DRAFT: 'draft',
|
|
119
|
+
PENDING_PAYMENT: 'pending_payment',
|
|
120
|
+
PAID: 'paid',
|
|
121
|
+
CANCELLED: 'cancelled'
|
|
122
|
+
} as const;
|
|
123
|
+
export type AccountPaymentDtoStatusEnum = typeof AccountPaymentDtoStatusEnum[keyof typeof AccountPaymentDtoStatusEnum];
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Check if a given object implements the AccountPaymentDto interface.
|
|
128
|
+
*/
|
|
129
|
+
export function instanceOfAccountPaymentDto(value: object): value is AccountPaymentDto {
|
|
130
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
131
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
132
|
+
if (!('paymentMethodProfiles' in value) || value['paymentMethodProfiles'] === undefined) return false;
|
|
133
|
+
if (!('basePrice' in value) || value['basePrice'] === undefined) return false;
|
|
134
|
+
if (!('totalPrice' in value) || value['totalPrice'] === undefined) return false;
|
|
135
|
+
if (!('totalTaxPrice' in value) || value['totalTaxPrice'] === undefined) return false;
|
|
136
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
137
|
+
if (!('allowedPaymentMethods' in value) || value['allowedPaymentMethods'] === undefined) return false;
|
|
138
|
+
if (!('transaction' in value) || value['transaction'] === undefined) return false;
|
|
139
|
+
if (!('hasPendingTransaction' in value) || value['hasPendingTransaction'] === undefined) return false;
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function AccountPaymentDtoFromJSON(json: any): AccountPaymentDto {
|
|
144
|
+
return AccountPaymentDtoFromJSONTyped(json, false);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function AccountPaymentDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountPaymentDto {
|
|
148
|
+
if (json == null) {
|
|
149
|
+
return json;
|
|
150
|
+
}
|
|
151
|
+
return {
|
|
152
|
+
|
|
153
|
+
'id': json['id'],
|
|
154
|
+
'status': json['status'],
|
|
155
|
+
'paymentMethodProfiles': ((json['paymentMethodProfiles'] as Array<any>).map(AccountPaymentMethodProfileDtoFromJSON)),
|
|
156
|
+
'basePrice': MoneyDtoFromJSON(json['basePrice']),
|
|
157
|
+
'totalPrice': MoneyDtoFromJSON(json['totalPrice']),
|
|
158
|
+
'totalTaxPrice': MoneyDtoFromJSON(json['totalTaxPrice']),
|
|
159
|
+
'items': ((json['items'] as Array<any>).map(InvoiceItemDtoFromJSON)),
|
|
160
|
+
'allowedPaymentMethods': json['allowedPaymentMethods'],
|
|
161
|
+
'transaction': InvoiceTransactionDtoFromJSON(json['transaction']),
|
|
162
|
+
'hasPendingTransaction': json['hasPendingTransaction'],
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function AccountPaymentDtoToJSON(json: any): AccountPaymentDto {
|
|
167
|
+
return AccountPaymentDtoToJSONTyped(json, false);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function AccountPaymentDtoToJSONTyped(value?: AccountPaymentDto | null, ignoreDiscriminator: boolean = false): any {
|
|
171
|
+
if (value == null) {
|
|
172
|
+
return value;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return {
|
|
176
|
+
|
|
177
|
+
'id': value['id'],
|
|
178
|
+
'status': value['status'],
|
|
179
|
+
'paymentMethodProfiles': ((value['paymentMethodProfiles'] as Array<any>).map(AccountPaymentMethodProfileDtoToJSON)),
|
|
180
|
+
'basePrice': MoneyDtoToJSON(value['basePrice']),
|
|
181
|
+
'totalPrice': MoneyDtoToJSON(value['totalPrice']),
|
|
182
|
+
'totalTaxPrice': MoneyDtoToJSON(value['totalTaxPrice']),
|
|
183
|
+
'items': ((value['items'] as Array<any>).map(InvoiceItemDtoToJSON)),
|
|
184
|
+
'allowedPaymentMethods': value['allowedPaymentMethods'],
|
|
185
|
+
'transaction': InvoiceTransactionDtoToJSON(value['transaction']),
|
|
186
|
+
'hasPendingTransaction': value['hasPendingTransaction'],
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
|