| POST | /recurringPayments/cancel | ||
|---|---|---|---|
| POST | /recurringPayments/{Id}/cancel |
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CancelRecurringPaymentRequest
{
public Integer id = null;
public String paymentTokenId = null;
public String phone = null;
public String reason = null;
public String via = null;
public Integer getId() { return id; }
public CancelRecurringPaymentRequest setId(Integer value) { this.id = value; return this; }
public String getPaymentTokenId() { return paymentTokenId; }
public CancelRecurringPaymentRequest setPaymentTokenId(String value) { this.paymentTokenId = value; return this; }
public String getPhone() { return phone; }
public CancelRecurringPaymentRequest setPhone(String value) { this.phone = value; return this; }
public String getReason() { return reason; }
public CancelRecurringPaymentRequest setReason(String value) { this.reason = value; return this; }
public String getVia() { return via; }
public CancelRecurringPaymentRequest setVia(String value) { this.via = value; return this; }
}
public static class CancelRecurringPaymentResult
{
public Boolean ok = null;
public Integer id = null;
public String effect = null;
public String status = null;
public Integer subscriptionLength = null;
public Integer priorSubscriptionLength = null;
public Integer monthsPaid = null;
public Date cancelledAt = null;
public String reason = null;
public Boolean alreadyCancelled = null;
public Integer remaining = null;
public Integer statusCode = null;
public String message = null;
public Boolean isOk() { return ok; }
public CancelRecurringPaymentResult setOk(Boolean value) { this.ok = value; return this; }
public Integer getId() { return id; }
public CancelRecurringPaymentResult setId(Integer value) { this.id = value; return this; }
public String getEffect() { return effect; }
public CancelRecurringPaymentResult setEffect(String value) { this.effect = value; return this; }
public String getStatus() { return status; }
public CancelRecurringPaymentResult setStatus(String value) { this.status = value; return this; }
public Integer getSubscriptionLength() { return subscriptionLength; }
public CancelRecurringPaymentResult setSubscriptionLength(Integer value) { this.subscriptionLength = value; return this; }
public Integer getPriorSubscriptionLength() { return priorSubscriptionLength; }
public CancelRecurringPaymentResult setPriorSubscriptionLength(Integer value) { this.priorSubscriptionLength = value; return this; }
public Integer getMonthsPaid() { return monthsPaid; }
public CancelRecurringPaymentResult setMonthsPaid(Integer value) { this.monthsPaid = value; return this; }
public Date getCancelledAt() { return cancelledAt; }
public CancelRecurringPaymentResult setCancelledAt(Date value) { this.cancelledAt = value; return this; }
public String getReason() { return reason; }
public CancelRecurringPaymentResult setReason(String value) { this.reason = value; return this; }
public Boolean isAlreadyCancelled() { return alreadyCancelled; }
public CancelRecurringPaymentResult setAlreadyCancelled(Boolean value) { this.alreadyCancelled = value; return this; }
public Integer getRemaining() { return remaining; }
public CancelRecurringPaymentResult setRemaining(Integer value) { this.remaining = value; return this; }
public Integer getStatusCode() { return statusCode; }
public CancelRecurringPaymentResult setStatusCode(Integer value) { this.statusCode = value; return this; }
public String getMessage() { return message; }
public CancelRecurringPaymentResult setMessage(String value) { this.message = value; return this; }
}
}
Java CancelRecurringPaymentRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /recurringPayments/cancel HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: 0,
paymentTokenId: String,
phone: String,
reason: String,
via: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ok: False,
id: 0,
effect: String,
status: String,
subscriptionLength: 0,
priorSubscriptionLength: 0,
monthsPaid: 0,
cancelledAt: 0001-01-01,
reason: String,
alreadyCancelled: False,
remaining: 0,
statusCode: 0,
message: String
}