Skip to content

Commit 7cc1d68

Browse files
taeyzzzThanetpon Kultontikorn
andauthored
Feat generate (#22)
* fix issue for duplicate clas * fix * updated * i think i found solution just need to try * WIP: generate share file for classes * WIP: generated class from selection set * fix json property * able to generate with shar type * WIP: testing * testing --------- Co-authored-by: Thanetpon Kultontikorn <[email protected]>
1 parent e0c73b0 commit 7cc1d68

17 files changed

+567
-247
lines changed

Agoda.Graphql/BookingQueries/DiscountBreakdown/BookingDiscountsByBookingIds.generated.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Newtonsoft.Json;
44
using Newtonsoft.Json.Converters;
55
using Agoda.Graphql;
6+
using Agoda.Graphql.BookingQueries;
67

78
namespace Agoda.Graphql.BookingQueries.DiscountBreakdown
89
{
@@ -42,7 +43,7 @@ public Query(List<int> bookingIds, IResultProcessor<Data> resultProcessor = null
4243

4344
public sealed class Data
4445
{
45-
[JsonProperty("BookingDetailsByBookingIds")]
46+
[JsonProperty("result")]
4647
public List<Result> Result { get; set; }
4748
}
4849

@@ -77,5 +78,4 @@ public sealed class Result
7778
[JsonProperty("propertyBooking")]
7879
public PropertyBooking PropertyBooking { get; set; }
7980
}
80-
8181
}

Agoda.Graphql/BookingQueries/DiscountBreakdown/DiscountBreakdownByBookingId.generated.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Newtonsoft.Json;
44
using Newtonsoft.Json.Converters;
55
using Agoda.Graphql;
6+
using Agoda.Graphql.BookingQueries;
67

78
namespace Agoda.Graphql.BookingQueries.DiscountBreakdown
89
{
@@ -58,5 +59,4 @@ public sealed class DiscountBreakdownByBookingIds
5859
[JsonProperty("appliedDate")]
5960
public List<string> AppliedDate { get; set; }
6061
}
61-
6262
}

Agoda.Graphql/BookingQueries/GetBookingDetailsByBookingId.generated.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Newtonsoft.Json;
44
using Newtonsoft.Json.Converters;
55
using Agoda.Graphql;
6+
using Agoda.Graphql.BookingQueries;
67

78
namespace Agoda.Graphql.BookingQueries
89
{
@@ -200,7 +201,7 @@ public sealed class BenefitList
200201

201202
public sealed class Benefits
202203
{
203-
[JsonProperty("benefits")]
204+
[JsonProperty("benefitList")]
204205
public List<BenefitList> BenefitList { get; set; }
205206
}
206207

@@ -355,5 +356,4 @@ public sealed class BookingDetailsByBookingIds
355356
[JsonProperty("propertyBooking")]
356357
public PropertyBooking PropertyBooking { get; set; }
357358
}
358-
359359
}

Agoda.Graphql/BookingQueries/PropertyBooking/GetBookingListByBookingIds.generated.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Newtonsoft.Json;
44
using Newtonsoft.Json.Converters;
55
using Agoda.Graphql;
6+
using Agoda.Graphql.BookingQueries;
67

78
namespace Agoda.Graphql.BookingQueries.PropertyBooking
89
{
@@ -200,7 +201,7 @@ public sealed class BenefitList
200201

201202
public sealed class Benefits
202203
{
203-
[JsonProperty("benefits")]
204+
[JsonProperty("benefitList")]
204205
public List<BenefitList> BenefitList { get; set; }
205206
}
206207

@@ -355,5 +356,4 @@ public sealed class BookingDetailsByBookingIds
355356
[JsonProperty("propertyBooking")]
356357
public PropertyBooking PropertyBooking { get; set; }
357358
}
358-
359359
}

Agoda.Graphql/BookingQueries/PropertyBooking/GetCsvData.generated.cs

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Newtonsoft.Json;
44
using Newtonsoft.Json.Converters;
55
using Agoda.Graphql;
6+
using Agoda.Graphql.BookingQueries;
67

78
namespace Agoda.Graphql.BookingQueries.PropertyBooking
89
{
@@ -266,7 +267,7 @@ public sealed class BenefitList
266267

267268
public sealed class Benefits
268269
{
269-
[JsonProperty("benefits")]
270+
[JsonProperty("benefitList")]
270271
public List<BenefitList> BenefitList { get; set; }
271272
}
272273

@@ -323,54 +324,4 @@ public sealed class PropertyBookingByYCSCriteria
323324
[JsonProperty("pagination")]
324325
public Pagination Pagination { get; set; }
325326
}
326-
327-
public enum AcknowledgementRequestType
328-
{
329-
All,
330-
AmendBooking,
331-
CancelBooking,
332-
ConfirmBooking
333-
}
334-
public sealed class DateRange
335-
{
336-
[JsonProperty("from")]
337-
public DateTime From { get; set; }
338-
[JsonProperty("to")]
339-
public DateTime To { get; set; }
340-
}
341-
public sealed class YCSCriteria
342-
{
343-
[JsonProperty("ackRequestTypes")]
344-
public List<AcknowledgementRequestType>? AckRequestTypes { get; set; }
345-
[JsonProperty("acknowledgementId")]
346-
public string AcknowledgementId { get; set; }
347-
[JsonProperty("blacklistDmcIds")]
348-
public List<int>? BlacklistDmcIds { get; set; }
349-
[JsonProperty("bookingDatePeriod")]
350-
public DateRange BookingDatePeriod { get; set; }
351-
[JsonProperty("bookingId")]
352-
public int? BookingId { get; set; }
353-
[JsonProperty("customerName")]
354-
public string CustomerName { get; set; }
355-
[JsonProperty("hotelId")]
356-
public int HotelId { get; set; }
357-
[JsonProperty("lastUpdateDatePeriod")]
358-
public DateRange LastUpdateDatePeriod { get; set; }
359-
[JsonProperty("pageIndex")]
360-
public int? PageIndex { get; set; }
361-
[JsonProperty("pageSize")]
362-
public int? PageSize { get; set; }
363-
[JsonProperty("rateChannel")]
364-
public int? RateChannel { get; set; }
365-
[JsonProperty("ratePlan")]
366-
public int? RatePlan { get; set; }
367-
[JsonProperty("roomTypeId")]
368-
public int? RoomTypeId { get; set; }
369-
[JsonProperty("sorting")]
370-
public string Sorting { get; set; }
371-
[JsonProperty("stayDatePeriod")]
372-
public DateRange StayDatePeriod { get; set; }
373-
[JsonProperty("whitelistDmcIds")]
374-
public List<int>? WhitelistDmcIds { get; set; }
375-
}
376327
}

Agoda.Graphql/BookingQueries/PropertyBooking/GetCsvDataWithoutPagination.generated.cs

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Newtonsoft.Json;
44
using Newtonsoft.Json.Converters;
55
using Agoda.Graphql;
6+
using Agoda.Graphql.BookingQueries;
67

78
namespace Agoda.Graphql.BookingQueries.PropertyBooking
89
{
@@ -260,7 +261,7 @@ public sealed class BenefitList
260261

261262
public sealed class Benefits
262263
{
263-
[JsonProperty("benefits")]
264+
[JsonProperty("benefitList")]
264265
public List<BenefitList> BenefitList { get; set; }
265266
}
266267

@@ -303,54 +304,4 @@ public sealed class PropertyBookingByYCSCriteria
303304
[JsonProperty("properties")]
304305
public List<Properties> Properties { get; set; }
305306
}
306-
307-
public enum AcknowledgementRequestType
308-
{
309-
All,
310-
AmendBooking,
311-
CancelBooking,
312-
ConfirmBooking
313-
}
314-
public sealed class DateRange
315-
{
316-
[JsonProperty("from")]
317-
public DateTime From { get; set; }
318-
[JsonProperty("to")]
319-
public DateTime To { get; set; }
320-
}
321-
public sealed class YCSCriteria
322-
{
323-
[JsonProperty("ackRequestTypes")]
324-
public List<AcknowledgementRequestType>? AckRequestTypes { get; set; }
325-
[JsonProperty("acknowledgementId")]
326-
public string AcknowledgementId { get; set; }
327-
[JsonProperty("blacklistDmcIds")]
328-
public List<int>? BlacklistDmcIds { get; set; }
329-
[JsonProperty("bookingDatePeriod")]
330-
public DateRange BookingDatePeriod { get; set; }
331-
[JsonProperty("bookingId")]
332-
public int? BookingId { get; set; }
333-
[JsonProperty("customerName")]
334-
public string CustomerName { get; set; }
335-
[JsonProperty("hotelId")]
336-
public int HotelId { get; set; }
337-
[JsonProperty("lastUpdateDatePeriod")]
338-
public DateRange LastUpdateDatePeriod { get; set; }
339-
[JsonProperty("pageIndex")]
340-
public int? PageIndex { get; set; }
341-
[JsonProperty("pageSize")]
342-
public int? PageSize { get; set; }
343-
[JsonProperty("rateChannel")]
344-
public int? RateChannel { get; set; }
345-
[JsonProperty("ratePlan")]
346-
public int? RatePlan { get; set; }
347-
[JsonProperty("roomTypeId")]
348-
public int? RoomTypeId { get; set; }
349-
[JsonProperty("sorting")]
350-
public string Sorting { get; set; }
351-
[JsonProperty("stayDatePeriod")]
352-
public DateRange StayDatePeriod { get; set; }
353-
[JsonProperty("whitelistDmcIds")]
354-
public List<int>? WhitelistDmcIds { get; set; }
355-
}
356307
}

Agoda.Graphql/BookingQueries/PropertyBooking/GetCsvMetaData.generated.cs

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Newtonsoft.Json;
44
using Newtonsoft.Json.Converters;
55
using Agoda.Graphql;
6+
using Agoda.Graphql.BookingQueries;
67

78
namespace Agoda.Graphql.BookingQueries.PropertyBooking
89
{
@@ -57,54 +58,4 @@ public sealed class PropertyBookingByYCSCriteria
5758
[JsonProperty("pagination")]
5859
public Pagination Pagination { get; set; }
5960
}
60-
61-
public enum AcknowledgementRequestType
62-
{
63-
All,
64-
AmendBooking,
65-
CancelBooking,
66-
ConfirmBooking
67-
}
68-
public sealed class DateRange
69-
{
70-
[JsonProperty("from")]
71-
public DateTime From { get; set; }
72-
[JsonProperty("to")]
73-
public DateTime To { get; set; }
74-
}
75-
public sealed class YCSCriteria
76-
{
77-
[JsonProperty("ackRequestTypes")]
78-
public List<AcknowledgementRequestType>? AckRequestTypes { get; set; }
79-
[JsonProperty("acknowledgementId")]
80-
public string AcknowledgementId { get; set; }
81-
[JsonProperty("blacklistDmcIds")]
82-
public List<int>? BlacklistDmcIds { get; set; }
83-
[JsonProperty("bookingDatePeriod")]
84-
public DateRange BookingDatePeriod { get; set; }
85-
[JsonProperty("bookingId")]
86-
public int? BookingId { get; set; }
87-
[JsonProperty("customerName")]
88-
public string CustomerName { get; set; }
89-
[JsonProperty("hotelId")]
90-
public int HotelId { get; set; }
91-
[JsonProperty("lastUpdateDatePeriod")]
92-
public DateRange LastUpdateDatePeriod { get; set; }
93-
[JsonProperty("pageIndex")]
94-
public int? PageIndex { get; set; }
95-
[JsonProperty("pageSize")]
96-
public int? PageSize { get; set; }
97-
[JsonProperty("rateChannel")]
98-
public int? RateChannel { get; set; }
99-
[JsonProperty("ratePlan")]
100-
public int? RatePlan { get; set; }
101-
[JsonProperty("roomTypeId")]
102-
public int? RoomTypeId { get; set; }
103-
[JsonProperty("sorting")]
104-
public string Sorting { get; set; }
105-
[JsonProperty("stayDatePeriod")]
106-
public DateRange StayDatePeriod { get; set; }
107-
[JsonProperty("whitelistDmcIds")]
108-
public List<int>? WhitelistDmcIds { get; set; }
109-
}
11061
}

Agoda.Graphql/BookingQueries/PropertyBooking/GetPropertyBookingByYCSCriteria.generated.cs

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Newtonsoft.Json;
44
using Newtonsoft.Json.Converters;
55
using Agoda.Graphql;
6+
using Agoda.Graphql.BookingQueries;
67

78
namespace Agoda.Graphql.BookingQueries.PropertyBooking
89
{
@@ -235,54 +236,4 @@ public sealed class PropertyBookingByYCSCriteria
235236
[JsonProperty("pagination")]
236237
public Pagination Pagination { get; set; }
237238
}
238-
239-
public enum AcknowledgementRequestType
240-
{
241-
All,
242-
AmendBooking,
243-
CancelBooking,
244-
ConfirmBooking
245-
}
246-
public sealed class DateRange
247-
{
248-
[JsonProperty("from")]
249-
public DateTime From { get; set; }
250-
[JsonProperty("to")]
251-
public DateTime To { get; set; }
252-
}
253-
public sealed class YCSCriteria
254-
{
255-
[JsonProperty("ackRequestTypes")]
256-
public List<AcknowledgementRequestType>? AckRequestTypes { get; set; }
257-
[JsonProperty("acknowledgementId")]
258-
public string AcknowledgementId { get; set; }
259-
[JsonProperty("blacklistDmcIds")]
260-
public List<int>? BlacklistDmcIds { get; set; }
261-
[JsonProperty("bookingDatePeriod")]
262-
public DateRange BookingDatePeriod { get; set; }
263-
[JsonProperty("bookingId")]
264-
public int? BookingId { get; set; }
265-
[JsonProperty("customerName")]
266-
public string CustomerName { get; set; }
267-
[JsonProperty("hotelId")]
268-
public int HotelId { get; set; }
269-
[JsonProperty("lastUpdateDatePeriod")]
270-
public DateRange LastUpdateDatePeriod { get; set; }
271-
[JsonProperty("pageIndex")]
272-
public int? PageIndex { get; set; }
273-
[JsonProperty("pageSize")]
274-
public int? PageSize { get; set; }
275-
[JsonProperty("rateChannel")]
276-
public int? RateChannel { get; set; }
277-
[JsonProperty("ratePlan")]
278-
public int? RatePlan { get; set; }
279-
[JsonProperty("roomTypeId")]
280-
public int? RoomTypeId { get; set; }
281-
[JsonProperty("sorting")]
282-
public string Sorting { get; set; }
283-
[JsonProperty("stayDatePeriod")]
284-
public DateRange StayDatePeriod { get; set; }
285-
[JsonProperty("whitelistDmcIds")]
286-
public List<int>? WhitelistDmcIds { get; set; }
287-
}
288239
}

0 commit comments

Comments
 (0)