public abstract static class AbstractSubscriptionBuilders.AbstractCreateSubscriptionRequestBuilder<B extends AbstractSubscriptionBuilders.AbstractCreateSubscriptionRequestBuilder,R,M extends Subscription> extends IdempotentRetrofitRequestBuilder<M,R,B> implements DescriptorRetry<B,M>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
descriptor |
protected java.lang.Boolean |
firstChargeAuthorizationOnly |
protected java.time.Duration |
firstChargeCaptureAfter |
protected java.lang.Boolean |
ignoreDescriptorOnError |
protected java.math.BigInteger |
initialAmount |
protected InstallmentPlanRequest |
installmentPlan |
protected MetadataMap |
metadata |
protected MoneyLike |
money |
protected java.lang.Boolean |
onlyDirectCurrency |
protected SubscriptionPeriod |
period |
protected java.lang.Boolean |
preserveEndOfMonth |
protected java.time.LocalDate |
startOn |
protected java.time.OffsetDateTime |
subsequentCyclesStart |
protected TransactionTokenId |
token |
protected java.time.ZoneId |
zoneId |
idempotencyKey
retrofit
Constructor and Description |
---|
AbstractCreateSubscriptionRequestBuilder(retrofit2.Retrofit retrofit,
TransactionTokenId token,
MoneyLike money,
SubscriptionPeriod period) |
Modifier and Type | Method and Description |
---|---|
Request<M> |
build() |
protected java.lang.String |
getDescriptor() |
protected java.lang.Boolean |
getFirstChargeAuthorizationOnly() |
protected java.time.Duration |
getFirstChargeCaptureAfter() |
protected java.math.BigInteger |
getInitialAmount() |
InstallmentPlanRequest |
getInstallmentPlan() |
protected MetadataMap |
getMetadata() |
protected MoneyLike |
getMoney() |
protected java.lang.Boolean |
getOnlyDirectCurrency() |
protected SubscriptionPeriod |
getPeriod() |
java.lang.Boolean |
getPreserveEndOfMonth() |
java.time.LocalDate |
getStartOn() |
java.time.OffsetDateTime |
getSubsequentCyclesStart() |
protected TransactionTokenId |
getToken() |
java.time.ZoneId |
getZoneId() |
Request<M> |
retryIgnoringDescriptor(Request<M> originalRequest) |
B |
withDescriptor(java.lang.String descriptor) |
B |
withDescriptor(java.lang.String descriptor,
java.lang.Boolean ignoreDescriptorOnError) |
B |
withFirstChargeAuthorizationOnly(java.lang.Boolean firstChargeAuthorizationOnly) |
B |
withFirstChargeCaptureAfter(java.time.Duration firstChargeCaptureAfter) |
B |
withInitialAmount(java.math.BigInteger initialAmount) |
B |
withInstallmentPlan(InstallmentPlanRequest installmentPlan) |
B |
withMetadata(MetadataMap metadata) |
<T> B |
withMetadata(T metadata,
MetadataAdapter<T> adapter) |
B |
withOnlyDirectCurrency(java.lang.Boolean onlyDirectCurrency) |
B |
withPreserveEndOfMoth(java.lang.Boolean preserveEndOfMonth) |
B |
withStartOn(java.time.LocalDate startOn) |
B |
withSubsequentCyclesStart(java.time.OffsetDateTime subsequentCyclesStart) |
B |
withZoneId(java.time.ZoneId zoneId) |
getIdempotencyKey, withIdempotencyKey
createCall, dispatch, dispatch, dispatch, getRequest
protected TransactionTokenId token
protected MoneyLike money
protected SubscriptionPeriod period
protected java.math.BigInteger initialAmount
protected java.lang.Boolean onlyDirectCurrency
protected java.lang.Boolean ignoreDescriptorOnError
protected java.lang.String descriptor
protected MetadataMap metadata
protected InstallmentPlanRequest installmentPlan
protected java.time.LocalDate startOn
protected java.time.ZoneId zoneId
protected java.lang.Boolean preserveEndOfMonth
protected java.time.OffsetDateTime subsequentCyclesStart
protected java.time.Duration firstChargeCaptureAfter
protected java.lang.Boolean firstChargeAuthorizationOnly
public AbstractCreateSubscriptionRequestBuilder(retrofit2.Retrofit retrofit, TransactionTokenId token, MoneyLike money, SubscriptionPeriod period)
protected TransactionTokenId getToken()
protected MoneyLike getMoney()
protected SubscriptionPeriod getPeriod()
protected java.math.BigInteger getInitialAmount()
protected java.lang.Boolean getOnlyDirectCurrency()
protected java.lang.String getDescriptor()
protected MetadataMap getMetadata()
public InstallmentPlanRequest getInstallmentPlan()
public java.time.LocalDate getStartOn()
public java.time.ZoneId getZoneId()
public java.lang.Boolean getPreserveEndOfMonth()
public java.time.OffsetDateTime getSubsequentCyclesStart()
protected java.time.Duration getFirstChargeCaptureAfter()
protected java.lang.Boolean getFirstChargeAuthorizationOnly()
public B withInitialAmount(java.math.BigInteger initialAmount)
public B withOnlyDirectCurrency(java.lang.Boolean onlyDirectCurrency)
public B withDescriptor(java.lang.String descriptor)
withDescriptor
in interface DescriptorRetry<B extends AbstractSubscriptionBuilders.AbstractCreateSubscriptionRequestBuilder,M extends Subscription>
public B withDescriptor(java.lang.String descriptor, java.lang.Boolean ignoreDescriptorOnError)
withDescriptor
in interface DescriptorRetry<B extends AbstractSubscriptionBuilders.AbstractCreateSubscriptionRequestBuilder,M extends Subscription>
public B withMetadata(MetadataMap metadata)
public <T> B withMetadata(T metadata, MetadataAdapter<T> adapter)
public B withInstallmentPlan(InstallmentPlanRequest installmentPlan)
public B withStartOn(java.time.LocalDate startOn)
public B withZoneId(java.time.ZoneId zoneId)
public B withPreserveEndOfMoth(java.lang.Boolean preserveEndOfMonth)
public B withSubsequentCyclesStart(java.time.OffsetDateTime subsequentCyclesStart)
public B withFirstChargeCaptureAfter(java.time.Duration firstChargeCaptureAfter)
public B withFirstChargeAuthorizationOnly(java.lang.Boolean firstChargeAuthorizationOnly)
public Request<M> build()
build
in interface RequestBuilder<M extends Subscription,Request<M extends Subscription>>
build
in class RetrofitRequestBuilder<M extends Subscription,R>
public Request<M> retryIgnoringDescriptor(Request<M> originalRequest)
retryIgnoringDescriptor
in interface DescriptorRetry<B extends AbstractSubscriptionBuilders.AbstractCreateSubscriptionRequestBuilder,M extends Subscription>