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