Class: Ingenico::Direct::SDK::Domain::AirlineData
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::AirlineData
- Defined in:
- lib/ingenico/direct/sdk/domain/airline_data.rb
Instance Attribute Summary collapse
-
#agent_numeric_code ⇒ String
The current value of agent_numeric_code.
-
#code ⇒ String
The current value of code.
-
#flight_date ⇒ String
The current value of flight_date.
-
#flight_legs ⇒ Array<Ingenico::Direct::SDK::Domain::AirlineFlightLeg>
The current value of flight_legs.
-
#invoice_number ⇒ String
The current value of invoice_number.
-
#is_e_ticket ⇒ true/false
The current value of is_e_ticket.
-
#is_restricted_ticket ⇒ true/false
The current value of is_restricted_ticket.
-
#is_third_party ⇒ true/false
The current value of is_third_party.
-
#issue_date ⇒ String
The current value of issue_date.
-
#merchant_customer_id ⇒ String
The current value of merchant_customer_id.
-
#name ⇒ String
The current value of name.
-
#passenger_name ⇒ String
The current value of passenger_name.
-
#passengers ⇒ Array<Ingenico::Direct::SDK::Domain::AirlinePassenger>
The current value of passengers.
-
#place_of_issue ⇒ String
The current value of place_of_issue.
-
#pnr ⇒ String
The current value of pnr.
-
#point_of_sale ⇒ String
The current value of point_of_sale.
-
#pos_city_code ⇒ String
The current value of pos_city_code.
-
#ticket_delivery_method ⇒ String
The current value of ticket_delivery_method.
-
#ticket_number ⇒ String
The current value of ticket_number.
-
#total_fare ⇒ Integer
The current value of total_fare.
-
#total_fee ⇒ Integer
The current value of total_fee.
-
#total_taxes ⇒ Integer
The current value of total_taxes.
-
#travel_agency_name ⇒ String
The current value of travel_agency_name.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#agent_numeric_code ⇒ String
Returns the current value of agent_numeric_code.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def agent_numeric_code @agent_numeric_code end |
#code ⇒ String
Returns the current value of code.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def code @code end |
#flight_date ⇒ String
Returns the current value of flight_date.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def flight_date @flight_date end |
#flight_legs ⇒ Array<Ingenico::Direct::SDK::Domain::AirlineFlightLeg>
Returns the current value of flight_legs.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def flight_legs @flight_legs end |
#invoice_number ⇒ String
Returns the current value of invoice_number.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def invoice_number @invoice_number end |
#is_e_ticket ⇒ true/false
Returns the current value of is_e_ticket.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def is_e_ticket @is_e_ticket end |
#is_restricted_ticket ⇒ true/false
Returns the current value of is_restricted_ticket.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def is_restricted_ticket @is_restricted_ticket end |
#is_third_party ⇒ true/false
Returns the current value of is_third_party.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def is_third_party @is_third_party end |
#issue_date ⇒ String
Returns the current value of issue_date.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def issue_date @issue_date end |
#merchant_customer_id ⇒ String
Returns the current value of merchant_customer_id.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def merchant_customer_id @merchant_customer_id end |
#name ⇒ String
Returns the current value of name.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def name @name end |
#passenger_name ⇒ String
Returns the current value of passenger_name.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def passenger_name @passenger_name end |
#passengers ⇒ Array<Ingenico::Direct::SDK::Domain::AirlinePassenger>
Returns the current value of passengers.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def passengers @passengers end |
#place_of_issue ⇒ String
Returns the current value of place_of_issue.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def place_of_issue @place_of_issue end |
#pnr ⇒ String
Returns the current value of pnr.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def pnr @pnr end |
#point_of_sale ⇒ String
Returns the current value of point_of_sale.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def point_of_sale @point_of_sale end |
#pos_city_code ⇒ String
Returns the current value of pos_city_code.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def pos_city_code @pos_city_code end |
#ticket_delivery_method ⇒ String
Returns the current value of ticket_delivery_method.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def ticket_delivery_method @ticket_delivery_method end |
#ticket_number ⇒ String
Returns the current value of ticket_number.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def ticket_number @ticket_number end |
#total_fare ⇒ Integer
Returns the current value of total_fare.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def total_fare @total_fare end |
#total_fee ⇒ Integer
Returns the current value of total_fee.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def total_fee @total_fee end |
#total_taxes ⇒ Integer
Returns the current value of total_taxes.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def total_taxes @total_taxes end |
#travel_agency_name ⇒ String
Returns the current value of travel_agency_name.
35 36 37 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 35 def travel_agency_name @travel_agency_name end |
Instance Method Details
#from_hash(hash) ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 89 def from_hash(hash) super @agent_numeric_code = hash['agentNumericCode'] if hash.key? 'agentNumericCode' @code = hash['code'] if hash.key? 'code' @flight_date = hash['flightDate'] if hash.key? 'flightDate' if hash.key? 'flightLegs' raise TypeError, "value '%s' is not an Array" % [hash['flightLegs']] unless hash['flightLegs'].is_a? Array @flight_legs = [] hash['flightLegs'].each do |e| @flight_legs << Ingenico::Direct::SDK::Domain::AirlineFlightLeg.new_from_hash(e) end end @invoice_number = hash['invoiceNumber'] if hash.key? 'invoiceNumber' @is_e_ticket = hash['isETicket'] if hash.key? 'isETicket' @is_restricted_ticket = hash['isRestrictedTicket'] if hash.key? 'isRestrictedTicket' @is_third_party = hash['isThirdParty'] if hash.key? 'isThirdParty' @issue_date = hash['issueDate'] if hash.key? 'issueDate' @merchant_customer_id = hash['merchantCustomerId'] if hash.key? 'merchantCustomerId' @name = hash['name'] if hash.key? 'name' @passenger_name = hash['passengerName'] if hash.key? 'passengerName' if hash.key? 'passengers' raise TypeError, "value '%s' is not an Array" % [hash['passengers']] unless hash['passengers'].is_a? Array @passengers = [] hash['passengers'].each do |e| @passengers << Ingenico::Direct::SDK::Domain::AirlinePassenger.new_from_hash(e) end end @place_of_issue = hash['placeOfIssue'] if hash.key? 'placeOfIssue' @pnr = hash['pnr'] if hash.key? 'pnr' @point_of_sale = hash['pointOfSale'] if hash.key? 'pointOfSale' @pos_city_code = hash['posCityCode'] if hash.key? 'posCityCode' @ticket_delivery_method = hash['ticketDeliveryMethod'] if hash.key? 'ticketDeliveryMethod' @ticket_number = hash['ticketNumber'] if hash.key? 'ticketNumber' @total_fare = hash['totalFare'] if hash.key? 'totalFare' @total_fee = hash['totalFee'] if hash.key? 'totalFee' @total_taxes = hash['totalTaxes'] if hash.key? 'totalTaxes' @travel_agency_name = hash['travelAgencyName'] if hash.key? 'travelAgencyName' end |
#to_h ⇒ Hash
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/ingenico/direct/sdk/domain/airline_data.rb', line 61 def to_h hash = super hash['agentNumericCode'] = @agent_numeric_code unless @agent_numeric_code.nil? hash['code'] = @code unless @code.nil? hash['flightDate'] = @flight_date unless @flight_date.nil? hash['flightLegs'] = @flight_legs.collect(&:to_h) if @flight_legs hash['invoiceNumber'] = @invoice_number unless @invoice_number.nil? hash['isETicket'] = @is_e_ticket unless @is_e_ticket.nil? hash['isRestrictedTicket'] = @is_restricted_ticket unless @is_restricted_ticket.nil? hash['isThirdParty'] = @is_third_party unless @is_third_party.nil? hash['issueDate'] = @issue_date unless @issue_date.nil? hash['merchantCustomerId'] = @merchant_customer_id unless @merchant_customer_id.nil? hash['name'] = @name unless @name.nil? hash['passengerName'] = @passenger_name unless @passenger_name.nil? hash['passengers'] = @passengers.collect(&:to_h) if @passengers hash['placeOfIssue'] = @place_of_issue unless @place_of_issue.nil? hash['pnr'] = @pnr unless @pnr.nil? hash['pointOfSale'] = @point_of_sale unless @point_of_sale.nil? hash['posCityCode'] = @pos_city_code unless @pos_city_code.nil? hash['ticketDeliveryMethod'] = @ticket_delivery_method unless @ticket_delivery_method.nil? hash['ticketNumber'] = @ticket_number unless @ticket_number.nil? hash['totalFare'] = @total_fare unless @total_fare.nil? hash['totalFee'] = @total_fee unless @total_fee.nil? hash['totalTaxes'] = @total_taxes unless @total_taxes.nil? hash['travelAgencyName'] = @travel_agency_name unless @travel_agency_name.nil? hash end |