Record Class Invoice
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.Invoice
- All Implemented Interfaces:
Serializable,ApiResult
public record Invoice(String title, String description, String startParameter, String currency, int totalAmount)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncurrency()Returns the value of thecurrencyrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thestartParameterrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalAmountrecord component.
-
Constructor Details
-
Invoice
public Invoice(String title, String description, String startParameter, String currency, int totalAmount) Creates an instance of aInvoicerecord class.- Parameters:
title- the value for thetitlerecord componentdescription- the value for thedescriptionrecord componentstartParameter- the value for thestartParameterrecord componentcurrency- the value for thecurrencyrecord componenttotalAmount- the value for thetotalAmountrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
startParameter
Returns the value of thestartParameterrecord component.- Returns:
- the value of the
startParameterrecord component
-
currency
Returns the value of thecurrencyrecord component.- Returns:
- the value of the
currencyrecord component
-
totalAmount
public int totalAmount()Returns the value of thetotalAmountrecord component.- Returns:
- the value of the
totalAmountrecord component
-