@jugarhoy/api 1.1.15 → 1.1.17

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.
@@ -0,0 +1,254 @@
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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ Location,
19
+ PlaySpotShift,
20
+ Reserve,
21
+ ReserveStatus,
22
+ TrainerFeedDto,
23
+ } from '../models/index';
24
+ import {
25
+ LocationFromJSON,
26
+ LocationToJSON,
27
+ PlaySpotShiftFromJSON,
28
+ PlaySpotShiftToJSON,
29
+ ReserveFromJSON,
30
+ ReserveToJSON,
31
+ ReserveStatusFromJSON,
32
+ ReserveStatusToJSON,
33
+ TrainerFeedDtoFromJSON,
34
+ TrainerFeedDtoToJSON,
35
+ } from '../models/index';
36
+
37
+ export interface ApiAppCoachWorkspaceClassesGetRequest {
38
+ locationId?: string;
39
+ status?: ReserveStatus;
40
+ fromDate?: Date;
41
+ toDate?: Date;
42
+ }
43
+
44
+ export interface ApiAppCoachWorkspaceClassesReserveIdCancelPostRequest {
45
+ reserveId: string;
46
+ }
47
+
48
+ export interface ApiAppCoachWorkspaceShiftsGetRequest {
49
+ locationId?: string;
50
+ }
51
+
52
+ /**
53
+ *
54
+ */
55
+ export class CoachWorkspaceApi extends runtime.BaseAPI {
56
+
57
+ /**
58
+ * Get coach\'s activity feed with upcoming classes and recent bookings
59
+ */
60
+ async apiAppCoachFeedGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TrainerFeedDto>> {
61
+ const queryParameters: any = {};
62
+
63
+ const headerParameters: runtime.HTTPHeaders = {};
64
+
65
+ if (this.configuration && this.configuration.accessToken) {
66
+ const token = this.configuration.accessToken;
67
+ const tokenString = await token("bearerAuth", []);
68
+
69
+ if (tokenString) {
70
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
71
+ }
72
+ }
73
+ const response = await this.request({
74
+ path: `/api/app/coach/feed`,
75
+ method: 'GET',
76
+ headers: headerParameters,
77
+ query: queryParameters,
78
+ }, initOverrides);
79
+
80
+ return new runtime.JSONApiResponse(response, (jsonValue) => TrainerFeedDtoFromJSON(jsonValue));
81
+ }
82
+
83
+ /**
84
+ * Get coach\'s activity feed with upcoming classes and recent bookings
85
+ */
86
+ async apiAppCoachFeedGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TrainerFeedDto> {
87
+ const response = await this.apiAppCoachFeedGetRaw(initOverrides);
88
+ return await response.value();
89
+ }
90
+
91
+ /**
92
+ * Get all classes (reserves) for the coach with filters
93
+ */
94
+ async apiAppCoachWorkspaceClassesGetRaw(requestParameters: ApiAppCoachWorkspaceClassesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Reserve>>> {
95
+ const queryParameters: any = {};
96
+
97
+ if (requestParameters['locationId'] != null) {
98
+ queryParameters['locationId'] = requestParameters['locationId'];
99
+ }
100
+
101
+ if (requestParameters['status'] != null) {
102
+ queryParameters['status'] = requestParameters['status'];
103
+ }
104
+
105
+ if (requestParameters['fromDate'] != null) {
106
+ queryParameters['fromDate'] = (requestParameters['fromDate'] as any).toISOString();
107
+ }
108
+
109
+ if (requestParameters['toDate'] != null) {
110
+ queryParameters['toDate'] = (requestParameters['toDate'] as any).toISOString();
111
+ }
112
+
113
+ const headerParameters: runtime.HTTPHeaders = {};
114
+
115
+ if (this.configuration && this.configuration.accessToken) {
116
+ const token = this.configuration.accessToken;
117
+ const tokenString = await token("bearerAuth", []);
118
+
119
+ if (tokenString) {
120
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
121
+ }
122
+ }
123
+ const response = await this.request({
124
+ path: `/api/app/coach/workspace/classes`,
125
+ method: 'GET',
126
+ headers: headerParameters,
127
+ query: queryParameters,
128
+ }, initOverrides);
129
+
130
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ReserveFromJSON));
131
+ }
132
+
133
+ /**
134
+ * Get all classes (reserves) for the coach with filters
135
+ */
136
+ async apiAppCoachWorkspaceClassesGet(requestParameters: ApiAppCoachWorkspaceClassesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Reserve>> {
137
+ const response = await this.apiAppCoachWorkspaceClassesGetRaw(requestParameters, initOverrides);
138
+ return await response.value();
139
+ }
140
+
141
+ /**
142
+ * Cancel a class (reserve)
143
+ */
144
+ async apiAppCoachWorkspaceClassesReserveIdCancelPostRaw(requestParameters: ApiAppCoachWorkspaceClassesReserveIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Reserve>> {
145
+ if (requestParameters['reserveId'] == null) {
146
+ throw new runtime.RequiredError(
147
+ 'reserveId',
148
+ 'Required parameter "reserveId" was null or undefined when calling apiAppCoachWorkspaceClassesReserveIdCancelPost().'
149
+ );
150
+ }
151
+
152
+ const queryParameters: any = {};
153
+
154
+ const headerParameters: runtime.HTTPHeaders = {};
155
+
156
+ if (this.configuration && this.configuration.accessToken) {
157
+ const token = this.configuration.accessToken;
158
+ const tokenString = await token("bearerAuth", []);
159
+
160
+ if (tokenString) {
161
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
162
+ }
163
+ }
164
+ const response = await this.request({
165
+ path: `/api/app/coach/workspace/classes/{reserveId}/cancel`.replace(`{${"reserveId"}}`, encodeURIComponent(String(requestParameters['reserveId']))),
166
+ method: 'POST',
167
+ headers: headerParameters,
168
+ query: queryParameters,
169
+ }, initOverrides);
170
+
171
+ return new runtime.JSONApiResponse(response, (jsonValue) => ReserveFromJSON(jsonValue));
172
+ }
173
+
174
+ /**
175
+ * Cancel a class (reserve)
176
+ */
177
+ async apiAppCoachWorkspaceClassesReserveIdCancelPost(requestParameters: ApiAppCoachWorkspaceClassesReserveIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Reserve> {
178
+ const response = await this.apiAppCoachWorkspaceClassesReserveIdCancelPostRaw(requestParameters, initOverrides);
179
+ return await response.value();
180
+ }
181
+
182
+ /**
183
+ * Get all locations for the coach
184
+ */
185
+ async apiAppCoachWorkspaceLocationsGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Location>>> {
186
+ const queryParameters: any = {};
187
+
188
+ const headerParameters: runtime.HTTPHeaders = {};
189
+
190
+ if (this.configuration && this.configuration.accessToken) {
191
+ const token = this.configuration.accessToken;
192
+ const tokenString = await token("bearerAuth", []);
193
+
194
+ if (tokenString) {
195
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
196
+ }
197
+ }
198
+ const response = await this.request({
199
+ path: `/api/app/coach/workspace/locations`,
200
+ method: 'GET',
201
+ headers: headerParameters,
202
+ query: queryParameters,
203
+ }, initOverrides);
204
+
205
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(LocationFromJSON));
206
+ }
207
+
208
+ /**
209
+ * Get all locations for the coach
210
+ */
211
+ async apiAppCoachWorkspaceLocationsGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Location>> {
212
+ const response = await this.apiAppCoachWorkspaceLocationsGetRaw(initOverrides);
213
+ return await response.value();
214
+ }
215
+
216
+ /**
217
+ * Get all shifts for the coach with optional location filter
218
+ */
219
+ async apiAppCoachWorkspaceShiftsGetRaw(requestParameters: ApiAppCoachWorkspaceShiftsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PlaySpotShift>>> {
220
+ const queryParameters: any = {};
221
+
222
+ if (requestParameters['locationId'] != null) {
223
+ queryParameters['locationId'] = requestParameters['locationId'];
224
+ }
225
+
226
+ const headerParameters: runtime.HTTPHeaders = {};
227
+
228
+ if (this.configuration && this.configuration.accessToken) {
229
+ const token = this.configuration.accessToken;
230
+ const tokenString = await token("bearerAuth", []);
231
+
232
+ if (tokenString) {
233
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
234
+ }
235
+ }
236
+ const response = await this.request({
237
+ path: `/api/app/coach/workspace/shifts`,
238
+ method: 'GET',
239
+ headers: headerParameters,
240
+ query: queryParameters,
241
+ }, initOverrides);
242
+
243
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PlaySpotShiftFromJSON));
244
+ }
245
+
246
+ /**
247
+ * Get all shifts for the coach with optional location filter
248
+ */
249
+ async apiAppCoachWorkspaceShiftsGet(requestParameters: ApiAppCoachWorkspaceShiftsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PlaySpotShift>> {
250
+ const response = await this.apiAppCoachWorkspaceShiftsGetRaw(requestParameters, initOverrides);
251
+ return await response.value();
252
+ }
253
+
254
+ }
@@ -0,0 +1,244 @@
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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ BookCoachClassDto,
19
+ CoachAvailabilityDto,
20
+ CoachProfileDto,
21
+ Reserve,
22
+ Sport,
23
+ } from '../models/index';
24
+ import {
25
+ BookCoachClassDtoFromJSON,
26
+ BookCoachClassDtoToJSON,
27
+ CoachAvailabilityDtoFromJSON,
28
+ CoachAvailabilityDtoToJSON,
29
+ CoachProfileDtoFromJSON,
30
+ CoachProfileDtoToJSON,
31
+ ReserveFromJSON,
32
+ ReserveToJSON,
33
+ SportFromJSON,
34
+ SportToJSON,
35
+ } from '../models/index';
36
+
37
+ export interface ApiAppCoachesBookPostRequest {
38
+ bookCoachClassDto: BookCoachClassDto;
39
+ }
40
+
41
+ export interface ApiAppCoachesCoachUserIdAvailabilityGetRequest {
42
+ coachUserId: string;
43
+ locationId: string;
44
+ }
45
+
46
+ export interface ApiAppCoachesCoachUserIdProfileGetRequest {
47
+ coachUserId: string;
48
+ }
49
+
50
+ export interface ApiAppCoachesSearchGetRequest {
51
+ sport?: Sport;
52
+ locationId?: string;
53
+ category?: string;
54
+ }
55
+
56
+ /**
57
+ *
58
+ */
59
+ export class PlayerCoachBookingApi extends runtime.BaseAPI {
60
+
61
+ /**
62
+ * Book a one-time class with a coach
63
+ */
64
+ async apiAppCoachesBookPostRaw(requestParameters: ApiAppCoachesBookPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Reserve>> {
65
+ if (requestParameters['bookCoachClassDto'] == null) {
66
+ throw new runtime.RequiredError(
67
+ 'bookCoachClassDto',
68
+ 'Required parameter "bookCoachClassDto" was null or undefined when calling apiAppCoachesBookPost().'
69
+ );
70
+ }
71
+
72
+ const queryParameters: any = {};
73
+
74
+ const headerParameters: runtime.HTTPHeaders = {};
75
+
76
+ headerParameters['Content-Type'] = 'application/json';
77
+
78
+ if (this.configuration && this.configuration.accessToken) {
79
+ const token = this.configuration.accessToken;
80
+ const tokenString = await token("bearerAuth", []);
81
+
82
+ if (tokenString) {
83
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
84
+ }
85
+ }
86
+ const response = await this.request({
87
+ path: `/api/app/coaches/book`,
88
+ method: 'POST',
89
+ headers: headerParameters,
90
+ query: queryParameters,
91
+ body: BookCoachClassDtoToJSON(requestParameters['bookCoachClassDto']),
92
+ }, initOverrides);
93
+
94
+ return new runtime.JSONApiResponse(response, (jsonValue) => ReserveFromJSON(jsonValue));
95
+ }
96
+
97
+ /**
98
+ * Book a one-time class with a coach
99
+ */
100
+ async apiAppCoachesBookPost(requestParameters: ApiAppCoachesBookPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Reserve> {
101
+ const response = await this.apiAppCoachesBookPostRaw(requestParameters, initOverrides);
102
+ return await response.value();
103
+ }
104
+
105
+ /**
106
+ * Get coach availability (shifts and prices) for a location
107
+ */
108
+ async apiAppCoachesCoachUserIdAvailabilityGetRaw(requestParameters: ApiAppCoachesCoachUserIdAvailabilityGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CoachAvailabilityDto>> {
109
+ if (requestParameters['coachUserId'] == null) {
110
+ throw new runtime.RequiredError(
111
+ 'coachUserId',
112
+ 'Required parameter "coachUserId" was null or undefined when calling apiAppCoachesCoachUserIdAvailabilityGet().'
113
+ );
114
+ }
115
+
116
+ if (requestParameters['locationId'] == null) {
117
+ throw new runtime.RequiredError(
118
+ 'locationId',
119
+ 'Required parameter "locationId" was null or undefined when calling apiAppCoachesCoachUserIdAvailabilityGet().'
120
+ );
121
+ }
122
+
123
+ const queryParameters: any = {};
124
+
125
+ if (requestParameters['locationId'] != null) {
126
+ queryParameters['locationId'] = requestParameters['locationId'];
127
+ }
128
+
129
+ const headerParameters: runtime.HTTPHeaders = {};
130
+
131
+ if (this.configuration && this.configuration.accessToken) {
132
+ const token = this.configuration.accessToken;
133
+ const tokenString = await token("bearerAuth", []);
134
+
135
+ if (tokenString) {
136
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
137
+ }
138
+ }
139
+ const response = await this.request({
140
+ path: `/api/app/coaches/{coachUserId}/availability`.replace(`{${"coachUserId"}}`, encodeURIComponent(String(requestParameters['coachUserId']))),
141
+ method: 'GET',
142
+ headers: headerParameters,
143
+ query: queryParameters,
144
+ }, initOverrides);
145
+
146
+ return new runtime.JSONApiResponse(response, (jsonValue) => CoachAvailabilityDtoFromJSON(jsonValue));
147
+ }
148
+
149
+ /**
150
+ * Get coach availability (shifts and prices) for a location
151
+ */
152
+ async apiAppCoachesCoachUserIdAvailabilityGet(requestParameters: ApiAppCoachesCoachUserIdAvailabilityGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CoachAvailabilityDto> {
153
+ const response = await this.apiAppCoachesCoachUserIdAvailabilityGetRaw(requestParameters, initOverrides);
154
+ return await response.value();
155
+ }
156
+
157
+ /**
158
+ * Get coach profile by user ID
159
+ */
160
+ async apiAppCoachesCoachUserIdProfileGetRaw(requestParameters: ApiAppCoachesCoachUserIdProfileGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CoachProfileDto>> {
161
+ if (requestParameters['coachUserId'] == null) {
162
+ throw new runtime.RequiredError(
163
+ 'coachUserId',
164
+ 'Required parameter "coachUserId" was null or undefined when calling apiAppCoachesCoachUserIdProfileGet().'
165
+ );
166
+ }
167
+
168
+ const queryParameters: any = {};
169
+
170
+ const headerParameters: runtime.HTTPHeaders = {};
171
+
172
+ if (this.configuration && this.configuration.accessToken) {
173
+ const token = this.configuration.accessToken;
174
+ const tokenString = await token("bearerAuth", []);
175
+
176
+ if (tokenString) {
177
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
178
+ }
179
+ }
180
+ const response = await this.request({
181
+ path: `/api/app/coaches/{coachUserId}/profile`.replace(`{${"coachUserId"}}`, encodeURIComponent(String(requestParameters['coachUserId']))),
182
+ method: 'GET',
183
+ headers: headerParameters,
184
+ query: queryParameters,
185
+ }, initOverrides);
186
+
187
+ return new runtime.JSONApiResponse(response, (jsonValue) => CoachProfileDtoFromJSON(jsonValue));
188
+ }
189
+
190
+ /**
191
+ * Get coach profile by user ID
192
+ */
193
+ async apiAppCoachesCoachUserIdProfileGet(requestParameters: ApiAppCoachesCoachUserIdProfileGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CoachProfileDto> {
194
+ const response = await this.apiAppCoachesCoachUserIdProfileGetRaw(requestParameters, initOverrides);
195
+ return await response.value();
196
+ }
197
+
198
+ /**
199
+ * Search for active coaches
200
+ */
201
+ async apiAppCoachesSearchGetRaw(requestParameters: ApiAppCoachesSearchGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CoachProfileDto>>> {
202
+ const queryParameters: any = {};
203
+
204
+ if (requestParameters['sport'] != null) {
205
+ queryParameters['sport'] = requestParameters['sport'];
206
+ }
207
+
208
+ if (requestParameters['locationId'] != null) {
209
+ queryParameters['locationId'] = requestParameters['locationId'];
210
+ }
211
+
212
+ if (requestParameters['category'] != null) {
213
+ queryParameters['category'] = requestParameters['category'];
214
+ }
215
+
216
+ const headerParameters: runtime.HTTPHeaders = {};
217
+
218
+ if (this.configuration && this.configuration.accessToken) {
219
+ const token = this.configuration.accessToken;
220
+ const tokenString = await token("bearerAuth", []);
221
+
222
+ if (tokenString) {
223
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
224
+ }
225
+ }
226
+ const response = await this.request({
227
+ path: `/api/app/coaches/search`,
228
+ method: 'GET',
229
+ headers: headerParameters,
230
+ query: queryParameters,
231
+ }, initOverrides);
232
+
233
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CoachProfileDtoFromJSON));
234
+ }
235
+
236
+ /**
237
+ * Search for active coaches
238
+ */
239
+ async apiAppCoachesSearchGet(requestParameters: ApiAppCoachesSearchGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CoachProfileDto>> {
240
+ const response = await this.apiAppCoachesSearchGetRaw(requestParameters, initOverrides);
241
+ return await response.value();
242
+ }
243
+
244
+ }
package/apis/TeamsApi.ts CHANGED
@@ -178,6 +178,7 @@ export class TeamsApi extends runtime.BaseAPI {
178
178
  }
179
179
 
180
180
  /**
181
+ * Creates a new team. Note - Only coaches can create TRAINING_GROUP teams. Any user can create PRIVATE_TEAM teams.
181
182
  * Create a new team
182
183
  */
183
184
  async apiAppTeamsPostRaw(requestParameters: ApiAppTeamsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TeamResponse>> {
@@ -214,6 +215,7 @@ export class TeamsApi extends runtime.BaseAPI {
214
215
  }
215
216
 
216
217
  /**
218
+ * Creates a new team. Note - Only coaches can create TRAINING_GROUP teams. Any user can create PRIVATE_TEAM teams.
217
219
  * Create a new team
218
220
  */
219
221
  async apiAppTeamsPost(requestParameters: ApiAppTeamsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TeamResponse> {
package/apis/index.ts CHANGED
@@ -22,6 +22,9 @@ export * from './AppPlaySearchApi';
22
22
  export * from './AuthApi';
23
23
  export * from './BackgroundApi';
24
24
  export * from './ClubApi';
25
+ export * from './CoachApi';
26
+ export * from './CoachPricingApi';
27
+ export * from './CoachWorkspaceApi';
25
28
  export * from './DevicesApi';
26
29
  export * from './FALTA1NotificationsApi';
27
30
  export * from './HealthApi';
@@ -29,6 +32,7 @@ export * from './MercadoPagoApi';
29
32
  export * from './MercadoPagoIPNApi';
30
33
  export * from './NotificationsApi';
31
34
  export * from './PlaySpotsApi';
35
+ export * from './PlayerCoachBookingApi';
32
36
  export * from './PositionsApi';
33
37
  export * from './RecurringGamesApi';
34
38
  export * from './ReservesApi';
@@ -0,0 +1,81 @@
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 ActivateCoachProfileRequest
20
+ */
21
+ export interface ActivateCoachProfileRequest {
22
+ /**
23
+ * Whether MercadoPago account is linked
24
+ * @type {boolean}
25
+ * @memberof ActivateCoachProfileRequest
26
+ */
27
+ mercadoPagoLinked?: boolean;
28
+ /**
29
+ * MercadoPago account ID (if linked)
30
+ * @type {string}
31
+ * @memberof ActivateCoachProfileRequest
32
+ */
33
+ mercadoPagoAccountId?: string;
34
+ /**
35
+ * Whether to allow cash payments
36
+ * @type {boolean}
37
+ * @memberof ActivateCoachProfileRequest
38
+ */
39
+ allowCashPayment?: boolean;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the ActivateCoachProfileRequest interface.
44
+ */
45
+ export function instanceOfActivateCoachProfileRequest(value: object): value is ActivateCoachProfileRequest {
46
+ return true;
47
+ }
48
+
49
+ export function ActivateCoachProfileRequestFromJSON(json: any): ActivateCoachProfileRequest {
50
+ return ActivateCoachProfileRequestFromJSONTyped(json, false);
51
+ }
52
+
53
+ export function ActivateCoachProfileRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActivateCoachProfileRequest {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+
59
+ 'mercadoPagoLinked': json['mercadoPagoLinked'] == null ? undefined : json['mercadoPagoLinked'],
60
+ 'mercadoPagoAccountId': json['mercadoPagoAccountId'] == null ? undefined : json['mercadoPagoAccountId'],
61
+ 'allowCashPayment': json['allowCashPayment'] == null ? undefined : json['allowCashPayment'],
62
+ };
63
+ }
64
+
65
+ export function ActivateCoachProfileRequestToJSON(json: any): ActivateCoachProfileRequest {
66
+ return ActivateCoachProfileRequestToJSONTyped(json, false);
67
+ }
68
+
69
+ export function ActivateCoachProfileRequestToJSONTyped(value?: ActivateCoachProfileRequest | null, ignoreDiscriminator: boolean = false): any {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+
74
+ return {
75
+
76
+ 'mercadoPagoLinked': value['mercadoPagoLinked'],
77
+ 'mercadoPagoAccountId': value['mercadoPagoAccountId'],
78
+ 'allowCashPayment': value['allowCashPayment'],
79
+ };
80
+ }
81
+