public static final class SubscriptionService.SubscriptionCancelRequest extends PostRequest<Subscription>
Request class for SubscriptionService.cancel(java.lang.String)
.
Immediately cancels a subscription; no more payments will be created under it. Any metadata supplied to this endpoint will be stored on the payment cancellation event it causes.
This will fail with a cancellation_failed error if the subscription is already cancelled or finished.
Modifier and Type | Method and Description |
---|---|
SubscriptionService.SubscriptionCancelRequest |
withHeader(java.lang.String headerName,
java.lang.String headerValue) |
SubscriptionService.SubscriptionCancelRequest |
withMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Key-value store of custom data.
|
SubscriptionService.SubscriptionCancelRequest |
withMetadata(java.lang.String key,
java.lang.String value)
Key-value store of custom data.
|
execute, executeWrapped
public SubscriptionService.SubscriptionCancelRequest withMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
public SubscriptionService.SubscriptionCancelRequest withMetadata(java.lang.String key, java.lang.String value)
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
public SubscriptionService.SubscriptionCancelRequest withHeader(java.lang.String headerName, java.lang.String headerValue)