001// Generated by delombok at Thu Aug 13 13:56:44 UTC 2026 002/* 003 * Copyright (c) 2010-2026 Mark Allen, Norbert Bartels. 004 * 005 * Permission is hereby granted, free of charge, to any person obtaining a copy 006 * of this software and associated documentation files (the "Software"), to deal 007 * in the Software without restriction, including without limitation the rights 008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 009 * copies of the Software, and to permit persons to whom the Software is 010 * furnished to do so, subject to the following conditions: 011 * 012 * The above copyright notice and this permission notice shall be included in 013 * all copies or substantial portions of the Software. 014 * 015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 021 * THE SOFTWARE. 022 */ 023package com.restfb.types.send.airline; 024 025import java.util.ArrayList; 026import java.util.List; 027import com.restfb.Facebook; 028import com.restfb.types.send.TemplatePayload; 029 030/** 031 * Represents the <a href= 032 * "https://developers.facebook.com/docs/messenger-platform/send-api-reference/airline-itinerary-template">Airline 033 * Itinerary Template Payload</a> type 034 */ 035public class AirlineItineraryTemplatePayload extends TemplatePayload { 036 @Facebook("intro_message") 037 private String introMessage; 038 @Facebook 039 private String locale; 040 @Facebook("theme_color") 041 private String themeColor; 042 @Facebook("pnr_number") 043 private String pnrNumber; 044 @Facebook("passenger_info") 045 private List<PassengerInfo> passengerInfoList; 046 @Facebook("flight_info") 047 private List<FlightInfo> flightInfoList; 048 @Facebook("passenger_segment_info") 049 private List<PassengerSegmentInfo> passengerSegmentInfoList; 050 @Facebook("price_info") 051 private List<PriceInfo> priceInfoList; 052 @Facebook("base_price") 053 private double basePrice; 054 @Facebook 055 private double tax; 056 @Facebook("total_price") 057 private double totalPrice; 058 @Facebook 059 private String currency; 060 061 public AirlineItineraryTemplatePayload(String introMessage, String locale, String pnrNumber, double totalPrice) { 062 setTemplateType("airline_itinerary"); 063 this.introMessage = introMessage; 064 this.locale = locale; 065 this.pnrNumber = pnrNumber; 066 this.totalPrice = totalPrice; 067 } 068 069 public boolean addPassengerInfo(PassengerInfo passengerInfo) { 070 if (passengerInfoList == null) { 071 passengerInfoList = new ArrayList<>(); 072 } 073 return passengerInfoList.add(passengerInfo); 074 } 075 076 public boolean addFlightInfo(FlightInfo flightInfo) { 077 if (flightInfoList == null) { 078 flightInfoList = new ArrayList<>(); 079 } 080 return flightInfoList.add(flightInfo); 081 } 082 083 public boolean addPassengerSegmentInfo(PassengerSegmentInfo passengerSegmentInfo) { 084 if (passengerSegmentInfoList == null) { 085 passengerSegmentInfoList = new ArrayList<>(); 086 } 087 return passengerSegmentInfoList.add(passengerSegmentInfo); 088 } 089 090 public boolean addPriceInfo(PriceInfo priceInfo) { 091 if (priceInfoList == null) { 092 priceInfoList = new ArrayList<>(); 093 } 094 return priceInfoList.add(priceInfo); 095 } 096 097 @java.lang.SuppressWarnings("all") 098 @lombok.Generated 099 public String getIntroMessage() { 100 return this.introMessage; 101 } 102 103 @java.lang.SuppressWarnings("all") 104 @lombok.Generated 105 public String getLocale() { 106 return this.locale; 107 } 108 109 @java.lang.SuppressWarnings("all") 110 @lombok.Generated 111 public String getThemeColor() { 112 return this.themeColor; 113 } 114 115 @java.lang.SuppressWarnings("all") 116 @lombok.Generated 117 public void setThemeColor(final String themeColor) { 118 this.themeColor = themeColor; 119 } 120 121 @java.lang.SuppressWarnings("all") 122 @lombok.Generated 123 public String getPnrNumber() { 124 return this.pnrNumber; 125 } 126 127 @java.lang.SuppressWarnings("all") 128 @lombok.Generated 129 public List<PassengerInfo> getPassengerInfoList() { 130 return this.passengerInfoList; 131 } 132 133 @java.lang.SuppressWarnings("all") 134 @lombok.Generated 135 public List<FlightInfo> getFlightInfoList() { 136 return this.flightInfoList; 137 } 138 139 @java.lang.SuppressWarnings("all") 140 @lombok.Generated 141 public List<PassengerSegmentInfo> getPassengerSegmentInfoList() { 142 return this.passengerSegmentInfoList; 143 } 144 145 @java.lang.SuppressWarnings("all") 146 @lombok.Generated 147 public List<PriceInfo> getPriceInfoList() { 148 return this.priceInfoList; 149 } 150 151 @java.lang.SuppressWarnings("all") 152 @lombok.Generated 153 public double getBasePrice() { 154 return this.basePrice; 155 } 156 157 @java.lang.SuppressWarnings("all") 158 @lombok.Generated 159 public void setBasePrice(final double basePrice) { 160 this.basePrice = basePrice; 161 } 162 163 @java.lang.SuppressWarnings("all") 164 @lombok.Generated 165 public double getTax() { 166 return this.tax; 167 } 168 169 @java.lang.SuppressWarnings("all") 170 @lombok.Generated 171 public void setTax(final double tax) { 172 this.tax = tax; 173 } 174 175 @java.lang.SuppressWarnings("all") 176 @lombok.Generated 177 public double getTotalPrice() { 178 return this.totalPrice; 179 } 180 181 @java.lang.SuppressWarnings("all") 182 @lombok.Generated 183 public String getCurrency() { 184 return this.currency; 185 } 186}