first_data_gateway 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +123 -0
- data/Rakefile +8 -0
- data/docs/AccessTokenResponse.md +11 -0
- data/docs/Address.md +14 -0
- data/docs/Airline.md +21 -0
- data/docs/AirlineAncillaryServiceCategory.md +8 -0
- data/docs/AirlineTravelRoute.md +16 -0
- data/docs/Amount.md +10 -0
- data/docs/AmountComponents.md +14 -0
- data/docs/AuthenticationApi.md +68 -0
- data/docs/AuthenticationResponseVerification.md +10 -0
- data/docs/BasketItem.md +11 -0
- data/docs/Billing.md +13 -0
- data/docs/CarRental.md +15 -0
- data/docs/CarRentalExtraCharges.md +8 -0
- data/docs/CardVerificationsTransaction.md +9 -0
- data/docs/ClientLocale.md +9 -0
- data/docs/Contact.md +11 -0
- data/docs/Error.md +10 -0
- data/docs/ErrorDetails.md +9 -0
- data/docs/ErrorResponse.md +11 -0
- data/docs/Expiration.md +9 -0
- data/docs/Frequency.md +9 -0
- data/docs/IndustrySpecificExtensions.md +10 -0
- data/docs/InstallmentOptions.md +10 -0
- data/docs/Lodging.md +12 -0
- data/docs/LodgingExtraCharges.md +8 -0
- data/docs/Order.md +10 -0
- data/docs/OrderApi.md +148 -0
- data/docs/PayPal.md +8 -0
- data/docs/PaymentApi.md +345 -0
- data/docs/PaymentCard.md +15 -0
- data/docs/PaymentCardAuthenticationRequest.md +8 -0
- data/docs/PaymentCardAuthenticationResult.md +12 -0
- data/docs/PaymentMethod.md +11 -0
- data/docs/PaymentSchedulesRequest.md +21 -0
- data/docs/PaymentSchedulesResponse.md +11 -0
- data/docs/PaymentUrlRequest.md +11 -0
- data/docs/PaymentUrlResponse.md +13 -0
- data/docs/PrimaryTransaction.md +18 -0
- data/docs/PrimaryTransactionAdditionalDetails.md +14 -0
- data/docs/ProcessorData.md +10 -0
- data/docs/ResponseType.md +7 -0
- data/docs/SecondaryTransaction.md +9 -0
- data/docs/Sepa.md +12 -0
- data/docs/SepaMandate.md +11 -0
- data/docs/Shipping.md +10 -0
- data/docs/SplitShipment.md +9 -0
- data/docs/StoredCredential.md +11 -0
- data/docs/TransactionErrorResponse.md +28 -0
- data/docs/TransactionResponse.md +27 -0
- data/docs/TransactionResponseAuthenticationRedirect.md +10 -0
- data/docs/TransactionResponseAuthenticationRedirectParams.md +10 -0
- data/docs/TransactionType.md +7 -0
- data/first_data_gateway.gemspec +45 -0
- data/git_push.sh +55 -0
- data/lib/simple/client_context.rb +15 -0
- data/lib/simple/gateway.rb +155 -0
- data/lib/simple/merchant_credentials.rb +10 -0
- data/lib/simple/signature.rb +52 -0
- data/lib/simple_client.rb +4 -0
- data/lib/swagger_client.rb +91 -0
- data/lib/swagger_client/api/authentication_api.rb +111 -0
- data/lib/swagger_client/api/order_api.rb +229 -0
- data/lib/swagger_client/api/payment_api.rb +517 -0
- data/lib/swagger_client/api_client.rb +390 -0
- data/lib/swagger_client/api_error.rb +38 -0
- data/lib/swagger_client/configuration.rb +202 -0
- data/lib/swagger_client/models/access_token_response.rb +252 -0
- data/lib/swagger_client/models/address.rb +361 -0
- data/lib/swagger_client/models/airline.rb +487 -0
- data/lib/swagger_client/models/airline_ancillary_service_category.rb +221 -0
- data/lib/swagger_client/models/airline_travel_route.rb +406 -0
- data/lib/swagger_client/models/amount.rb +217 -0
- data/lib/swagger_client/models/amount_components.rb +242 -0
- data/lib/swagger_client/models/authentication_response_verification.rb +239 -0
- data/lib/swagger_client/models/basket_item.rb +218 -0
- data/lib/swagger_client/models/billing.rb +282 -0
- data/lib/swagger_client/models/car_rental.rb +317 -0
- data/lib/swagger_client/models/car_rental_extra_charges.rb +221 -0
- data/lib/swagger_client/models/card_verifications_transaction.rb +203 -0
- data/lib/swagger_client/models/client_locale.rb +209 -0
- data/lib/swagger_client/models/contact.rb +279 -0
- data/lib/swagger_client/models/error.rb +211 -0
- data/lib/swagger_client/models/error_details.rb +199 -0
- data/lib/swagger_client/models/error_response.rb +218 -0
- data/lib/swagger_client/models/expiration.rb +207 -0
- data/lib/swagger_client/models/frequency.rb +270 -0
- data/lib/swagger_client/models/industry_specific_extensions.rb +206 -0
- data/lib/swagger_client/models/installment_options.rb +259 -0
- data/lib/swagger_client/models/lodging.rb +245 -0
- data/lib/swagger_client/models/lodging_extra_charges.rb +221 -0
- data/lib/swagger_client/models/order.rb +206 -0
- data/lib/swagger_client/models/pay_pal.rb +213 -0
- data/lib/swagger_client/models/payment_card.rb +294 -0
- data/lib/swagger_client/models/payment_card_authentication_request.rb +222 -0
- data/lib/swagger_client/models/payment_card_authentication_result.rb +336 -0
- data/lib/swagger_client/models/payment_method.rb +254 -0
- data/lib/swagger_client/models/payment_schedules_request.rb +398 -0
- data/lib/swagger_client/models/payment_schedules_response.rb +267 -0
- data/lib/swagger_client/models/payment_url_request.rb +232 -0
- data/lib/swagger_client/models/payment_url_response.rb +286 -0
- data/lib/swagger_client/models/primary_transaction.rb +298 -0
- data/lib/swagger_client/models/primary_transaction_additional_details.rb +244 -0
- data/lib/swagger_client/models/processor_data.rb +216 -0
- data/lib/swagger_client/models/response_type.rb +37 -0
- data/lib/swagger_client/models/secondary_transaction.rb +197 -0
- data/lib/swagger_client/models/sepa.rb +321 -0
- data/lib/swagger_client/models/sepa_mandate.rb +321 -0
- data/lib/swagger_client/models/shipping.rb +222 -0
- data/lib/swagger_client/models/split_shipment.rb +201 -0
- data/lib/swagger_client/models/stored_credential.rb +290 -0
- data/lib/swagger_client/models/transaction_error_response.rb +445 -0
- data/lib/swagger_client/models/transaction_response.rb +436 -0
- data/lib/swagger_client/models/transaction_response_authentication_redirect.rb +239 -0
- data/lib/swagger_client/models/transaction_response_authentication_redirect_params.rb +206 -0
- data/lib/swagger_client/models/transaction_type.rb +36 -0
- data/lib/swagger_client/version.rb +15 -0
- data/spec/api/authentication_api_spec.rb +51 -0
- data/spec/api/order_api_spec.rb +73 -0
- data/spec/api/payment_api_spec.rb +126 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/access_token_response_spec.rb +64 -0
- data/spec/models/address_spec.rb +78 -0
- data/spec/models/airline_ancillary_service_category_spec.rb +46 -0
- data/spec/models/airline_spec.rb +124 -0
- data/spec/models/airline_travel_route_spec.rb +94 -0
- data/spec/models/amount_components_spec.rb +78 -0
- data/spec/models/amount_spec.rb +54 -0
- data/spec/models/authentication_response_verification_spec.rb +58 -0
- data/spec/models/basket_item_spec.rb +60 -0
- data/spec/models/billing_spec.rb +76 -0
- data/spec/models/car_rental_extra_charges_spec.rb +46 -0
- data/spec/models/car_rental_spec.rb +84 -0
- data/spec/models/card_verifications_transaction_spec.rb +48 -0
- data/spec/models/client_locale_spec.rb +48 -0
- data/spec/models/contact_spec.rb +60 -0
- data/spec/models/error_details_spec.rb +48 -0
- data/spec/models/error_response_spec.rb +60 -0
- data/spec/models/error_spec.rb +54 -0
- data/spec/models/expiration_spec.rb +48 -0
- data/spec/models/frequency_spec.rb +52 -0
- data/spec/models/industry_specific_extensions_spec.rb +54 -0
- data/spec/models/installment_options_spec.rb +54 -0
- data/spec/models/lodging_extra_charges_spec.rb +46 -0
- data/spec/models/lodging_spec.rb +66 -0
- data/spec/models/order_spec.rb +54 -0
- data/spec/models/pay_pal_spec.rb +42 -0
- data/spec/models/payment_card_authentication_request_spec.rb +46 -0
- data/spec/models/payment_card_authentication_result_spec.rb +78 -0
- data/spec/models/payment_card_spec.rb +88 -0
- data/spec/models/payment_method_spec.rb +64 -0
- data/spec/models/payment_schedules_request_spec.rb +124 -0
- data/spec/models/payment_schedules_response_spec.rb +64 -0
- data/spec/models/payment_url_request_spec.rb +60 -0
- data/spec/models/payment_url_response_spec.rb +76 -0
- data/spec/models/primary_transaction_additional_details_spec.rb +78 -0
- data/spec/models/primary_transaction_spec.rb +102 -0
- data/spec/models/processor_data_spec.rb +54 -0
- data/spec/models/response_type_spec.rb +36 -0
- data/spec/models/secondary_transaction_spec.rb +48 -0
- data/spec/models/sepa_mandate_spec.rb +64 -0
- data/spec/models/sepa_spec.rb +66 -0
- data/spec/models/shipping_spec.rb +54 -0
- data/spec/models/split_shipment_spec.rb +48 -0
- data/spec/models/stored_credential_spec.rb +68 -0
- data/spec/models/transaction_error_response_spec.rb +170 -0
- data/spec/models/transaction_response_authentication_redirect_params_spec.rb +54 -0
- data/spec/models/transaction_response_authentication_redirect_spec.rb +58 -0
- data/spec/models/transaction_response_spec.rb +164 -0
- data/spec/models/transaction_type_spec.rb +36 -0
- data/spec/spec_helper.rb +111 -0
- metadata +457 -0
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Payment Gateway API Specification
|
|
3
|
+
|
|
4
|
+
#Payment Gateway API for payment processing.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 0.0.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: unset
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module SwaggerClient
|
|
16
|
+
# Additional data specific to the airline industry
|
|
17
|
+
class Airline
|
|
18
|
+
attr_accessor :passenger_name
|
|
19
|
+
|
|
20
|
+
attr_accessor :ticket_number
|
|
21
|
+
|
|
22
|
+
attr_accessor :issuing_carrier
|
|
23
|
+
|
|
24
|
+
attr_accessor :carrier_name
|
|
25
|
+
|
|
26
|
+
attr_accessor :travel_agency_iata_code
|
|
27
|
+
|
|
28
|
+
attr_accessor :travel_agency_name
|
|
29
|
+
|
|
30
|
+
attr_accessor :airline_plan_number
|
|
31
|
+
|
|
32
|
+
attr_accessor :airline_invoice_number
|
|
33
|
+
|
|
34
|
+
attr_accessor :reservation_system
|
|
35
|
+
|
|
36
|
+
attr_accessor :restricted
|
|
37
|
+
|
|
38
|
+
attr_accessor :travel_route
|
|
39
|
+
|
|
40
|
+
attr_accessor :related_ticket_number
|
|
41
|
+
|
|
42
|
+
# Identify the purchase of ancillary goods or services with a false value. If this element is not provided, the transaction is assumed to be a purchase of an airline ticket.
|
|
43
|
+
attr_accessor :ancillary_service_category
|
|
44
|
+
|
|
45
|
+
attr_accessor :ticket_purchase
|
|
46
|
+
|
|
47
|
+
class EnumAttributeValidator
|
|
48
|
+
attr_reader :datatype
|
|
49
|
+
attr_reader :allowable_values
|
|
50
|
+
|
|
51
|
+
def initialize(datatype, allowable_values)
|
|
52
|
+
@allowable_values = allowable_values.map do |value|
|
|
53
|
+
case datatype.to_s
|
|
54
|
+
when /Integer/i
|
|
55
|
+
value.to_i
|
|
56
|
+
when /Float/i
|
|
57
|
+
value.to_f
|
|
58
|
+
else
|
|
59
|
+
value
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def valid?(value)
|
|
65
|
+
!value || allowable_values.include?(value)
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
70
|
+
def self.attribute_map
|
|
71
|
+
{
|
|
72
|
+
:'passenger_name' => :'passengerName',
|
|
73
|
+
:'ticket_number' => :'ticketNumber',
|
|
74
|
+
:'issuing_carrier' => :'issuingCarrier',
|
|
75
|
+
:'carrier_name' => :'carrierName',
|
|
76
|
+
:'travel_agency_iata_code' => :'travelAgencyIataCode',
|
|
77
|
+
:'travel_agency_name' => :'travelAgencyName',
|
|
78
|
+
:'airline_plan_number' => :'airlinePlanNumber',
|
|
79
|
+
:'airline_invoice_number' => :'airlineInvoiceNumber',
|
|
80
|
+
:'reservation_system' => :'reservationSystem',
|
|
81
|
+
:'restricted' => :'restricted',
|
|
82
|
+
:'travel_route' => :'travelRoute',
|
|
83
|
+
:'related_ticket_number' => :'relatedTicketNumber',
|
|
84
|
+
:'ancillary_service_category' => :'ancillaryServiceCategory',
|
|
85
|
+
:'ticket_purchase' => :'ticketPurchase'
|
|
86
|
+
}
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Attribute type mapping.
|
|
90
|
+
def self.swagger_types
|
|
91
|
+
{
|
|
92
|
+
:'passenger_name' => :'String',
|
|
93
|
+
:'ticket_number' => :'String',
|
|
94
|
+
:'issuing_carrier' => :'String',
|
|
95
|
+
:'carrier_name' => :'String',
|
|
96
|
+
:'travel_agency_iata_code' => :'String',
|
|
97
|
+
:'travel_agency_name' => :'String',
|
|
98
|
+
:'airline_plan_number' => :'String',
|
|
99
|
+
:'airline_invoice_number' => :'String',
|
|
100
|
+
:'reservation_system' => :'String',
|
|
101
|
+
:'restricted' => :'BOOLEAN',
|
|
102
|
+
:'travel_route' => :'Array<AirlineTravelRoute>',
|
|
103
|
+
:'related_ticket_number' => :'String',
|
|
104
|
+
:'ancillary_service_category' => :'Array<AirlineAncillaryServiceCategory>',
|
|
105
|
+
:'ticket_purchase' => :'BOOLEAN'
|
|
106
|
+
}
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Initializes the object
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
def initialize(attributes = {})
|
|
112
|
+
return unless attributes.is_a?(Hash)
|
|
113
|
+
|
|
114
|
+
# convert string to symbol for hash key
|
|
115
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
116
|
+
|
|
117
|
+
if attributes.has_key?(:'passengerName')
|
|
118
|
+
self.passenger_name = attributes[:'passengerName']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.has_key?(:'ticketNumber')
|
|
122
|
+
self.ticket_number = attributes[:'ticketNumber']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.has_key?(:'issuingCarrier')
|
|
126
|
+
self.issuing_carrier = attributes[:'issuingCarrier']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.has_key?(:'carrierName')
|
|
130
|
+
self.carrier_name = attributes[:'carrierName']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.has_key?(:'travelAgencyIataCode')
|
|
134
|
+
self.travel_agency_iata_code = attributes[:'travelAgencyIataCode']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.has_key?(:'travelAgencyName')
|
|
138
|
+
self.travel_agency_name = attributes[:'travelAgencyName']
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.has_key?(:'airlinePlanNumber')
|
|
142
|
+
self.airline_plan_number = attributes[:'airlinePlanNumber']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.has_key?(:'airlineInvoiceNumber')
|
|
146
|
+
self.airline_invoice_number = attributes[:'airlineInvoiceNumber']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.has_key?(:'reservationSystem')
|
|
150
|
+
self.reservation_system = attributes[:'reservationSystem']
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.has_key?(:'restricted')
|
|
154
|
+
self.restricted = attributes[:'restricted']
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.has_key?(:'travelRoute')
|
|
158
|
+
if (value = attributes[:'travelRoute']).is_a?(Array)
|
|
159
|
+
self.travel_route = value
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.has_key?(:'relatedTicketNumber')
|
|
164
|
+
self.related_ticket_number = attributes[:'relatedTicketNumber']
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.has_key?(:'ancillaryServiceCategory')
|
|
168
|
+
if (value = attributes[:'ancillaryServiceCategory']).is_a?(Array)
|
|
169
|
+
self.ancillary_service_category = value
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.has_key?(:'ticketPurchase')
|
|
174
|
+
self.ticket_purchase = attributes[:'ticketPurchase']
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
180
|
+
# @return Array for valid properties with the reasons
|
|
181
|
+
def list_invalid_properties
|
|
182
|
+
invalid_properties = Array.new
|
|
183
|
+
if !@passenger_name.nil? && @passenger_name.to_s.length > 30
|
|
184
|
+
invalid_properties.push("invalid value for 'passenger_name', the character length must be smaller than or equal to 30.")
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if !@ticket_number.nil? && @ticket_number.to_s.length > 20
|
|
188
|
+
invalid_properties.push("invalid value for 'ticket_number', the character length must be smaller than or equal to 20.")
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if !@issuing_carrier.nil? && @issuing_carrier.to_s.length > 20
|
|
192
|
+
invalid_properties.push("invalid value for 'issuing_carrier', the character length must be smaller than or equal to 20.")
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if !@carrier_name.nil? && @carrier_name.to_s.length > 20
|
|
196
|
+
invalid_properties.push("invalid value for 'carrier_name', the character length must be smaller than or equal to 20.")
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if !@travel_agency_iata_code.nil? && @travel_agency_iata_code.to_s.length > 20
|
|
200
|
+
invalid_properties.push("invalid value for 'travel_agency_iata_code', the character length must be smaller than or equal to 20.")
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if !@travel_agency_name.nil? && @travel_agency_name.to_s.length > 30
|
|
204
|
+
invalid_properties.push("invalid value for 'travel_agency_name', the character length must be smaller than or equal to 30.")
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
if !@airline_plan_number.nil? && @airline_plan_number.to_s.length > 2
|
|
208
|
+
invalid_properties.push("invalid value for 'airline_plan_number', the character length must be smaller than or equal to 2.")
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if !@airline_invoice_number.nil? && @airline_invoice_number.to_s.length > 6
|
|
212
|
+
invalid_properties.push("invalid value for 'airline_invoice_number', the character length must be smaller than or equal to 6.")
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if !@related_ticket_number.nil? && @related_ticket_number.to_s.length > 20
|
|
216
|
+
invalid_properties.push("invalid value for 'related_ticket_number', the character length must be smaller than or equal to 20.")
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
return invalid_properties
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Check to see if the all the properties in the model are valid
|
|
223
|
+
# @return true if the model is valid
|
|
224
|
+
def valid?
|
|
225
|
+
return false if !@passenger_name.nil? && @passenger_name.to_s.length > 30
|
|
226
|
+
return false if !@ticket_number.nil? && @ticket_number.to_s.length > 20
|
|
227
|
+
return false if !@issuing_carrier.nil? && @issuing_carrier.to_s.length > 20
|
|
228
|
+
return false if !@carrier_name.nil? && @carrier_name.to_s.length > 20
|
|
229
|
+
return false if !@travel_agency_iata_code.nil? && @travel_agency_iata_code.to_s.length > 20
|
|
230
|
+
return false if !@travel_agency_name.nil? && @travel_agency_name.to_s.length > 30
|
|
231
|
+
return false if !@airline_plan_number.nil? && @airline_plan_number.to_s.length > 2
|
|
232
|
+
return false if !@airline_invoice_number.nil? && @airline_invoice_number.to_s.length > 6
|
|
233
|
+
reservation_system_validator = EnumAttributeValidator.new('String', ["START", "TWA", "DELTA", "SABRE", "COVIA_APOLLO", "DR_BLANK", "DER", "TUI"])
|
|
234
|
+
return false unless reservation_system_validator.valid?(@reservation_system)
|
|
235
|
+
return false if !@related_ticket_number.nil? && @related_ticket_number.to_s.length > 20
|
|
236
|
+
return true
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Custom attribute writer method with validation
|
|
240
|
+
# @param [Object] passenger_name Value to be assigned
|
|
241
|
+
def passenger_name=(passenger_name)
|
|
242
|
+
|
|
243
|
+
if !passenger_name.nil? && passenger_name.to_s.length > 30
|
|
244
|
+
fail ArgumentError, "invalid value for 'passenger_name', the character length must be smaller than or equal to 30."
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
@passenger_name = passenger_name
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Custom attribute writer method with validation
|
|
251
|
+
# @param [Object] ticket_number Value to be assigned
|
|
252
|
+
def ticket_number=(ticket_number)
|
|
253
|
+
|
|
254
|
+
if !ticket_number.nil? && ticket_number.to_s.length > 20
|
|
255
|
+
fail ArgumentError, "invalid value for 'ticket_number', the character length must be smaller than or equal to 20."
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
@ticket_number = ticket_number
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Custom attribute writer method with validation
|
|
262
|
+
# @param [Object] issuing_carrier Value to be assigned
|
|
263
|
+
def issuing_carrier=(issuing_carrier)
|
|
264
|
+
|
|
265
|
+
if !issuing_carrier.nil? && issuing_carrier.to_s.length > 20
|
|
266
|
+
fail ArgumentError, "invalid value for 'issuing_carrier', the character length must be smaller than or equal to 20."
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
@issuing_carrier = issuing_carrier
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Custom attribute writer method with validation
|
|
273
|
+
# @param [Object] carrier_name Value to be assigned
|
|
274
|
+
def carrier_name=(carrier_name)
|
|
275
|
+
|
|
276
|
+
if !carrier_name.nil? && carrier_name.to_s.length > 20
|
|
277
|
+
fail ArgumentError, "invalid value for 'carrier_name', the character length must be smaller than or equal to 20."
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
@carrier_name = carrier_name
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# Custom attribute writer method with validation
|
|
284
|
+
# @param [Object] travel_agency_iata_code Value to be assigned
|
|
285
|
+
def travel_agency_iata_code=(travel_agency_iata_code)
|
|
286
|
+
|
|
287
|
+
if !travel_agency_iata_code.nil? && travel_agency_iata_code.to_s.length > 20
|
|
288
|
+
fail ArgumentError, "invalid value for 'travel_agency_iata_code', the character length must be smaller than or equal to 20."
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
@travel_agency_iata_code = travel_agency_iata_code
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# Custom attribute writer method with validation
|
|
295
|
+
# @param [Object] travel_agency_name Value to be assigned
|
|
296
|
+
def travel_agency_name=(travel_agency_name)
|
|
297
|
+
|
|
298
|
+
if !travel_agency_name.nil? && travel_agency_name.to_s.length > 30
|
|
299
|
+
fail ArgumentError, "invalid value for 'travel_agency_name', the character length must be smaller than or equal to 30."
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
@travel_agency_name = travel_agency_name
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# Custom attribute writer method with validation
|
|
306
|
+
# @param [Object] airline_plan_number Value to be assigned
|
|
307
|
+
def airline_plan_number=(airline_plan_number)
|
|
308
|
+
|
|
309
|
+
if !airline_plan_number.nil? && airline_plan_number.to_s.length > 2
|
|
310
|
+
fail ArgumentError, "invalid value for 'airline_plan_number', the character length must be smaller than or equal to 2."
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
@airline_plan_number = airline_plan_number
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Custom attribute writer method with validation
|
|
317
|
+
# @param [Object] airline_invoice_number Value to be assigned
|
|
318
|
+
def airline_invoice_number=(airline_invoice_number)
|
|
319
|
+
|
|
320
|
+
if !airline_invoice_number.nil? && airline_invoice_number.to_s.length > 6
|
|
321
|
+
fail ArgumentError, "invalid value for 'airline_invoice_number', the character length must be smaller than or equal to 6."
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
@airline_invoice_number = airline_invoice_number
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
328
|
+
# @param [Object] reservation_system Object to be assigned
|
|
329
|
+
def reservation_system=(reservation_system)
|
|
330
|
+
validator = EnumAttributeValidator.new('String', ["START", "TWA", "DELTA", "SABRE", "COVIA_APOLLO", "DR_BLANK", "DER", "TUI"])
|
|
331
|
+
unless validator.valid?(reservation_system)
|
|
332
|
+
fail ArgumentError, "invalid value for 'reservation_system', must be one of #{validator.allowable_values}."
|
|
333
|
+
end
|
|
334
|
+
@reservation_system = reservation_system
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Custom attribute writer method with validation
|
|
338
|
+
# @param [Object] related_ticket_number Value to be assigned
|
|
339
|
+
def related_ticket_number=(related_ticket_number)
|
|
340
|
+
|
|
341
|
+
if !related_ticket_number.nil? && related_ticket_number.to_s.length > 20
|
|
342
|
+
fail ArgumentError, "invalid value for 'related_ticket_number', the character length must be smaller than or equal to 20."
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
@related_ticket_number = related_ticket_number
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# Checks equality by comparing each attribute.
|
|
349
|
+
# @param [Object] Object to be compared
|
|
350
|
+
def ==(o)
|
|
351
|
+
return true if self.equal?(o)
|
|
352
|
+
self.class == o.class &&
|
|
353
|
+
passenger_name == o.passenger_name &&
|
|
354
|
+
ticket_number == o.ticket_number &&
|
|
355
|
+
issuing_carrier == o.issuing_carrier &&
|
|
356
|
+
carrier_name == o.carrier_name &&
|
|
357
|
+
travel_agency_iata_code == o.travel_agency_iata_code &&
|
|
358
|
+
travel_agency_name == o.travel_agency_name &&
|
|
359
|
+
airline_plan_number == o.airline_plan_number &&
|
|
360
|
+
airline_invoice_number == o.airline_invoice_number &&
|
|
361
|
+
reservation_system == o.reservation_system &&
|
|
362
|
+
restricted == o.restricted &&
|
|
363
|
+
travel_route == o.travel_route &&
|
|
364
|
+
related_ticket_number == o.related_ticket_number &&
|
|
365
|
+
ancillary_service_category == o.ancillary_service_category &&
|
|
366
|
+
ticket_purchase == o.ticket_purchase
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
# @see the `==` method
|
|
370
|
+
# @param [Object] Object to be compared
|
|
371
|
+
def eql?(o)
|
|
372
|
+
self == o
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# Calculates hash code according to all attributes.
|
|
376
|
+
# @return [Fixnum] Hash code
|
|
377
|
+
def hash
|
|
378
|
+
[passenger_name, ticket_number, issuing_carrier, carrier_name, travel_agency_iata_code, travel_agency_name, airline_plan_number, airline_invoice_number, reservation_system, restricted, travel_route, related_ticket_number, ancillary_service_category, ticket_purchase].hash
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# Builds the object from hash
|
|
382
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
383
|
+
# @return [Object] Returns the model itself
|
|
384
|
+
def build_from_hash(attributes)
|
|
385
|
+
return nil unless attributes.is_a?(Hash)
|
|
386
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
387
|
+
if type =~ /\AArray<(.*)>/i
|
|
388
|
+
# check to ensure the input is an array given that the the attribute
|
|
389
|
+
# is documented as an array but the input is not
|
|
390
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
391
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
392
|
+
end
|
|
393
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
394
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
395
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
self
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# Deserializes the data based on type
|
|
402
|
+
# @param string type Data type
|
|
403
|
+
# @param string value Value to be deserialized
|
|
404
|
+
# @return [Object] Deserialized data
|
|
405
|
+
def _deserialize(type, value)
|
|
406
|
+
case type.to_sym
|
|
407
|
+
when :DateTime
|
|
408
|
+
DateTime.parse(value)
|
|
409
|
+
when :Date
|
|
410
|
+
Date.parse(value)
|
|
411
|
+
when :String
|
|
412
|
+
value.to_s
|
|
413
|
+
when :Integer
|
|
414
|
+
value.to_i
|
|
415
|
+
when :Float
|
|
416
|
+
value.to_f
|
|
417
|
+
when :BOOLEAN
|
|
418
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
419
|
+
true
|
|
420
|
+
else
|
|
421
|
+
false
|
|
422
|
+
end
|
|
423
|
+
when :Object
|
|
424
|
+
# generic object (usually a Hash), return directly
|
|
425
|
+
value
|
|
426
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
427
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
428
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
429
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
430
|
+
k_type = Regexp.last_match[:k_type]
|
|
431
|
+
v_type = Regexp.last_match[:v_type]
|
|
432
|
+
{}.tap do |hash|
|
|
433
|
+
value.each do |k, v|
|
|
434
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
435
|
+
end
|
|
436
|
+
end
|
|
437
|
+
else # model
|
|
438
|
+
temp_model = SwaggerClient.const_get(type).new
|
|
439
|
+
temp_model.build_from_hash(value)
|
|
440
|
+
end
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
# Returns the string representation of the object
|
|
444
|
+
# @return [String] String presentation of the object
|
|
445
|
+
def to_s
|
|
446
|
+
to_hash.to_s
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
450
|
+
# @return [Hash] Returns the object in the form of hash
|
|
451
|
+
def to_body
|
|
452
|
+
to_hash
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
# Returns the object in the form of hash
|
|
456
|
+
# @return [Hash] Returns the object in the form of hash
|
|
457
|
+
def to_hash
|
|
458
|
+
hash = {}
|
|
459
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
460
|
+
value = self.send(attr)
|
|
461
|
+
next if value.nil?
|
|
462
|
+
hash[param] = _to_hash(value)
|
|
463
|
+
end
|
|
464
|
+
hash
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
# Outputs non-array value in the form of hash
|
|
468
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
469
|
+
# @param [Object] value Any valid value
|
|
470
|
+
# @return [Hash] Returns the value in the form of hash
|
|
471
|
+
def _to_hash(value)
|
|
472
|
+
if value.is_a?(Array)
|
|
473
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
474
|
+
elsif value.is_a?(Hash)
|
|
475
|
+
{}.tap do |hash|
|
|
476
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
477
|
+
end
|
|
478
|
+
elsif value.respond_to? :to_hash
|
|
479
|
+
value.to_hash
|
|
480
|
+
else
|
|
481
|
+
value
|
|
482
|
+
end
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
end
|