Package dev.tobee.telegram.model
Record Class OrderInfo
java.lang.Object
java.lang.Record
dev.tobee.telegram.model.OrderInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionemail()Returns the value of theemailrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thephone_numberrecord component.Returns the value of theshippingAddressrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
OrderInfo
public OrderInfo(Optional<String> name, Optional<String> phone_number, Optional<String> email, Optional<ShippingAddress> shippingAddress)Creates an instance of aOrderInforecord class.- Parameters:
name- the value for thenamerecord componentphone_number- the value for thephone_numberrecord componentemail- the value for theemailrecord componentshippingAddress- the value for theshippingAddressrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
phone_number
Returns the value of thephone_numberrecord component.- Returns:
- the value of the
phone_numberrecord component
-
email
Returns the value of theemailrecord component.- Returns:
- the value of the
emailrecord component
-
shippingAddress
Returns the value of theshippingAddressrecord component.- Returns:
- the value of the
shippingAddressrecord component
-