cybersource_rest_client 0.0.80 → 0.0.81

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 (152) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb +17 -7
  3. data/lib/AuthenticationSDK/core/Authorization.rb +2 -2
  4. data/lib/AuthenticationSDK/core/MerchantConfig.rb +277 -23
  5. data/lib/AuthenticationSDK/util/Cache.rb +144 -8
  6. data/lib/AuthenticationSDK/util/CachedMLEKId.rb +17 -0
  7. data/lib/AuthenticationSDK/util/CertificateUtility.rb +109 -29
  8. data/lib/AuthenticationSDK/util/Constants.rb +4 -0
  9. data/lib/AuthenticationSDK/util/MLEUtility.rb +167 -11
  10. data/lib/AuthenticationSDK/util/Utility.rb +37 -1
  11. data/lib/cybersource_rest_client/api/bank_account_validation_api.rb +6 -2
  12. data/lib/cybersource_rest_client/api/batches_api.rb +24 -8
  13. data/lib/cybersource_rest_client/api/billing_agreements_api.rb +18 -6
  14. data/lib/cybersource_rest_client/api/bin_lookup_api.rb +6 -2
  15. data/lib/cybersource_rest_client/api/capture_api.rb +6 -2
  16. data/lib/cybersource_rest_client/api/chargeback_details_api.rb +6 -2
  17. data/lib/cybersource_rest_client/api/chargeback_summaries_api.rb +6 -2
  18. data/lib/cybersource_rest_client/api/conversion_details_api.rb +6 -2
  19. data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +18 -6
  20. data/lib/cybersource_rest_client/api/credit_api.rb +6 -2
  21. data/lib/cybersource_rest_client/api/customer_api.rb +24 -8
  22. data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +30 -10
  23. data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +30 -10
  24. data/lib/cybersource_rest_client/api/decision_manager_api.rb +30 -10
  25. data/lib/cybersource_rest_client/api/device_de_association_api.rb +12 -4
  26. data/lib/cybersource_rest_client/api/device_search_api.rb +12 -4
  27. data/lib/cybersource_rest_client/api/download_dtd_api.rb +6 -2
  28. data/lib/cybersource_rest_client/api/download_xsd_api.rb +6 -2
  29. data/lib/cybersource_rest_client/api/emv_tag_details_api.rb +12 -4
  30. data/lib/cybersource_rest_client/api/enrollment_api.rb +104 -0
  31. data/lib/cybersource_rest_client/api/flex_api_api.rb +6 -2
  32. data/lib/cybersource_rest_client/api/instructions_api.rb +452 -0
  33. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +36 -12
  34. data/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb +6 -2
  35. data/lib/cybersource_rest_client/api/invoice_settings_api.rb +12 -4
  36. data/lib/cybersource_rest_client/api/invoices_api.rb +42 -14
  37. data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +42 -14
  38. data/lib/cybersource_rest_client/api/merchant_boarding_api.rb +12 -4
  39. data/lib/cybersource_rest_client/api/merchant_defined_fields_api.rb +24 -8
  40. data/lib/cybersource_rest_client/api/microform_integration_api.rb +6 -2
  41. data/lib/cybersource_rest_client/api/net_fundings_api.rb +6 -2
  42. data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +6 -2
  43. data/lib/cybersource_rest_client/api/offers_api.rb +12 -4
  44. data/lib/cybersource_rest_client/api/orders_api.rb +12 -4
  45. data/lib/cybersource_rest_client/api/payer_authentication_api.rb +18 -6
  46. data/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +6 -2
  47. data/lib/cybersource_rest_client/api/payment_instrument_api.rb +24 -8
  48. data/lib/cybersource_rest_client/api/payment_links_api.rb +24 -8
  49. data/lib/cybersource_rest_client/api/payment_tokens_api.rb +6 -2
  50. data/lib/cybersource_rest_client/api/payments_api.rb +36 -12
  51. data/lib/cybersource_rest_client/api/payouts_api.rb +6 -2
  52. data/lib/cybersource_rest_client/api/plans_api.rb +48 -16
  53. data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +6 -2
  54. data/lib/cybersource_rest_client/api/push_funds_api.rb +6 -2
  55. data/lib/cybersource_rest_client/api/refund_api.rb +12 -4
  56. data/lib/cybersource_rest_client/api/report_definitions_api.rb +12 -4
  57. data/lib/cybersource_rest_client/api/report_downloads_api.rb +6 -2
  58. data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +30 -10
  59. data/lib/cybersource_rest_client/api/reports_api.rb +18 -6
  60. data/lib/cybersource_rest_client/api/retrieval_details_api.rb +6 -2
  61. data/lib/cybersource_rest_client/api/retrieval_summaries_api.rb +6 -2
  62. data/lib/cybersource_rest_client/api/reversal_api.rb +12 -4
  63. data/lib/cybersource_rest_client/api/search_transactions_api.rb +12 -4
  64. data/lib/cybersource_rest_client/api/secure_file_share_api.rb +12 -4
  65. data/lib/cybersource_rest_client/api/subscriptions_api.rb +48 -16
  66. data/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb +12 -4
  67. data/lib/cybersource_rest_client/api/taxes_api.rb +12 -4
  68. data/lib/cybersource_rest_client/api/token_api.rb +12 -4
  69. data/lib/cybersource_rest_client/api/tokenize_api.rb +6 -2
  70. data/lib/cybersource_rest_client/api/tokenized_card_api.rb +24 -8
  71. data/lib/cybersource_rest_client/api/transaction_batches_api.rb +24 -8
  72. data/lib/cybersource_rest_client/api/transaction_details_api.rb +6 -2
  73. data/lib/cybersource_rest_client/api/transient_token_data_api.rb +12 -4
  74. data/lib/cybersource_rest_client/api/unified_checkout_capture_context_api.rb +6 -2
  75. data/lib/cybersource_rest_client/api/user_management_api.rb +6 -2
  76. data/lib/cybersource_rest_client/api/user_management_search_api.rb +6 -2
  77. data/lib/cybersource_rest_client/api/verification_api.rb +12 -4
  78. data/lib/cybersource_rest_client/api/void_api.rb +30 -10
  79. data/lib/cybersource_rest_client/api_client.rb +20 -3
  80. data/lib/cybersource_rest_client/models/acpv1instructions_decline_threshold.rb +232 -0
  81. data/lib/cybersource_rest_client/models/acpv1instructions_mandates.rb +405 -0
  82. data/lib/cybersource_rest_client/models/acpv1instructions_recurring_payment_information.rb +191 -0
  83. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconf_processor_info_payment_instrument_verifi_results.rb +213 -0
  84. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_confirmation_data.rb +229 -0
  85. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_merchant_information.rb +258 -0
  86. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_order_information.rb +377 -0
  87. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_order_information_shipping_details.rb +206 -0
  88. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb +425 -0
  89. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information_payment_instrument.rb +190 -0
  90. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_attachments.rb +258 -0
  91. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_client_reference_information.rb +215 -0
  92. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_mandate_reference_data.rb +205 -0
  93. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_merchant_information.rb +334 -0
  94. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_merchant_information_merchant_descriptor.rb +250 -0
  95. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information.rb +228 -0
  96. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_amount_detail.rb +354 -0
  97. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_items.rb +367 -0
  98. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_items_additional_info.rb +231 -0
  99. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_items_policies.rb +346 -0
  100. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_line_items.rb +190 -0
  101. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_ship_to.rb +686 -0
  102. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_payment_options.rb +217 -0
  103. data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb +348 -0
  104. data/lib/cybersource_rest_client/models/acpv1tokens_assurance_data.rb +313 -0
  105. data/lib/cybersource_rest_client/models/acpv1tokens_authenticated_identities.rb +237 -0
  106. data/lib/cybersource_rest_client/models/acpv1tokens_authentication_context.rb +191 -0
  107. data/lib/cybersource_rest_client/models/acpv1tokens_bill_to.rb +400 -0
  108. data/lib/cybersource_rest_client/models/acpv1tokens_buyer_information.rb +229 -0
  109. data/lib/cybersource_rest_client/models/acpv1tokens_buyer_information_personal_identification.rb +212 -0
  110. data/lib/cybersource_rest_client/models/acpv1tokens_consent_data.rb +297 -0
  111. data/lib/cybersource_rest_client/models/acpv1tokens_consumer_identity.rb +268 -0
  112. data/lib/cybersource_rest_client/models/acpv1tokens_device_information.rb +378 -0
  113. data/lib/cybersource_rest_client/models/acpv1tokens_device_information_device_data.rb +302 -0
  114. data/lib/cybersource_rest_client/models/acpv1tokens_enrollment_reference_data.rb +207 -0
  115. data/lib/cybersource_rest_client/models/acpv1tokens_payment_information.rb +215 -0
  116. data/lib/cybersource_rest_client/models/acpv1tokens_payment_information_customer.rb +197 -0
  117. data/lib/cybersource_rest_client/models/acpv1tokens_payment_information_instrument_identifier.rb +206 -0
  118. data/lib/cybersource_rest_client/models/acpv1tokens_payment_information_payment_instrument.rb +197 -0
  119. data/lib/cybersource_rest_client/models/agentic_cancel_purchase_intent_request.rb +257 -0
  120. data/lib/cybersource_rest_client/models/agentic_card_enrollment_bad_request_response400.rb +189 -0
  121. data/lib/cybersource_rest_client/models/agentic_card_enrollment_bad_request_response400_error.rb +238 -0
  122. data/lib/cybersource_rest_client/models/agentic_card_enrollment_bad_request_response400_error_detail.rb +224 -0
  123. data/lib/cybersource_rest_client/models/agentic_card_enrollment_request.rb +325 -0
  124. data/lib/cybersource_rest_client/models/agentic_card_enrollment_response200.rb +206 -0
  125. data/lib/cybersource_rest_client/models/agentic_card_enrollment_response202.rb +219 -0
  126. data/lib/cybersource_rest_client/models/agentic_confirm_transaction_events_request.rb +247 -0
  127. data/lib/cybersource_rest_client/models/agentic_confirm_transaction_events_response202.rb +195 -0
  128. data/lib/cybersource_rest_client/models/agentic_create_purchase_intent_request.rb +327 -0
  129. data/lib/cybersource_rest_client/models/agentic_create_purchase_intent_response200.rb +222 -0
  130. data/lib/cybersource_rest_client/models/agentic_pending_purchase_intent_response202.rb +241 -0
  131. data/lib/cybersource_rest_client/models/agentic_retrieve_payment_credentials_request.rb +247 -0
  132. data/lib/cybersource_rest_client/models/agentic_retrieve_payment_credentials_response200.rb +200 -0
  133. data/lib/cybersource_rest_client/models/agentic_retrieve_payment_credentials_response200_transaction_response_complete.rb +244 -0
  134. data/lib/cybersource_rest_client/models/agentic_retrieve_payment_credentials_response200_transaction_response_with_pending_events.rb +235 -0
  135. data/lib/cybersource_rest_client/models/agentic_update_purchase_intent_request.rb +315 -0
  136. data/lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information.rb +36 -1
  137. data/lib/cybersource_rest_client/models/boardingv1registrations_organization_information_business_information_localized_names.rb +254 -0
  138. data/lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_ancillary_information.rb +22 -5
  139. data/lib/cybersource_rest_client/models/ptsv2payments_travel_information_transit_airline_ancillary_information_service.rb +39 -5
  140. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information.rb +246 -0
  141. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information_transit.rb +189 -0
  142. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information_transit_airline.rb +889 -0
  143. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information_transit_airline_ancillary_information.rb +259 -0
  144. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_travel_information_transit_airline_ancillary_information_service.rb +213 -0
  145. data/lib/cybersource_rest_client/models/refund_capture_request.rb +1 -1
  146. data/lib/cybersource_rest_client/models/refund_payment_request.rb +1 -1
  147. data/lib/cybersource_rest_client/models/upv1capturecontexts_data.rb +4 -2
  148. data/lib/cybersource_rest_client/models/upv1capturecontexts_data_merchant_defined_information.rb +3 -2
  149. data/lib/cybersource_rest_client/utilities/jwe_utility.rb +1 -1
  150. data/lib/cybersource_rest_client.rb +64 -0
  151. metadata +68 -3
  152. /data/lib/AuthenticationSDK/util/{JWEUtility.rb → AuthJWEUtility.rb} +0 -0
@@ -0,0 +1,889 @@
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.38
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module CyberSource
15
+ class Ptsv2paymentsidrefundsTravelInformationTransitAirline
16
+ # Specifies if the flight is: Domestic (01) International (02) If Y then 01 else 02
17
+ attr_accessor :is_domestic
18
+
19
+ # Reference number for the airline booking. Required if ticket numbers are not issued.
20
+ attr_accessor :booking_reference_number
21
+
22
+ # Airline that generated the ticket. Format: English characters only. Optional request field.
23
+ attr_accessor :carrier_name
24
+
25
+ attr_accessor :ticket_issuer
26
+
27
+ # Ticket number. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field.
28
+ attr_accessor :ticket_number
29
+
30
+ # Check digit for the ticket number. CyberSource recommends that you validate the check digit. With Discover and Diners Club, a valid ticket number has these characteristics: - The value is numeric. - The first three digits are a valid IATA2 license plate carrier code. - The last digit is a check digit or zero (0). - All remaining digits are nonzero.
31
+ attr_accessor :check_digit
32
+
33
+ # Flag that indicates whether or not the ticket is restricted (nonrefundable). Possible values: - 0: No restriction (refundable) - 1: Restricted (nonrefundable) Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field.
34
+ attr_accessor :restricted_ticket_indicator
35
+
36
+ # Type of charge. Possible values: - 01: Charge is for an airline ticket - 02: Charge is for an item that is not an airline ticket
37
+ attr_accessor :transaction_type
38
+
39
+ # The field is not currently supported.
40
+ attr_accessor :extended_payment_code
41
+
42
+ # Name of the passenger to whom the ticket was issued. This will always be a single passenger's name. If there are more than one passengers, provide only the primary passenger's name. Do not include special characters such as commas, hyphens, or apostrophes. Only ASCII characters are supported. Format: English characters only. Optional request field.
43
+ attr_accessor :passenger_name
44
+
45
+ # Reference number or code that identifies the cardholder. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field.
46
+ attr_accessor :customer_code
47
+
48
+ # Airline document type code that specifies the purpose of the transaction. Format: English characters only. Optional request field. | Code | Description | | --- | --- | | 01 | Passenger ticket | | 02 | Additional collection | | 03 | Excess baggage | | 04 | Miscellaneous charge order (MCO) or prepaid ticket authorization | | 05 | Special service ticket | | 06 | Supported refund | | 07 | Unsupported refund | | 08 | Lost ticket application | | 09 | Tour order voucher | | 10 | Ticket by mail | | 11 | Undercharge adjustment | | 12 | Group ticket | | 13 | Exchange adjustment | | 14 | SPD or air freight | | 15 | In-flight adjustment | | 16 | Agency passenger ticket | | 17 | Agency tour order or voucher | | 18 | Agency miscellaneous charge order (MCO) | | 19 | Agency exchange order | | 20 | Agency group ticket | | 21 | Debit adjustment for duplicate refund or use | | 22 | In-flight merchandise order | | 23 | Catalogue merchandise order | | 24 | In-flight phone charges | | 25 | Frequent flyer fee or purchase | | 26 | Kennel charge | | 27 | Animal transportation charge | | 28 | Firearms case | | 29 | Upgrade charge | | 30 | Credit for unused transportation | | 31 | Credit for class of service adjustment | | 32 | Credit for denied boarding | | 33 | Credit for miscellaneous refund | | 34 | Credit for lost ticket refund | | 35 | Credit for exchange refund | | 36 | Credit for overcharge adjustment | | 37 | Credit for multiple Unused tickets | | 38 | Exchange order | | 39 | Self-service ticket | | 41 | In-flight duty-free purchase | | 42 | Senior citizen discount booklets | | 43 | Club membership fee | | 44 | Coupon book | | 45 | In-flight charges | | 46 | Tour deposit | | 47 | Frequent flyer overnight delivery charge | | 48 | Frequent flyer fulfillment | | 49 | Small package delivery | | 50 | Vendor sale | | 51 | Miscellaneous taxes or fees | | 52 | Travel agency fee | | 60 | Vendor refund or credit | | 64 | Duty free sale | | 65 | Preferred seat upgrade | | 66 | Cabin upgrade | | 67 | Lounge or club access or day pass | | 68 | Agent assisted reservation or ticketing fee | | 69 | Ticket change or cancel fee | | 70 | Trip insurance | | 71 | Unaccompanied minor | | 72 | Standby fee | | 73 | Curbside baggage | | 74 | In-flight medical equipment | | 75 | Ticket or pass print fee | | 76 | Checked sporting or special equipment | | 77 | Dry ice fee | | 78 | Mail or postage fee | | 79 | Club membership fee or temporary trial | | 80 | Frequent flyer activation or reinstatement | | 81 | Gift certificate | | 82 | Onboard or in-flight prepaid voucher | | 83 | Optional services fee | | 84 | Advance purchase for excess baggage | | 85 | Advance purchase for preferred seat upgrade | | 86 | Advance purchase for cabin upgrade | | 87 | Advance purchase for optional services | | 88 | WiFi | | 89 | Packages | | 90 | In-flight entertainment or internet access | | 91 | Overweight bag fee | | 92 | Sleep sets | | 93 | Special purchase fee |
49
+ attr_accessor :document_type
50
+
51
+ # The field is not currently supported.
52
+ attr_accessor :document_number
53
+
54
+ # The field is not currently supported.
55
+ attr_accessor :document_number_of_parts
56
+
57
+ # Invoice number for the airline transaction.
58
+ attr_accessor :invoice_number
59
+
60
+ # Invoice date. The format is YYYYMMDD. If this value is included in the request, it is used in the creation of the invoice number. See \"Invoice Number,\"
61
+ attr_accessor :invoice_date
62
+
63
+ # Description of the charge if the charge does not involve an airline ticket. For example: Excess baggage.
64
+ attr_accessor :additional_charges
65
+
66
+ # Total fee for the ticket. This value cannot exceed `99999999999999999999` (twenty 9s). Format: English characters only. Optional request field.
67
+ attr_accessor :total_fee_amount
68
+
69
+ # Number that identifies the clearing message when multiple clearing messages are allowed per authorized transaction. Each clearing message linked to one authorization request must include a unique clearing sequence number between 1 and the total number of clearing records. Format: English characters only. Optional request field.
70
+ attr_accessor :clearing_sequence
71
+
72
+ # Total number of clearing messages associated with the authorization request. Format: English characters only. Optional request field.
73
+ attr_accessor :clearing_count
74
+
75
+ # Total clearing amount for all transactions in the clearing count set. This value cannot exceed `99999999999999999999` (twenty 9s). Format: English characters only. If this field is not set and if the total amount from the original authorization is not NULL, the total clearing amount is set to the total amount from the original authorization.
76
+ attr_accessor :total_clearing_amount
77
+
78
+ # Number of passengers for whom the ticket was issued. Format: English characters only. Optional request field.
79
+ attr_accessor :number_of_passengers
80
+
81
+ # Code that specifies the computerized reservation system used to make the reservation and purchase the ticket. Format: English characters only. Restricted string data type that indicates a sequence of letters, numbers, and spaces; special characters are not included. Optional request field.
82
+ attr_accessor :reservation_system_code
83
+
84
+ # Airline process identifier. This value is the airline's three-digit IATA1 code which is used to process extended payment airline tickets.
85
+ attr_accessor :process_identifier
86
+
87
+ # Date on which the transaction occurred. Format: `YYYYMMDD` Format: English characters only. Optional request field.
88
+ attr_accessor :ticket_issue_date
89
+
90
+ # Flag that indicates whether an electronic ticket was issued. Possible values: - `true` - `false` Optional request field.
91
+ attr_accessor :electronic_ticket_indicator
92
+
93
+ # Original ticket number when the transaction is for a replacement ticket.
94
+ attr_accessor :original_ticket_number
95
+
96
+ # Type of purchase. Possible values: - `EXC`: Exchange ticket - `MSC`: Miscellaneous (not a ticket purchase and not a transaction related to an exchange ticket) - `REF`: Refund - `TKT`: Ticket Format: English characters only. Optional request field.
97
+ attr_accessor :purchase_type
98
+
99
+ # Reason for the credit. Possible values: - `A`: Cancellation of the ancillary passenger transport purchase. - `B`: Cancellation of the airline ticket and the passenger transport ancillary purchase. - `C`: Cancellation of the airline ticket. - `O`: Other. - `P`: Partial refund of the airline ticket. Format: English characters only. Optional request field.
100
+ attr_accessor :credit_reason_indicator
101
+
102
+ # Type of update. Possible values: - `C`: Change to the existing ticket. - `N`: New ticket. Format: English characters only Optional request field.
103
+ attr_accessor :ticket_change_indicator
104
+
105
+ # Plan number based on the fare. This value is provided by the airline. Format: English characters only. Optional request field.
106
+ attr_accessor :plan_number
107
+
108
+ # Date of arrival for the last leg of the trip. Format: `MMDDYYYY` English characters only. Optional request field.
109
+ attr_accessor :arrival_date
110
+
111
+ # Text that describes the ticket limitations, such as _nonrefundable_. Format: English characters only. Optional request field.
112
+ attr_accessor :restricted_ticket_desciption
113
+
114
+ # Amount of the exchanged ticket. Format: English characters only.
115
+ attr_accessor :exchange_ticket_amount
116
+
117
+ # Fee for exchanging the ticket. Format: English characters only. Optional request field.
118
+ attr_accessor :exchange_ticket_fee_amount
119
+
120
+ # The field is not currently supported.
121
+ attr_accessor :reservation_type
122
+
123
+ # Boarding fee.
124
+ attr_accessor :boarding_fee_amount
125
+
126
+ attr_accessor :legs
127
+
128
+ attr_accessor :ancillary_information
129
+
130
+ # Specifies the type of flight. One way (0) Return (1) Transit (2) Transit & Return (3) Multi-City (4)
131
+ attr_accessor :flight_type
132
+
133
+ # The total cost of the flight insurance. Example: 10000.00
134
+ attr_accessor :insurance_amount
135
+
136
+ # The consumer's frequent flyer number. Leave 0 if there is no frequent flyer number
137
+ attr_accessor :frequent_flyer_number
138
+
139
+ # Specifies if the travel agent joins the flight (0) or not (1)
140
+ attr_accessor :third_party_status
141
+
142
+ # List of passenger types in a booking code: A (Adult) C (Child) Comma separated values for total number of passenger
143
+ attr_accessor :passenger_type
144
+
145
+ # Total insurance amount. We have per leg and not total
146
+ attr_accessor :total_insurance_amount
147
+
148
+ # Attribute mapping from ruby-style variable name to JSON key.
149
+ def self.attribute_map
150
+ {
151
+ :'is_domestic' => :'isDomestic',
152
+ :'booking_reference_number' => :'bookingReferenceNumber',
153
+ :'carrier_name' => :'carrierName',
154
+ :'ticket_issuer' => :'ticketIssuer',
155
+ :'ticket_number' => :'ticketNumber',
156
+ :'check_digit' => :'checkDigit',
157
+ :'restricted_ticket_indicator' => :'restrictedTicketIndicator',
158
+ :'transaction_type' => :'transactionType',
159
+ :'extended_payment_code' => :'extendedPaymentCode',
160
+ :'passenger_name' => :'passengerName',
161
+ :'customer_code' => :'customerCode',
162
+ :'document_type' => :'documentType',
163
+ :'document_number' => :'documentNumber',
164
+ :'document_number_of_parts' => :'documentNumberOfParts',
165
+ :'invoice_number' => :'invoiceNumber',
166
+ :'invoice_date' => :'invoiceDate',
167
+ :'additional_charges' => :'additionalCharges',
168
+ :'total_fee_amount' => :'totalFeeAmount',
169
+ :'clearing_sequence' => :'clearingSequence',
170
+ :'clearing_count' => :'clearingCount',
171
+ :'total_clearing_amount' => :'totalClearingAmount',
172
+ :'number_of_passengers' => :'numberOfPassengers',
173
+ :'reservation_system_code' => :'reservationSystemCode',
174
+ :'process_identifier' => :'processIdentifier',
175
+ :'ticket_issue_date' => :'ticketIssueDate',
176
+ :'electronic_ticket_indicator' => :'electronicTicketIndicator',
177
+ :'original_ticket_number' => :'originalTicketNumber',
178
+ :'purchase_type' => :'purchaseType',
179
+ :'credit_reason_indicator' => :'creditReasonIndicator',
180
+ :'ticket_change_indicator' => :'ticketChangeIndicator',
181
+ :'plan_number' => :'planNumber',
182
+ :'arrival_date' => :'arrivalDate',
183
+ :'restricted_ticket_desciption' => :'restrictedTicketDesciption',
184
+ :'exchange_ticket_amount' => :'exchangeTicketAmount',
185
+ :'exchange_ticket_fee_amount' => :'exchangeTicketFeeAmount',
186
+ :'reservation_type' => :'reservationType',
187
+ :'boarding_fee_amount' => :'boardingFeeAmount',
188
+ :'legs' => :'legs',
189
+ :'ancillary_information' => :'ancillaryInformation',
190
+ :'flight_type' => :'flightType',
191
+ :'insurance_amount' => :'insuranceAmount',
192
+ :'frequent_flyer_number' => :'frequentFlyerNumber',
193
+ :'third_party_status' => :'thirdPartyStatus',
194
+ :'passenger_type' => :'passengerType',
195
+ :'total_insurance_amount' => :'totalInsuranceAmount'
196
+ }
197
+ end
198
+
199
+ # Attribute mapping from JSON key to ruby-style variable name.
200
+ def self.json_map
201
+ {
202
+ :'is_domestic' => :'is_domestic',
203
+ :'booking_reference_number' => :'booking_reference_number',
204
+ :'carrier_name' => :'carrier_name',
205
+ :'ticket_issuer' => :'ticket_issuer',
206
+ :'ticket_number' => :'ticket_number',
207
+ :'check_digit' => :'check_digit',
208
+ :'restricted_ticket_indicator' => :'restricted_ticket_indicator',
209
+ :'transaction_type' => :'transaction_type',
210
+ :'extended_payment_code' => :'extended_payment_code',
211
+ :'passenger_name' => :'passenger_name',
212
+ :'customer_code' => :'customer_code',
213
+ :'document_type' => :'document_type',
214
+ :'document_number' => :'document_number',
215
+ :'document_number_of_parts' => :'document_number_of_parts',
216
+ :'invoice_number' => :'invoice_number',
217
+ :'invoice_date' => :'invoice_date',
218
+ :'additional_charges' => :'additional_charges',
219
+ :'total_fee_amount' => :'total_fee_amount',
220
+ :'clearing_sequence' => :'clearing_sequence',
221
+ :'clearing_count' => :'clearing_count',
222
+ :'total_clearing_amount' => :'total_clearing_amount',
223
+ :'number_of_passengers' => :'number_of_passengers',
224
+ :'reservation_system_code' => :'reservation_system_code',
225
+ :'process_identifier' => :'process_identifier',
226
+ :'ticket_issue_date' => :'ticket_issue_date',
227
+ :'electronic_ticket_indicator' => :'electronic_ticket_indicator',
228
+ :'original_ticket_number' => :'original_ticket_number',
229
+ :'purchase_type' => :'purchase_type',
230
+ :'credit_reason_indicator' => :'credit_reason_indicator',
231
+ :'ticket_change_indicator' => :'ticket_change_indicator',
232
+ :'plan_number' => :'plan_number',
233
+ :'arrival_date' => :'arrival_date',
234
+ :'restricted_ticket_desciption' => :'restricted_ticket_desciption',
235
+ :'exchange_ticket_amount' => :'exchange_ticket_amount',
236
+ :'exchange_ticket_fee_amount' => :'exchange_ticket_fee_amount',
237
+ :'reservation_type' => :'reservation_type',
238
+ :'boarding_fee_amount' => :'boarding_fee_amount',
239
+ :'legs' => :'legs',
240
+ :'ancillary_information' => :'ancillary_information',
241
+ :'flight_type' => :'flight_type',
242
+ :'insurance_amount' => :'insurance_amount',
243
+ :'frequent_flyer_number' => :'frequent_flyer_number',
244
+ :'third_party_status' => :'third_party_status',
245
+ :'passenger_type' => :'passenger_type',
246
+ :'total_insurance_amount' => :'total_insurance_amount'
247
+ }
248
+ end
249
+
250
+ # Attribute type mapping.
251
+ def self.swagger_types
252
+ {
253
+ :'is_domestic' => :'String',
254
+ :'booking_reference_number' => :'String',
255
+ :'carrier_name' => :'String',
256
+ :'ticket_issuer' => :'Ptsv2paymentsTravelInformationTransitAirlineTicketIssuer',
257
+ :'ticket_number' => :'String',
258
+ :'check_digit' => :'String',
259
+ :'restricted_ticket_indicator' => :'Integer',
260
+ :'transaction_type' => :'Integer',
261
+ :'extended_payment_code' => :'String',
262
+ :'passenger_name' => :'String',
263
+ :'customer_code' => :'String',
264
+ :'document_type' => :'String',
265
+ :'document_number' => :'String',
266
+ :'document_number_of_parts' => :'Integer',
267
+ :'invoice_number' => :'String',
268
+ :'invoice_date' => :'Integer',
269
+ :'additional_charges' => :'String',
270
+ :'total_fee_amount' => :'String',
271
+ :'clearing_sequence' => :'String',
272
+ :'clearing_count' => :'String',
273
+ :'total_clearing_amount' => :'String',
274
+ :'number_of_passengers' => :'Integer',
275
+ :'reservation_system_code' => :'String',
276
+ :'process_identifier' => :'String',
277
+ :'ticket_issue_date' => :'String',
278
+ :'electronic_ticket_indicator' => :'BOOLEAN',
279
+ :'original_ticket_number' => :'String',
280
+ :'purchase_type' => :'String',
281
+ :'credit_reason_indicator' => :'String',
282
+ :'ticket_change_indicator' => :'String',
283
+ :'plan_number' => :'String',
284
+ :'arrival_date' => :'String',
285
+ :'restricted_ticket_desciption' => :'String',
286
+ :'exchange_ticket_amount' => :'String',
287
+ :'exchange_ticket_fee_amount' => :'String',
288
+ :'reservation_type' => :'String',
289
+ :'boarding_fee_amount' => :'String',
290
+ :'legs' => :'Array<Ptsv2paymentsTravelInformationTransitAirlineLegs>',
291
+ :'ancillary_information' => :'Ptsv2paymentsidrefundsTravelInformationTransitAirlineAncillaryInformation',
292
+ :'flight_type' => :'String',
293
+ :'insurance_amount' => :'String',
294
+ :'frequent_flyer_number' => :'String',
295
+ :'third_party_status' => :'String',
296
+ :'passenger_type' => :'String',
297
+ :'total_insurance_amount' => :'String'
298
+ }
299
+ end
300
+
301
+ # Initializes the object
302
+ # @param [Hash] attributes Model attributes in the form of hash
303
+ def initialize(attributes = {})
304
+ return unless attributes.is_a?(Hash)
305
+
306
+ # convert string to symbol for hash key
307
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
308
+
309
+ if attributes.has_key?(:'isDomestic')
310
+ self.is_domestic = attributes[:'isDomestic']
311
+ end
312
+
313
+ if attributes.has_key?(:'bookingReferenceNumber')
314
+ self.booking_reference_number = attributes[:'bookingReferenceNumber']
315
+ end
316
+
317
+ if attributes.has_key?(:'carrierName')
318
+ self.carrier_name = attributes[:'carrierName']
319
+ end
320
+
321
+ if attributes.has_key?(:'ticketIssuer')
322
+ self.ticket_issuer = attributes[:'ticketIssuer']
323
+ end
324
+
325
+ if attributes.has_key?(:'ticketNumber')
326
+ self.ticket_number = attributes[:'ticketNumber']
327
+ end
328
+
329
+ if attributes.has_key?(:'checkDigit')
330
+ self.check_digit = attributes[:'checkDigit']
331
+ end
332
+
333
+ if attributes.has_key?(:'restrictedTicketIndicator')
334
+ self.restricted_ticket_indicator = attributes[:'restrictedTicketIndicator']
335
+ end
336
+
337
+ if attributes.has_key?(:'transactionType')
338
+ self.transaction_type = attributes[:'transactionType']
339
+ end
340
+
341
+ if attributes.has_key?(:'extendedPaymentCode')
342
+ self.extended_payment_code = attributes[:'extendedPaymentCode']
343
+ end
344
+
345
+ if attributes.has_key?(:'passengerName')
346
+ self.passenger_name = attributes[:'passengerName']
347
+ end
348
+
349
+ if attributes.has_key?(:'customerCode')
350
+ self.customer_code = attributes[:'customerCode']
351
+ end
352
+
353
+ if attributes.has_key?(:'documentType')
354
+ self.document_type = attributes[:'documentType']
355
+ end
356
+
357
+ if attributes.has_key?(:'documentNumber')
358
+ self.document_number = attributes[:'documentNumber']
359
+ end
360
+
361
+ if attributes.has_key?(:'documentNumberOfParts')
362
+ self.document_number_of_parts = attributes[:'documentNumberOfParts']
363
+ end
364
+
365
+ if attributes.has_key?(:'invoiceNumber')
366
+ self.invoice_number = attributes[:'invoiceNumber']
367
+ end
368
+
369
+ if attributes.has_key?(:'invoiceDate')
370
+ self.invoice_date = attributes[:'invoiceDate']
371
+ end
372
+
373
+ if attributes.has_key?(:'additionalCharges')
374
+ self.additional_charges = attributes[:'additionalCharges']
375
+ end
376
+
377
+ if attributes.has_key?(:'totalFeeAmount')
378
+ self.total_fee_amount = attributes[:'totalFeeAmount']
379
+ end
380
+
381
+ if attributes.has_key?(:'clearingSequence')
382
+ self.clearing_sequence = attributes[:'clearingSequence']
383
+ end
384
+
385
+ if attributes.has_key?(:'clearingCount')
386
+ self.clearing_count = attributes[:'clearingCount']
387
+ end
388
+
389
+ if attributes.has_key?(:'totalClearingAmount')
390
+ self.total_clearing_amount = attributes[:'totalClearingAmount']
391
+ end
392
+
393
+ if attributes.has_key?(:'numberOfPassengers')
394
+ self.number_of_passengers = attributes[:'numberOfPassengers']
395
+ end
396
+
397
+ if attributes.has_key?(:'reservationSystemCode')
398
+ self.reservation_system_code = attributes[:'reservationSystemCode']
399
+ end
400
+
401
+ if attributes.has_key?(:'processIdentifier')
402
+ self.process_identifier = attributes[:'processIdentifier']
403
+ end
404
+
405
+ if attributes.has_key?(:'ticketIssueDate')
406
+ self.ticket_issue_date = attributes[:'ticketIssueDate']
407
+ end
408
+
409
+ if attributes.has_key?(:'electronicTicketIndicator')
410
+ self.electronic_ticket_indicator = attributes[:'electronicTicketIndicator']
411
+ end
412
+
413
+ if attributes.has_key?(:'originalTicketNumber')
414
+ self.original_ticket_number = attributes[:'originalTicketNumber']
415
+ end
416
+
417
+ if attributes.has_key?(:'purchaseType')
418
+ self.purchase_type = attributes[:'purchaseType']
419
+ end
420
+
421
+ if attributes.has_key?(:'creditReasonIndicator')
422
+ self.credit_reason_indicator = attributes[:'creditReasonIndicator']
423
+ end
424
+
425
+ if attributes.has_key?(:'ticketChangeIndicator')
426
+ self.ticket_change_indicator = attributes[:'ticketChangeIndicator']
427
+ end
428
+
429
+ if attributes.has_key?(:'planNumber')
430
+ self.plan_number = attributes[:'planNumber']
431
+ end
432
+
433
+ if attributes.has_key?(:'arrivalDate')
434
+ self.arrival_date = attributes[:'arrivalDate']
435
+ end
436
+
437
+ if attributes.has_key?(:'restrictedTicketDesciption')
438
+ self.restricted_ticket_desciption = attributes[:'restrictedTicketDesciption']
439
+ end
440
+
441
+ if attributes.has_key?(:'exchangeTicketAmount')
442
+ self.exchange_ticket_amount = attributes[:'exchangeTicketAmount']
443
+ end
444
+
445
+ if attributes.has_key?(:'exchangeTicketFeeAmount')
446
+ self.exchange_ticket_fee_amount = attributes[:'exchangeTicketFeeAmount']
447
+ end
448
+
449
+ if attributes.has_key?(:'reservationType')
450
+ self.reservation_type = attributes[:'reservationType']
451
+ end
452
+
453
+ if attributes.has_key?(:'boardingFeeAmount')
454
+ self.boarding_fee_amount = attributes[:'boardingFeeAmount']
455
+ end
456
+
457
+ if attributes.has_key?(:'legs')
458
+ if (value = attributes[:'legs']).is_a?(Array)
459
+ self.legs = value
460
+ end
461
+ end
462
+
463
+ if attributes.has_key?(:'ancillaryInformation')
464
+ self.ancillary_information = attributes[:'ancillaryInformation']
465
+ end
466
+
467
+ if attributes.has_key?(:'flightType')
468
+ self.flight_type = attributes[:'flightType']
469
+ end
470
+
471
+ if attributes.has_key?(:'insuranceAmount')
472
+ self.insurance_amount = attributes[:'insuranceAmount']
473
+ end
474
+
475
+ if attributes.has_key?(:'frequentFlyerNumber')
476
+ self.frequent_flyer_number = attributes[:'frequentFlyerNumber']
477
+ end
478
+
479
+ if attributes.has_key?(:'thirdPartyStatus')
480
+ self.third_party_status = attributes[:'thirdPartyStatus']
481
+ end
482
+
483
+ if attributes.has_key?(:'passengerType')
484
+ self.passenger_type = attributes[:'passengerType']
485
+ end
486
+
487
+ if attributes.has_key?(:'totalInsuranceAmount')
488
+ self.total_insurance_amount = attributes[:'totalInsuranceAmount']
489
+ end
490
+ end
491
+
492
+ # Show invalid properties with the reasons. Usually used together with valid?
493
+ # @return Array for valid properties with the reasons
494
+ def list_invalid_properties
495
+ invalid_properties = Array.new
496
+ invalid_properties
497
+ end
498
+
499
+ # Check to see if the all the properties in the model are valid
500
+ # @return true if the model is valid
501
+ def valid?
502
+ true
503
+ end
504
+
505
+ # Custom attribute writer method with validation
506
+ # @param [Object] is_domestic Value to be assigned
507
+ def is_domestic=(is_domestic)
508
+ @is_domestic = is_domestic
509
+ end
510
+
511
+ # Custom attribute writer method with validation
512
+ # @param [Object] booking_reference_number Value to be assigned
513
+ def booking_reference_number=(booking_reference_number)
514
+ @booking_reference_number = booking_reference_number
515
+ end
516
+
517
+ # Custom attribute writer method with validation
518
+ # @param [Object] carrier_name Value to be assigned
519
+ def carrier_name=(carrier_name)
520
+ @carrier_name = carrier_name
521
+ end
522
+
523
+ # Custom attribute writer method with validation
524
+ # @param [Object] ticket_number Value to be assigned
525
+ def ticket_number=(ticket_number)
526
+ @ticket_number = ticket_number
527
+ end
528
+
529
+ # Custom attribute writer method with validation
530
+ # @param [Object] check_digit Value to be assigned
531
+ def check_digit=(check_digit)
532
+ @check_digit = check_digit
533
+ end
534
+
535
+ # Custom attribute writer method with validation
536
+ # @param [Object] extended_payment_code Value to be assigned
537
+ def extended_payment_code=(extended_payment_code)
538
+ @extended_payment_code = extended_payment_code
539
+ end
540
+
541
+ # Custom attribute writer method with validation
542
+ # @param [Object] passenger_name Value to be assigned
543
+ def passenger_name=(passenger_name)
544
+ @passenger_name = passenger_name
545
+ end
546
+
547
+ # Custom attribute writer method with validation
548
+ # @param [Object] customer_code Value to be assigned
549
+ def customer_code=(customer_code)
550
+ @customer_code = customer_code
551
+ end
552
+
553
+ # Custom attribute writer method with validation
554
+ # @param [Object] document_type Value to be assigned
555
+ def document_type=(document_type)
556
+ @document_type = document_type
557
+ end
558
+
559
+ # Custom attribute writer method with validation
560
+ # @param [Object] document_number Value to be assigned
561
+ def document_number=(document_number)
562
+ @document_number = document_number
563
+ end
564
+
565
+ # Custom attribute writer method with validation
566
+ # @param [Object] invoice_number Value to be assigned
567
+ def invoice_number=(invoice_number)
568
+ @invoice_number = invoice_number
569
+ end
570
+
571
+ # Custom attribute writer method with validation
572
+ # @param [Object] additional_charges Value to be assigned
573
+ def additional_charges=(additional_charges)
574
+ @additional_charges = additional_charges
575
+ end
576
+
577
+ # Custom attribute writer method with validation
578
+ # @param [Object] total_fee_amount Value to be assigned
579
+ def total_fee_amount=(total_fee_amount)
580
+ @total_fee_amount = total_fee_amount
581
+ end
582
+
583
+ # Custom attribute writer method with validation
584
+ # @param [Object] clearing_sequence Value to be assigned
585
+ def clearing_sequence=(clearing_sequence)
586
+ @clearing_sequence = clearing_sequence
587
+ end
588
+
589
+ # Custom attribute writer method with validation
590
+ # @param [Object] clearing_count Value to be assigned
591
+ def clearing_count=(clearing_count)
592
+ @clearing_count = clearing_count
593
+ end
594
+
595
+ # Custom attribute writer method with validation
596
+ # @param [Object] total_clearing_amount Value to be assigned
597
+ def total_clearing_amount=(total_clearing_amount)
598
+ @total_clearing_amount = total_clearing_amount
599
+ end
600
+
601
+ # Custom attribute writer method with validation
602
+ # @param [Object] reservation_system_code Value to be assigned
603
+ def reservation_system_code=(reservation_system_code)
604
+ @reservation_system_code = reservation_system_code
605
+ end
606
+
607
+ # Custom attribute writer method with validation
608
+ # @param [Object] process_identifier Value to be assigned
609
+ def process_identifier=(process_identifier)
610
+ @process_identifier = process_identifier
611
+ end
612
+
613
+ # Custom attribute writer method with validation
614
+ # @param [Object] ticket_issue_date Value to be assigned
615
+ def ticket_issue_date=(ticket_issue_date)
616
+ @ticket_issue_date = ticket_issue_date
617
+ end
618
+
619
+ # Custom attribute writer method with validation
620
+ # @param [Object] original_ticket_number Value to be assigned
621
+ def original_ticket_number=(original_ticket_number)
622
+ @original_ticket_number = original_ticket_number
623
+ end
624
+
625
+ # Custom attribute writer method with validation
626
+ # @param [Object] purchase_type Value to be assigned
627
+ def purchase_type=(purchase_type)
628
+ @purchase_type = purchase_type
629
+ end
630
+
631
+ # Custom attribute writer method with validation
632
+ # @param [Object] credit_reason_indicator Value to be assigned
633
+ def credit_reason_indicator=(credit_reason_indicator)
634
+ @credit_reason_indicator = credit_reason_indicator
635
+ end
636
+
637
+ # Custom attribute writer method with validation
638
+ # @param [Object] ticket_change_indicator Value to be assigned
639
+ def ticket_change_indicator=(ticket_change_indicator)
640
+ @ticket_change_indicator = ticket_change_indicator
641
+ end
642
+
643
+ # Custom attribute writer method with validation
644
+ # @param [Object] plan_number Value to be assigned
645
+ def plan_number=(plan_number)
646
+ @plan_number = plan_number
647
+ end
648
+
649
+ # Custom attribute writer method with validation
650
+ # @param [Object] arrival_date Value to be assigned
651
+ def arrival_date=(arrival_date)
652
+ @arrival_date = arrival_date
653
+ end
654
+
655
+ # Custom attribute writer method with validation
656
+ # @param [Object] restricted_ticket_desciption Value to be assigned
657
+ def restricted_ticket_desciption=(restricted_ticket_desciption)
658
+ @restricted_ticket_desciption = restricted_ticket_desciption
659
+ end
660
+
661
+ # Custom attribute writer method with validation
662
+ # @param [Object] exchange_ticket_amount Value to be assigned
663
+ def exchange_ticket_amount=(exchange_ticket_amount)
664
+ @exchange_ticket_amount = exchange_ticket_amount
665
+ end
666
+
667
+ # Custom attribute writer method with validation
668
+ # @param [Object] exchange_ticket_fee_amount Value to be assigned
669
+ def exchange_ticket_fee_amount=(exchange_ticket_fee_amount)
670
+ @exchange_ticket_fee_amount = exchange_ticket_fee_amount
671
+ end
672
+
673
+ # Custom attribute writer method with validation
674
+ # @param [Object] reservation_type Value to be assigned
675
+ def reservation_type=(reservation_type)
676
+ @reservation_type = reservation_type
677
+ end
678
+
679
+ # Custom attribute writer method with validation
680
+ # @param [Object] boarding_fee_amount Value to be assigned
681
+ def boarding_fee_amount=(boarding_fee_amount)
682
+ @boarding_fee_amount = boarding_fee_amount
683
+ end
684
+
685
+ # Custom attribute writer method with validation
686
+ # @param [Object] flight_type Value to be assigned
687
+ def flight_type=(flight_type)
688
+ @flight_type = flight_type
689
+ end
690
+
691
+ # Custom attribute writer method with validation
692
+ # @param [Object] insurance_amount Value to be assigned
693
+ def insurance_amount=(insurance_amount)
694
+ @insurance_amount = insurance_amount
695
+ end
696
+
697
+ # Custom attribute writer method with validation
698
+ # @param [Object] frequent_flyer_number Value to be assigned
699
+ def frequent_flyer_number=(frequent_flyer_number)
700
+ @frequent_flyer_number = frequent_flyer_number
701
+ end
702
+
703
+ # Custom attribute writer method with validation
704
+ # @param [Object] third_party_status Value to be assigned
705
+ def third_party_status=(third_party_status)
706
+ @third_party_status = third_party_status
707
+ end
708
+
709
+ # Custom attribute writer method with validation
710
+ # @param [Object] passenger_type Value to be assigned
711
+ def passenger_type=(passenger_type)
712
+ @passenger_type = passenger_type
713
+ end
714
+
715
+ # Custom attribute writer method with validation
716
+ # @param [Object] total_insurance_amount Value to be assigned
717
+ def total_insurance_amount=(total_insurance_amount)
718
+ @total_insurance_amount = total_insurance_amount
719
+ end
720
+
721
+ # Checks equality by comparing each attribute.
722
+ # @param [Object] Object to be compared
723
+ def ==(o)
724
+ return true if self.equal?(o)
725
+ self.class == o.class &&
726
+ is_domestic == o.is_domestic &&
727
+ booking_reference_number == o.booking_reference_number &&
728
+ carrier_name == o.carrier_name &&
729
+ ticket_issuer == o.ticket_issuer &&
730
+ ticket_number == o.ticket_number &&
731
+ check_digit == o.check_digit &&
732
+ restricted_ticket_indicator == o.restricted_ticket_indicator &&
733
+ transaction_type == o.transaction_type &&
734
+ extended_payment_code == o.extended_payment_code &&
735
+ passenger_name == o.passenger_name &&
736
+ customer_code == o.customer_code &&
737
+ document_type == o.document_type &&
738
+ document_number == o.document_number &&
739
+ document_number_of_parts == o.document_number_of_parts &&
740
+ invoice_number == o.invoice_number &&
741
+ invoice_date == o.invoice_date &&
742
+ additional_charges == o.additional_charges &&
743
+ total_fee_amount == o.total_fee_amount &&
744
+ clearing_sequence == o.clearing_sequence &&
745
+ clearing_count == o.clearing_count &&
746
+ total_clearing_amount == o.total_clearing_amount &&
747
+ number_of_passengers == o.number_of_passengers &&
748
+ reservation_system_code == o.reservation_system_code &&
749
+ process_identifier == o.process_identifier &&
750
+ ticket_issue_date == o.ticket_issue_date &&
751
+ electronic_ticket_indicator == o.electronic_ticket_indicator &&
752
+ original_ticket_number == o.original_ticket_number &&
753
+ purchase_type == o.purchase_type &&
754
+ credit_reason_indicator == o.credit_reason_indicator &&
755
+ ticket_change_indicator == o.ticket_change_indicator &&
756
+ plan_number == o.plan_number &&
757
+ arrival_date == o.arrival_date &&
758
+ restricted_ticket_desciption == o.restricted_ticket_desciption &&
759
+ exchange_ticket_amount == o.exchange_ticket_amount &&
760
+ exchange_ticket_fee_amount == o.exchange_ticket_fee_amount &&
761
+ reservation_type == o.reservation_type &&
762
+ boarding_fee_amount == o.boarding_fee_amount &&
763
+ legs == o.legs &&
764
+ ancillary_information == o.ancillary_information &&
765
+ flight_type == o.flight_type &&
766
+ insurance_amount == o.insurance_amount &&
767
+ frequent_flyer_number == o.frequent_flyer_number &&
768
+ third_party_status == o.third_party_status &&
769
+ passenger_type == o.passenger_type &&
770
+ total_insurance_amount == o.total_insurance_amount
771
+ end
772
+
773
+ # @see the `==` method
774
+ # @param [Object] Object to be compared
775
+ def eql?(o)
776
+ self == o
777
+ end
778
+
779
+ # Calculates hash code according to all attributes.
780
+ # @return [Fixnum] Hash code
781
+ def hash
782
+ [is_domestic, booking_reference_number, carrier_name, ticket_issuer, ticket_number, check_digit, restricted_ticket_indicator, transaction_type, extended_payment_code, passenger_name, customer_code, document_type, document_number, document_number_of_parts, invoice_number, invoice_date, additional_charges, total_fee_amount, clearing_sequence, clearing_count, total_clearing_amount, number_of_passengers, reservation_system_code, process_identifier, ticket_issue_date, electronic_ticket_indicator, original_ticket_number, purchase_type, credit_reason_indicator, ticket_change_indicator, plan_number, arrival_date, restricted_ticket_desciption, exchange_ticket_amount, exchange_ticket_fee_amount, reservation_type, boarding_fee_amount, legs, ancillary_information, flight_type, insurance_amount, frequent_flyer_number, third_party_status, passenger_type, total_insurance_amount].hash
783
+ end
784
+
785
+ # Builds the object from hash
786
+ # @param [Hash] attributes Model attributes in the form of hash
787
+ # @return [Object] Returns the model itself
788
+ def build_from_hash(attributes)
789
+ return nil unless attributes.is_a?(Hash)
790
+ self.class.swagger_types.each_pair do |key, type|
791
+ if type =~ /\AArray<(.*)>/i
792
+ # check to ensure the input is an array given that the the attribute
793
+ # is documented as an array but the input is not
794
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
795
+ self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
796
+ end
797
+ elsif !attributes[self.class.attribute_map[key]].nil?
798
+ self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
799
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
800
+ end
801
+
802
+ self
803
+ end
804
+
805
+ # Deserializes the data based on type
806
+ # @param string type Data type
807
+ # @param string value Value to be deserialized
808
+ # @return [Object] Deserialized data
809
+ def _deserialize(type, value)
810
+ case type.to_sym
811
+ when :DateTime
812
+ DateTime.parse(value)
813
+ when :Date
814
+ Date.parse(value)
815
+ when :String
816
+ value.to_s
817
+ when :Integer
818
+ value.to_i
819
+ when :Float
820
+ value.to_f
821
+ when :BOOLEAN
822
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
823
+ true
824
+ else
825
+ false
826
+ end
827
+ when :Object
828
+ # generic object (usually a Hash), return directly
829
+ value
830
+ when /\AArray<(?<inner_type>.+)>\z/
831
+ inner_type = Regexp.last_match[:inner_type]
832
+ value.map { |v| _deserialize(inner_type, v) }
833
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
834
+ k_type = Regexp.last_match[:k_type]
835
+ v_type = Regexp.last_match[:v_type]
836
+ {}.tap do |hash|
837
+ value.each do |k, v|
838
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
839
+ end
840
+ end
841
+ else # model
842
+ temp_model = CyberSource.const_get(type).new
843
+ temp_model.build_from_hash(value)
844
+ end
845
+ end
846
+
847
+ # Returns the string representation of the object
848
+ # @return [String] String presentation of the object
849
+ def to_s
850
+ to_hash.to_s
851
+ end
852
+
853
+ # to_body is an alias to to_hash (backward compatibility)
854
+ # @return [Hash] Returns the object in the form of hash
855
+ def to_body
856
+ to_hash
857
+ end
858
+
859
+ # Returns the object in the form of hash
860
+ # @return [Hash] Returns the object in the form of hash
861
+ def to_hash
862
+ hash = {}
863
+ self.class.attribute_map.each_pair do |attr, param|
864
+ value = self.send(attr)
865
+ next if value.nil?
866
+ hash[param] = _to_hash(value)
867
+ end
868
+ hash
869
+ end
870
+
871
+ # Outputs non-array value in the form of hash
872
+ # For object, use to_hash. Otherwise, just return the value
873
+ # @param [Object] value Any valid value
874
+ # @return [Hash] Returns the value in the form of hash
875
+ def _to_hash(value)
876
+ if value.is_a?(Array)
877
+ value.compact.map { |v| _to_hash(v) }
878
+ elsif value.is_a?(Hash)
879
+ {}.tap do |hash|
880
+ value.each { |k, v| hash[k] = _to_hash(v) }
881
+ end
882
+ elsif value.respond_to? :to_hash
883
+ value.to_hash
884
+ else
885
+ value
886
+ end
887
+ end
888
+ end
889
+ end