@jugarhoy/api 1.1.52 → 1.1.56
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/apis/AdminPaymentConfigsApi.ts +58 -0
- package/apis/AdminPaymentsApi.ts +263 -0
- package/apis/PublicPaymentsApi.ts +93 -0
- package/apis/ReservesApi.ts +50 -0
- package/apis/UserPaymentApi.ts +188 -0
- package/apis/index.ts +2 -0
- package/models/AdminCreatePaymentMethodRequest.ts +131 -0
- package/models/AdminUpdatePaymentMethodRequest.ts +113 -0
- package/models/CalculateServiceFee200Response.ts +22 -4
- package/models/CoachPaymentsDto.ts +32 -0
- package/models/CoachProfileDto.ts +13 -2
- package/models/CreateCustomerPaymentConfigDto.ts +32 -0
- package/models/CustomerPaymentConfig.ts +16 -0
- package/models/CustomerPaymentConfigDto.ts +16 -0
- package/models/PaymentDetail.ts +32 -0
- package/models/PaymentMethod.ts +2 -1
- package/models/PaymentMethodInfoDto.ts +137 -0
- package/models/SetCucuruCredentialsRequest.ts +75 -0
- package/models/SetUserPaymentSurchargePctRequest.ts +75 -0
- package/models/TransferCucuruDetails.ts +101 -0
- package/models/UpcomingActivityDto.ts +10 -1
- package/models/UserPaymentMethodDto.ts +8 -0
- package/models/index.ts +6 -0
- package/package.json +1 -1
package/apis/UserPaymentApi.ts
CHANGED
|
@@ -18,6 +18,8 @@ import type {
|
|
|
18
18
|
GetUserMercadoPagoAuthUrl200Response,
|
|
19
19
|
LinkCoachMercadoPagoRequest,
|
|
20
20
|
SaveTransferDetailsRequest,
|
|
21
|
+
SetCucuruCredentialsRequest,
|
|
22
|
+
SetUserPaymentSurchargePctRequest,
|
|
21
23
|
ToggleUserCashPaymentRequest,
|
|
22
24
|
UserPaymentMethodDto,
|
|
23
25
|
} from '../models/index';
|
|
@@ -28,6 +30,10 @@ import {
|
|
|
28
30
|
LinkCoachMercadoPagoRequestToJSON,
|
|
29
31
|
SaveTransferDetailsRequestFromJSON,
|
|
30
32
|
SaveTransferDetailsRequestToJSON,
|
|
33
|
+
SetCucuruCredentialsRequestFromJSON,
|
|
34
|
+
SetCucuruCredentialsRequestToJSON,
|
|
35
|
+
SetUserPaymentSurchargePctRequestFromJSON,
|
|
36
|
+
SetUserPaymentSurchargePctRequestToJSON,
|
|
31
37
|
ToggleUserCashPaymentRequestFromJSON,
|
|
32
38
|
ToggleUserCashPaymentRequestToJSON,
|
|
33
39
|
UserPaymentMethodDtoFromJSON,
|
|
@@ -38,6 +44,10 @@ export interface LinkUserMercadoPagoRequest {
|
|
|
38
44
|
linkCoachMercadoPagoRequest: LinkCoachMercadoPagoRequest;
|
|
39
45
|
}
|
|
40
46
|
|
|
47
|
+
export interface LinkUserTransferCucuruRequest {
|
|
48
|
+
setCucuruCredentialsRequest: SetCucuruCredentialsRequest;
|
|
49
|
+
}
|
|
50
|
+
|
|
41
51
|
export interface ListUserPaymentMethodsRequest {
|
|
42
52
|
type?: string;
|
|
43
53
|
}
|
|
@@ -46,10 +56,19 @@ export interface SaveUserTransferDetailsRequest {
|
|
|
46
56
|
saveTransferDetailsRequest: SaveTransferDetailsRequest;
|
|
47
57
|
}
|
|
48
58
|
|
|
59
|
+
export interface SetUserPaymentSurchargePctOperationRequest {
|
|
60
|
+
setUserPaymentSurchargePctRequest: SetUserPaymentSurchargePctRequest;
|
|
61
|
+
}
|
|
62
|
+
|
|
49
63
|
export interface ToggleUserCashPaymentOperationRequest {
|
|
50
64
|
toggleUserCashPaymentRequest: ToggleUserCashPaymentRequest;
|
|
51
65
|
}
|
|
52
66
|
|
|
67
|
+
export interface ToggleUserPaymentMethodRequest {
|
|
68
|
+
paymentMethodCode: string;
|
|
69
|
+
toggleUserCashPaymentRequest: ToggleUserCashPaymentRequest;
|
|
70
|
+
}
|
|
71
|
+
|
|
53
72
|
/**
|
|
54
73
|
*
|
|
55
74
|
*/
|
|
@@ -132,6 +151,49 @@ export class UserPaymentApi extends runtime.BaseAPI {
|
|
|
132
151
|
await this.linkUserMercadoPagoRaw(requestParameters, initOverrides);
|
|
133
152
|
}
|
|
134
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Link Cucuru account using API key
|
|
156
|
+
*/
|
|
157
|
+
async linkUserTransferCucuruRaw(requestParameters: LinkUserTransferCucuruRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
158
|
+
if (requestParameters['setCucuruCredentialsRequest'] == null) {
|
|
159
|
+
throw new runtime.RequiredError(
|
|
160
|
+
'setCucuruCredentialsRequest',
|
|
161
|
+
'Required parameter "setCucuruCredentialsRequest" was null or undefined when calling linkUserTransferCucuru().'
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const queryParameters: any = {};
|
|
166
|
+
|
|
167
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
168
|
+
|
|
169
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
170
|
+
|
|
171
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
172
|
+
const token = this.configuration.accessToken;
|
|
173
|
+
const tokenString = await token("bearerAuth", []);
|
|
174
|
+
|
|
175
|
+
if (tokenString) {
|
|
176
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
const response = await this.request({
|
|
180
|
+
path: `/api/app/user-payment/cucuru/link`,
|
|
181
|
+
method: 'POST',
|
|
182
|
+
headers: headerParameters,
|
|
183
|
+
query: queryParameters,
|
|
184
|
+
body: SetCucuruCredentialsRequestToJSON(requestParameters['setCucuruCredentialsRequest']),
|
|
185
|
+
}, initOverrides);
|
|
186
|
+
|
|
187
|
+
return new runtime.VoidApiResponse(response);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Link Cucuru account using API key
|
|
192
|
+
*/
|
|
193
|
+
async linkUserTransferCucuru(requestParameters: LinkUserTransferCucuruRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
194
|
+
await this.linkUserTransferCucuruRaw(requestParameters, initOverrides);
|
|
195
|
+
}
|
|
196
|
+
|
|
135
197
|
/**
|
|
136
198
|
* List user\'s payment method configurations
|
|
137
199
|
*/
|
|
@@ -246,6 +308,49 @@ export class UserPaymentApi extends runtime.BaseAPI {
|
|
|
246
308
|
await this.saveUserTransferDetailsRaw(requestParameters, initOverrides);
|
|
247
309
|
}
|
|
248
310
|
|
|
311
|
+
/**
|
|
312
|
+
* Set surcharge percentage for a payment method
|
|
313
|
+
*/
|
|
314
|
+
async setUserPaymentSurchargePctRaw(requestParameters: SetUserPaymentSurchargePctOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
315
|
+
if (requestParameters['setUserPaymentSurchargePctRequest'] == null) {
|
|
316
|
+
throw new runtime.RequiredError(
|
|
317
|
+
'setUserPaymentSurchargePctRequest',
|
|
318
|
+
'Required parameter "setUserPaymentSurchargePctRequest" was null or undefined when calling setUserPaymentSurchargePct().'
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const queryParameters: any = {};
|
|
323
|
+
|
|
324
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
325
|
+
|
|
326
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
327
|
+
|
|
328
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
329
|
+
const token = this.configuration.accessToken;
|
|
330
|
+
const tokenString = await token("bearerAuth", []);
|
|
331
|
+
|
|
332
|
+
if (tokenString) {
|
|
333
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
const response = await this.request({
|
|
337
|
+
path: `/api/app/user-payment/surcharge`,
|
|
338
|
+
method: 'PUT',
|
|
339
|
+
headers: headerParameters,
|
|
340
|
+
query: queryParameters,
|
|
341
|
+
body: SetUserPaymentSurchargePctRequestToJSON(requestParameters['setUserPaymentSurchargePctRequest']),
|
|
342
|
+
}, initOverrides);
|
|
343
|
+
|
|
344
|
+
return new runtime.VoidApiResponse(response);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Set surcharge percentage for a payment method
|
|
349
|
+
*/
|
|
350
|
+
async setUserPaymentSurchargePct(requestParameters: SetUserPaymentSurchargePctOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
351
|
+
await this.setUserPaymentSurchargePctRaw(requestParameters, initOverrides);
|
|
352
|
+
}
|
|
353
|
+
|
|
249
354
|
/**
|
|
250
355
|
* Toggle cash payment acceptance (Efectivo)
|
|
251
356
|
*/
|
|
@@ -289,6 +394,56 @@ export class UserPaymentApi extends runtime.BaseAPI {
|
|
|
289
394
|
await this.toggleUserCashPaymentRaw(requestParameters, initOverrides);
|
|
290
395
|
}
|
|
291
396
|
|
|
397
|
+
/**
|
|
398
|
+
* Enable or disable a payment method without removing credentials
|
|
399
|
+
*/
|
|
400
|
+
async toggleUserPaymentMethodRaw(requestParameters: ToggleUserPaymentMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
401
|
+
if (requestParameters['paymentMethodCode'] == null) {
|
|
402
|
+
throw new runtime.RequiredError(
|
|
403
|
+
'paymentMethodCode',
|
|
404
|
+
'Required parameter "paymentMethodCode" was null or undefined when calling toggleUserPaymentMethod().'
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
if (requestParameters['toggleUserCashPaymentRequest'] == null) {
|
|
409
|
+
throw new runtime.RequiredError(
|
|
410
|
+
'toggleUserCashPaymentRequest',
|
|
411
|
+
'Required parameter "toggleUserCashPaymentRequest" was null or undefined when calling toggleUserPaymentMethod().'
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
const queryParameters: any = {};
|
|
416
|
+
|
|
417
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
418
|
+
|
|
419
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
420
|
+
|
|
421
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
422
|
+
const token = this.configuration.accessToken;
|
|
423
|
+
const tokenString = await token("bearerAuth", []);
|
|
424
|
+
|
|
425
|
+
if (tokenString) {
|
|
426
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
const response = await this.request({
|
|
430
|
+
path: `/api/app/user-payment/{paymentMethodCode}/toggle`.replace(`{${"paymentMethodCode"}}`, encodeURIComponent(String(requestParameters['paymentMethodCode']))),
|
|
431
|
+
method: 'PUT',
|
|
432
|
+
headers: headerParameters,
|
|
433
|
+
query: queryParameters,
|
|
434
|
+
body: ToggleUserCashPaymentRequestToJSON(requestParameters['toggleUserCashPaymentRequest']),
|
|
435
|
+
}, initOverrides);
|
|
436
|
+
|
|
437
|
+
return new runtime.VoidApiResponse(response);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Enable or disable a payment method without removing credentials
|
|
442
|
+
*/
|
|
443
|
+
async toggleUserPaymentMethod(requestParameters: ToggleUserPaymentMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
444
|
+
await this.toggleUserPaymentMethodRaw(requestParameters, initOverrides);
|
|
445
|
+
}
|
|
446
|
+
|
|
292
447
|
/**
|
|
293
448
|
* Unlink MercadoPago account
|
|
294
449
|
*/
|
|
@@ -322,4 +477,37 @@ export class UserPaymentApi extends runtime.BaseAPI {
|
|
|
322
477
|
await this.unlinkUserMercadoPagoRaw(initOverrides);
|
|
323
478
|
}
|
|
324
479
|
|
|
480
|
+
/**
|
|
481
|
+
* Unlink Cucuru account
|
|
482
|
+
*/
|
|
483
|
+
async unlinkUserTransferCucuruRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
484
|
+
const queryParameters: any = {};
|
|
485
|
+
|
|
486
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
487
|
+
|
|
488
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
489
|
+
const token = this.configuration.accessToken;
|
|
490
|
+
const tokenString = await token("bearerAuth", []);
|
|
491
|
+
|
|
492
|
+
if (tokenString) {
|
|
493
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
const response = await this.request({
|
|
497
|
+
path: `/api/app/user-payment/cucuru/unlink`,
|
|
498
|
+
method: 'DELETE',
|
|
499
|
+
headers: headerParameters,
|
|
500
|
+
query: queryParameters,
|
|
501
|
+
}, initOverrides);
|
|
502
|
+
|
|
503
|
+
return new runtime.VoidApiResponse(response);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Unlink Cucuru account
|
|
508
|
+
*/
|
|
509
|
+
async unlinkUserTransferCucuru(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
510
|
+
await this.unlinkUserTransferCucuruRaw(initOverrides);
|
|
511
|
+
}
|
|
512
|
+
|
|
325
513
|
}
|
package/apis/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './AdminFeaturesApi';
|
|
|
9
9
|
export * from './AdminInvitationsApi';
|
|
10
10
|
export * from './AdminLocationsApi';
|
|
11
11
|
export * from './AdminPaymentConfigsApi';
|
|
12
|
+
export * from './AdminPaymentsApi';
|
|
12
13
|
export * from './AdminPlayPricesApi';
|
|
13
14
|
export * from './AdminPlaySpotShiftsApi';
|
|
14
15
|
export * from './AdminPlaySpotsApi';
|
|
@@ -39,6 +40,7 @@ export * from './PlaySpotsApi';
|
|
|
39
40
|
export * from './PlayerCoachBookingApi';
|
|
40
41
|
export * from './PositionsApi';
|
|
41
42
|
export * from './PublicCoachDiscoveryApi';
|
|
43
|
+
export * from './PublicPaymentsApi';
|
|
42
44
|
export * from './RecurringGamesApi';
|
|
43
45
|
export * from './ReservesApi';
|
|
44
46
|
export * from './SportEventsApi';
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AdminCreatePaymentMethodRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface AdminCreatePaymentMethodRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AdminCreatePaymentMethodRequest
|
|
26
|
+
*/
|
|
27
|
+
code: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AdminCreatePaymentMethodRequest
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof AdminCreatePaymentMethodRequest
|
|
38
|
+
*/
|
|
39
|
+
notes?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof AdminCreatePaymentMethodRequest
|
|
44
|
+
*/
|
|
45
|
+
instructions?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof AdminCreatePaymentMethodRequest
|
|
50
|
+
*/
|
|
51
|
+
conditions?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof AdminCreatePaymentMethodRequest
|
|
56
|
+
*/
|
|
57
|
+
imageUrl?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {boolean}
|
|
61
|
+
* @memberof AdminCreatePaymentMethodRequest
|
|
62
|
+
*/
|
|
63
|
+
enabled?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether to charge the Jugar Hoy platform fee for this method (default true)
|
|
66
|
+
* @type {boolean}
|
|
67
|
+
* @memberof AdminCreatePaymentMethodRequest
|
|
68
|
+
*/
|
|
69
|
+
hasPlatformFee?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* When true, a disabled CustomerPaymentConfig is auto-created for new customers on club registration (default false)
|
|
72
|
+
* @type {boolean}
|
|
73
|
+
* @memberof AdminCreatePaymentMethodRequest
|
|
74
|
+
*/
|
|
75
|
+
autoSetup?: boolean;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Check if a given object implements the AdminCreatePaymentMethodRequest interface.
|
|
80
|
+
*/
|
|
81
|
+
export function instanceOfAdminCreatePaymentMethodRequest(value: object): value is AdminCreatePaymentMethodRequest {
|
|
82
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
83
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function AdminCreatePaymentMethodRequestFromJSON(json: any): AdminCreatePaymentMethodRequest {
|
|
88
|
+
return AdminCreatePaymentMethodRequestFromJSONTyped(json, false);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function AdminCreatePaymentMethodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminCreatePaymentMethodRequest {
|
|
92
|
+
if (json == null) {
|
|
93
|
+
return json;
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'code': json['code'],
|
|
98
|
+
'name': json['name'],
|
|
99
|
+
'notes': json['notes'] == null ? undefined : json['notes'],
|
|
100
|
+
'instructions': json['instructions'] == null ? undefined : json['instructions'],
|
|
101
|
+
'conditions': json['conditions'] == null ? undefined : json['conditions'],
|
|
102
|
+
'imageUrl': json['imageUrl'] == null ? undefined : json['imageUrl'],
|
|
103
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
104
|
+
'hasPlatformFee': json['hasPlatformFee'] == null ? undefined : json['hasPlatformFee'],
|
|
105
|
+
'autoSetup': json['autoSetup'] == null ? undefined : json['autoSetup'],
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function AdminCreatePaymentMethodRequestToJSON(json: any): AdminCreatePaymentMethodRequest {
|
|
110
|
+
return AdminCreatePaymentMethodRequestToJSONTyped(json, false);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function AdminCreatePaymentMethodRequestToJSONTyped(value?: AdminCreatePaymentMethodRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
114
|
+
if (value == null) {
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
|
|
120
|
+
'code': value['code'],
|
|
121
|
+
'name': value['name'],
|
|
122
|
+
'notes': value['notes'],
|
|
123
|
+
'instructions': value['instructions'],
|
|
124
|
+
'conditions': value['conditions'],
|
|
125
|
+
'imageUrl': value['imageUrl'],
|
|
126
|
+
'enabled': value['enabled'],
|
|
127
|
+
'hasPlatformFee': value['hasPlatformFee'],
|
|
128
|
+
'autoSetup': value['autoSetup'],
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AdminUpdatePaymentMethodRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface AdminUpdatePaymentMethodRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AdminUpdatePaymentMethodRequest
|
|
26
|
+
*/
|
|
27
|
+
name?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AdminUpdatePaymentMethodRequest
|
|
32
|
+
*/
|
|
33
|
+
notes?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof AdminUpdatePaymentMethodRequest
|
|
38
|
+
*/
|
|
39
|
+
instructions?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof AdminUpdatePaymentMethodRequest
|
|
44
|
+
*/
|
|
45
|
+
conditions?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof AdminUpdatePaymentMethodRequest
|
|
50
|
+
*/
|
|
51
|
+
imageUrl?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof AdminUpdatePaymentMethodRequest
|
|
56
|
+
*/
|
|
57
|
+
enabled?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* When true, a disabled CustomerPaymentConfig is auto-created for new customers on club registration
|
|
60
|
+
* @type {boolean}
|
|
61
|
+
* @memberof AdminUpdatePaymentMethodRequest
|
|
62
|
+
*/
|
|
63
|
+
autoSetup?: boolean;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the AdminUpdatePaymentMethodRequest interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfAdminUpdatePaymentMethodRequest(value: object): value is AdminUpdatePaymentMethodRequest {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function AdminUpdatePaymentMethodRequestFromJSON(json: any): AdminUpdatePaymentMethodRequest {
|
|
74
|
+
return AdminUpdatePaymentMethodRequestFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function AdminUpdatePaymentMethodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminUpdatePaymentMethodRequest {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
84
|
+
'notes': json['notes'] == null ? undefined : json['notes'],
|
|
85
|
+
'instructions': json['instructions'] == null ? undefined : json['instructions'],
|
|
86
|
+
'conditions': json['conditions'] == null ? undefined : json['conditions'],
|
|
87
|
+
'imageUrl': json['imageUrl'] == null ? undefined : json['imageUrl'],
|
|
88
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
89
|
+
'autoSetup': json['autoSetup'] == null ? undefined : json['autoSetup'],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function AdminUpdatePaymentMethodRequestToJSON(json: any): AdminUpdatePaymentMethodRequest {
|
|
94
|
+
return AdminUpdatePaymentMethodRequestToJSONTyped(json, false);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function AdminUpdatePaymentMethodRequestToJSONTyped(value?: AdminUpdatePaymentMethodRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
98
|
+
if (value == null) {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
|
|
104
|
+
'name': value['name'],
|
|
105
|
+
'notes': value['notes'],
|
|
106
|
+
'instructions': value['instructions'],
|
|
107
|
+
'conditions': value['conditions'],
|
|
108
|
+
'imageUrl': value['imageUrl'],
|
|
109
|
+
'enabled': value['enabled'],
|
|
110
|
+
'autoSetup': value['autoSetup'],
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
@@ -20,19 +20,31 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface CalculateServiceFee200Response {
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Jugar Hoy platform fee in ARS
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof CalculateServiceFee200Response
|
|
26
26
|
*/
|
|
27
27
|
fee: number;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Provider surcharge in ARS (0 when paymentMethod not provided)
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof CalculateServiceFee200Response
|
|
32
|
+
*/
|
|
33
|
+
surcharge: number;
|
|
34
|
+
/**
|
|
35
|
+
* Provider surcharge percentage (0 when paymentMethod not provided)
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof CalculateServiceFee200Response
|
|
38
|
+
*/
|
|
39
|
+
surchargePct: number;
|
|
40
|
+
/**
|
|
41
|
+
* Platform fee rate
|
|
30
42
|
* @type {number}
|
|
31
43
|
* @memberof CalculateServiceFee200Response
|
|
32
44
|
*/
|
|
33
45
|
rate: number;
|
|
34
46
|
/**
|
|
35
|
-
* Maximum fee cap in ARS
|
|
47
|
+
* Maximum platform fee cap in ARS
|
|
36
48
|
* @type {number}
|
|
37
49
|
* @memberof CalculateServiceFee200Response
|
|
38
50
|
*/
|
|
@@ -44,7 +56,7 @@ export interface CalculateServiceFee200Response {
|
|
|
44
56
|
*/
|
|
45
57
|
basePrice: number;
|
|
46
58
|
/**
|
|
47
|
-
* basePrice + fee
|
|
59
|
+
* basePrice + surcharge + fee
|
|
48
60
|
* @type {number}
|
|
49
61
|
* @memberof CalculateServiceFee200Response
|
|
50
62
|
*/
|
|
@@ -56,6 +68,8 @@ export interface CalculateServiceFee200Response {
|
|
|
56
68
|
*/
|
|
57
69
|
export function instanceOfCalculateServiceFee200Response(value: object): value is CalculateServiceFee200Response {
|
|
58
70
|
if (!('fee' in value) || value['fee'] === undefined) return false;
|
|
71
|
+
if (!('surcharge' in value) || value['surcharge'] === undefined) return false;
|
|
72
|
+
if (!('surchargePct' in value) || value['surchargePct'] === undefined) return false;
|
|
59
73
|
if (!('rate' in value) || value['rate'] === undefined) return false;
|
|
60
74
|
if (!('cap' in value) || value['cap'] === undefined) return false;
|
|
61
75
|
if (!('basePrice' in value) || value['basePrice'] === undefined) return false;
|
|
@@ -74,6 +88,8 @@ export function CalculateServiceFee200ResponseFromJSONTyped(json: any, ignoreDis
|
|
|
74
88
|
return {
|
|
75
89
|
|
|
76
90
|
'fee': json['fee'],
|
|
91
|
+
'surcharge': json['surcharge'],
|
|
92
|
+
'surchargePct': json['surchargePct'],
|
|
77
93
|
'rate': json['rate'],
|
|
78
94
|
'cap': json['cap'],
|
|
79
95
|
'basePrice': json['basePrice'],
|
|
@@ -93,6 +109,8 @@ export function CalculateServiceFee200ResponseToJSONTyped(value?: CalculateServi
|
|
|
93
109
|
return {
|
|
94
110
|
|
|
95
111
|
'fee': value['fee'],
|
|
112
|
+
'surcharge': value['surcharge'],
|
|
113
|
+
'surchargePct': value['surchargePct'],
|
|
96
114
|
'rate': value['rate'],
|
|
97
115
|
'cap': value['cap'],
|
|
98
116
|
'basePrice': value['basePrice'],
|
|
@@ -37,6 +37,30 @@ export interface CoachPaymentsDto {
|
|
|
37
37
|
* @memberof CoachPaymentsDto
|
|
38
38
|
*/
|
|
39
39
|
mercadoPagoAccountId?: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof CoachPaymentsDto
|
|
44
|
+
*/
|
|
45
|
+
transferCucuruEnabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof CoachPaymentsDto
|
|
50
|
+
*/
|
|
51
|
+
mercadoPagoSurchargePct?: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof CoachPaymentsDto
|
|
56
|
+
*/
|
|
57
|
+
transferCucuruSurchargePct?: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof CoachPaymentsDto
|
|
62
|
+
*/
|
|
63
|
+
cashSurchargePct?: number;
|
|
40
64
|
}
|
|
41
65
|
|
|
42
66
|
/**
|
|
@@ -59,6 +83,10 @@ export function CoachPaymentsDtoFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
59
83
|
'allowCashPayment': json['allowCashPayment'] == null ? undefined : json['allowCashPayment'],
|
|
60
84
|
'mercadoPagoLinked': json['mercadoPagoLinked'] == null ? undefined : json['mercadoPagoLinked'],
|
|
61
85
|
'mercadoPagoAccountId': json['mercadoPagoAccountId'] == null ? undefined : json['mercadoPagoAccountId'],
|
|
86
|
+
'transferCucuruEnabled': json['transferCucuruEnabled'] == null ? undefined : json['transferCucuruEnabled'],
|
|
87
|
+
'mercadoPagoSurchargePct': json['mercadoPagoSurchargePct'] == null ? undefined : json['mercadoPagoSurchargePct'],
|
|
88
|
+
'transferCucuruSurchargePct': json['transferCucuruSurchargePct'] == null ? undefined : json['transferCucuruSurchargePct'],
|
|
89
|
+
'cashSurchargePct': json['cashSurchargePct'] == null ? undefined : json['cashSurchargePct'],
|
|
62
90
|
};
|
|
63
91
|
}
|
|
64
92
|
|
|
@@ -76,6 +104,10 @@ export function CoachPaymentsDtoToJSONTyped(value?: CoachPaymentsDto | null, ign
|
|
|
76
104
|
'allowCashPayment': value['allowCashPayment'],
|
|
77
105
|
'mercadoPagoLinked': value['mercadoPagoLinked'],
|
|
78
106
|
'mercadoPagoAccountId': value['mercadoPagoAccountId'],
|
|
107
|
+
'transferCucuruEnabled': value['transferCucuruEnabled'],
|
|
108
|
+
'mercadoPagoSurchargePct': value['mercadoPagoSurchargePct'],
|
|
109
|
+
'transferCucuruSurchargePct': value['transferCucuruSurchargePct'],
|
|
110
|
+
'cashSurchargePct': value['cashSurchargePct'],
|
|
79
111
|
};
|
|
80
112
|
}
|
|
81
113
|
|
|
@@ -138,17 +138,26 @@ export interface CoachProfileDto {
|
|
|
138
138
|
*/
|
|
139
139
|
status: CoachProfileDtoStatusEnum;
|
|
140
140
|
/**
|
|
141
|
-
*
|
|
141
|
+
* Deprecated — derived from user_payments.enabled for CASH
|
|
142
142
|
* @type {boolean}
|
|
143
143
|
* @memberof CoachProfileDto
|
|
144
|
+
* @deprecated
|
|
144
145
|
*/
|
|
145
146
|
allowCashPayment?: boolean;
|
|
146
147
|
/**
|
|
147
|
-
*
|
|
148
|
+
* Deprecated — derived from user_payments.enabled for MERCADOPAGO
|
|
148
149
|
* @type {boolean}
|
|
149
150
|
* @memberof CoachProfileDto
|
|
151
|
+
* @deprecated
|
|
150
152
|
*/
|
|
151
153
|
mercadoPagoLinked?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Deprecated — derived from user_payments.enabled for TRANSFER_CUCURU
|
|
156
|
+
* @type {boolean}
|
|
157
|
+
* @memberof CoachProfileDto
|
|
158
|
+
* @deprecated
|
|
159
|
+
*/
|
|
160
|
+
transferCucuruEnabled?: boolean;
|
|
152
161
|
/**
|
|
153
162
|
*
|
|
154
163
|
* @type {CoachProfileDtoRating}
|
|
@@ -221,6 +230,7 @@ export function CoachProfileDtoFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
221
230
|
'status': json['status'],
|
|
222
231
|
'allowCashPayment': json['allowCashPayment'] == null ? undefined : json['allowCashPayment'],
|
|
223
232
|
'mercadoPagoLinked': json['mercadoPagoLinked'] == null ? undefined : json['mercadoPagoLinked'],
|
|
233
|
+
'transferCucuruEnabled': json['transferCucuruEnabled'] == null ? undefined : json['transferCucuruEnabled'],
|
|
224
234
|
'rating': json['rating'] == null ? undefined : CoachProfileDtoRatingFromJSON(json['rating']),
|
|
225
235
|
'locations': json['locations'] == null ? undefined : ((json['locations'] as Array<any>).map(LocationFromJSON)),
|
|
226
236
|
'distanceKm': json['distanceKm'] == null ? undefined : json['distanceKm'],
|
|
@@ -256,6 +266,7 @@ export function CoachProfileDtoToJSONTyped(value?: CoachProfileDto | null, ignor
|
|
|
256
266
|
'status': value['status'],
|
|
257
267
|
'allowCashPayment': value['allowCashPayment'],
|
|
258
268
|
'mercadoPagoLinked': value['mercadoPagoLinked'],
|
|
269
|
+
'transferCucuruEnabled': value['transferCucuruEnabled'],
|
|
259
270
|
'rating': CoachProfileDtoRatingToJSON(value['rating']),
|
|
260
271
|
'locations': value['locations'] == null ? undefined : ((value['locations'] as Array<any>).map(LocationToJSON)),
|
|
261
272
|
'distanceKm': value['distanceKm'],
|