View Javadoc
1   package org.oxerr.viagogo.model.response.inventory;
2   
3   import java.time.Instant;
4   import java.util.List;
5   
6   import org.apache.commons.lang3.builder.EqualsBuilder;
7   import org.apache.commons.lang3.builder.HashCodeBuilder;
8   import org.oxerr.viagogo.model.BarcodeInformation;
9   import org.oxerr.viagogo.model.Money;
10  import org.oxerr.viagogo.model.SeatingDetail;
11  import org.oxerr.viagogo.model.response.Resource;
12  import org.oxerr.viagogo.model.response.catalog.Event;
13  import org.oxerr.viagogo.model.response.catalog.Venue;
14  
15  import io.openapitools.jackson.dataformat.hal.annotation.EmbeddedResource;
16  
17  /**
18   * A set of tickets for sale on the viagogo marketplace that belong to the
19   * currently authenticated user.
20   *
21   * <a href=
22   * "https://developer.viagogo.net/api-reference/inventory#tag/Resource_SellerListing">SellerListing</a>
23   */
24  @io.openapitools.jackson.dataformat.hal.annotation.Resource
25  public class SellerListing extends Resource {
26  
27  	private static final long serialVersionUID = 2023021301L;
28  
29  	/**
30  	 * The listing identifier.
31  	 */
32  	private Long id;
33  
34  	/**
35  	 * The date when the listing was created.
36  	 */
37  	private Instant createdAt;
38  
39  	/**
40  	 * The number of tickets available for purchase.
41  	 */
42  	private Integer numberOfTickets;
43  
44  	/**
45  	 * The seating information for the ticket(s) in this listing.
46  	 */
47  	private SeatingDetail seating;
48  
49  	/**
50  	 * The seating information that will be displayed to buyers for the ticket(s) in
51  	 * this listing.
52  	 */
53  	private SeatingDetail displaySeating;
54  
55  	/**
56  	 * The price of each ticket in the listing.
57  	 */
58  	private Money ticketPrice;
59  
60  	/**
61  	 * The date when the listing was last updated.
62  	 */
63  	private Instant updatedAt;
64  
65  	/**
66  	 * An identifier that has been assigned to the listing in an external inventory
67  	 * management system.
68  	 */
69  	private String externalId;
70  
71  	/**
72  	 * The date when the listing will be automatically unpublished from the
73  	 * marketplace.
74  	 */
75  	private Instant expiresAt;
76  
77  	/**
78  	 * The number of tickets that should be displayed to buyers as available for
79  	 * purchase.
80  	 */
81  	private Integer displayNumberOfTickets;
82  
83  	/**
84  	 * The price printed on the ticket, not including any booking fees.
85  	 */
86  	private Money faceValue;
87  
88  	/**
89  	 * The amount that the seller will receive for each ticket sold.
90  	 */
91  	private Money ticketProceeds;
92  
93  	/**
94  	 * The date when the seller will have the tickets in hand.
95  	 */
96  	private Instant inHandAt;
97  
98  	/**
99  	 * Barcode(s) for the ticket(s) in this listing.
100 	 */
101 	private List<BarcodeInformation> barcodes;
102 
103 	private Boolean instantDelivery;
104 
105 	/**
106 	 * Shipment of the ticket to the buyer cannot be guaranteed before the event. To
107 	 * increase the deliverability of electronic type tickets, preupload them (e.g.
108 	 * pre-upload barcodes or PDF files.) To increase deliverability of paper
109 	 * tickets, opt your tickets into our LMS program.
110 	 */
111 	private Boolean undeliverable;
112 
113 	/**
114 	 * The purchase price paid by the seller for each ticket in the listing.
115 	 */
116 	private Money purchasePricePerTicket;
117 
118 	/**
119 	 * The total purchase price paid by the seller.
120 	 */
121 	private Money totalPurchasePrice;
122 
123 	/**
124 	 * True if the seller already paid sales tax for the ticket(s); otherwise,
125 	 * false.
126 	 */
127 	private Boolean salesTaxPaid;
128 
129 	@EmbeddedResource
130 	private ListingConstraints constraints;
131 
132 	@EmbeddedResource
133 	private Event event;
134 
135 	@EmbeddedResource
136 	private List<ListingNote> listingNotes;
137 
138 	@EmbeddedResource
139 	private SplitType splitType;
140 
141 	@EmbeddedResource
142 	private TicketType ticketType;
143 
144 	@EmbeddedResource
145 	private Venue venue;
146 
147 	public Long getId() {
148 		return id;
149 	}
150 
151 	public void setId(Long id) {
152 		this.id = id;
153 	}
154 
155 	public Instant getCreatedAt() {
156 		return createdAt;
157 	}
158 
159 	public void setCreatedAt(Instant createdAt) {
160 		this.createdAt = createdAt;
161 	}
162 
163 	public Integer getNumberOfTickets() {
164 		return numberOfTickets;
165 	}
166 
167 	public void setNumberOfTickets(Integer numberOfTickets) {
168 		this.numberOfTickets = numberOfTickets;
169 	}
170 
171 	public SeatingDetail getSeating() {
172 		return seating;
173 	}
174 
175 	public void setSeating(SeatingDetail seating) {
176 		this.seating = seating;
177 	}
178 
179 	public SeatingDetail getDisplaySeating() {
180 		return displaySeating;
181 	}
182 
183 	public void setDisplaySeating(SeatingDetail displaySeating) {
184 		this.displaySeating = displaySeating;
185 	}
186 
187 	public Money getTicketPrice() {
188 		return ticketPrice;
189 	}
190 
191 	public void setTicketPrice(Money ticketPrice) {
192 		this.ticketPrice = ticketPrice;
193 	}
194 
195 	public Instant getUpdatedAt() {
196 		return updatedAt;
197 	}
198 
199 	public void setUpdatedAt(Instant updatedAt) {
200 		this.updatedAt = updatedAt;
201 	}
202 
203 	public String getExternalId() {
204 		return externalId;
205 	}
206 
207 	public void setExternalId(String externalId) {
208 		this.externalId = externalId;
209 	}
210 
211 	public Instant getExpiresAt() {
212 		return expiresAt;
213 	}
214 
215 	public void setExpiresAt(Instant expiresAt) {
216 		this.expiresAt = expiresAt;
217 	}
218 
219 	public Integer getDisplayNumberOfTickets() {
220 		return displayNumberOfTickets;
221 	}
222 
223 	public void setDisplayNumberOfTickets(Integer displayNumberOfTickets) {
224 		this.displayNumberOfTickets = displayNumberOfTickets;
225 	}
226 
227 	public Money getFaceValue() {
228 		return faceValue;
229 	}
230 
231 	public void setFaceValue(Money faceValue) {
232 		this.faceValue = faceValue;
233 	}
234 
235 	public Money getTicketProceeds() {
236 		return ticketProceeds;
237 	}
238 
239 	public void setTicketProceeds(Money ticketProceeds) {
240 		this.ticketProceeds = ticketProceeds;
241 	}
242 
243 	public Instant getInHandAt() {
244 		return inHandAt;
245 	}
246 
247 	public void setInHandAt(Instant inHandAt) {
248 		this.inHandAt = inHandAt;
249 	}
250 
251 	public List<BarcodeInformation> getBarcodes() {
252 		return barcodes;
253 	}
254 
255 	public void setBarcodes(List<BarcodeInformation> barcodes) {
256 		this.barcodes = barcodes;
257 	}
258 
259 	public Boolean getInstantDelivery() {
260 		return instantDelivery;
261 	}
262 
263 	public void setInstantDelivery(Boolean instantDelivery) {
264 		this.instantDelivery = instantDelivery;
265 	}
266 
267 	public Boolean getUndeliverable() {
268 		return undeliverable;
269 	}
270 
271 	public void setUndeliverable(Boolean undeliverable) {
272 		this.undeliverable = undeliverable;
273 	}
274 
275 	public Money getPurchasePricePerTicket() {
276 		return purchasePricePerTicket;
277 	}
278 
279 	public void setPurchasePricePerTicket(Money purchasePricePerTicket) {
280 		this.purchasePricePerTicket = purchasePricePerTicket;
281 	}
282 
283 	public Money getTotalPurchasePrice() {
284 		return totalPurchasePrice;
285 	}
286 
287 	public void setTotalPurchasePrice(Money totalPurchasePrice) {
288 		this.totalPurchasePrice = totalPurchasePrice;
289 	}
290 
291 	public Boolean getSalesTaxPaid() {
292 		return salesTaxPaid;
293 	}
294 
295 	public void setSalesTaxPaid(Boolean salesTaxPaid) {
296 		this.salesTaxPaid = salesTaxPaid;
297 	}
298 
299 	public ListingConstraints getConstraints() {
300 		return constraints;
301 	}
302 
303 	public void setConstraints(ListingConstraints constraints) {
304 		this.constraints = constraints;
305 	}
306 
307 	public Event getEvent() {
308 		return event;
309 	}
310 
311 	public void setEvent(Event event) {
312 		this.event = event;
313 	}
314 
315 	public List<ListingNote> getListingNotes() {
316 		return listingNotes;
317 	}
318 
319 	public void setListingNotes(List<ListingNote> listingNotes) {
320 		this.listingNotes = listingNotes;
321 	}
322 
323 	public SplitType getSplitType() {
324 		return splitType;
325 	}
326 
327 	public void setSplitType(SplitType splitType) {
328 		this.splitType = splitType;
329 	}
330 
331 	public TicketType getTicketType() {
332 		return ticketType;
333 	}
334 
335 	public void setTicketType(TicketType ticketType) {
336 		this.ticketType = ticketType;
337 	}
338 
339 	public Venue getVenue() {
340 		return venue;
341 	}
342 
343 	public void setVenue(Venue venue) {
344 		this.venue = venue;
345 	}
346 
347 	@Override
348 	public int hashCode() {
349 		return HashCodeBuilder.reflectionHashCode(this);
350 	}
351 
352 	@Override
353 	public boolean equals(Object obj) {
354 		if (obj == null) {
355 			return false;
356 		}
357 		if (obj == this) {
358 			return true;
359 		}
360 		if (obj.getClass() != getClass()) {
361 			return false;
362 		}
363 		SellerListing rhs = (SellerListing) obj;
364 		return EqualsBuilder.reflectionEquals(this, rhs);
365 	}
366 
367 	@Override
368 	public String toString() {
369 		return String.format("seller listing id=%s(externalId=%s)", this.id, this.externalId);
370 	}
371 
372 }