| 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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<CancelRecurringPaymentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Id>0</Id>
<PaymentTokenId>String</PaymentTokenId>
<Phone>String</Phone>
<Reason>String</Reason>
<Via>String</Via>
</CancelRecurringPaymentRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CancelRecurringPaymentResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel"> <AlreadyCancelled>false</AlreadyCancelled> <CancelledAt>0001-01-01T00:00:00</CancelledAt> <Effect>String</Effect> <Id>0</Id> <Message>String</Message> <MonthsPaid>0</MonthsPaid> <Ok>false</Ok> <PriorSubscriptionLength>0</PriorSubscriptionLength> <Reason>String</Reason> <Remaining>0</Remaining> <Status>String</Status> <StatusCode>0</StatusCode> <SubscriptionLength>0</SubscriptionLength> </CancelRecurringPaymentResult>