@jugarhoy/api 1.0.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.
- package/apis/AdminCoachesApi.ts +259 -0
- package/apis/AdminCustomersApi.ts +374 -0
- package/apis/AdminDevicesApi.ts +364 -0
- package/apis/AdminLocationsApi.ts +304 -0
- package/apis/AdminPaymentConfigsApi.ts +358 -0
- package/apis/AdminPlayPricesApi.ts +397 -0
- package/apis/AdminPlaySpotShiftsApi.ts +267 -0
- package/apis/AdminPlaySpotsApi.ts +307 -0
- package/apis/AdminReservationsApi.ts +335 -0
- package/apis/AdminSubscriptionsApi.ts +354 -0
- package/apis/AdminUsersApi.ts +323 -0
- package/apis/AuthApi.ts +196 -0
- package/apis/BackgroundApi.ts +66 -0
- package/apis/ClubApi.ts +174 -0
- package/apis/DevicesApi.ts +136 -0
- package/apis/HealthApi.ts +56 -0
- package/apis/MercadoPagoApi.ts +111 -0
- package/apis/MercadoPagoIPNApi.ts +80 -0
- package/apis/PlaySpotsApi.ts +207 -0
- package/apis/ReservesApi.ts +366 -0
- package/apis/UsersApi.ts +648 -0
- package/apis/index.ts +23 -0
- package/index.ts +5 -0
- package/models/AddMemberToSubscriptionRequest.ts +66 -0
- package/models/ApiAdminPlayPricesIdPutRequest.ts +140 -0
- package/models/ApiAdminPlayPricesPostRequest.ts +146 -0
- package/models/AvailabilityShift.ts +89 -0
- package/models/AvailabilityShiftHour.ts +81 -0
- package/models/AvailabilityShiftSpot.ts +89 -0
- package/models/CancelReservationParams.ts +75 -0
- package/models/CancelReservationRequest.ts +66 -0
- package/models/CancelReservationResult.ts +89 -0
- package/models/ChargeOn.ts +53 -0
- package/models/Check200Response.ts +65 -0
- package/models/CheckUserExists200Response.ts +73 -0
- package/models/ClubDto.ts +164 -0
- package/models/ClubSearchParams.ts +119 -0
- package/models/ClubSearchParamsGeo.ts +73 -0
- package/models/ClubSearchParamsPaging.ts +73 -0
- package/models/ClubSearchResponse.ts +88 -0
- package/models/ClubSearchResponseDataInner.ts +168 -0
- package/models/ClubSearchResponsePagination.ts +89 -0
- package/models/Coach.ts +121 -0
- package/models/CoachDto.ts +119 -0
- package/models/CoachDtoAvailabilityInner.ts +88 -0
- package/models/ConfirmReservationParams.ts +74 -0
- package/models/ConfirmReservationResponse.ts +83 -0
- package/models/ConfirmReservationResponseResult.ts +81 -0
- package/models/CreateBasicUserDto.ts +112 -0
- package/models/CreateCheckoutPreferenceRequest.ts +104 -0
- package/models/CreateCheckoutPreferenceRequestBackUrls.ts +81 -0
- package/models/CreateCheckoutPreferenceRequestItemsInner.ts +89 -0
- package/models/CreateCustomerPaymentConfigDto.ts +84 -0
- package/models/CreateDefault500Response.ts +65 -0
- package/models/CreateFromInvite400Response.ts +65 -0
- package/models/CreateShiftRequest.ts +153 -0
- package/models/CreateUserNotificationDto.ts +93 -0
- package/models/Customer.ts +235 -0
- package/models/CustomerDocument.ts +128 -0
- package/models/CustomerDto.ts +209 -0
- package/models/CustomerDtoRefund.ts +103 -0
- package/models/CustomerLocationDto.ts +102 -0
- package/models/CustomerPaymentConfig.ts +144 -0
- package/models/CustomerPaymentConfigDto.ts +85 -0
- package/models/CustomerRefund.ts +102 -0
- package/models/CustomerStatus.ts +53 -0
- package/models/DayOfWeek.ts +58 -0
- package/models/DeleteShift200Response.ts +65 -0
- package/models/Device.ts +139 -0
- package/models/DeviceDto.ts +131 -0
- package/models/DeviceState.ts +111 -0
- package/models/DeviceType.ts +53 -0
- package/models/DominantPlaySide.ts +54 -0
- package/models/ErrorResponse.ts +66 -0
- package/models/ExpireUnpaidReservationResult.ts +81 -0
- package/models/ExpireUnpaidReservations401Response.ts +65 -0
- package/models/ExpireUnpaidReservations500Response.ts +65 -0
- package/models/Feature.ts +121 -0
- package/models/FindOccurrences200Response.ts +91 -0
- package/models/Frequency.ts +54 -0
- package/models/GenerateCode500Response.ts +65 -0
- package/models/GetAllDevices200ResponseInner.ts +154 -0
- package/models/GetAllPlaySpots200ResponseInner.ts +213 -0
- package/models/GetAllShifts200ResponseInner.ts +199 -0
- package/models/GetHourlyReservationStatus200Response.ts +89 -0
- package/models/GetHourlyReservationStatus200ResponseHourlyStatusInner.ts +97 -0
- package/models/GetMercadoPagoAuthUrl200Response.ts +66 -0
- package/models/GetSession401Response.ts +65 -0
- package/models/GetSession500Response.ts +65 -0
- package/models/HourShiftDetail.ts +81 -0
- package/models/InitiateReservationParams.ts +137 -0
- package/models/Level.ts +54 -0
- package/models/LightControlResponse.ts +83 -0
- package/models/Location.ts +209 -0
- package/models/LocationDto.ts +204 -0
- package/models/ManageLightSwitch200Response.ts +81 -0
- package/models/ManageLightSwitch500Response.ts +73 -0
- package/models/MatchRequirements.ts +100 -0
- package/models/MercadoPagoIPN.ts +135 -0
- package/models/NotificationType.ts +55 -0
- package/models/Occurrence.ts +84 -0
- package/models/PaymentDetail.ts +185 -0
- package/models/PaymentMethod.ts +56 -0
- package/models/PaymentRefund.ts +111 -0
- package/models/PaymentStatus.ts +55 -0
- package/models/PaymentTerms.ts +85 -0
- package/models/PlayPrice.ts +165 -0
- package/models/PlaySpot.ts +197 -0
- package/models/PlaySpotAvailabilityDetail.ts +89 -0
- package/models/PlaySpotDateSummary.ts +81 -0
- package/models/PlaySpotDeviceExecutionState.ts +127 -0
- package/models/PlaySpotDto.ts +185 -0
- package/models/PlaySpotShift.ts +184 -0
- package/models/PlaySpotShortDto.ts +97 -0
- package/models/PlaySubscription.ts +293 -0
- package/models/PlaySubscriptionCreateDto.ts +167 -0
- package/models/PlaySubscriptionParams.ts +114 -0
- package/models/PlaySubscriptionType.ts +55 -0
- package/models/PlayerCategory.ts +61 -0
- package/models/ProcessEmailMessageRequest.ts +66 -0
- package/models/ProcessMercadoPagoIPN200Response.ts +73 -0
- package/models/ProcessMercadoPagoPaymentParams.ts +83 -0
- package/models/ProcessMercadoPagoPaymentResponse.ts +83 -0
- package/models/ProcessMercadoPagoPaymentResponseResult.ts +89 -0
- package/models/RefundPolicy.ts +54 -0
- package/models/RegisterClub400Response.ts +65 -0
- package/models/RegisterClub401Response.ts +65 -0
- package/models/RegisterClub500Response.ts +65 -0
- package/models/RegisterClubParams.ts +191 -0
- package/models/RegisterClubResponse.ts +83 -0
- package/models/RegisterClubResponseResult.ts +96 -0
- package/models/RentHour.ts +73 -0
- package/models/ReservationAccessCodeResponse.ts +91 -0
- package/models/ReservationAccessCodeResponseResult.ts +107 -0
- package/models/ReservationParams.ts +121 -0
- package/models/ReservationStatus.ts +55 -0
- package/models/Reserve.ts +290 -0
- package/models/ReserveDto.ts +207 -0
- package/models/ReserveSlotDto.ts +81 -0
- package/models/ReserveStatus.ts +57 -0
- package/models/ReserveType.ts +58 -0
- package/models/SearchClubs400Response.ts +65 -0
- package/models/SearchClubs500Response.ts +65 -0
- package/models/SetAuthCodeDto.ts +85 -0
- package/models/Shift.ts +93 -0
- package/models/Sport.ts +61 -0
- package/models/SuccessResponse.ts +66 -0
- package/models/TimeOfDay.ts +54 -0
- package/models/TriggerDeviceAction200Response.ts +81 -0
- package/models/TriggerDeviceActionRequest.ts +73 -0
- package/models/UpdateReservationAdminRequest.ts +83 -0
- package/models/UpdateReserveDto.ts +83 -0
- package/models/UpdateUserNotificationDto.ts +73 -0
- package/models/User.ts +243 -0
- package/models/UserAuth.ts +135 -0
- package/models/UserDto.ts +142 -0
- package/models/UserNotification.ts +123 -0
- package/models/UserNotificationDto.ts +115 -0
- package/models/UserRating.ts +75 -0
- package/models/UserReserveDto.ts +230 -0
- package/models/UserRole.ts +53 -0
- package/models/UserSession.ts +129 -0
- package/models/UserSessionCustomer.ts +81 -0
- package/models/UserSportProfile.ts +117 -0
- package/models/UserSportProfileDto.ts +117 -0
- package/models/UserType.ts +54 -0
- package/models/VerifyPhoneNumber200Response.ts +65 -0
- package/models/VerifyPhoneNumberRequest.ts +66 -0
- package/models/index.ts +147 -0
- package/package.json +35 -0
- package/runtime.ts +432 -0
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
* A single occurrence of a subscription
|
|
18
|
+
* @export
|
|
19
|
+
* @interface Occurrence
|
|
20
|
+
*/
|
|
21
|
+
export interface Occurrence {
|
|
22
|
+
/**
|
|
23
|
+
* Start date of the occurrence rental period
|
|
24
|
+
* @type {Date}
|
|
25
|
+
* @memberof Occurrence
|
|
26
|
+
*/
|
|
27
|
+
rentedFrom: Date;
|
|
28
|
+
/**
|
|
29
|
+
* End date of the occurrence rental period
|
|
30
|
+
* @type {Date}
|
|
31
|
+
* @memberof Occurrence
|
|
32
|
+
*/
|
|
33
|
+
rentedTo: Date;
|
|
34
|
+
/**
|
|
35
|
+
* ID of the play spot for this occurrence
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof Occurrence
|
|
38
|
+
*/
|
|
39
|
+
playSpotId: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the Occurrence interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfOccurrence(value: object): value is Occurrence {
|
|
46
|
+
if (!('rentedFrom' in value) || value['rentedFrom'] === undefined) return false;
|
|
47
|
+
if (!('rentedTo' in value) || value['rentedTo'] === undefined) return false;
|
|
48
|
+
if (!('playSpotId' in value) || value['playSpotId'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function OccurrenceFromJSON(json: any): Occurrence {
|
|
53
|
+
return OccurrenceFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function OccurrenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Occurrence {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'rentedFrom': (new Date(json['rentedFrom'])),
|
|
63
|
+
'rentedTo': (new Date(json['rentedTo'])),
|
|
64
|
+
'playSpotId': json['playSpotId'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function OccurrenceToJSON(json: any): Occurrence {
|
|
69
|
+
return OccurrenceToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function OccurrenceToJSONTyped(value?: Occurrence | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'rentedFrom': ((value['rentedFrom']).toISOString()),
|
|
80
|
+
'rentedTo': ((value['rentedTo']).toISOString()),
|
|
81
|
+
'playSpotId': value['playSpotId'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -0,0 +1,185 @@
|
|
|
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
|
+
import type { PaymentMethod } from './PaymentMethod';
|
|
17
|
+
import {
|
|
18
|
+
PaymentMethodFromJSON,
|
|
19
|
+
PaymentMethodFromJSONTyped,
|
|
20
|
+
PaymentMethodToJSON,
|
|
21
|
+
PaymentMethodToJSONTyped,
|
|
22
|
+
} from './PaymentMethod';
|
|
23
|
+
import type { PaymentRefund } from './PaymentRefund';
|
|
24
|
+
import {
|
|
25
|
+
PaymentRefundFromJSON,
|
|
26
|
+
PaymentRefundFromJSONTyped,
|
|
27
|
+
PaymentRefundToJSON,
|
|
28
|
+
PaymentRefundToJSONTyped,
|
|
29
|
+
} from './PaymentRefund';
|
|
30
|
+
import type { PaymentStatus } from './PaymentStatus';
|
|
31
|
+
import {
|
|
32
|
+
PaymentStatusFromJSON,
|
|
33
|
+
PaymentStatusFromJSONTyped,
|
|
34
|
+
PaymentStatusToJSON,
|
|
35
|
+
PaymentStatusToJSONTyped,
|
|
36
|
+
} from './PaymentStatus';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @export
|
|
41
|
+
* @interface PaymentDetail
|
|
42
|
+
*/
|
|
43
|
+
export interface PaymentDetail {
|
|
44
|
+
/**
|
|
45
|
+
* Unique identifier for the payment
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof PaymentDetail
|
|
48
|
+
*/
|
|
49
|
+
id: string;
|
|
50
|
+
/**
|
|
51
|
+
* Reserve ID associated with this payment (nullable if payment is for subscription)
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof PaymentDetail
|
|
54
|
+
*/
|
|
55
|
+
reserveId?: string | null;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {PaymentMethod}
|
|
59
|
+
* @memberof PaymentDetail
|
|
60
|
+
*/
|
|
61
|
+
method: PaymentMethod;
|
|
62
|
+
/**
|
|
63
|
+
* Transaction reference number
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @memberof PaymentDetail
|
|
66
|
+
*/
|
|
67
|
+
transactionId: string;
|
|
68
|
+
/**
|
|
69
|
+
* Payment identifier (may match or not the transaction)
|
|
70
|
+
* @type {string}
|
|
71
|
+
* @memberof PaymentDetail
|
|
72
|
+
*/
|
|
73
|
+
paymentId?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {PaymentStatus}
|
|
77
|
+
* @memberof PaymentDetail
|
|
78
|
+
*/
|
|
79
|
+
status: PaymentStatus;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @type {PaymentRefund}
|
|
83
|
+
* @memberof PaymentDetail
|
|
84
|
+
*/
|
|
85
|
+
refund?: PaymentRefund;
|
|
86
|
+
/**
|
|
87
|
+
* ID of the associated subscription
|
|
88
|
+
* @type {string}
|
|
89
|
+
* @memberof PaymentDetail
|
|
90
|
+
*/
|
|
91
|
+
subscriptionId?: string | null;
|
|
92
|
+
/**
|
|
93
|
+
* Base price of the reservation
|
|
94
|
+
* @type {number}
|
|
95
|
+
* @memberof PaymentDetail
|
|
96
|
+
*/
|
|
97
|
+
amount: number;
|
|
98
|
+
/**
|
|
99
|
+
* Discount amount applied
|
|
100
|
+
* @type {number}
|
|
101
|
+
* @memberof PaymentDetail
|
|
102
|
+
*/
|
|
103
|
+
discount: number;
|
|
104
|
+
/**
|
|
105
|
+
* Final total amount after discount
|
|
106
|
+
* @type {number}
|
|
107
|
+
* @memberof PaymentDetail
|
|
108
|
+
*/
|
|
109
|
+
total: number;
|
|
110
|
+
/**
|
|
111
|
+
* Currency code for the payment
|
|
112
|
+
* @type {string}
|
|
113
|
+
* @memberof PaymentDetail
|
|
114
|
+
*/
|
|
115
|
+
currency: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Check if a given object implements the PaymentDetail interface.
|
|
122
|
+
*/
|
|
123
|
+
export function instanceOfPaymentDetail(value: object): value is PaymentDetail {
|
|
124
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
125
|
+
if (!('method' in value) || value['method'] === undefined) return false;
|
|
126
|
+
if (!('transactionId' in value) || value['transactionId'] === undefined) return false;
|
|
127
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
128
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
129
|
+
if (!('discount' in value) || value['discount'] === undefined) return false;
|
|
130
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
131
|
+
if (!('currency' in value) || value['currency'] === undefined) return false;
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function PaymentDetailFromJSON(json: any): PaymentDetail {
|
|
136
|
+
return PaymentDetailFromJSONTyped(json, false);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function PaymentDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentDetail {
|
|
140
|
+
if (json == null) {
|
|
141
|
+
return json;
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
|
|
145
|
+
'id': json['id'],
|
|
146
|
+
'reserveId': json['reserveId'] == null ? undefined : json['reserveId'],
|
|
147
|
+
'method': PaymentMethodFromJSON(json['method']),
|
|
148
|
+
'transactionId': json['transactionId'],
|
|
149
|
+
'paymentId': json['paymentId'] == null ? undefined : json['paymentId'],
|
|
150
|
+
'status': PaymentStatusFromJSON(json['status']),
|
|
151
|
+
'refund': json['refund'] == null ? undefined : PaymentRefundFromJSON(json['refund']),
|
|
152
|
+
'subscriptionId': json['subscriptionId'] == null ? undefined : json['subscriptionId'],
|
|
153
|
+
'amount': json['amount'],
|
|
154
|
+
'discount': json['discount'],
|
|
155
|
+
'total': json['total'],
|
|
156
|
+
'currency': json['currency'],
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function PaymentDetailToJSON(json: any): PaymentDetail {
|
|
161
|
+
return PaymentDetailToJSONTyped(json, false);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export function PaymentDetailToJSONTyped(value?: PaymentDetail | null, ignoreDiscriminator: boolean = false): any {
|
|
165
|
+
if (value == null) {
|
|
166
|
+
return value;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return {
|
|
170
|
+
|
|
171
|
+
'id': value['id'],
|
|
172
|
+
'reserveId': value['reserveId'],
|
|
173
|
+
'method': PaymentMethodToJSON(value['method']),
|
|
174
|
+
'transactionId': value['transactionId'],
|
|
175
|
+
'paymentId': value['paymentId'],
|
|
176
|
+
'status': PaymentStatusToJSON(value['status']),
|
|
177
|
+
'refund': PaymentRefundToJSON(value['refund']),
|
|
178
|
+
'subscriptionId': value['subscriptionId'],
|
|
179
|
+
'amount': value['amount'],
|
|
180
|
+
'discount': value['discount'],
|
|
181
|
+
'total': value['total'],
|
|
182
|
+
'currency': value['currency'],
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* Represents the available payment methods
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const PaymentMethod = {
|
|
21
|
+
Cash: 'CASH',
|
|
22
|
+
Mercadopago: 'MERCADOPAGO',
|
|
23
|
+
Qr: 'QR',
|
|
24
|
+
BankTransfer: 'BANK_TRANSFER',
|
|
25
|
+
Subscription: 'SUBSCRIPTION'
|
|
26
|
+
} as const;
|
|
27
|
+
export type PaymentMethod = typeof PaymentMethod[keyof typeof PaymentMethod];
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export function instanceOfPaymentMethod(value: any): boolean {
|
|
31
|
+
for (const key in PaymentMethod) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(PaymentMethod, key)) {
|
|
33
|
+
if (PaymentMethod[key as keyof typeof PaymentMethod] === value) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function PaymentMethodFromJSON(json: any): PaymentMethod {
|
|
42
|
+
return PaymentMethodFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function PaymentMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentMethod {
|
|
46
|
+
return json as PaymentMethod;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function PaymentMethodToJSON(value?: PaymentMethod | null): any {
|
|
50
|
+
return value as any;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function PaymentMethodToJSONTyped(value: any, ignoreDiscriminator: boolean): PaymentMethod {
|
|
54
|
+
return value as PaymentMethod;
|
|
55
|
+
}
|
|
56
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
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 PaymentRefund
|
|
20
|
+
*/
|
|
21
|
+
export interface PaymentRefund {
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier for the refund
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof PaymentRefund
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* ID of the original payment
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof PaymentRefund
|
|
32
|
+
*/
|
|
33
|
+
paymentId: string;
|
|
34
|
+
/**
|
|
35
|
+
* Amount refunded
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof PaymentRefund
|
|
38
|
+
*/
|
|
39
|
+
amount: number;
|
|
40
|
+
/**
|
|
41
|
+
* Status of the refund (e.g., approved, pending)
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof PaymentRefund
|
|
44
|
+
*/
|
|
45
|
+
status: string;
|
|
46
|
+
/**
|
|
47
|
+
* When the refund was created
|
|
48
|
+
* @type {Date}
|
|
49
|
+
* @memberof PaymentRefund
|
|
50
|
+
*/
|
|
51
|
+
createdAt: Date;
|
|
52
|
+
/**
|
|
53
|
+
* When the refund was last updated
|
|
54
|
+
* @type {Date}
|
|
55
|
+
* @memberof PaymentRefund
|
|
56
|
+
*/
|
|
57
|
+
updatedAt: Date;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the PaymentRefund interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfPaymentRefund(value: object): value is PaymentRefund {
|
|
64
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
65
|
+
if (!('paymentId' in value) || value['paymentId'] === undefined) return false;
|
|
66
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
67
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
68
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
69
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function PaymentRefundFromJSON(json: any): PaymentRefund {
|
|
74
|
+
return PaymentRefundFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function PaymentRefundFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentRefund {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'id': json['id'],
|
|
84
|
+
'paymentId': json['paymentId'],
|
|
85
|
+
'amount': json['amount'],
|
|
86
|
+
'status': json['status'],
|
|
87
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
88
|
+
'updatedAt': (new Date(json['updatedAt'])),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function PaymentRefundToJSON(json: any): PaymentRefund {
|
|
93
|
+
return PaymentRefundToJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function PaymentRefundToJSONTyped(value?: PaymentRefund | null, ignoreDiscriminator: boolean = false): any {
|
|
97
|
+
if (value == null) {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'id': value['id'],
|
|
104
|
+
'paymentId': value['paymentId'],
|
|
105
|
+
'amount': value['amount'],
|
|
106
|
+
'status': value['status'],
|
|
107
|
+
'createdAt': ((value['createdAt']).toISOString()),
|
|
108
|
+
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* Represents the current status of a payment
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const PaymentStatus = {
|
|
21
|
+
Pending: 'PENDING',
|
|
22
|
+
Requested: 'REQUESTED',
|
|
23
|
+
Paid: 'PAID',
|
|
24
|
+
Refunded: 'REFUNDED'
|
|
25
|
+
} as const;
|
|
26
|
+
export type PaymentStatus = typeof PaymentStatus[keyof typeof PaymentStatus];
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export function instanceOfPaymentStatus(value: any): boolean {
|
|
30
|
+
for (const key in PaymentStatus) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(PaymentStatus, key)) {
|
|
32
|
+
if (PaymentStatus[key as keyof typeof PaymentStatus] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function PaymentStatusFromJSON(json: any): PaymentStatus {
|
|
41
|
+
return PaymentStatusFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function PaymentStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentStatus {
|
|
45
|
+
return json as PaymentStatus;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function PaymentStatusToJSON(value?: PaymentStatus | null): any {
|
|
49
|
+
return value as any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function PaymentStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): PaymentStatus {
|
|
53
|
+
return value as PaymentStatus;
|
|
54
|
+
}
|
|
55
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
import type { Frequency } from './Frequency';
|
|
17
|
+
import {
|
|
18
|
+
FrequencyFromJSON,
|
|
19
|
+
FrequencyFromJSONTyped,
|
|
20
|
+
FrequencyToJSON,
|
|
21
|
+
FrequencyToJSONTyped,
|
|
22
|
+
} from './Frequency';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Payment terms information for the subscription
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PaymentTerms
|
|
28
|
+
*/
|
|
29
|
+
export interface PaymentTerms {
|
|
30
|
+
/**
|
|
31
|
+
* ID of the play price associated with the subscription
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof PaymentTerms
|
|
34
|
+
*/
|
|
35
|
+
playPriceId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Frequency}
|
|
39
|
+
* @memberof PaymentTerms
|
|
40
|
+
*/
|
|
41
|
+
frequency: Frequency;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the PaymentTerms interface.
|
|
48
|
+
*/
|
|
49
|
+
export function instanceOfPaymentTerms(value: object): value is PaymentTerms {
|
|
50
|
+
if (!('playPriceId' in value) || value['playPriceId'] === undefined) return false;
|
|
51
|
+
if (!('frequency' in value) || value['frequency'] === undefined) return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function PaymentTermsFromJSON(json: any): PaymentTerms {
|
|
56
|
+
return PaymentTermsFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function PaymentTermsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentTerms {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'playPriceId': json['playPriceId'],
|
|
66
|
+
'frequency': FrequencyFromJSON(json['frequency']),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function PaymentTermsToJSON(json: any): PaymentTerms {
|
|
71
|
+
return PaymentTermsToJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function PaymentTermsToJSONTyped(value?: PaymentTerms | null, ignoreDiscriminator: boolean = false): any {
|
|
75
|
+
if (value == null) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'playPriceId': value['playPriceId'],
|
|
82
|
+
'frequency': FrequencyToJSON(value['frequency']),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|