apimatic-cp-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 (271) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +178 -0
  4. data/bin/console +15 -0
  5. data/lib/cell_point_api/api_helper.rb +10 -0
  6. data/lib/cell_point_api/apis/apple_pay_api.rb +51 -0
  7. data/lib/cell_point_api/apis/authentication_api.rb +81 -0
  8. data/lib/cell_point_api/apis/base_api.rb +67 -0
  9. data/lib/cell_point_api/apis/bulk_api.rb +93 -0
  10. data/lib/cell_point_api/apis/cards_api.rb +104 -0
  11. data/lib/cell_point_api/apis/notes_api.rb +66 -0
  12. data/lib/cell_point_api/apis/oauth_authorization_api.rb +44 -0
  13. data/lib/cell_point_api/apis/orders_api.rb +483 -0
  14. data/lib/cell_point_api/apis/payment_methods_api.rb +57 -0
  15. data/lib/cell_point_api/apis/proxy_api.rb +91 -0
  16. data/lib/cell_point_api/apis/transactions_api.rb +546 -0
  17. data/lib/cell_point_api/apis/wallet_api.rb +39 -0
  18. data/lib/cell_point_api/client.rb +145 -0
  19. data/lib/cell_point_api/configuration.rb +180 -0
  20. data/lib/cell_point_api/events/callbacks/callbacks_handler.rb +37 -0
  21. data/lib/cell_point_api/events/unknown_event.rb +32 -0
  22. data/lib/cell_point_api/exceptions/api_exception.rb +21 -0
  23. data/lib/cell_point_api/exceptions/oauth_provider_exception.rb +64 -0
  24. data/lib/cell_point_api/exceptions/problem_exception.rb +75 -0
  25. data/lib/cell_point_api/http/api_response.rb +19 -0
  26. data/lib/cell_point_api/http/auth/cpd_issued_jwt.rb +156 -0
  27. data/lib/cell_point_api/http/auth/merchant_issued_jwt.rb +53 -0
  28. data/lib/cell_point_api/http/http_call_back.rb +10 -0
  29. data/lib/cell_point_api/http/http_method_enum.rb +10 -0
  30. data/lib/cell_point_api/http/http_request.rb +10 -0
  31. data/lib/cell_point_api/http/http_response.rb +10 -0
  32. data/lib/cell_point_api/http/proxy_settings.rb +22 -0
  33. data/lib/cell_point_api/logging/configuration/api_logging_configuration.rb +186 -0
  34. data/lib/cell_point_api/logging/sdk_logger.rb +17 -0
  35. data/lib/cell_point_api/models/account.rb +168 -0
  36. data/lib/cell_point_api/models/account_status.rb +52 -0
  37. data/lib/cell_point_api/models/account_type.rb +44 -0
  38. data/lib/cell_point_api/models/action_base.rb +74 -0
  39. data/lib/cell_point_api/models/action_completion_response.rb +77 -0
  40. data/lib/cell_point_api/models/action_result_status.rb +40 -0
  41. data/lib/cell_point_api/models/action_type.rb +36 -0
  42. data/lib/cell_point_api/models/activity.rb +244 -0
  43. data/lib/cell_point_api/models/activity_data.rb +127 -0
  44. data/lib/cell_point_api/models/address_verification_status.rb +56 -0
  45. data/lib/cell_point_api/models/airline_ancillary.rb +244 -0
  46. data/lib/cell_point_api/models/airline_ancillary_data.rb +120 -0
  47. data/lib/cell_point_api/models/airline_fare.rb +348 -0
  48. data/lib/cell_point_api/models/airline_fare_data.rb +217 -0
  49. data/lib/cell_point_api/models/airline_industry_data.rb +152 -0
  50. data/lib/cell_point_api/models/airport.rb +144 -0
  51. data/lib/cell_point_api/models/amount.rb +105 -0
  52. data/lib/cell_point_api/models/ancillary_details.rb +366 -0
  53. data/lib/cell_point_api/models/apple_pay_config.rb +83 -0
  54. data/lib/cell_point_api/models/apple_pay_instrument_apple_pay_node.rb +119 -0
  55. data/lib/cell_point_api/models/apple_pay_payment_instrument.rb +123 -0
  56. data/lib/cell_point_api/models/apple_tokenized_token.rb +143 -0
  57. data/lib/cell_point_api/models/audience.rb +36 -0
  58. data/lib/cell_point_api/models/authorization.rb +145 -0
  59. data/lib/cell_point_api/models/authorization_group.rb +99 -0
  60. data/lib/cell_point_api/models/authorization_group1.rb +216 -0
  61. data/lib/cell_point_api/models/authorization_group_full.rb +193 -0
  62. data/lib/cell_point_api/models/authorize_order_by_id_post201_response.rb +128 -0
  63. data/lib/cell_point_api/models/auto_rental.rb +195 -0
  64. data/lib/cell_point_api/models/auto_rental_data.rb +76 -0
  65. data/lib/cell_point_api/models/auto_rental_industry_data.rb +182 -0
  66. data/lib/cell_point_api/models/base_model.rb +110 -0
  67. data/lib/cell_point_api/models/bin.rb +73 -0
  68. data/lib/cell_point_api/models/breadcrumb.rb +86 -0
  69. data/lib/cell_point_api/models/browser_info.rb +114 -0
  70. data/lib/cell_point_api/models/bundle.rb +195 -0
  71. data/lib/cell_point_api/models/bundled_activity.rb +229 -0
  72. data/lib/cell_point_api/models/bundled_airline_ancillary.rb +226 -0
  73. data/lib/cell_point_api/models/bundled_airline_fare.rb +330 -0
  74. data/lib/cell_point_api/models/bundled_auto_rental.rb +176 -0
  75. data/lib/cell_point_api/models/bundled_discount.rb +132 -0
  76. data/lib/cell_point_api/models/bundled_item_base.rb +123 -0
  77. data/lib/cell_point_api/models/bundled_lodging_reservation.rb +176 -0
  78. data/lib/cell_point_api/models/bundled_product.rb +161 -0
  79. data/lib/cell_point_api/models/buyer.rb +129 -0
  80. data/lib/cell_point_api/models/buyer_fingerprint.rb +125 -0
  81. data/lib/cell_point_api/models/buyer_history.rb +199 -0
  82. data/lib/cell_point_api/models/cancel.rb +109 -0
  83. data/lib/cell_point_api/models/cancelled_payment_transactions.rb +84 -0
  84. data/lib/cell_point_api/models/capabilities.rb +77 -0
  85. data/lib/cell_point_api/models/capture.rb +84 -0
  86. data/lib/cell_point_api/models/capture_payment_response.rb +159 -0
  87. data/lib/cell_point_api/models/card.rb +131 -0
  88. data/lib/cell_point_api/models/card_config.rb +105 -0
  89. data/lib/cell_point_api/models/card_identification.rb +126 -0
  90. data/lib/cell_point_api/models/card_instrument_card_node.rb +232 -0
  91. data/lib/cell_point_api/models/card_number.rb +122 -0
  92. data/lib/cell_point_api/models/card_payment_instrument.rb +136 -0
  93. data/lib/cell_point_api/models/card_scheme.rb +63 -0
  94. data/lib/cell_point_api/models/card_scheme_configuration.rb +87 -0
  95. data/lib/cell_point_api/models/carrier.rb +82 -0
  96. data/lib/cell_point_api/models/category.rb +36 -0
  97. data/lib/cell_point_api/models/client_assertion.rb +135 -0
  98. data/lib/cell_point_api/models/close.rb +89 -0
  99. data/lib/cell_point_api/models/close_refund_response.rb +73 -0
  100. data/lib/cell_point_api/models/closed_payment_transactions.rb +83 -0
  101. data/lib/cell_point_api/models/codeshare.rb +87 -0
  102. data/lib/cell_point_api/models/complete_person_name.rb +120 -0
  103. data/lib/cell_point_api/models/completion_redirect.rb +93 -0
  104. data/lib/cell_point_api/models/configuration.rb +86 -0
  105. data/lib/cell_point_api/models/contact_data.rb +82 -0
  106. data/lib/cell_point_api/models/cpu.rb +74 -0
  107. data/lib/cell_point_api/models/device_os.rb +60 -0
  108. data/lib/cell_point_api/models/discount.rb +150 -0
  109. data/lib/cell_point_api/models/discount_data.rb +83 -0
  110. data/lib/cell_point_api/models/driver.rb +86 -0
  111. data/lib/cell_point_api/models/external_transaction.rb +227 -0
  112. data/lib/cell_point_api/models/externally_tokenized_card.rb +81 -0
  113. data/lib/cell_point_api/models/failover.rb +105 -0
  114. data/lib/cell_point_api/models/failure_category.rb +62 -0
  115. data/lib/cell_point_api/models/failure_module.rb +58 -0
  116. data/lib/cell_point_api/models/fingerprint.rb +82 -0
  117. data/lib/cell_point_api/models/fraud_assessment.rb +163 -0
  118. data/lib/cell_point_api/models/fulfilled_activity.rb +207 -0
  119. data/lib/cell_point_api/models/fulfilled_airline_ancillary.rb +207 -0
  120. data/lib/cell_point_api/models/fulfilled_airline_fare.rb +207 -0
  121. data/lib/cell_point_api/models/fulfilled_auto_rental.rb +207 -0
  122. data/lib/cell_point_api/models/fulfilled_bundle.rb +207 -0
  123. data/lib/cell_point_api/models/fulfilled_discount.rb +178 -0
  124. data/lib/cell_point_api/models/fulfilled_line_item_base.rb +177 -0
  125. data/lib/cell_point_api/models/fulfilled_lodging_reservation.rb +207 -0
  126. data/lib/cell_point_api/models/fulfilled_order.rb +148 -0
  127. data/lib/cell_point_api/models/fulfilled_product.rb +207 -0
  128. data/lib/cell_point_api/models/fulfilled_tax_line.rb +162 -0
  129. data/lib/cell_point_api/models/fulfillment_data.rb +90 -0
  130. data/lib/cell_point_api/models/fulfillment_status.rb +41 -0
  131. data/lib/cell_point_api/models/funding_type.rb +40 -0
  132. data/lib/cell_point_api/models/gender.rb +40 -0
  133. data/lib/cell_point_api/models/hpp_data.rb +155 -0
  134. data/lib/cell_point_api/models/identifying_document.rb +159 -0
  135. data/lib/cell_point_api/models/identifying_document_type.rb +60 -0
  136. data/lib/cell_point_api/models/industry_data.rb +124 -0
  137. data/lib/cell_point_api/models/informational_price_row.rb +97 -0
  138. data/lib/cell_point_api/models/informational_price_section.rb +104 -0
  139. data/lib/cell_point_api/models/itinerary_type.rb +47 -0
  140. data/lib/cell_point_api/models/journey_segment.rb +83 -0
  141. data/lib/cell_point_api/models/line_item_base.rb +101 -0
  142. data/lib/cell_point_api/models/line_item_type.rb +60 -0
  143. data/lib/cell_point_api/models/links.rb +86 -0
  144. data/lib/cell_point_api/models/location.rb +153 -0
  145. data/lib/cell_point_api/models/lodging_industry_data.rb +216 -0
  146. data/lib/cell_point_api/models/lodging_reservation.rb +195 -0
  147. data/lib/cell_point_api/models/lodging_reservation_data.rb +76 -0
  148. data/lib/cell_point_api/models/loyalty_account.rb +103 -0
  149. data/lib/cell_point_api/models/network_info.rb +76 -0
  150. data/lib/cell_point_api/models/non_negative_amount.rb +105 -0
  151. data/lib/cell_point_api/models/non_positive_amount.rb +105 -0
  152. data/lib/cell_point_api/models/note.rb +139 -0
  153. data/lib/cell_point_api/models/note_request.rb +90 -0
  154. data/lib/cell_point_api/models/oauth_provider_error.rb +62 -0
  155. data/lib/cell_point_api/models/oauth_scope_cpd_issued_jwt.rb +158 -0
  156. data/lib/cell_point_api/models/oauth_token.rb +96 -0
  157. data/lib/cell_point_api/models/order.rb +414 -0
  158. data/lib/cell_point_api/models/order_canceled_reason.rb +56 -0
  159. data/lib/cell_point_api/models/order_core.rb +343 -0
  160. data/lib/cell_point_api/models/order_extended.rb +150 -0
  161. data/lib/cell_point_api/models/order_payment_summary.rb +117 -0
  162. data/lib/cell_point_api/models/order_status.rb +161 -0
  163. data/lib/cell_point_api/models/order_status_type.rb +58 -0
  164. data/lib/cell_point_api/models/order_transactions.rb +88 -0
  165. data/lib/cell_point_api/models/owner.rb +131 -0
  166. data/lib/cell_point_api/models/page_type.rb +26 -0
  167. data/lib/cell_point_api/models/passenger.rb +229 -0
  168. data/lib/cell_point_api/models/password_change_type.rb +41 -0
  169. data/lib/cell_point_api/models/pay_pal_action.rb +129 -0
  170. data/lib/cell_point_api/models/pay_pal_payment_instrument.rb +88 -0
  171. data/lib/cell_point_api/models/payment_data.rb +102 -0
  172. data/lib/cell_point_api/models/payment_data_header.rb +94 -0
  173. data/lib/cell_point_api/models/payment_data_version.rb +26 -0
  174. data/lib/cell_point_api/models/payment_field.rb +68 -0
  175. data/lib/cell_point_api/models/payment_instrument_base.rb +87 -0
  176. data/lib/cell_point_api/models/payment_method.rb +52 -0
  177. data/lib/cell_point_api/models/payment_methods_for_order_get200_response.rb +157 -0
  178. data/lib/cell_point_api/models/payment_methods_search_vouchers_post200_response.rb +82 -0
  179. data/lib/cell_point_api/models/payment_processor.rb +121 -0
  180. data/lib/cell_point_api/models/payment_status.rb +122 -0
  181. data/lib/cell_point_api/models/payment_transaction.rb +605 -0
  182. data/lib/cell_point_api/models/payment_transaction_authorized_amount.rb +105 -0
  183. data/lib/cell_point_api/models/payment_transaction_canceled_amount.rb +105 -0
  184. data/lib/cell_point_api/models/payment_transaction_captured_amount.rb +105 -0
  185. data/lib/cell_point_api/models/payment_transaction_pending_authorize_amount.rb +106 -0
  186. data/lib/cell_point_api/models/payment_transaction_pending_cancel_amount.rb +106 -0
  187. data/lib/cell_point_api/models/payment_transaction_pending_capture_amount.rb +106 -0
  188. data/lib/cell_point_api/models/payment_transaction_processing_fee.rb +106 -0
  189. data/lib/cell_point_api/models/payment_transaction_refunded_amount.rb +105 -0
  190. data/lib/cell_point_api/models/payments_v1_bulks_response.rb +74 -0
  191. data/lib/cell_point_api/models/payments_v1_orders_payments_retry_failed_refunds_request.rb +74 -0
  192. data/lib/cell_point_api/models/payments_v1_refunds_closures_request.rb +74 -0
  193. data/lib/cell_point_api/models/payments_v1_refunds_retry_failed_refunds_request.rb +74 -0
  194. data/lib/cell_point_api/models/payments_v1_schemes_response.rb +76 -0
  195. data/lib/cell_point_api/models/paypal_config.rb +94 -0
  196. data/lib/cell_point_api/models/person.rb +161 -0
  197. data/lib/cell_point_api/models/person_name.rb +89 -0
  198. data/lib/cell_point_api/models/phone.rb +132 -0
  199. data/lib/cell_point_api/models/pk_payment_method.rb +111 -0
  200. data/lib/cell_point_api/models/pk_payment_token.rb +94 -0
  201. data/lib/cell_point_api/models/postal_address.rb +217 -0
  202. data/lib/cell_point_api/models/price_summary.rb +191 -0
  203. data/lib/cell_point_api/models/product.rb +179 -0
  204. data/lib/cell_point_api/models/product_data.rb +104 -0
  205. data/lib/cell_point_api/models/property.rb +110 -0
  206. data/lib/cell_point_api/models/provider.rb +129 -0
  207. data/lib/cell_point_api/models/psp.rb +26 -0
  208. data/lib/cell_point_api/models/redirect_action.rb +116 -0
  209. data/lib/cell_point_api/models/refund_item.rb +310 -0
  210. data/lib/cell_point_api/models/refund_method.rb +36 -0
  211. data/lib/cell_point_api/models/refund_order_group_post201_response.rb +91 -0
  212. data/lib/cell_point_api/models/refund_reason.rb +104 -0
  213. data/lib/cell_point_api/models/refund_request.rb +161 -0
  214. data/lib/cell_point_api/models/refund_status.rb +44 -0
  215. data/lib/cell_point_api/models/refund_transaction.rb +311 -0
  216. data/lib/cell_point_api/models/refund_transaction_amount.rb +105 -0
  217. data/lib/cell_point_api/models/refund_type.rb +38 -0
  218. data/lib/cell_point_api/models/related_payment.rb +106 -0
  219. data/lib/cell_point_api/models/related_refund.rb +106 -0
  220. data/lib/cell_point_api/models/rental_location.rb +226 -0
  221. data/lib/cell_point_api/models/retry_refund_response.rb +73 -0
  222. data/lib/cell_point_api/models/reward.rb +101 -0
  223. data/lib/cell_point_api/models/room.rb +100 -0
  224. data/lib/cell_point_api/models/sales_channel.rb +36 -0
  225. data/lib/cell_point_api/models/save_pk_payment_token_request.rb +83 -0
  226. data/lib/cell_point_api/models/save_wallet_payment_token_request.rb +83 -0
  227. data/lib/cell_point_api/models/screen.rb +97 -0
  228. data/lib/cell_point_api/models/search_vouchers_request.rb +119 -0
  229. data/lib/cell_point_api/models/security_code.rb +83 -0
  230. data/lib/cell_point_api/models/security_code_match_status.rb +50 -0
  231. data/lib/cell_point_api/models/status.rb +43 -0
  232. data/lib/cell_point_api/models/status1.rb +52 -0
  233. data/lib/cell_point_api/models/summary.rb +82 -0
  234. data/lib/cell_point_api/models/tax.rb +134 -0
  235. data/lib/cell_point_api/models/taxes_and_fees_breakdown_page.rb +82 -0
  236. data/lib/cell_point_api/models/token_post200_response.rb +96 -0
  237. data/lib/cell_point_api/models/tokenized_card.rb +229 -0
  238. data/lib/cell_point_api/models/tokenized_card_with_contact_data.rb +247 -0
  239. data/lib/cell_point_api/models/tokenized_data.rb +169 -0
  240. data/lib/cell_point_api/models/total_row.rb +83 -0
  241. data/lib/cell_point_api/models/transaction_action.rb +108 -0
  242. data/lib/cell_point_api/models/transaction_action_result.rb +94 -0
  243. data/lib/cell_point_api/models/transaction_base.rb +132 -0
  244. data/lib/cell_point_api/models/transaction_failure.rb +222 -0
  245. data/lib/cell_point_api/models/travel_journey.rb +139 -0
  246. data/lib/cell_point_api/models/travel_leg.rb +194 -0
  247. data/lib/cell_point_api/models/trigger_bulk_request.rb +83 -0
  248. data/lib/cell_point_api/models/type.rb +67 -0
  249. data/lib/cell_point_api/models/type1.rb +47 -0
  250. data/lib/cell_point_api/models/type2.rb +40 -0
  251. data/lib/cell_point_api/models/type3.rb +41 -0
  252. data/lib/cell_point_api/models/type4.rb +56 -0
  253. data/lib/cell_point_api/models/type5.rb +78 -0
  254. data/lib/cell_point_api/models/uplift_config.rb +73 -0
  255. data/lib/cell_point_api/models/uplift_payment_instrument.rb +102 -0
  256. data/lib/cell_point_api/models/vehicle.rb +139 -0
  257. data/lib/cell_point_api/models/voucher_config.rb +92 -0
  258. data/lib/cell_point_api/models/voucher_issuer.rb +26 -0
  259. data/lib/cell_point_api/models/voucher_payment_instrument.rb +233 -0
  260. data/lib/cell_point_api/models/voucher_payment_instrument_node.rb +198 -0
  261. data/lib/cell_point_api/models/voucher_type.rb +36 -0
  262. data/lib/cell_point_api/models/wallet_instrument_wallet_node.rb +136 -0
  263. data/lib/cell_point_api/models/wallet_payment_instrument.rb +123 -0
  264. data/lib/cell_point_api/models/wallet_tokenized_token.rb +148 -0
  265. data/lib/cell_point_api/models/wallet_tokenized_token_identification.rb +75 -0
  266. data/lib/cell_point_api/models/wallet_type.rb +36 -0
  267. data/lib/cell_point_api/utilities/date_time_helper.rb +11 -0
  268. data/lib/cell_point_api/utilities/file_wrapper.rb +28 -0
  269. data/lib/cell_point_api/utilities/union_type_lookup.rb +260 -0
  270. data/lib/cell_point_api.rb +301 -0
  271. metadata +354 -0
@@ -0,0 +1,348 @@
1
+ # cell_point_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module CellPointApi
7
+ # Represents an airline fare that is part of a bundle.
8
+ class AirlineFare < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Discriminator used to identify the type of line item.
13
+ # @return [String]
14
+ attr_reader :type
15
+
16
+ # What should be shown as the title of the line item on a receipt or billing
17
+ # summary.
18
+ # @return [String]
19
+ attr_accessor :title
20
+
21
+ # AuthorizationGroup that the line item should be part of for splitting
22
+ # authorizations for Aggregate Payments Payments.
23
+ # If this is set, there must be a matching AuthorizationGroup created in the
24
+ # PriceSummary.
25
+ # > NOTE: Items within a Bundle should not have an `authorizationGroupId`,
26
+ # they will use the same `authorizationGroupId` as the top-level bundle.
27
+ # @return [String]
28
+ attr_accessor :authorization_group_id
29
+
30
+ # Stock Keeping Unit (SKU) is a product and service identification code for
31
+ # a specific product.
32
+ # @return [String]
33
+ attr_accessor :sku
34
+
35
+ # Stock Keeping Unit (SKU) is a product and service identification code for
36
+ # a specific product.
37
+ # @return [Integer]
38
+ attr_accessor :quantity
39
+
40
+ # An amount that is a nonnegative number, i.e. {0, 1, 2, 3, 4, 5,…}
41
+ # @return [NonNegativeAmount]
42
+ attr_accessor :unit_price
43
+
44
+ # Total Price for the line item. Should be equal to `unitPrice` *
45
+ # `quantity`, if `unitPrice` is specified.
46
+ # @return [NonNegativeAmount]
47
+ attr_accessor :total_price
48
+
49
+ # Passenger Name Record.
50
+ # MUST match a PNR in `IndustryData.AirlineData`.
51
+ # @return [String]
52
+ attr_accessor :pnr
53
+
54
+ # Passenger Name Record.
55
+ # MUST match a PNR in `IndustryData.AirlineData`.
56
+ # @return [String]
57
+ attr_accessor :carrier_name
58
+
59
+ # Passenger Name Record.
60
+ # MUST match a PNR in `IndustryData.AirlineData`.
61
+ # @return [Array[String]]
62
+ attr_accessor :passenger_ids
63
+
64
+ # Passenger Name Record.
65
+ # MUST match a PNR in `IndustryData.AirlineData`.
66
+ # @return [Array[String]]
67
+ attr_accessor :fare_basis_codes
68
+
69
+ # Type of itinerary being booked for travel.
70
+ # <table>
71
+ # <thead>
72
+ # <tr>
73
+ # <th>Itinerary Type</th>
74
+ # <th>Description</th>
75
+ # </tr>
76
+ # </thead>
77
+ # <tbody>
78
+ # <tr>
79
+ # <td>ONE_WAY</td>
80
+ # <td>Only a single journey is being taken, with no return journey
81
+ # booked.</td>
82
+ # </tr>
83
+ # <tr>
84
+ # <td>ROUND_TRIP</td>
85
+ # <td>Two journeys are being booked, one outbound and one inbound. Final
86
+ # inbound journey will be returning to where the traveler started.</td>
87
+ # </tr>
88
+ # <tr>
89
+ # <td>MULTI_CITY</td>
90
+ # <td>Multiple journeys are being booked at once between various
91
+ # cities.</td>
92
+ # </tr>
93
+ # </tbody>
94
+ # </table>
95
+ # @return [ItineraryType]
96
+ attr_accessor :itinerary_type
97
+
98
+ # Segment of the journey.
99
+ # Given an the following `ItineraryType`, here are the example
100
+ # JourneySegment to use:
101
+ # <table>
102
+ # <thead>
103
+ # <tr>
104
+ # <th>Itinerary Type</th>
105
+ # <th>Journey Segment</th>
106
+ # <th>Description</th>
107
+ # </tr>
108
+ # </thead>
109
+ # <tbody>
110
+ # <tr>
111
+ # <td>ONE_WAY</td>
112
+ # <td>OUTBOUND</td>
113
+ # <td>Single Journey</td>
114
+ # </tr>
115
+ # <tr>
116
+ # <td>ROUND_TRIP</td>
117
+ # <td>OUTBOUND</td>
118
+ # <td>First Journey, leaving.</td>
119
+ # </tr>
120
+ # <tr>
121
+ # <td>ROUND_TRIP</td>
122
+ # <td>INBOUND</td>
123
+ # <td>Second Journey, returning.</td>
124
+ # </tr>
125
+ # <tr>
126
+ # <td>MULTI_CITY</td>
127
+ # <td>MULTI_CITY_1</td>
128
+ # <td>First Journey </td>
129
+ # </tr>
130
+ # <tr>
131
+ # <td>MULTI_CITY</td>
132
+ # <td>MULTI_CITY_2</td>
133
+ # <td>Second Journey </td>
134
+ # </tr>
135
+ # <tr>
136
+ # <td>MULTI_CITY</td>
137
+ # <td>MULTI_CITY_3</td>
138
+ # <td>Third Journey </td>
139
+ # </tr>
140
+ # </tbody>
141
+ # </table>
142
+ # @return [JourneySegment]
143
+ attr_accessor :journey_segment
144
+
145
+ # Passenger type code (PTC). IATA PTC values are 3-letter alphabetical.
146
+ # Example: ADT, SRC, CNN, INS.
147
+ # Commonly used codes include (but definitely not limited to):
148
+ # - `ADT`: Adult
149
+ # - `CNN`: Child
150
+ # - `INF`: Infant without a seat
151
+ # - `INS`: Infant with a seat
152
+ # - `SRC`: Senior Citizen
153
+ # However, several carriers use non-standard codes that can be up to 5
154
+ # alphanumeric characters.
155
+ # @return [String]
156
+ attr_accessor :passenger_type_code
157
+
158
+ # A mapping from model property names to API property names.
159
+ def self.names
160
+ @_hash = {} if @_hash.nil?
161
+ @_hash['type'] = 'type'
162
+ @_hash['title'] = 'title'
163
+ @_hash['authorization_group_id'] = 'authorizationGroupId'
164
+ @_hash['sku'] = 'sku'
165
+ @_hash['quantity'] = 'quantity'
166
+ @_hash['unit_price'] = 'unitPrice'
167
+ @_hash['total_price'] = 'totalPrice'
168
+ @_hash['pnr'] = 'pnr'
169
+ @_hash['carrier_name'] = 'carrierName'
170
+ @_hash['passenger_ids'] = 'passengerIds'
171
+ @_hash['fare_basis_codes'] = 'fareBasisCodes'
172
+ @_hash['itinerary_type'] = 'itineraryType'
173
+ @_hash['journey_segment'] = 'journeySegment'
174
+ @_hash['passenger_type_code'] = 'passengerTypeCode'
175
+ @_hash
176
+ end
177
+
178
+ # An array for optional fields
179
+ def self.optionals
180
+ %w[
181
+ authorization_group_id
182
+ passenger_ids
183
+ journey_segment
184
+ passenger_type_code
185
+ ]
186
+ end
187
+
188
+ # An array for nullable fields
189
+ def self.nullables
190
+ []
191
+ end
192
+
193
+ def initialize(title:, sku:, quantity: 1, unit_price:, total_price:, pnr:,
194
+ carrier_name:, fare_basis_codes:, itinerary_type:,
195
+ authorization_group_id: SKIP, passenger_ids: SKIP,
196
+ journey_segment: SKIP, passenger_type_code: SKIP,
197
+ additional_properties: nil)
198
+ # Add additional model properties to the instance
199
+ additional_properties = {} if additional_properties.nil?
200
+
201
+ @type = 'AIRLINE_FARE'
202
+ @title = title
203
+ @authorization_group_id = authorization_group_id unless authorization_group_id == SKIP
204
+ @sku = sku
205
+ @quantity = quantity
206
+ @unit_price = unit_price
207
+ @total_price = total_price
208
+ @pnr = pnr
209
+ @carrier_name = carrier_name
210
+ @passenger_ids = passenger_ids unless passenger_ids == SKIP
211
+ @fare_basis_codes = fare_basis_codes
212
+ @itinerary_type = itinerary_type
213
+ @journey_segment = journey_segment unless journey_segment == SKIP
214
+ @passenger_type_code = passenger_type_code unless passenger_type_code == SKIP
215
+ @additional_properties = additional_properties
216
+ end
217
+
218
+ # Creates an instance of the object from a hash.
219
+ def self.from_hash(hash)
220
+ return nil unless hash
221
+
222
+ # Extract variables from the hash.
223
+ title = hash.key?('title') ? hash['title'] : nil
224
+ sku = hash.key?('sku') ? hash['sku'] : nil
225
+ quantity = hash['quantity'] ||= 1
226
+ unit_price = NonNegativeAmount.from_hash(hash['unitPrice']) if hash['unitPrice']
227
+ total_price = NonNegativeAmount.from_hash(hash['totalPrice']) if hash['totalPrice']
228
+ pnr = hash.key?('pnr') ? hash['pnr'] : nil
229
+ carrier_name = hash.key?('carrierName') ? hash['carrierName'] : nil
230
+ fare_basis_codes =
231
+ hash.key?('fareBasisCodes') ? hash['fareBasisCodes'] : nil
232
+ itinerary_type = hash.key?('itineraryType') ? hash['itineraryType'] : nil
233
+ authorization_group_id =
234
+ hash.key?('authorizationGroupId') ? hash['authorizationGroupId'] : SKIP
235
+ passenger_ids = hash.key?('passengerIds') ? hash['passengerIds'] : SKIP
236
+ journey_segment =
237
+ hash.key?('journeySegment') ? hash['journeySegment'] : SKIP
238
+ passenger_type_code =
239
+ hash.key?('passengerTypeCode') ? hash['passengerTypeCode'] : SKIP
240
+
241
+ # Create a new hash for additional properties, removing known properties.
242
+ new_hash = hash.reject { |k, _| names.value?(k) }
243
+
244
+ additional_properties = APIHelper.get_additional_properties(
245
+ new_hash, proc { |value| value }
246
+ )
247
+
248
+ # Create object from extracted values.
249
+ AirlineFare.new(title: title,
250
+ sku: sku,
251
+ quantity: quantity,
252
+ unit_price: unit_price,
253
+ total_price: total_price,
254
+ pnr: pnr,
255
+ carrier_name: carrier_name,
256
+ fare_basis_codes: fare_basis_codes,
257
+ itinerary_type: itinerary_type,
258
+ authorization_group_id: authorization_group_id,
259
+ passenger_ids: passenger_ids,
260
+ journey_segment: journey_segment,
261
+ passenger_type_code: passenger_type_code,
262
+ additional_properties: additional_properties)
263
+ end
264
+
265
+ # Validates an instance of the object from a given value.
266
+ # @param [AirlineFare | Hash] The value against the validation is performed.
267
+ def self.validate(value)
268
+ if value.instance_of? self
269
+ return (
270
+ APIHelper.valid_type?(value.type,
271
+ ->(val) { val.instance_of? String }) and
272
+ APIHelper.valid_type?(value.title,
273
+ ->(val) { val.instance_of? String }) and
274
+ APIHelper.valid_type?(value.sku,
275
+ ->(val) { val.instance_of? String }) and
276
+ APIHelper.valid_type?(value.quantity,
277
+ ->(val) { val.instance_of? Integer }) and
278
+ APIHelper.valid_type?(value.unit_price,
279
+ ->(val) { NonNegativeAmount.validate(val) },
280
+ is_model_hash: true) and
281
+ APIHelper.valid_type?(value.total_price,
282
+ ->(val) { NonNegativeAmount.validate(val) },
283
+ is_model_hash: true) and
284
+ APIHelper.valid_type?(value.pnr,
285
+ ->(val) { val.instance_of? String }) and
286
+ APIHelper.valid_type?(value.carrier_name,
287
+ ->(val) { val.instance_of? String }) and
288
+ APIHelper.valid_type?(value.fare_basis_codes,
289
+ ->(val) { val.instance_of? String }) and
290
+ APIHelper.valid_type?(value.itinerary_type,
291
+ ->(val) { ItineraryType.validate(val) })
292
+ )
293
+ end
294
+
295
+ return false unless value.instance_of? Hash
296
+
297
+ (
298
+ APIHelper.valid_type?(value['type'],
299
+ ->(val) { val.instance_of? String }) and
300
+ APIHelper.valid_type?(value['title'],
301
+ ->(val) { val.instance_of? String }) and
302
+ APIHelper.valid_type?(value['sku'],
303
+ ->(val) { val.instance_of? String }) and
304
+ APIHelper.valid_type?(value['quantity'],
305
+ ->(val) { val.instance_of? Integer }) and
306
+ APIHelper.valid_type?(value['unitPrice'],
307
+ ->(val) { NonNegativeAmount.validate(val) },
308
+ is_model_hash: true) and
309
+ APIHelper.valid_type?(value['totalPrice'],
310
+ ->(val) { NonNegativeAmount.validate(val) },
311
+ is_model_hash: true) and
312
+ APIHelper.valid_type?(value['pnr'],
313
+ ->(val) { val.instance_of? String }) and
314
+ APIHelper.valid_type?(value['carrierName'],
315
+ ->(val) { val.instance_of? String }) and
316
+ APIHelper.valid_type?(value['fareBasisCodes'],
317
+ ->(val) { val.instance_of? String }) and
318
+ APIHelper.valid_type?(value['itineraryType'],
319
+ ->(val) { ItineraryType.validate(val) })
320
+ )
321
+ end
322
+
323
+ # Provides a human-readable string representation of the object.
324
+ def to_s
325
+ class_name = self.class.name.split('::').last
326
+ "<#{class_name} type: #{@type}, title: #{@title}, authorization_group_id:"\
327
+ " #{@authorization_group_id}, sku: #{@sku}, quantity: #{@quantity}, unit_price:"\
328
+ " #{@unit_price}, total_price: #{@total_price}, pnr: #{@pnr}, carrier_name:"\
329
+ " #{@carrier_name}, passenger_ids: #{@passenger_ids}, fare_basis_codes:"\
330
+ " #{@fare_basis_codes}, itinerary_type: #{@itinerary_type}, journey_segment:"\
331
+ " #{@journey_segment}, passenger_type_code: #{@passenger_type_code}, additional_properties:"\
332
+ " #{@additional_properties}>"
333
+ end
334
+
335
+ # Provides a debugging-friendly string with detailed object information.
336
+ def inspect
337
+ class_name = self.class.name.split('::').last
338
+ "<#{class_name} type: #{@type.inspect}, title: #{@title.inspect}, authorization_group_id:"\
339
+ " #{@authorization_group_id.inspect}, sku: #{@sku.inspect}, quantity: #{@quantity.inspect},"\
340
+ " unit_price: #{@unit_price.inspect}, total_price: #{@total_price.inspect}, pnr:"\
341
+ " #{@pnr.inspect}, carrier_name: #{@carrier_name.inspect}, passenger_ids:"\
342
+ " #{@passenger_ids.inspect}, fare_basis_codes: #{@fare_basis_codes.inspect}, itinerary_type:"\
343
+ " #{@itinerary_type.inspect}, journey_segment: #{@journey_segment.inspect},"\
344
+ " passenger_type_code: #{@passenger_type_code.inspect}, additional_properties:"\
345
+ " #{@additional_properties}>"
346
+ end
347
+ end
348
+ end
@@ -0,0 +1,217 @@
1
+ # cell_point_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module CellPointApi
7
+ # Airline specific data.
8
+ class AirlineFareData < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Passenger Name Record.
13
+ # MUST match a PNR in `IndustryData.AirlineData`.
14
+ # @return [String]
15
+ attr_accessor :pnr
16
+
17
+ # Passenger Name Record.
18
+ # MUST match a PNR in `IndustryData.AirlineData`.
19
+ # @return [String]
20
+ attr_accessor :carrier_name
21
+
22
+ # Passenger Name Record.
23
+ # MUST match a PNR in `IndustryData.AirlineData`.
24
+ # @return [Array[String]]
25
+ attr_accessor :passenger_ids
26
+
27
+ # Passenger Name Record.
28
+ # MUST match a PNR in `IndustryData.AirlineData`.
29
+ # @return [Array[String]]
30
+ attr_accessor :fare_basis_codes
31
+
32
+ # Type of itinerary being booked for travel.
33
+ # <table>
34
+ # <thead>
35
+ # <tr>
36
+ # <th>Itinerary Type</th>
37
+ # <th>Description</th>
38
+ # </tr>
39
+ # </thead>
40
+ # <tbody>
41
+ # <tr>
42
+ # <td>ONE_WAY</td>
43
+ # <td>Only a single journey is being taken, with no return journey
44
+ # booked.</td>
45
+ # </tr>
46
+ # <tr>
47
+ # <td>ROUND_TRIP</td>
48
+ # <td>Two journeys are being booked, one outbound and one inbound. Final
49
+ # inbound journey will be returning to where the traveler started.</td>
50
+ # </tr>
51
+ # <tr>
52
+ # <td>MULTI_CITY</td>
53
+ # <td>Multiple journeys are being booked at once between various
54
+ # cities.</td>
55
+ # </tr>
56
+ # </tbody>
57
+ # </table>
58
+ # @return [ItineraryType]
59
+ attr_accessor :itinerary_type
60
+
61
+ # Segment of the journey.
62
+ # Given an the following `ItineraryType`, here are the example
63
+ # JourneySegment to use:
64
+ # <table>
65
+ # <thead>
66
+ # <tr>
67
+ # <th>Itinerary Type</th>
68
+ # <th>Journey Segment</th>
69
+ # <th>Description</th>
70
+ # </tr>
71
+ # </thead>
72
+ # <tbody>
73
+ # <tr>
74
+ # <td>ONE_WAY</td>
75
+ # <td>OUTBOUND</td>
76
+ # <td>Single Journey</td>
77
+ # </tr>
78
+ # <tr>
79
+ # <td>ROUND_TRIP</td>
80
+ # <td>OUTBOUND</td>
81
+ # <td>First Journey, leaving.</td>
82
+ # </tr>
83
+ # <tr>
84
+ # <td>ROUND_TRIP</td>
85
+ # <td>INBOUND</td>
86
+ # <td>Second Journey, returning.</td>
87
+ # </tr>
88
+ # <tr>
89
+ # <td>MULTI_CITY</td>
90
+ # <td>MULTI_CITY_1</td>
91
+ # <td>First Journey </td>
92
+ # </tr>
93
+ # <tr>
94
+ # <td>MULTI_CITY</td>
95
+ # <td>MULTI_CITY_2</td>
96
+ # <td>Second Journey </td>
97
+ # </tr>
98
+ # <tr>
99
+ # <td>MULTI_CITY</td>
100
+ # <td>MULTI_CITY_3</td>
101
+ # <td>Third Journey </td>
102
+ # </tr>
103
+ # </tbody>
104
+ # </table>
105
+ # @return [JourneySegment]
106
+ attr_accessor :journey_segment
107
+
108
+ # Passenger type code (PTC). IATA PTC values are 3-letter alphabetical.
109
+ # Example: ADT, SRC, CNN, INS.
110
+ # Commonly used codes include (but definitely not limited to):
111
+ # - `ADT`: Adult
112
+ # - `CNN`: Child
113
+ # - `INF`: Infant without a seat
114
+ # - `INS`: Infant with a seat
115
+ # - `SRC`: Senior Citizen
116
+ # However, several carriers use non-standard codes that can be up to 5
117
+ # alphanumeric characters.
118
+ # @return [String]
119
+ attr_accessor :passenger_type_code
120
+
121
+ # A mapping from model property names to API property names.
122
+ def self.names
123
+ @_hash = {} if @_hash.nil?
124
+ @_hash['pnr'] = 'pnr'
125
+ @_hash['carrier_name'] = 'carrierName'
126
+ @_hash['passenger_ids'] = 'passengerIds'
127
+ @_hash['fare_basis_codes'] = 'fareBasisCodes'
128
+ @_hash['itinerary_type'] = 'itineraryType'
129
+ @_hash['journey_segment'] = 'journeySegment'
130
+ @_hash['passenger_type_code'] = 'passengerTypeCode'
131
+ @_hash
132
+ end
133
+
134
+ # An array for optional fields
135
+ def self.optionals
136
+ %w[
137
+ passenger_ids
138
+ journey_segment
139
+ passenger_type_code
140
+ ]
141
+ end
142
+
143
+ # An array for nullable fields
144
+ def self.nullables
145
+ []
146
+ end
147
+
148
+ def initialize(pnr:, carrier_name:, fare_basis_codes:, itinerary_type:,
149
+ passenger_ids: SKIP, journey_segment: SKIP,
150
+ passenger_type_code: SKIP, additional_properties: nil)
151
+ # Add additional model properties to the instance
152
+ additional_properties = {} if additional_properties.nil?
153
+
154
+ @pnr = pnr
155
+ @carrier_name = carrier_name
156
+ @passenger_ids = passenger_ids unless passenger_ids == SKIP
157
+ @fare_basis_codes = fare_basis_codes
158
+ @itinerary_type = itinerary_type
159
+ @journey_segment = journey_segment unless journey_segment == SKIP
160
+ @passenger_type_code = passenger_type_code unless passenger_type_code == SKIP
161
+ @additional_properties = additional_properties
162
+ end
163
+
164
+ # Creates an instance of the object from a hash.
165
+ def self.from_hash(hash)
166
+ return nil unless hash
167
+
168
+ # Extract variables from the hash.
169
+ pnr = hash.key?('pnr') ? hash['pnr'] : nil
170
+ carrier_name = hash.key?('carrierName') ? hash['carrierName'] : nil
171
+ fare_basis_codes =
172
+ hash.key?('fareBasisCodes') ? hash['fareBasisCodes'] : nil
173
+ itinerary_type = hash.key?('itineraryType') ? hash['itineraryType'] : nil
174
+ passenger_ids = hash.key?('passengerIds') ? hash['passengerIds'] : SKIP
175
+ journey_segment =
176
+ hash.key?('journeySegment') ? hash['journeySegment'] : SKIP
177
+ passenger_type_code =
178
+ hash.key?('passengerTypeCode') ? hash['passengerTypeCode'] : SKIP
179
+
180
+ # Create a new hash for additional properties, removing known properties.
181
+ new_hash = hash.reject { |k, _| names.value?(k) }
182
+
183
+ additional_properties = APIHelper.get_additional_properties(
184
+ new_hash, proc { |value| value }
185
+ )
186
+
187
+ # Create object from extracted values.
188
+ AirlineFareData.new(pnr: pnr,
189
+ carrier_name: carrier_name,
190
+ fare_basis_codes: fare_basis_codes,
191
+ itinerary_type: itinerary_type,
192
+ passenger_ids: passenger_ids,
193
+ journey_segment: journey_segment,
194
+ passenger_type_code: passenger_type_code,
195
+ additional_properties: additional_properties)
196
+ end
197
+
198
+ # Provides a human-readable string representation of the object.
199
+ def to_s
200
+ class_name = self.class.name.split('::').last
201
+ "<#{class_name} pnr: #{@pnr}, carrier_name: #{@carrier_name}, passenger_ids:"\
202
+ " #{@passenger_ids}, fare_basis_codes: #{@fare_basis_codes}, itinerary_type:"\
203
+ " #{@itinerary_type}, journey_segment: #{@journey_segment}, passenger_type_code:"\
204
+ " #{@passenger_type_code}, additional_properties: #{@additional_properties}>"
205
+ end
206
+
207
+ # Provides a debugging-friendly string with detailed object information.
208
+ def inspect
209
+ class_name = self.class.name.split('::').last
210
+ "<#{class_name} pnr: #{@pnr.inspect}, carrier_name: #{@carrier_name.inspect},"\
211
+ " passenger_ids: #{@passenger_ids.inspect}, fare_basis_codes: #{@fare_basis_codes.inspect},"\
212
+ " itinerary_type: #{@itinerary_type.inspect}, journey_segment: #{@journey_segment.inspect},"\
213
+ " passenger_type_code: #{@passenger_type_code.inspect}, additional_properties:"\
214
+ " #{@additional_properties}>"
215
+ end
216
+ end
217
+ end