public class Subscription<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
additionalFields
Any extra properties needed to define the subscription
|
protected String |
frequency
How often the customer will be charged
|
protected String |
numberOfInstallments
The number of times that the customer will be charged
|
protected T |
parent |
protected javax.money.MonetaryAmount |
recurringAmount
The amount that must be paid for each billing cycle
|
protected Instant |
startDate
Start of when this subscription should be active.
|
Constructor and Description |
---|
Subscription() |
Subscription(T parent) |
Modifier and Type | Method and Description |
---|---|
Subscription<T> |
additionalFields(String key,
Object value) |
T |
done() |
Subscription<T> |
frequency(String frequency) |
Map<String,Object> |
getAdditionalFields()
Any extra properties needed to define the subscription
|
String |
getFrequency()
How often the customer will be charged
|
String |
getNumberOfInstallments()
The number of times that the customer will be charged
|
T |
getParent() |
javax.money.MonetaryAmount |
getRecurringAmount()
The amount that must be paid for each billing cycle
|
Instant |
getStartDate()
Start of when this subscription should be active.
|
Subscription<T> |
numberOfInstallments(String numberOfInstallments) |
Subscription<T> |
recurringAmount(javax.money.MonetaryAmount recurringAmount) |
Subscription<T> |
startDate(Instant startDate) |
boolean |
subscriptionPopulated() |
protected T parent
protected javax.money.MonetaryAmount recurringAmount
protected String frequency
protected String numberOfInstallments
protected Instant startDate
public Subscription()
public Subscription(T parent)
public T done()
public Subscription<T> additionalFields(String key, Object value)
public Subscription<T> recurringAmount(javax.money.MonetaryAmount recurringAmount)
public Subscription<T> frequency(String frequency)
public Subscription<T> numberOfInstallments(String numberOfInstallments)
public Subscription<T> startDate(Instant startDate)
public boolean subscriptionPopulated()
public T getParent()
public javax.money.MonetaryAmount getRecurringAmount()
public String getFrequency()
public String getNumberOfInstallments()
public Instant getStartDate()
Copyright © 2021. All rights reserved.