Package com.adyen.model.checkout
Class Ticket
- java.lang.Object
-
- com.adyen.model.checkout.Ticket
-
public class Ticket extends Object
Ticket
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_ISSUE_ADDRESSstatic StringJSON_PROPERTY_ISSUE_DATEstatic StringJSON_PROPERTY_NUMBER
-
Constructor Summary
Constructors Constructor Description Ticket()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Return true if this Ticket object is equal to o.static TicketfromJson(String jsonString)Create an instance of Ticket given an JSON stringStringgetIssueAddress()The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 charactersLocalDategetIssueDate()The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-ddStringgetNumber()The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros.inthashCode()TicketissueAddress(String issueAddress)The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 charactersTicketissueDate(LocalDate issueDate)The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-ddTicketnumber(String number)The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros.voidsetIssueAddress(String issueAddress)The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 charactersvoidsetIssueDate(LocalDate issueDate)The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-ddvoidsetNumber(String number)The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros.StringtoJson()Convert an instance of Ticket to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_ISSUE_ADDRESS
public static final String JSON_PROPERTY_ISSUE_ADDRESS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ISSUE_DATE
public static final String JSON_PROPERTY_ISSUE_DATE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_NUMBER
public static final String JSON_PROPERTY_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
issueAddress
public Ticket issueAddress(String issueAddress)
The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters- Parameters:
issueAddress- The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters- Returns:
- the current
Ticketinstance, allowing for method chaining
-
getIssueAddress
public String getIssueAddress()
The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters- Returns:
- issueAddress The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters
-
setIssueAddress
public void setIssueAddress(String issueAddress)
The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters- Parameters:
issueAddress- The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters
-
issueDate
public Ticket issueDate(LocalDate issueDate)
The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd- Parameters:
issueDate- The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd- Returns:
- the current
Ticketinstance, allowing for method chaining
-
getIssueDate
public LocalDate getIssueDate()
The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd- Returns:
- issueDate The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd
-
setIssueDate
public void setIssueDate(LocalDate issueDate)
The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd- Parameters:
issueDate- The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd
-
number
public Ticket number(String number)
The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros.- Parameters:
number- The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros.- Returns:
- the current
Ticketinstance, allowing for method chaining
-
getNumber
public String getNumber()
The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros.- Returns:
- number The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros.
-
setNumber
public void setNumber(String number)
The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros.- Parameters:
number- The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros.
-
equals
public boolean equals(Object o)
Return true if this Ticket object is equal to o.
-
fromJson
public static Ticket fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Ticket given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Ticket
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Ticket
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Ticket to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-