apimatic-bcd-travel-sdk 0.0.1
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.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +180 -0
- data/bin/console +15 -0
- data/lib/bcd_travel_api/api_helper.rb +10 -0
- data/lib/bcd_travel_api/apis/air_api.rb +138 -0
- data/lib/bcd_travel_api/apis/air_availability_return_flight_api.rb +31 -0
- data/lib/bcd_travel_api/apis/air_fare_search_optional_services_api.rb +31 -0
- data/lib/bcd_travel_api/apis/air_fare_search_select_seat_api.rb +53 -0
- data/lib/bcd_travel_api/apis/air_fare_search_simple_api.rb +195 -0
- data/lib/bcd_travel_api/apis/base_api.rb +67 -0
- data/lib/bcd_travel_api/apis/cars_api.rb +563 -0
- data/lib/bcd_travel_api/apis/hotels_api.rb +930 -0
- data/lib/bcd_travel_api/apis/retrieve_versions_api.rb +32 -0
- data/lib/bcd_travel_api/apis/search_expenses_api.rb +88 -0
- data/lib/bcd_travel_api/apis/v20_api.rb +72 -0
- data/lib/bcd_travel_api/apis/v21_api.rb +535 -0
- data/lib/bcd_travel_api/client.rb +136 -0
- data/lib/bcd_travel_api/configuration.rb +205 -0
- data/lib/bcd_travel_api/exceptions/api_exception.rb +21 -0
- data/lib/bcd_travel_api/http/api_response.rb +19 -0
- data/lib/bcd_travel_api/http/auth/basic.rb +62 -0
- data/lib/bcd_travel_api/http/auth/bearer.rb +53 -0
- data/lib/bcd_travel_api/http/http_call_back.rb +10 -0
- data/lib/bcd_travel_api/http/http_method_enum.rb +10 -0
- data/lib/bcd_travel_api/http/http_request.rb +10 -0
- data/lib/bcd_travel_api/http/http_response.rb +10 -0
- data/lib/bcd_travel_api/http/proxy_settings.rb +22 -0
- data/lib/bcd_travel_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/bcd_travel_api/logging/sdk_logger.rb +17 -0
- data/lib/bcd_travel_api/models/address.rb +74 -0
- data/lib/bcd_travel_api/models/address1.rb +111 -0
- data/lib/bcd_travel_api/models/address3.rb +109 -0
- data/lib/bcd_travel_api/models/address32.rb +75 -0
- data/lib/bcd_travel_api/models/address33.rb +103 -0
- data/lib/bcd_travel_api/models/address5.rb +100 -0
- data/lib/bcd_travel_api/models/air.rb +108 -0
- data/lib/bcd_travel_api/models/air1.rb +108 -0
- data/lib/bcd_travel_api/models/air16.rb +100 -0
- data/lib/bcd_travel_api/models/air2.rb +108 -0
- data/lib/bcd_travel_api/models/airavailabilityrequest.rb +164 -0
- data/lib/bcd_travel_api/models/airbookrequest.rb +350 -0
- data/lib/bcd_travel_api/models/aircancel_reservation_request4.rb +161 -0
- data/lib/bcd_travel_api/models/aircancel_reservationrefundquoteconfirmrequest.rb +164 -0
- data/lib/bcd_travel_api/models/aircomplete_verification_request.rb +146 -0
- data/lib/bcd_travel_api/models/airdocuments_issue_request.rb +163 -0
- data/lib/bcd_travel_api/models/airfare_rules_request.rb +155 -0
- data/lib/bcd_travel_api/models/airfare_search_request.rb +243 -0
- data/lib/bcd_travel_api/models/airget_checkout_data_request.rb +177 -0
- data/lib/bcd_travel_api/models/airpricingavailabilityrequest.rb +222 -0
- data/lib/bcd_travel_api/models/airpricingavailabilityrequest1.rb +231 -0
- data/lib/bcd_travel_api/models/airpricingfare_searchrequest.rb +214 -0
- data/lib/bcd_travel_api/models/airretrieve_reservations_list_request.rb +172 -0
- data/lib/bcd_travel_api/models/airseat_map_request.rb +175 -0
- data/lib/bcd_travel_api/models/arrival_location.rb +82 -0
- data/lib/bcd_travel_api/models/base_fare.rb +91 -0
- data/lib/bcd_travel_api/models/base_fare1.rb +119 -0
- data/lib/bcd_travel_api/models/base_fare2.rb +91 -0
- data/lib/bcd_travel_api/models/base_model.rb +110 -0
- data/lib/bcd_travel_api/models/billing_address.rb +110 -0
- data/lib/bcd_travel_api/models/booking_data.rb +73 -0
- data/lib/bcd_travel_api/models/broker.rb +82 -0
- data/lib/bcd_travel_api/models/broker16.rb +82 -0
- data/lib/bcd_travel_api/models/car.rb +91 -0
- data/lib/bcd_travel_api/models/car1.rb +91 -0
- data/lib/bcd_travel_api/models/car16.rb +83 -0
- data/lib/bcd_travel_api/models/car2.rb +91 -0
- data/lib/bcd_travel_api/models/card_detail.rb +104 -0
- data/lib/bcd_travel_api/models/carsbookcardrequest.rb +310 -0
- data/lib/bcd_travel_api/models/carsbookguaranteerequest.rb +236 -0
- data/lib/bcd_travel_api/models/carsbookvoucherrequest.rb +266 -0
- data/lib/bcd_travel_api/models/carscancel_reservation_request1.rb +163 -0
- data/lib/bcd_travel_api/models/carsdirect_sell_bookcardrequest.rb +362 -0
- data/lib/bcd_travel_api/models/carsdirect_sell_bookno_paymentrequest.rb +307 -0
- data/lib/bcd_travel_api/models/carsmodify_reservation_request.rb +215 -0
- data/lib/bcd_travel_api/models/carsretrieve_reservations_list_request.rb +172 -0
- data/lib/bcd_travel_api/models/client_reportable_datum.rb +82 -0
- data/lib/bcd_travel_api/models/content_type.rb +26 -0
- data/lib/bcd_travel_api/models/cruise_ferry.rb +91 -0
- data/lib/bcd_travel_api/models/departure_location.rb +82 -0
- data/lib/bcd_travel_api/models/document.rb +150 -0
- data/lib/bcd_travel_api/models/drop_off_location.rb +122 -0
- data/lib/bcd_travel_api/models/drop_off_location1.rb +118 -0
- data/lib/bcd_travel_api/models/drop_off_location16.rb +83 -0
- data/lib/bcd_travel_api/models/drop_off_location2.rb +82 -0
- data/lib/bcd_travel_api/models/end_location_address.rb +109 -0
- data/lib/bcd_travel_api/models/fare.rb +117 -0
- data/lib/bcd_travel_api/models/fare2.rb +119 -0
- data/lib/bcd_travel_api/models/fare3.rb +119 -0
- data/lib/bcd_travel_api/models/fare5.rb +91 -0
- data/lib/bcd_travel_api/models/ff_number.rb +82 -0
- data/lib/bcd_travel_api/models/filter.rb +185 -0
- data/lib/bcd_travel_api/models/filter1.rb +74 -0
- data/lib/bcd_travel_api/models/filter10.rb +74 -0
- data/lib/bcd_travel_api/models/filter11.rb +75 -0
- data/lib/bcd_travel_api/models/filter12.rb +75 -0
- data/lib/bcd_travel_api/models/filter13.rb +74 -0
- data/lib/bcd_travel_api/models/filter14.rb +75 -0
- data/lib/bcd_travel_api/models/filter15.rb +75 -0
- data/lib/bcd_travel_api/models/filter2.rb +74 -0
- data/lib/bcd_travel_api/models/filter3.rb +74 -0
- data/lib/bcd_travel_api/models/filter4.rb +75 -0
- data/lib/bcd_travel_api/models/filter6.rb +75 -0
- data/lib/bcd_travel_api/models/filter8.rb +75 -0
- data/lib/bcd_travel_api/models/generate_oauth_20_token.rb +91 -0
- data/lib/bcd_travel_api/models/get_configurations_post_request.rb +193 -0
- data/lib/bcd_travel_api/models/get_versionsbytrip_id.rb +99 -0
- data/lib/bcd_travel_api/models/guest.rb +82 -0
- data/lib/bcd_travel_api/models/hotel.rb +91 -0
- data/lib/bcd_travel_api/models/hotel1.rb +91 -0
- data/lib/bcd_travel_api/models/hotel16.rb +83 -0
- data/lib/bcd_travel_api/models/hotel2.rb +91 -0
- data/lib/bcd_travel_api/models/hotelsbookrequest.rb +418 -0
- data/lib/bcd_travel_api/models/hotelsbookrequest1.rb +445 -0
- data/lib/bcd_travel_api/models/hotelscancel_reservation_request.rb +153 -0
- data/lib/bcd_travel_api/models/hotelsrebookrequest.rb +214 -0
- data/lib/bcd_travel_api/models/hotelsrebookrequest1.rb +231 -0
- data/lib/bcd_travel_api/models/hotelsupdate_reservation_details_request.rb +153 -0
- data/lib/bcd_travel_api/models/hotelsupdate_reservation_details_request1.rb +164 -0
- data/lib/bcd_travel_api/models/leg.rb +166 -0
- data/lib/bcd_travel_api/models/leg1.rb +168 -0
- data/lib/bcd_travel_api/models/leg2.rb +156 -0
- data/lib/bcd_travel_api/models/leg3.rb +160 -0
- data/lib/bcd_travel_api/models/leg33.rb +164 -0
- data/lib/bcd_travel_api/models/leg34.rb +143 -0
- data/lib/bcd_travel_api/models/leg4.rb +154 -0
- data/lib/bcd_travel_api/models/leg6.rb +143 -0
- data/lib/bcd_travel_api/models/line_item.rb +109 -0
- data/lib/bcd_travel_api/models/line_item1.rb +119 -0
- data/lib/bcd_travel_api/models/location.rb +73 -0
- data/lib/bcd_travel_api/models/location16.rb +73 -0
- data/lib/bcd_travel_api/models/misc.rb +91 -0
- data/lib/bcd_travel_api/models/misc10.rb +83 -0
- data/lib/bcd_travel_api/models/options.rb +84 -0
- data/lib/bcd_travel_api/models/origin_destination.rb +134 -0
- data/lib/bcd_travel_api/models/origin_destination1.rb +108 -0
- data/lib/bcd_travel_api/models/passenger.rb +104 -0
- data/lib/bcd_travel_api/models/passport.rb +102 -0
- data/lib/bcd_travel_api/models/payment.rb +137 -0
- data/lib/bcd_travel_api/models/payment1.rb +141 -0
- data/lib/bcd_travel_api/models/payment2.rb +121 -0
- data/lib/bcd_travel_api/models/payment3.rb +111 -0
- data/lib/bcd_travel_api/models/pickup_location.rb +122 -0
- data/lib/bcd_travel_api/models/pickup_location1.rb +118 -0
- data/lib/bcd_travel_api/models/pickup_location16.rb +83 -0
- data/lib/bcd_travel_api/models/pickup_location2.rb +82 -0
- data/lib/bcd_travel_api/models/ping_getresponse.rb +72 -0
- data/lib/bcd_travel_api/models/pingrequest.rb +126 -0
- data/lib/bcd_travel_api/models/pingrequest2.rb +146 -0
- data/lib/bcd_travel_api/models/products.rb +129 -0
- data/lib/bcd_travel_api/models/products1.rb +117 -0
- data/lib/bcd_travel_api/models/products16.rb +111 -0
- data/lib/bcd_travel_api/models/products2.rb +107 -0
- data/lib/bcd_travel_api/models/rail.rb +91 -0
- data/lib/bcd_travel_api/models/rail1.rb +91 -0
- data/lib/bcd_travel_api/models/rail16.rb +82 -0
- data/lib/bcd_travel_api/models/rail2.rb +91 -0
- data/lib/bcd_travel_api/models/reservation.rb +223 -0
- data/lib/bcd_travel_api/models/reservation1.rb +239 -0
- data/lib/bcd_travel_api/models/reservation2.rb +170 -0
- data/lib/bcd_travel_api/models/reservation3.rb +193 -0
- data/lib/bcd_travel_api/models/reservation4.rb +201 -0
- data/lib/bcd_travel_api/models/reservation56.rb +220 -0
- data/lib/bcd_travel_api/models/reservation57.rb +219 -0
- data/lib/bcd_travel_api/models/reservation6.rb +240 -0
- data/lib/bcd_travel_api/models/reservation8.rb +220 -0
- data/lib/bcd_travel_api/models/reservation9.rb +239 -0
- data/lib/bcd_travel_api/models/result.rb +299 -0
- data/lib/bcd_travel_api/models/result1.rb +267 -0
- data/lib/bcd_travel_api/models/result16.rb +295 -0
- data/lib/bcd_travel_api/models/result2.rb +295 -0
- data/lib/bcd_travel_api/models/search_expenses.rb +111 -0
- data/lib/bcd_travel_api/models/search_expenses_request.rb +99 -0
- data/lib/bcd_travel_api/models/search_expensesbyaccount_id.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbyaccount_id_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbybooking_date_time.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbybooking_date_time_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbybooking_date_timerange.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbybooking_date_timerange_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbycalculated_ticket_status.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbycalculated_ticket_status_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbycustomer_number.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbycustomer_number_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbyglobal_customer_number.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbyglobal_customer_number_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbyhas_transaction.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbyhas_transaction_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbyinvoice_date_time.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbyinvoice_date_time_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbyinvoice_date_timerange.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbyinvoice_date_timerange_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbyinvoice_number.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbyinvoice_number_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbylast_modified_date_time.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbylast_modified_date_time_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbylast_modified_date_timerange.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbylast_modified_date_timerange_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbyrecord_locator.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbyrecord_locator_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbyticket_status.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbyticket_status_request.rb +90 -0
- data/lib/bcd_travel_api/models/search_expensesbytraveler_email.rb +111 -0
- data/lib/bcd_travel_api/models/search_expensesbytraveler_email_request.rb +90 -0
- data/lib/bcd_travel_api/models/segment_option.rb +85 -0
- data/lib/bcd_travel_api/models/seller.rb +83 -0
- data/lib/bcd_travel_api/models/seller16.rb +72 -0
- data/lib/bcd_travel_api/models/sort.rb +86 -0
- data/lib/bcd_travel_api/models/specific_flight.rb +82 -0
- data/lib/bcd_travel_api/models/start_location_address.rb +109 -0
- data/lib/bcd_travel_api/models/taxis.rb +145 -0
- data/lib/bcd_travel_api/models/taxis1.rb +132 -0
- data/lib/bcd_travel_api/models/taxis3.rb +143 -0
- data/lib/bcd_travel_api/models/taxis4.rb +130 -0
- data/lib/bcd_travel_api/models/ticket.rb +334 -0
- data/lib/bcd_travel_api/models/ticket1.rb +156 -0
- data/lib/bcd_travel_api/models/ticket2.rb +244 -0
- data/lib/bcd_travel_api/models/ticket3.rb +156 -0
- data/lib/bcd_travel_api/models/ticket32.rb +337 -0
- data/lib/bcd_travel_api/models/ticket33.rb +156 -0
- data/lib/bcd_travel_api/models/ticket4.rb +337 -0
- data/lib/bcd_travel_api/models/ticket5.rb +156 -0
- data/lib/bcd_travel_api/models/time_restriction.rb +90 -0
- data/lib/bcd_travel_api/models/tour.rb +91 -0
- data/lib/bcd_travel_api/models/traveler.rb +91 -0
- data/lib/bcd_travel_api/models/traveler1.rb +110 -0
- data/lib/bcd_travel_api/models/traveler3.rb +91 -0
- data/lib/bcd_travel_api/models/traveler4.rb +120 -0
- data/lib/bcd_travel_api/models/traveler_name.rb +82 -0
- data/lib/bcd_travel_api/utilities/date_time_helper.rb +11 -0
- data/lib/bcd_travel_api/utilities/file_wrapper.rb +28 -0
- data/lib/bcd_travel_api/utilities/union_type_lookup.rb +128 -0
- data/lib/bcd_travel_api.rb +270 -0
- metadata +316 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# bcd_travel_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module BcdTravelApi
|
|
7
|
+
# Reservation Model.
|
|
8
|
+
class Reservation < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :booking_date_time
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :car_type
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :confirmation_number
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [DropOffLocation]
|
|
26
|
+
attr_accessor :drop_off_location
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :end_date_time
|
|
31
|
+
|
|
32
|
+
# TODO: Write general description for this method
|
|
33
|
+
# @return [Fare]
|
|
34
|
+
attr_accessor :fare
|
|
35
|
+
|
|
36
|
+
# TODO: Write general description for this method
|
|
37
|
+
# @return [BaseFare]
|
|
38
|
+
attr_accessor :base_fare
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for this method
|
|
41
|
+
# @return [TrueClass | FalseClass]
|
|
42
|
+
attr_accessor :is_international
|
|
43
|
+
|
|
44
|
+
# TODO: Write general description for this method
|
|
45
|
+
# @return [Array[String]]
|
|
46
|
+
attr_accessor :line_items
|
|
47
|
+
|
|
48
|
+
# TODO: Write general description for this method
|
|
49
|
+
# @return [Integer]
|
|
50
|
+
attr_accessor :number_of_cars
|
|
51
|
+
|
|
52
|
+
# TODO: Write general description for this method
|
|
53
|
+
# @return [DropOffLocation]
|
|
54
|
+
attr_accessor :pickup_location
|
|
55
|
+
|
|
56
|
+
# TODO: Write general description for this method
|
|
57
|
+
# @return [Integer]
|
|
58
|
+
attr_accessor :rental_days
|
|
59
|
+
|
|
60
|
+
# TODO: Write general description for this method
|
|
61
|
+
# @return [Integer]
|
|
62
|
+
attr_accessor :segment_number
|
|
63
|
+
|
|
64
|
+
# TODO: Write general description for this method
|
|
65
|
+
# @return [String]
|
|
66
|
+
attr_accessor :start_date_time
|
|
67
|
+
|
|
68
|
+
# TODO: Write general description for this method
|
|
69
|
+
# @return [String]
|
|
70
|
+
attr_accessor :vendor_chain_code
|
|
71
|
+
|
|
72
|
+
# TODO: Write general description for this method
|
|
73
|
+
# @return [String]
|
|
74
|
+
attr_accessor :vendor_chain_name
|
|
75
|
+
|
|
76
|
+
# A mapping from model property names to API property names.
|
|
77
|
+
def self.names
|
|
78
|
+
@_hash = {} if @_hash.nil?
|
|
79
|
+
@_hash['booking_date_time'] = 'bookingDateTime'
|
|
80
|
+
@_hash['car_type'] = 'carType'
|
|
81
|
+
@_hash['confirmation_number'] = 'confirmationNumber'
|
|
82
|
+
@_hash['drop_off_location'] = 'dropOffLocation'
|
|
83
|
+
@_hash['end_date_time'] = 'endDateTime'
|
|
84
|
+
@_hash['fare'] = 'fare'
|
|
85
|
+
@_hash['base_fare'] = 'baseFare'
|
|
86
|
+
@_hash['is_international'] = 'isInternational'
|
|
87
|
+
@_hash['line_items'] = 'lineItems'
|
|
88
|
+
@_hash['number_of_cars'] = 'numberOfCars'
|
|
89
|
+
@_hash['pickup_location'] = 'pickupLocation'
|
|
90
|
+
@_hash['rental_days'] = 'rentalDays'
|
|
91
|
+
@_hash['segment_number'] = 'segmentNumber'
|
|
92
|
+
@_hash['start_date_time'] = 'startDateTime'
|
|
93
|
+
@_hash['vendor_chain_code'] = 'vendorChainCode'
|
|
94
|
+
@_hash['vendor_chain_name'] = 'vendorChainName'
|
|
95
|
+
@_hash
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# An array for optional fields
|
|
99
|
+
def self.optionals
|
|
100
|
+
%w[
|
|
101
|
+
fare
|
|
102
|
+
base_fare
|
|
103
|
+
]
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# An array for nullable fields
|
|
107
|
+
def self.nullables
|
|
108
|
+
[]
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def initialize(booking_date_time:, car_type:, confirmation_number:,
|
|
112
|
+
drop_off_location:, end_date_time:, is_international:,
|
|
113
|
+
line_items:, number_of_cars:, pickup_location:, rental_days:,
|
|
114
|
+
segment_number:, start_date_time:, vendor_chain_code:,
|
|
115
|
+
vendor_chain_name:, fare: SKIP, base_fare: SKIP,
|
|
116
|
+
additional_properties: nil)
|
|
117
|
+
# Add additional model properties to the instance
|
|
118
|
+
additional_properties = {} if additional_properties.nil?
|
|
119
|
+
|
|
120
|
+
@booking_date_time = booking_date_time
|
|
121
|
+
@car_type = car_type
|
|
122
|
+
@confirmation_number = confirmation_number
|
|
123
|
+
@drop_off_location = drop_off_location
|
|
124
|
+
@end_date_time = end_date_time
|
|
125
|
+
@fare = fare unless fare == SKIP
|
|
126
|
+
@base_fare = base_fare unless base_fare == SKIP
|
|
127
|
+
@is_international = is_international
|
|
128
|
+
@line_items = line_items
|
|
129
|
+
@number_of_cars = number_of_cars
|
|
130
|
+
@pickup_location = pickup_location
|
|
131
|
+
@rental_days = rental_days
|
|
132
|
+
@segment_number = segment_number
|
|
133
|
+
@start_date_time = start_date_time
|
|
134
|
+
@vendor_chain_code = vendor_chain_code
|
|
135
|
+
@vendor_chain_name = vendor_chain_name
|
|
136
|
+
@additional_properties = additional_properties
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Creates an instance of the object from a hash.
|
|
140
|
+
def self.from_hash(hash)
|
|
141
|
+
return nil unless hash
|
|
142
|
+
|
|
143
|
+
# Extract variables from the hash.
|
|
144
|
+
booking_date_time =
|
|
145
|
+
hash.key?('bookingDateTime') ? hash['bookingDateTime'] : nil
|
|
146
|
+
car_type = hash.key?('carType') ? hash['carType'] : nil
|
|
147
|
+
confirmation_number =
|
|
148
|
+
hash.key?('confirmationNumber') ? hash['confirmationNumber'] : nil
|
|
149
|
+
drop_off_location = DropOffLocation.from_hash(hash['dropOffLocation']) if
|
|
150
|
+
hash['dropOffLocation']
|
|
151
|
+
end_date_time = hash.key?('endDateTime') ? hash['endDateTime'] : nil
|
|
152
|
+
is_international =
|
|
153
|
+
hash.key?('isInternational') ? hash['isInternational'] : nil
|
|
154
|
+
line_items = hash.key?('lineItems') ? hash['lineItems'] : nil
|
|
155
|
+
number_of_cars = hash.key?('numberOfCars') ? hash['numberOfCars'] : nil
|
|
156
|
+
pickup_location = DropOffLocation.from_hash(hash['pickupLocation']) if
|
|
157
|
+
hash['pickupLocation']
|
|
158
|
+
rental_days = hash.key?('rentalDays') ? hash['rentalDays'] : nil
|
|
159
|
+
segment_number = hash.key?('segmentNumber') ? hash['segmentNumber'] : nil
|
|
160
|
+
start_date_time = hash.key?('startDateTime') ? hash['startDateTime'] : nil
|
|
161
|
+
vendor_chain_code =
|
|
162
|
+
hash.key?('vendorChainCode') ? hash['vendorChainCode'] : nil
|
|
163
|
+
vendor_chain_name =
|
|
164
|
+
hash.key?('vendorChainName') ? hash['vendorChainName'] : nil
|
|
165
|
+
fare = Fare.from_hash(hash['fare']) if hash['fare']
|
|
166
|
+
base_fare = BaseFare.from_hash(hash['baseFare']) if hash['baseFare']
|
|
167
|
+
|
|
168
|
+
# Create a new hash for additional properties, removing known properties.
|
|
169
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
170
|
+
|
|
171
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
172
|
+
new_hash, proc { |value| value }
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
# Create object from extracted values.
|
|
176
|
+
Reservation.new(booking_date_time: booking_date_time,
|
|
177
|
+
car_type: car_type,
|
|
178
|
+
confirmation_number: confirmation_number,
|
|
179
|
+
drop_off_location: drop_off_location,
|
|
180
|
+
end_date_time: end_date_time,
|
|
181
|
+
is_international: is_international,
|
|
182
|
+
line_items: line_items,
|
|
183
|
+
number_of_cars: number_of_cars,
|
|
184
|
+
pickup_location: pickup_location,
|
|
185
|
+
rental_days: rental_days,
|
|
186
|
+
segment_number: segment_number,
|
|
187
|
+
start_date_time: start_date_time,
|
|
188
|
+
vendor_chain_code: vendor_chain_code,
|
|
189
|
+
vendor_chain_name: vendor_chain_name,
|
|
190
|
+
fare: fare,
|
|
191
|
+
base_fare: base_fare,
|
|
192
|
+
additional_properties: additional_properties)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Provides a human-readable string representation of the object.
|
|
196
|
+
def to_s
|
|
197
|
+
class_name = self.class.name.split('::').last
|
|
198
|
+
"<#{class_name} booking_date_time: #{@booking_date_time}, car_type: #{@car_type},"\
|
|
199
|
+
" confirmation_number: #{@confirmation_number}, drop_off_location: #{@drop_off_location},"\
|
|
200
|
+
" end_date_time: #{@end_date_time}, fare: #{@fare}, base_fare: #{@base_fare},"\
|
|
201
|
+
" is_international: #{@is_international}, line_items: #{@line_items}, number_of_cars:"\
|
|
202
|
+
" #{@number_of_cars}, pickup_location: #{@pickup_location}, rental_days: #{@rental_days},"\
|
|
203
|
+
" segment_number: #{@segment_number}, start_date_time: #{@start_date_time},"\
|
|
204
|
+
" vendor_chain_code: #{@vendor_chain_code}, vendor_chain_name: #{@vendor_chain_name},"\
|
|
205
|
+
" additional_properties: #{@additional_properties}>"
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
209
|
+
def inspect
|
|
210
|
+
class_name = self.class.name.split('::').last
|
|
211
|
+
"<#{class_name} booking_date_time: #{@booking_date_time.inspect}, car_type:"\
|
|
212
|
+
" #{@car_type.inspect}, confirmation_number: #{@confirmation_number.inspect},"\
|
|
213
|
+
" drop_off_location: #{@drop_off_location.inspect}, end_date_time:"\
|
|
214
|
+
" #{@end_date_time.inspect}, fare: #{@fare.inspect}, base_fare: #{@base_fare.inspect},"\
|
|
215
|
+
" is_international: #{@is_international.inspect}, line_items: #{@line_items.inspect},"\
|
|
216
|
+
" number_of_cars: #{@number_of_cars.inspect}, pickup_location: #{@pickup_location.inspect},"\
|
|
217
|
+
" rental_days: #{@rental_days.inspect}, segment_number: #{@segment_number.inspect},"\
|
|
218
|
+
" start_date_time: #{@start_date_time.inspect}, vendor_chain_code:"\
|
|
219
|
+
" #{@vendor_chain_code.inspect}, vendor_chain_name: #{@vendor_chain_name.inspect},"\
|
|
220
|
+
" additional_properties: #{@additional_properties}>"
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
end
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# bcd_travel_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module BcdTravelApi
|
|
7
|
+
# Reservation1 Model.
|
|
8
|
+
class Reservation1 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Address1]
|
|
14
|
+
attr_accessor :address
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :booking_date_time
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :check_in_date_time
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :check_out_date_time
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :confirmation_number
|
|
31
|
+
|
|
32
|
+
# TODO: Write general description for this method
|
|
33
|
+
# @return [Fare2]
|
|
34
|
+
attr_accessor :fare
|
|
35
|
+
|
|
36
|
+
# TODO: Write general description for this method
|
|
37
|
+
# @return [Array[Guest]]
|
|
38
|
+
attr_accessor :guests
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for this method
|
|
41
|
+
# @return [Array[String]]
|
|
42
|
+
attr_accessor :line_items
|
|
43
|
+
|
|
44
|
+
# TODO: Write general description for this method
|
|
45
|
+
# @return [Integer]
|
|
46
|
+
attr_accessor :number_of_nights
|
|
47
|
+
|
|
48
|
+
# TODO: Write general description for this method
|
|
49
|
+
# @return [Integer]
|
|
50
|
+
attr_accessor :number_of_rooms
|
|
51
|
+
|
|
52
|
+
# TODO: Write general description for this method
|
|
53
|
+
# @return [String]
|
|
54
|
+
attr_accessor :room_type
|
|
55
|
+
|
|
56
|
+
# TODO: Write general description for this method
|
|
57
|
+
# @return [Integer]
|
|
58
|
+
attr_accessor :segment_number
|
|
59
|
+
|
|
60
|
+
# TODO: Write general description for this method
|
|
61
|
+
# @return [String]
|
|
62
|
+
attr_accessor :vendor_chain_code
|
|
63
|
+
|
|
64
|
+
# TODO: Write general description for this method
|
|
65
|
+
# @return [String]
|
|
66
|
+
attr_accessor :vendor_chain_name
|
|
67
|
+
|
|
68
|
+
# TODO: Write general description for this method
|
|
69
|
+
# @return [String]
|
|
70
|
+
attr_accessor :vendor_code
|
|
71
|
+
|
|
72
|
+
# TODO: Write general description for this method
|
|
73
|
+
# @return [String]
|
|
74
|
+
attr_accessor :vendor_name
|
|
75
|
+
|
|
76
|
+
# TODO: Write general description for this method
|
|
77
|
+
# @return [BaseFare1]
|
|
78
|
+
attr_accessor :base_fare
|
|
79
|
+
|
|
80
|
+
# A mapping from model property names to API property names.
|
|
81
|
+
def self.names
|
|
82
|
+
@_hash = {} if @_hash.nil?
|
|
83
|
+
@_hash['address'] = 'address'
|
|
84
|
+
@_hash['booking_date_time'] = 'bookingDateTime'
|
|
85
|
+
@_hash['check_in_date_time'] = 'checkInDateTime'
|
|
86
|
+
@_hash['check_out_date_time'] = 'checkOutDateTime'
|
|
87
|
+
@_hash['confirmation_number'] = 'confirmationNumber'
|
|
88
|
+
@_hash['fare'] = 'fare'
|
|
89
|
+
@_hash['guests'] = 'guests'
|
|
90
|
+
@_hash['line_items'] = 'lineItems'
|
|
91
|
+
@_hash['number_of_nights'] = 'numberOfNights'
|
|
92
|
+
@_hash['number_of_rooms'] = 'numberOfRooms'
|
|
93
|
+
@_hash['room_type'] = 'roomType'
|
|
94
|
+
@_hash['segment_number'] = 'segmentNumber'
|
|
95
|
+
@_hash['vendor_chain_code'] = 'vendorChainCode'
|
|
96
|
+
@_hash['vendor_chain_name'] = 'vendorChainName'
|
|
97
|
+
@_hash['vendor_code'] = 'vendorCode'
|
|
98
|
+
@_hash['vendor_name'] = 'vendorName'
|
|
99
|
+
@_hash['base_fare'] = 'baseFare'
|
|
100
|
+
@_hash
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# An array for optional fields
|
|
104
|
+
def self.optionals
|
|
105
|
+
%w[
|
|
106
|
+
base_fare
|
|
107
|
+
]
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# An array for nullable fields
|
|
111
|
+
def self.nullables
|
|
112
|
+
[]
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def initialize(address:, booking_date_time:, check_in_date_time:,
|
|
116
|
+
check_out_date_time:, confirmation_number:, fare:, guests:,
|
|
117
|
+
line_items:, number_of_nights:, number_of_rooms:, room_type:,
|
|
118
|
+
segment_number:, vendor_chain_code:, vendor_chain_name:,
|
|
119
|
+
vendor_code:, vendor_name:, base_fare: SKIP,
|
|
120
|
+
additional_properties: nil)
|
|
121
|
+
# Add additional model properties to the instance
|
|
122
|
+
additional_properties = {} if additional_properties.nil?
|
|
123
|
+
|
|
124
|
+
@address = address
|
|
125
|
+
@booking_date_time = booking_date_time
|
|
126
|
+
@check_in_date_time = check_in_date_time
|
|
127
|
+
@check_out_date_time = check_out_date_time
|
|
128
|
+
@confirmation_number = confirmation_number
|
|
129
|
+
@fare = fare
|
|
130
|
+
@guests = guests
|
|
131
|
+
@line_items = line_items
|
|
132
|
+
@number_of_nights = number_of_nights
|
|
133
|
+
@number_of_rooms = number_of_rooms
|
|
134
|
+
@room_type = room_type
|
|
135
|
+
@segment_number = segment_number
|
|
136
|
+
@vendor_chain_code = vendor_chain_code
|
|
137
|
+
@vendor_chain_name = vendor_chain_name
|
|
138
|
+
@vendor_code = vendor_code
|
|
139
|
+
@vendor_name = vendor_name
|
|
140
|
+
@base_fare = base_fare unless base_fare == SKIP
|
|
141
|
+
@additional_properties = additional_properties
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Creates an instance of the object from a hash.
|
|
145
|
+
def self.from_hash(hash)
|
|
146
|
+
return nil unless hash
|
|
147
|
+
|
|
148
|
+
# Extract variables from the hash.
|
|
149
|
+
address = Address1.from_hash(hash['address']) if hash['address']
|
|
150
|
+
booking_date_time =
|
|
151
|
+
hash.key?('bookingDateTime') ? hash['bookingDateTime'] : nil
|
|
152
|
+
check_in_date_time =
|
|
153
|
+
hash.key?('checkInDateTime') ? hash['checkInDateTime'] : nil
|
|
154
|
+
check_out_date_time =
|
|
155
|
+
hash.key?('checkOutDateTime') ? hash['checkOutDateTime'] : nil
|
|
156
|
+
confirmation_number =
|
|
157
|
+
hash.key?('confirmationNumber') ? hash['confirmationNumber'] : nil
|
|
158
|
+
fare = Fare2.from_hash(hash['fare']) if hash['fare']
|
|
159
|
+
# Parameter is an array, so we need to iterate through it
|
|
160
|
+
guests = nil
|
|
161
|
+
unless hash['guests'].nil?
|
|
162
|
+
guests = []
|
|
163
|
+
hash['guests'].each do |structure|
|
|
164
|
+
guests << (Guest.from_hash(structure) if structure)
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
guests = nil unless hash.key?('guests')
|
|
169
|
+
line_items = hash.key?('lineItems') ? hash['lineItems'] : nil
|
|
170
|
+
number_of_nights =
|
|
171
|
+
hash.key?('numberOfNights') ? hash['numberOfNights'] : nil
|
|
172
|
+
number_of_rooms = hash.key?('numberOfRooms') ? hash['numberOfRooms'] : nil
|
|
173
|
+
room_type = hash.key?('roomType') ? hash['roomType'] : nil
|
|
174
|
+
segment_number = hash.key?('segmentNumber') ? hash['segmentNumber'] : nil
|
|
175
|
+
vendor_chain_code =
|
|
176
|
+
hash.key?('vendorChainCode') ? hash['vendorChainCode'] : nil
|
|
177
|
+
vendor_chain_name =
|
|
178
|
+
hash.key?('vendorChainName') ? hash['vendorChainName'] : nil
|
|
179
|
+
vendor_code = hash.key?('vendorCode') ? hash['vendorCode'] : nil
|
|
180
|
+
vendor_name = hash.key?('vendorName') ? hash['vendorName'] : nil
|
|
181
|
+
base_fare = BaseFare1.from_hash(hash['baseFare']) if hash['baseFare']
|
|
182
|
+
|
|
183
|
+
# Create a new hash for additional properties, removing known properties.
|
|
184
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
185
|
+
|
|
186
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
187
|
+
new_hash, proc { |value| value }
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
# Create object from extracted values.
|
|
191
|
+
Reservation1.new(address: address,
|
|
192
|
+
booking_date_time: booking_date_time,
|
|
193
|
+
check_in_date_time: check_in_date_time,
|
|
194
|
+
check_out_date_time: check_out_date_time,
|
|
195
|
+
confirmation_number: confirmation_number,
|
|
196
|
+
fare: fare,
|
|
197
|
+
guests: guests,
|
|
198
|
+
line_items: line_items,
|
|
199
|
+
number_of_nights: number_of_nights,
|
|
200
|
+
number_of_rooms: number_of_rooms,
|
|
201
|
+
room_type: room_type,
|
|
202
|
+
segment_number: segment_number,
|
|
203
|
+
vendor_chain_code: vendor_chain_code,
|
|
204
|
+
vendor_chain_name: vendor_chain_name,
|
|
205
|
+
vendor_code: vendor_code,
|
|
206
|
+
vendor_name: vendor_name,
|
|
207
|
+
base_fare: base_fare,
|
|
208
|
+
additional_properties: additional_properties)
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Provides a human-readable string representation of the object.
|
|
212
|
+
def to_s
|
|
213
|
+
class_name = self.class.name.split('::').last
|
|
214
|
+
"<#{class_name} address: #{@address}, booking_date_time: #{@booking_date_time},"\
|
|
215
|
+
" check_in_date_time: #{@check_in_date_time}, check_out_date_time: #{@check_out_date_time},"\
|
|
216
|
+
" confirmation_number: #{@confirmation_number}, fare: #{@fare}, guests: #{@guests},"\
|
|
217
|
+
" line_items: #{@line_items}, number_of_nights: #{@number_of_nights}, number_of_rooms:"\
|
|
218
|
+
" #{@number_of_rooms}, room_type: #{@room_type}, segment_number: #{@segment_number},"\
|
|
219
|
+
" vendor_chain_code: #{@vendor_chain_code}, vendor_chain_name: #{@vendor_chain_name},"\
|
|
220
|
+
" vendor_code: #{@vendor_code}, vendor_name: #{@vendor_name}, base_fare: #{@base_fare},"\
|
|
221
|
+
" additional_properties: #{@additional_properties}>"
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
225
|
+
def inspect
|
|
226
|
+
class_name = self.class.name.split('::').last
|
|
227
|
+
"<#{class_name} address: #{@address.inspect}, booking_date_time:"\
|
|
228
|
+
" #{@booking_date_time.inspect}, check_in_date_time: #{@check_in_date_time.inspect},"\
|
|
229
|
+
" check_out_date_time: #{@check_out_date_time.inspect}, confirmation_number:"\
|
|
230
|
+
" #{@confirmation_number.inspect}, fare: #{@fare.inspect}, guests: #{@guests.inspect},"\
|
|
231
|
+
" line_items: #{@line_items.inspect}, number_of_nights: #{@number_of_nights.inspect},"\
|
|
232
|
+
" number_of_rooms: #{@number_of_rooms.inspect}, room_type: #{@room_type.inspect},"\
|
|
233
|
+
" segment_number: #{@segment_number.inspect}, vendor_chain_code:"\
|
|
234
|
+
" #{@vendor_chain_code.inspect}, vendor_chain_name: #{@vendor_chain_name.inspect},"\
|
|
235
|
+
" vendor_code: #{@vendor_code.inspect}, vendor_name: #{@vendor_name.inspect}, base_fare:"\
|
|
236
|
+
" #{@base_fare.inspect}, additional_properties: #{@additional_properties}>"
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
end
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# bcd_travel_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module BcdTravelApi
|
|
7
|
+
# Reservation2 Model.
|
|
8
|
+
class Reservation2 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :booking_date_time
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :cabin
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :confirmation_number
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :end_date_time
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [BaseFare]
|
|
30
|
+
attr_accessor :fare
|
|
31
|
+
|
|
32
|
+
# TODO: Write general description for this method
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :link_code
|
|
35
|
+
|
|
36
|
+
# TODO: Write general description for this method
|
|
37
|
+
# @return [Integer]
|
|
38
|
+
attr_accessor :segment_number
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for this method
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :ship_name
|
|
43
|
+
|
|
44
|
+
# TODO: Write general description for this method
|
|
45
|
+
# @return [String]
|
|
46
|
+
attr_accessor :start_date_time
|
|
47
|
+
|
|
48
|
+
# TODO: Write general description for this method
|
|
49
|
+
# @return [String]
|
|
50
|
+
attr_accessor :vendor_chain_code
|
|
51
|
+
|
|
52
|
+
# TODO: Write general description for this method
|
|
53
|
+
# @return [String]
|
|
54
|
+
attr_accessor :vendor_chain_name
|
|
55
|
+
|
|
56
|
+
# A mapping from model property names to API property names.
|
|
57
|
+
def self.names
|
|
58
|
+
@_hash = {} if @_hash.nil?
|
|
59
|
+
@_hash['booking_date_time'] = 'bookingDateTime'
|
|
60
|
+
@_hash['cabin'] = 'cabin'
|
|
61
|
+
@_hash['confirmation_number'] = 'confirmationNumber'
|
|
62
|
+
@_hash['end_date_time'] = 'endDateTime'
|
|
63
|
+
@_hash['fare'] = 'fare'
|
|
64
|
+
@_hash['link_code'] = 'linkCode'
|
|
65
|
+
@_hash['segment_number'] = 'segmentNumber'
|
|
66
|
+
@_hash['ship_name'] = 'shipName'
|
|
67
|
+
@_hash['start_date_time'] = 'startDateTime'
|
|
68
|
+
@_hash['vendor_chain_code'] = 'vendorChainCode'
|
|
69
|
+
@_hash['vendor_chain_name'] = 'vendorChainName'
|
|
70
|
+
@_hash
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# An array for optional fields
|
|
74
|
+
def self.optionals
|
|
75
|
+
[]
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# An array for nullable fields
|
|
79
|
+
def self.nullables
|
|
80
|
+
[]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def initialize(booking_date_time:, cabin:, confirmation_number:,
|
|
84
|
+
end_date_time:, fare:, link_code:, segment_number:,
|
|
85
|
+
ship_name:, start_date_time:, vendor_chain_code:,
|
|
86
|
+
vendor_chain_name:, additional_properties: nil)
|
|
87
|
+
# Add additional model properties to the instance
|
|
88
|
+
additional_properties = {} if additional_properties.nil?
|
|
89
|
+
|
|
90
|
+
@booking_date_time = booking_date_time
|
|
91
|
+
@cabin = cabin
|
|
92
|
+
@confirmation_number = confirmation_number
|
|
93
|
+
@end_date_time = end_date_time
|
|
94
|
+
@fare = fare
|
|
95
|
+
@link_code = link_code
|
|
96
|
+
@segment_number = segment_number
|
|
97
|
+
@ship_name = ship_name
|
|
98
|
+
@start_date_time = start_date_time
|
|
99
|
+
@vendor_chain_code = vendor_chain_code
|
|
100
|
+
@vendor_chain_name = vendor_chain_name
|
|
101
|
+
@additional_properties = additional_properties
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Creates an instance of the object from a hash.
|
|
105
|
+
def self.from_hash(hash)
|
|
106
|
+
return nil unless hash
|
|
107
|
+
|
|
108
|
+
# Extract variables from the hash.
|
|
109
|
+
booking_date_time =
|
|
110
|
+
hash.key?('bookingDateTime') ? hash['bookingDateTime'] : nil
|
|
111
|
+
cabin = hash.key?('cabin') ? hash['cabin'] : nil
|
|
112
|
+
confirmation_number =
|
|
113
|
+
hash.key?('confirmationNumber') ? hash['confirmationNumber'] : nil
|
|
114
|
+
end_date_time = hash.key?('endDateTime') ? hash['endDateTime'] : nil
|
|
115
|
+
fare = BaseFare.from_hash(hash['fare']) if hash['fare']
|
|
116
|
+
link_code = hash.key?('linkCode') ? hash['linkCode'] : nil
|
|
117
|
+
segment_number = hash.key?('segmentNumber') ? hash['segmentNumber'] : nil
|
|
118
|
+
ship_name = hash.key?('shipName') ? hash['shipName'] : nil
|
|
119
|
+
start_date_time = hash.key?('startDateTime') ? hash['startDateTime'] : nil
|
|
120
|
+
vendor_chain_code =
|
|
121
|
+
hash.key?('vendorChainCode') ? hash['vendorChainCode'] : nil
|
|
122
|
+
vendor_chain_name =
|
|
123
|
+
hash.key?('vendorChainName') ? hash['vendorChainName'] : nil
|
|
124
|
+
|
|
125
|
+
# Create a new hash for additional properties, removing known properties.
|
|
126
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
127
|
+
|
|
128
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
129
|
+
new_hash, proc { |value| value }
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
# Create object from extracted values.
|
|
133
|
+
Reservation2.new(booking_date_time: booking_date_time,
|
|
134
|
+
cabin: cabin,
|
|
135
|
+
confirmation_number: confirmation_number,
|
|
136
|
+
end_date_time: end_date_time,
|
|
137
|
+
fare: fare,
|
|
138
|
+
link_code: link_code,
|
|
139
|
+
segment_number: segment_number,
|
|
140
|
+
ship_name: ship_name,
|
|
141
|
+
start_date_time: start_date_time,
|
|
142
|
+
vendor_chain_code: vendor_chain_code,
|
|
143
|
+
vendor_chain_name: vendor_chain_name,
|
|
144
|
+
additional_properties: additional_properties)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Provides a human-readable string representation of the object.
|
|
148
|
+
def to_s
|
|
149
|
+
class_name = self.class.name.split('::').last
|
|
150
|
+
"<#{class_name} booking_date_time: #{@booking_date_time}, cabin: #{@cabin},"\
|
|
151
|
+
" confirmation_number: #{@confirmation_number}, end_date_time: #{@end_date_time}, fare:"\
|
|
152
|
+
" #{@fare}, link_code: #{@link_code}, segment_number: #{@segment_number}, ship_name:"\
|
|
153
|
+
" #{@ship_name}, start_date_time: #{@start_date_time}, vendor_chain_code:"\
|
|
154
|
+
" #{@vendor_chain_code}, vendor_chain_name: #{@vendor_chain_name}, additional_properties:"\
|
|
155
|
+
" #{@additional_properties}>"
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
159
|
+
def inspect
|
|
160
|
+
class_name = self.class.name.split('::').last
|
|
161
|
+
"<#{class_name} booking_date_time: #{@booking_date_time.inspect}, cabin: #{@cabin.inspect},"\
|
|
162
|
+
" confirmation_number: #{@confirmation_number.inspect}, end_date_time:"\
|
|
163
|
+
" #{@end_date_time.inspect}, fare: #{@fare.inspect}, link_code: #{@link_code.inspect},"\
|
|
164
|
+
" segment_number: #{@segment_number.inspect}, ship_name: #{@ship_name.inspect},"\
|
|
165
|
+
" start_date_time: #{@start_date_time.inspect}, vendor_chain_code:"\
|
|
166
|
+
" #{@vendor_chain_code.inspect}, vendor_chain_name: #{@vendor_chain_name.inspect},"\
|
|
167
|
+
" additional_properties: #{@additional_properties}>"
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
end
|