View Javadoc
1   package org.oxerr.seatgeek.client.model;
2   
3   import java.io.Serializable;
4   import java.math.BigDecimal;
5   import java.time.LocalDate;
6   import java.util.List;
7   
8   import org.apache.commons.lang3.builder.EqualsBuilder;
9   import org.apache.commons.lang3.builder.HashCodeBuilder;
10  
11  import com.fasterxml.jackson.annotation.JsonProperty;
12  
13  public abstract class AbstractListing implements Serializable {
14  
15  	private static final long serialVersionUID = 2023031401L;
16  
17  	/**
18  	 * The number of seats in this listing.
19  	 */
20  	private Integer quantity;
21  
22  	/**
23  	 * The broadcast price of the listing.
24  	 * You will be paid this amount per ticket, less any fees.
25  	 * Buyers will typically see a higher price than this.
26  	 */
27  	private BigDecimal cost;
28  
29  	/**
30  	 * What section are the seats in?
31  	 */
32  	private String section;
33  
34  	/**
35  	 * What row are the seats in?
36  	 */
37  	private String row;
38  
39  	/**
40  	 * The minimum seat number in this listing.
41  	 */
42  	private Integer seatFrom;
43  
44  	/**
45  	 * The maximum seat number in this listing.
46  	 */
47  	private Integer seatThru;
48  
49  	/**
50  	 * Notes about what kind of seats these are, as well as how they will be fulfilled.
51  	 * See Notes section below for more details.
52  	 */
53  	private String notes;
54  
55  	/**
56  	 * If you provide a date here, you’re telling SeatGeek to not remind you
57  	 * to fulfill this listing until this date.
58  	 * If you don’t, we’ll start reminding you right away.
59  	 */
60  	private LocalDate inHandDate;
61  
62  	/**
63  	 * Will these tickets be fulfilled electronically?
64  	 * Should be {@literal true} for PDF, screenshot, and mobile transfer fulfillment,
65  	 * and {@literal false} for shipped, shipped gift card, venue walk-in,
66  	 * and will call fulfillment.
67  	 */
68  	@JsonProperty("is_edelivery")
69  	private Boolean edelivery;
70  
71  	/**
72  	 * Will you fulfill this order within minutes of a purchase?
73  	 * Will be set to {@literal false} if Is Electronic is {@literal false}.
74  	 */
75  	@JsonProperty("is_instant")
76  	private Boolean instant;
77  
78  	/**
79  	 * How should we choose which quantities to sell in?
80  	 */
81  	private SplitType splitType;
82  
83  	/**
84  	 * The type of tokens being sent through {@code Tokens}.
85  	 */
86  	private TokensType tokensType;
87  
88  	/**
89  	 * When seats are not provided, tokens should be in the order
90  	 * of the seat numbers.
91  	 * For this sample value, if {@code SeatFrom} is {@literal 1}
92  	 * and {@code SeatThru} is {@literal 4},
93  	 * then {@literal 4534k} is seat 1, {@literal 728k} is seat 2, etc.
94  	 */
95  	private List<Token> tokens;
96  
97  	/**
98  	 * When seats are not provided, barcodes should be in the order
99  	 * of the seat numbers.
100 	 * For this sample value, if {@code SeatFrom} is {@literal 1}
101 	 * and {@code SeatThru} is {@literal 4},
102 	 * then {@literal 4534k} is seat 1, {@literal 728k} is seat 2, etc.
103 	 */
104 	private List<Barcode> barcodes;
105 
106 	public Integer getQuantity() {
107 		return quantity;
108 	}
109 
110 	public void setQuantity(Integer quantity) {
111 		this.quantity = quantity;
112 	}
113 
114 	public BigDecimal getCost() {
115 		return cost;
116 	}
117 
118 	public void setCost(BigDecimal cost) {
119 		this.cost = cost;
120 	}
121 
122 	public String getSection() {
123 		return section;
124 	}
125 
126 	public void setSection(String section) {
127 		this.section = section;
128 	}
129 
130 	public String getRow() {
131 		return row;
132 	}
133 
134 	public void setRow(String row) {
135 		this.row = row;
136 	}
137 
138 	public Integer getSeatFrom() {
139 		return seatFrom;
140 	}
141 
142 	public void setSeatFrom(Integer seatFrom) {
143 		this.seatFrom = seatFrom;
144 	}
145 
146 	public Integer getSeatThru() {
147 		return seatThru;
148 	}
149 
150 	public void setSeatThru(Integer seatThru) {
151 		this.seatThru = seatThru;
152 	}
153 
154 	public String getNotes() {
155 		return notes;
156 	}
157 
158 	public void setNotes(String notes) {
159 		this.notes = notes;
160 	}
161 
162 	public LocalDate getInHandDate() {
163 		return inHandDate;
164 	}
165 
166 	public void setInHandDate(LocalDate inHandDate) {
167 		this.inHandDate = inHandDate;
168 	}
169 
170 	public Boolean getEdelivery() {
171 		return edelivery;
172 	}
173 
174 	public void setEdelivery(Boolean edelivery) {
175 		this.edelivery = edelivery;
176 	}
177 
178 	public Boolean getInstant() {
179 		return instant;
180 	}
181 
182 	public void setInstant(Boolean instant) {
183 		this.instant = instant;
184 	}
185 
186 	public SplitType getSplitType() {
187 		return splitType;
188 	}
189 
190 	public void setSplitType(SplitType splitType) {
191 		this.splitType = splitType;
192 	}
193 
194 	public TokensType getTokensType() {
195 		return tokensType;
196 	}
197 
198 	public void setTokensType(TokensType tokensType) {
199 		this.tokensType = tokensType;
200 	}
201 
202 	public List<Token> getTokens() {
203 		return tokens;
204 	}
205 
206 	public void setTokens(List<Token> tokens) {
207 		this.tokens = tokens;
208 	}
209 
210 	public List<Barcode> getBarcodes() {
211 		return barcodes;
212 	}
213 
214 	public void setBarcodes(List<Barcode> barcodes) {
215 		this.barcodes = barcodes;
216 	}
217 
218 	@Override
219 	public int hashCode() {
220 		return HashCodeBuilder.reflectionHashCode(this);
221 	}
222 
223 	@Override
224 	public boolean equals(Object obj) {
225 		if (obj == null) {
226 			return false;
227 		}
228 		if (obj == this) {
229 			return true;
230 		}
231 		if (obj.getClass() != getClass()) {
232 			return false;
233 		}
234 		AbstractListing rhs = (AbstractListing) obj;
235 		return EqualsBuilder.reflectionEquals(this, rhs);
236 	}
237 
238 }