| Requires any of the roles: | Admin, TeamAdmin |
| POST | /recurringPayments |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class RecurringPaymentCreateRequest
{
public String phoneVerificationNumber = null;
public String token = null;
public String panLastFour = null;
public String expYear = null;
public String expMonth = null;
public String deviceId = null;
public Integer monthlyPrice = null;
public Integer subscriptionLength = null;
public Boolean chargeFirstMonth = null;
public Integer ownerId = null;
public Integer ownerCardTypeId = null;
public String paymentTokenId = null;
public BigDecimal transactionFee = null;
public String currency = null;
public String mode = null;
public Date startDate = null;
public Date lastPayment = null;
public Date nextPayment = null;
public String jsonResponse = null;
public String termsVersion = null;
public Date termsAcceptedAt = null;
public String getPhoneVerificationNumber() { return phoneVerificationNumber; }
public RecurringPaymentCreateRequest setPhoneVerificationNumber(String value) { this.phoneVerificationNumber = value; return this; }
public String getToken() { return token; }
public RecurringPaymentCreateRequest setToken(String value) { this.token = value; return this; }
public String getPanLastFour() { return panLastFour; }
public RecurringPaymentCreateRequest setPanLastFour(String value) { this.panLastFour = value; return this; }
public String getExpYear() { return expYear; }
public RecurringPaymentCreateRequest setExpYear(String value) { this.expYear = value; return this; }
public String getExpMonth() { return expMonth; }
public RecurringPaymentCreateRequest setExpMonth(String value) { this.expMonth = value; return this; }
public String getDeviceId() { return deviceId; }
public RecurringPaymentCreateRequest setDeviceId(String value) { this.deviceId = value; return this; }
public Integer getMonthlyPrice() { return monthlyPrice; }
public RecurringPaymentCreateRequest setMonthlyPrice(Integer value) { this.monthlyPrice = value; return this; }
public Integer getSubscriptionLength() { return subscriptionLength; }
public RecurringPaymentCreateRequest setSubscriptionLength(Integer value) { this.subscriptionLength = value; return this; }
public Boolean isChargeFirstMonth() { return chargeFirstMonth; }
public RecurringPaymentCreateRequest setChargeFirstMonth(Boolean value) { this.chargeFirstMonth = value; return this; }
public Integer getOwnerId() { return ownerId; }
public RecurringPaymentCreateRequest setOwnerId(Integer value) { this.ownerId = value; return this; }
public Integer getOwnerCardTypeId() { return ownerCardTypeId; }
public RecurringPaymentCreateRequest setOwnerCardTypeId(Integer value) { this.ownerCardTypeId = value; return this; }
public String getPaymentTokenId() { return paymentTokenId; }
public RecurringPaymentCreateRequest setPaymentTokenId(String value) { this.paymentTokenId = value; return this; }
public BigDecimal getTransactionFee() { return transactionFee; }
public RecurringPaymentCreateRequest setTransactionFee(BigDecimal value) { this.transactionFee = value; return this; }
public String getCurrency() { return currency; }
public RecurringPaymentCreateRequest setCurrency(String value) { this.currency = value; return this; }
public String getMode() { return mode; }
public RecurringPaymentCreateRequest setMode(String value) { this.mode = value; return this; }
public Date getStartDate() { return startDate; }
public RecurringPaymentCreateRequest setStartDate(Date value) { this.startDate = value; return this; }
public Date getLastPayment() { return lastPayment; }
public RecurringPaymentCreateRequest setLastPayment(Date value) { this.lastPayment = value; return this; }
public Date getNextPayment() { return nextPayment; }
public RecurringPaymentCreateRequest setNextPayment(Date value) { this.nextPayment = value; return this; }
public String getJsonResponse() { return jsonResponse; }
public RecurringPaymentCreateRequest setJsonResponse(String value) { this.jsonResponse = value; return this; }
public String getTermsVersion() { return termsVersion; }
public RecurringPaymentCreateRequest setTermsVersion(String value) { this.termsVersion = value; return this; }
public Date getTermsAcceptedAt() { return termsAcceptedAt; }
public RecurringPaymentCreateRequest setTermsAcceptedAt(Date value) { this.termsAcceptedAt = value; return this; }
}
public static class RecurringPaymentGetResult
{
public RecurringPayment item = null;
public Boolean alreadyExisted = null;
public Integer statusCode = null;
public String message = null;
public RecurringPayment getItem() { return item; }
public RecurringPaymentGetResult setItem(RecurringPayment value) { this.item = value; return this; }
public Boolean isAlreadyExisted() { return alreadyExisted; }
public RecurringPaymentGetResult setAlreadyExisted(Boolean value) { this.alreadyExisted = value; return this; }
public Integer getStatusCode() { return statusCode; }
public RecurringPaymentGetResult setStatusCode(Integer value) { this.statusCode = value; return this; }
public String getMessage() { return message; }
public RecurringPaymentGetResult setMessage(String value) { this.message = value; return this; }
}
public static class RecurringPayment
{
public Integer id = null;
public String status = null;
public String phoneVerificationNumber = null;
public String deviceId = null;
public String panLastFour = null;
public String expYear = null;
public String expMonth = null;
public String token = null;
public Integer monthlyPrice = null;
public Integer subscriptionLength = null;
public Integer monthsPaid = null;
public Boolean chargeFirstMonth = null;
@References(EventOwner.class)
public Integer ownerId = null;
public Integer ownerCardTypeId = null;
@StringLength(2147483647)
public String jsonResponse = null;
public Date startDate = null;
public Date lastPayment = null;
public Date nextPayment = null;
public String paymentTokenId = null;
public Integer declinedCounter = null;
public BigDecimal transactionFee = null;
public String termsVersion = null;
public Date termsAcceptedAt = null;
public String currency = null;
public String mode = null;
public String lastDeclineReason = null;
public Date lastDeclineDate = null;
public Short lastDunningStage = null;
public Date lastDunningNotifiedAt = null;
public Integer getId() { return id; }
public RecurringPayment setId(Integer value) { this.id = value; return this; }
public String getStatus() { return status; }
public RecurringPayment setStatus(String value) { this.status = value; return this; }
public String getPhoneVerificationNumber() { return phoneVerificationNumber; }
public RecurringPayment setPhoneVerificationNumber(String value) { this.phoneVerificationNumber = value; return this; }
public String getDeviceId() { return deviceId; }
public RecurringPayment setDeviceId(String value) { this.deviceId = value; return this; }
public String getPanLastFour() { return panLastFour; }
public RecurringPayment setPanLastFour(String value) { this.panLastFour = value; return this; }
public String getExpYear() { return expYear; }
public RecurringPayment setExpYear(String value) { this.expYear = value; return this; }
public String getExpMonth() { return expMonth; }
public RecurringPayment setExpMonth(String value) { this.expMonth = value; return this; }
public String getToken() { return token; }
public RecurringPayment setToken(String value) { this.token = value; return this; }
public Integer getMonthlyPrice() { return monthlyPrice; }
public RecurringPayment setMonthlyPrice(Integer value) { this.monthlyPrice = value; return this; }
public Integer getSubscriptionLength() { return subscriptionLength; }
public RecurringPayment setSubscriptionLength(Integer value) { this.subscriptionLength = value; return this; }
public Integer getMonthsPaid() { return monthsPaid; }
public RecurringPayment setMonthsPaid(Integer value) { this.monthsPaid = value; return this; }
public Boolean isChargeFirstMonth() { return chargeFirstMonth; }
public RecurringPayment setChargeFirstMonth(Boolean value) { this.chargeFirstMonth = value; return this; }
public Integer getOwnerId() { return ownerId; }
public RecurringPayment setOwnerId(Integer value) { this.ownerId = value; return this; }
public Integer getOwnerCardTypeId() { return ownerCardTypeId; }
public RecurringPayment setOwnerCardTypeId(Integer value) { this.ownerCardTypeId = value; return this; }
public String getJsonResponse() { return jsonResponse; }
public RecurringPayment setJsonResponse(String value) { this.jsonResponse = value; return this; }
public Date getStartDate() { return startDate; }
public RecurringPayment setStartDate(Date value) { this.startDate = value; return this; }
public Date getLastPayment() { return lastPayment; }
public RecurringPayment setLastPayment(Date value) { this.lastPayment = value; return this; }
public Date getNextPayment() { return nextPayment; }
public RecurringPayment setNextPayment(Date value) { this.nextPayment = value; return this; }
public String getPaymentTokenId() { return paymentTokenId; }
public RecurringPayment setPaymentTokenId(String value) { this.paymentTokenId = value; return this; }
public Integer getDeclinedCounter() { return declinedCounter; }
public RecurringPayment setDeclinedCounter(Integer value) { this.declinedCounter = value; return this; }
public BigDecimal getTransactionFee() { return transactionFee; }
public RecurringPayment setTransactionFee(BigDecimal value) { this.transactionFee = value; return this; }
public String getTermsVersion() { return termsVersion; }
public RecurringPayment setTermsVersion(String value) { this.termsVersion = value; return this; }
public Date getTermsAcceptedAt() { return termsAcceptedAt; }
public RecurringPayment setTermsAcceptedAt(Date value) { this.termsAcceptedAt = value; return this; }
public String getCurrency() { return currency; }
public RecurringPayment setCurrency(String value) { this.currency = value; return this; }
public String getMode() { return mode; }
public RecurringPayment setMode(String value) { this.mode = value; return this; }
public String getLastDeclineReason() { return lastDeclineReason; }
public RecurringPayment setLastDeclineReason(String value) { this.lastDeclineReason = value; return this; }
public Date getLastDeclineDate() { return lastDeclineDate; }
public RecurringPayment setLastDeclineDate(Date value) { this.lastDeclineDate = value; return this; }
public Short getLastDunningStage() { return lastDunningStage; }
public RecurringPayment setLastDunningStage(Short value) { this.lastDunningStage = value; return this; }
public Date getLastDunningNotifiedAt() { return lastDunningNotifiedAt; }
public RecurringPayment setLastDunningNotifiedAt(Date value) { this.lastDunningNotifiedAt = value; return this; }
}
}
Java RecurringPaymentCreateRequest 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 HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<RecurringPaymentCreateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<ChargeFirstMonth>false</ChargeFirstMonth>
<Currency>String</Currency>
<DeviceId>String</DeviceId>
<ExpMonth>String</ExpMonth>
<ExpYear>String</ExpYear>
<JsonResponse>String</JsonResponse>
<LastPayment>0001-01-01T00:00:00</LastPayment>
<Mode>String</Mode>
<MonthlyPrice>0</MonthlyPrice>
<NextPayment>0001-01-01T00:00:00</NextPayment>
<OwnerCardTypeId>0</OwnerCardTypeId>
<OwnerId>0</OwnerId>
<PanLastFour>String</PanLastFour>
<PaymentTokenId>String</PaymentTokenId>
<PhoneVerificationNumber>String</PhoneVerificationNumber>
<StartDate>0001-01-01T00:00:00</StartDate>
<SubscriptionLength>0</SubscriptionLength>
<TermsAcceptedAt>0001-01-01T00:00:00</TermsAcceptedAt>
<TermsVersion>String</TermsVersion>
<Token>String</Token>
<TransactionFee>0</TransactionFee>
</RecurringPaymentCreateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<RecurringPaymentGetResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<AlreadyExisted>false</AlreadyExisted>
<Item xmlns:d2p1="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel.Types.Payouts">
<d2p1:ChargeFirstMonth>false</d2p1:ChargeFirstMonth>
<d2p1:Currency>String</d2p1:Currency>
<d2p1:DeclinedCounter>0</d2p1:DeclinedCounter>
<d2p1:DeviceId>String</d2p1:DeviceId>
<d2p1:ExpMonth>String</d2p1:ExpMonth>
<d2p1:ExpYear>String</d2p1:ExpYear>
<d2p1:Id>0</d2p1:Id>
<d2p1:JsonResponse>String</d2p1:JsonResponse>
<d2p1:LastDeclineDate>0001-01-01T00:00:00</d2p1:LastDeclineDate>
<d2p1:LastDeclineReason>String</d2p1:LastDeclineReason>
<d2p1:LastDunningNotifiedAt>0001-01-01T00:00:00</d2p1:LastDunningNotifiedAt>
<d2p1:LastDunningStage>0</d2p1:LastDunningStage>
<d2p1:LastPayment>0001-01-01T00:00:00</d2p1:LastPayment>
<d2p1:Mode>String</d2p1:Mode>
<d2p1:MonthlyPrice>0</d2p1:MonthlyPrice>
<d2p1:MonthsPaid>0</d2p1:MonthsPaid>
<d2p1:NextPayment>0001-01-01T00:00:00</d2p1:NextPayment>
<d2p1:OwnerCardTypeId>0</d2p1:OwnerCardTypeId>
<d2p1:OwnerId>0</d2p1:OwnerId>
<d2p1:PanLastFour>String</d2p1:PanLastFour>
<d2p1:PaymentTokenId>String</d2p1:PaymentTokenId>
<d2p1:PhoneVerificationNumber>String</d2p1:PhoneVerificationNumber>
<d2p1:StartDate>0001-01-01T00:00:00</d2p1:StartDate>
<d2p1:Status>String</d2p1:Status>
<d2p1:SubscriptionLength>0</d2p1:SubscriptionLength>
<d2p1:TermsAcceptedAt>0001-01-01T00:00:00</d2p1:TermsAcceptedAt>
<d2p1:TermsVersion>String</d2p1:TermsVersion>
<d2p1:Token>String</d2p1:Token>
<d2p1:TransactionFee>0</d2p1:TransactionFee>
</Item>
<Message>String</Message>
<StatusCode>0</StatusCode>
</RecurringPaymentGetResult>