Record Class SubscriptionService.Subscription
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.server.economy.capability.SubscriptionService.Subscription
- Enclosing interface:
SubscriptionService
public static record SubscriptionService.Subscription(UUID id, Account subscriber, Account beneficiary, Currency currency, BigDecimal amount, Duration interval, Instant lastBilled, Instant nextBilling, EconomyContext context, SubscriptionService.SubscriptionState state)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSubscription(UUID id, Account subscriber, Account beneficiary, Currency currency, BigDecimal amount, Duration interval, Instant lastBilled, Instant nextBilling, EconomyContext context, SubscriptionService.SubscriptionState state) Creates an instance of aSubscriptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionamount()Returns the value of theamountrecord component.Returns the value of thebeneficiaryrecord component.context()Returns the value of thecontextrecord component.currency()Returns the value of thecurrencyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.interval()Returns the value of theintervalrecord component.Returns the value of thelastBilledrecord component.Returns the value of thenextBillingrecord component.state()Returns the value of thestaterecord component.Returns the value of thesubscriberrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Subscription
public Subscription(UUID id, Account subscriber, Account beneficiary, Currency currency, BigDecimal amount, Duration interval, Instant lastBilled, Instant nextBilling, EconomyContext context, SubscriptionService.SubscriptionState state) Creates an instance of aSubscriptionrecord class.- Parameters:
id- the value for theidrecord componentsubscriber- the value for thesubscriberrecord componentbeneficiary- the value for thebeneficiaryrecord componentcurrency- the value for thecurrencyrecord componentamount- the value for theamountrecord componentinterval- the value for theintervalrecord componentlastBilled- the value for thelastBilledrecord componentnextBilling- the value for thenextBillingrecord componentcontext- the value for thecontextrecord componentstate- the value for thestaterecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
subscriber
Returns the value of thesubscriberrecord component.- Returns:
- the value of the
subscriberrecord component
-
beneficiary
Returns the value of thebeneficiaryrecord component.- Returns:
- the value of the
beneficiaryrecord component
-
currency
Returns the value of thecurrencyrecord component.- Returns:
- the value of the
currencyrecord component
-
amount
Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
interval
Returns the value of theintervalrecord component.- Returns:
- the value of the
intervalrecord component
-
lastBilled
Returns the value of thelastBilledrecord component.- Returns:
- the value of the
lastBilledrecord component
-
nextBilling
Returns the value of thenextBillingrecord component.- Returns:
- the value of the
nextBillingrecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-