| Requires any of the roles: | Admin, TeamAdmin | Requires the permission: | ReadData |
| POST | /OrderOwnerCards/upgrade | Charge the delta, issue the target card (PricePaid = delta), revoke the source card, re-link future tickets — one transaction, idempotent |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class OwnerCardsUpgradeRequest
{
public String buyerPhone = null;
public Integer sourceOwnerCardId = null;
public Integer targetOwnerCardTypeId = null;
public String idempotencyKey = null;
public String paymentMethodId = null;
public Borgun3DFinalRequest borgun3DFinalInfo = null;
public ArrayList<OrderTender> tenders = null;
public String holderName = null;
public String holderEmail = null;
public String deviceId = null;
public Boolean returnCards = null;
public String getBuyerPhone() { return buyerPhone; }
public OwnerCardsUpgradeRequest setBuyerPhone(String value) { this.buyerPhone = value; return this; }
public Integer getSourceOwnerCardId() { return sourceOwnerCardId; }
public OwnerCardsUpgradeRequest setSourceOwnerCardId(Integer value) { this.sourceOwnerCardId = value; return this; }
public Integer getTargetOwnerCardTypeId() { return targetOwnerCardTypeId; }
public OwnerCardsUpgradeRequest setTargetOwnerCardTypeId(Integer value) { this.targetOwnerCardTypeId = value; return this; }
public String getIdempotencyKey() { return idempotencyKey; }
public OwnerCardsUpgradeRequest setIdempotencyKey(String value) { this.idempotencyKey = value; return this; }
public String getPaymentMethodId() { return paymentMethodId; }
public OwnerCardsUpgradeRequest setPaymentMethodId(String value) { this.paymentMethodId = value; return this; }
public Borgun3DFinalRequest getBorgun3DFinalInfo() { return borgun3DFinalInfo; }
public OwnerCardsUpgradeRequest setBorgun3DFinalInfo(Borgun3DFinalRequest value) { this.borgun3DFinalInfo = value; return this; }
public ArrayList<OrderTender> getTenders() { return tenders; }
public OwnerCardsUpgradeRequest setTenders(ArrayList<OrderTender> value) { this.tenders = value; return this; }
public String getHolderName() { return holderName; }
public OwnerCardsUpgradeRequest setHolderName(String value) { this.holderName = value; return this; }
public String getHolderEmail() { return holderEmail; }
public OwnerCardsUpgradeRequest setHolderEmail(String value) { this.holderEmail = value; return this; }
public String getDeviceId() { return deviceId; }
public OwnerCardsUpgradeRequest setDeviceId(String value) { this.deviceId = value; return this; }
public Boolean isReturnCards() { return returnCards; }
public OwnerCardsUpgradeRequest setReturnCards(Boolean value) { this.returnCards = value; return this; }
}
public static class Borgun3DFinalRequest
{
public String transactionType = null;
public Integer amount = null;
public String currency = null;
public Date transactionDate = null;
public String orderId = null;
public Borgun3DFinalPaymentMethodInfo paymentMethod = null;
public Borgun3DFinal3DSecureInfo threeDSecure = null;
public String getTransactionType() { return transactionType; }
public Borgun3DFinalRequest setTransactionType(String value) { this.transactionType = value; return this; }
public Integer getAmount() { return amount; }
public Borgun3DFinalRequest setAmount(Integer value) { this.amount = value; return this; }
public String getCurrency() { return currency; }
public Borgun3DFinalRequest setCurrency(String value) { this.currency = value; return this; }
public Date getTransactionDate() { return transactionDate; }
public Borgun3DFinalRequest setTransactionDate(Date value) { this.transactionDate = value; return this; }
public String getOrderId() { return orderId; }
public Borgun3DFinalRequest setOrderId(String value) { this.orderId = value; return this; }
public Borgun3DFinalPaymentMethodInfo getPaymentMethod() { return paymentMethod; }
public Borgun3DFinalRequest setPaymentMethod(Borgun3DFinalPaymentMethodInfo value) { this.paymentMethod = value; return this; }
public Borgun3DFinal3DSecureInfo getThreeDSecure() { return threeDSecure; }
public Borgun3DFinalRequest setThreeDSecure(Borgun3DFinal3DSecureInfo value) { this.threeDSecure = value; return this; }
}
public static class Borgun3DFinalPaymentMethodInfo
{
public String paymentType = null;
public String token = null;
public String virtualNumber = null;
public String expYear = null;
public String expMonth = null;
public String panLastFour = null;
public String getPaymentType() { return paymentType; }
public Borgun3DFinalPaymentMethodInfo setPaymentType(String value) { this.paymentType = value; return this; }
public String getToken() { return token; }
public Borgun3DFinalPaymentMethodInfo setToken(String value) { this.token = value; return this; }
public String getVirtualNumber() { return virtualNumber; }
public Borgun3DFinalPaymentMethodInfo setVirtualNumber(String value) { this.virtualNumber = value; return this; }
public String getExpYear() { return expYear; }
public Borgun3DFinalPaymentMethodInfo setExpYear(String value) { this.expYear = value; return this; }
public String getExpMonth() { return expMonth; }
public Borgun3DFinalPaymentMethodInfo setExpMonth(String value) { this.expMonth = value; return this; }
public String getPanLastFour() { return panLastFour; }
public Borgun3DFinalPaymentMethodInfo setPanLastFour(String value) { this.panLastFour = value; return this; }
}
public static class Borgun3DFinal3DSecureInfo
{
public String dataType = null;
public String mpiToken = null;
public String getDataType() { return dataType; }
public Borgun3DFinal3DSecureInfo setDataType(String value) { this.dataType = value; return this; }
public String getMpiToken() { return mpiToken; }
public Borgun3DFinal3DSecureInfo setMpiToken(String value) { this.mpiToken = value; return this; }
}
public static class OrderTender
{
public String kind = null;
public String code = null;
public Integer amountMinor = null;
public String idempotencyKey = null;
public Integer holdId = null;
public Integer appliedMinor = null;
public String getKind() { return kind; }
public OrderTender setKind(String value) { this.kind = value; return this; }
public String getCode() { return code; }
public OrderTender setCode(String value) { this.code = value; return this; }
public Integer getAmountMinor() { return amountMinor; }
public OrderTender setAmountMinor(Integer value) { this.amountMinor = value; return this; }
public String getIdempotencyKey() { return idempotencyKey; }
public OrderTender setIdempotencyKey(String value) { this.idempotencyKey = value; return this; }
public Integer getHoldId() { return holdId; }
public OrderTender setHoldId(Integer value) { this.holdId = value; return this; }
public Integer getAppliedMinor() { return appliedMinor; }
public OrderTender setAppliedMinor(Integer value) { this.appliedMinor = value; return this; }
}
public static class OwnerCardsUpgradeResult extends OwnerCardsOrderResult
{
public Integer sourceOwnerCardId = null;
public Integer sourceOwnerCardTypeId = null;
public String sourceTypeName = null;
public Integer newOwnerCardId = null;
public Integer targetOwnerCardTypeId = null;
public String targetTypeName = null;
public Integer relinkedTickets = null;
public String paymentReference = null;
public Boolean refundPending = null;
public Integer getSourceOwnerCardId() { return sourceOwnerCardId; }
public OwnerCardsUpgradeResult setSourceOwnerCardId(Integer value) { this.sourceOwnerCardId = value; return this; }
public Integer getSourceOwnerCardTypeId() { return sourceOwnerCardTypeId; }
public OwnerCardsUpgradeResult setSourceOwnerCardTypeId(Integer value) { this.sourceOwnerCardTypeId = value; return this; }
public String getSourceTypeName() { return sourceTypeName; }
public OwnerCardsUpgradeResult setSourceTypeName(String value) { this.sourceTypeName = value; return this; }
public Integer getNewOwnerCardId() { return newOwnerCardId; }
public OwnerCardsUpgradeResult setNewOwnerCardId(Integer value) { this.newOwnerCardId = value; return this; }
public Integer getTargetOwnerCardTypeId() { return targetOwnerCardTypeId; }
public OwnerCardsUpgradeResult setTargetOwnerCardTypeId(Integer value) { this.targetOwnerCardTypeId = value; return this; }
public String getTargetTypeName() { return targetTypeName; }
public OwnerCardsUpgradeResult setTargetTypeName(String value) { this.targetTypeName = value; return this; }
public Integer getRelinkedTickets() { return relinkedTickets; }
public OwnerCardsUpgradeResult setRelinkedTickets(Integer value) { this.relinkedTickets = value; return this; }
public String getPaymentReference() { return paymentReference; }
public OwnerCardsUpgradeResult setPaymentReference(String value) { this.paymentReference = value; return this; }
public Boolean isRefundPending() { return refundPending; }
public OwnerCardsUpgradeResult setRefundPending(Boolean value) { this.refundPending = value; return this; }
}
public static class OwnerCardsOrderResult extends GeneralOrderResponse
{
public ArrayList<OwnerCards> cards = null;
public String orderReference = null;
public Boolean isSubscription = null;
public BigDecimal monthlyPrice = null;
public BigDecimal transactionFee = null;
public Integer months = null;
public String paymentTokenId = null;
public Boolean subscriptionTokenMissing = null;
public Integer priceTotal = null;
public Integer discountAmount = null;
public Integer giftCardAmount = null;
public Integer donationAmount = null;
public Integer chargedAmount = null;
public String reason = null;
public ArrayList<OwnerCards> getCards() { return cards; }
public OwnerCardsOrderResult setCards(ArrayList<OwnerCards> value) { this.cards = value; return this; }
public String getOrderReference() { return orderReference; }
public OwnerCardsOrderResult setOrderReference(String value) { this.orderReference = value; return this; }
public Boolean getIsSubscription() { return isSubscription; }
public OwnerCardsOrderResult setIsSubscription(Boolean value) { this.isSubscription = value; return this; }
public BigDecimal getMonthlyPrice() { return monthlyPrice; }
public OwnerCardsOrderResult setMonthlyPrice(BigDecimal value) { this.monthlyPrice = value; return this; }
public BigDecimal getTransactionFee() { return transactionFee; }
public OwnerCardsOrderResult setTransactionFee(BigDecimal value) { this.transactionFee = value; return this; }
public Integer getMonths() { return months; }
public OwnerCardsOrderResult setMonths(Integer value) { this.months = value; return this; }
public String getPaymentTokenId() { return paymentTokenId; }
public OwnerCardsOrderResult setPaymentTokenId(String value) { this.paymentTokenId = value; return this; }
public Boolean isSubscriptionTokenMissing() { return subscriptionTokenMissing; }
public OwnerCardsOrderResult setSubscriptionTokenMissing(Boolean value) { this.subscriptionTokenMissing = value; return this; }
public Integer getPriceTotal() { return priceTotal; }
public OwnerCardsOrderResult setPriceTotal(Integer value) { this.priceTotal = value; return this; }
public Integer getDiscountAmount() { return discountAmount; }
public OwnerCardsOrderResult setDiscountAmount(Integer value) { this.discountAmount = value; return this; }
public Integer getGiftCardAmount() { return giftCardAmount; }
public OwnerCardsOrderResult setGiftCardAmount(Integer value) { this.giftCardAmount = value; return this; }
public Integer getDonationAmount() { return donationAmount; }
public OwnerCardsOrderResult setDonationAmount(Integer value) { this.donationAmount = value; return this; }
public Integer getChargedAmount() { return chargedAmount; }
public OwnerCardsOrderResult setChargedAmount(Integer value) { this.chargedAmount = value; return this; }
public String getReason() { return reason; }
public OwnerCardsOrderResult setReason(String value) { this.reason = value; return this; }
}
public static class GeneralOrderResponse
{
public Integer statusCode = null;
public String message = null;
public Boolean success = null;
public Boolean paymentIsPending = null;
public String orderTokenId = null;
public Integer getStatusCode() { return statusCode; }
public GeneralOrderResponse setStatusCode(Integer value) { this.statusCode = value; return this; }
public String getMessage() { return message; }
public GeneralOrderResponse setMessage(String value) { this.message = value; return this; }
public Boolean isSuccess() { return success; }
public GeneralOrderResponse setSuccess(Boolean value) { this.success = value; return this; }
public Boolean isPaymentIsPending() { return paymentIsPending; }
public GeneralOrderResponse setPaymentIsPending(Boolean value) { this.paymentIsPending = value; return this; }
public String getOrderTokenId() { return orderTokenId; }
public GeneralOrderResponse setOrderTokenId(String value) { this.orderTokenId = value; return this; }
}
public static class OwnerCards
{
public Integer id = null;
public Integer ownerId = null;
public Integer ownerCardTypeId = null;
public Integer phoneVerificationId = null;
public Integer initialMaxTickets = null;
public Integer currentAvailableTickets = null;
public Date timeStampCreatedUTC = null;
public Date timeStampLastChangedUTC = null;
public Date timeStampBoughtUTC = null;
public Date timeStampOrderedUTC = null;
public Date cardValidFromUTC = null;
public Date cardValidToUTC = null;
public Boolean hasStoreCredit = null;
public BigDecimal cardPrice = null;
public BigDecimal pricePaid = null;
public BigDecimal initialStoreCredit = null;
public BigDecimal currentStoreCredit = null;
public String phoneFullVerificationNumber = null;
public String holderId = null;
public String holderName = null;
public String holderEmail = null;
public String cardPriceCurrency = null;
public String pricePaidCurrency = null;
public String deviceId = null;
public String paymentMethodId = null;
public String paymentReference = null;
public String phoneVerificationNumber = null;
public String paymentPhoneNumber = null;
public String paymentId = null;
public String paymentStatus = null;
public String paymentTokenId = null;
public Integer maxTicketsPerEvent = null;
public String multiplePaymentsId = null;
public String imageUrl = null;
public String backgroundImageUrl = null;
public String orderReference = null;
public Integer upgradedFromOwnerCardId = null;
public Integer getId() { return id; }
public OwnerCards setId(Integer value) { this.id = value; return this; }
public Integer getOwnerId() { return ownerId; }
public OwnerCards setOwnerId(Integer value) { this.ownerId = value; return this; }
public Integer getOwnerCardTypeId() { return ownerCardTypeId; }
public OwnerCards setOwnerCardTypeId(Integer value) { this.ownerCardTypeId = value; return this; }
public Integer getPhoneVerificationId() { return phoneVerificationId; }
public OwnerCards setPhoneVerificationId(Integer value) { this.phoneVerificationId = value; return this; }
public Integer getInitialMaxTickets() { return initialMaxTickets; }
public OwnerCards setInitialMaxTickets(Integer value) { this.initialMaxTickets = value; return this; }
public Integer getCurrentAvailableTickets() { return currentAvailableTickets; }
public OwnerCards setCurrentAvailableTickets(Integer value) { this.currentAvailableTickets = value; return this; }
public Date getTimeStampCreatedUTC() { return timeStampCreatedUTC; }
public OwnerCards setTimeStampCreatedUTC(Date value) { this.timeStampCreatedUTC = value; return this; }
public Date getTimeStampLastChangedUTC() { return timeStampLastChangedUTC; }
public OwnerCards setTimeStampLastChangedUTC(Date value) { this.timeStampLastChangedUTC = value; return this; }
public Date getTimeStampBoughtUTC() { return timeStampBoughtUTC; }
public OwnerCards setTimeStampBoughtUTC(Date value) { this.timeStampBoughtUTC = value; return this; }
public Date getTimeStampOrderedUTC() { return timeStampOrderedUTC; }
public OwnerCards setTimeStampOrderedUTC(Date value) { this.timeStampOrderedUTC = value; return this; }
public Date getCardValidFromUTC() { return cardValidFromUTC; }
public OwnerCards setCardValidFromUTC(Date value) { this.cardValidFromUTC = value; return this; }
public Date getCardValidToUTC() { return cardValidToUTC; }
public OwnerCards setCardValidToUTC(Date value) { this.cardValidToUTC = value; return this; }
public Boolean isHasStoreCredit() { return hasStoreCredit; }
public OwnerCards setHasStoreCredit(Boolean value) { this.hasStoreCredit = value; return this; }
public BigDecimal getCardPrice() { return cardPrice; }
public OwnerCards setCardPrice(BigDecimal value) { this.cardPrice = value; return this; }
public BigDecimal getPricePaid() { return pricePaid; }
public OwnerCards setPricePaid(BigDecimal value) { this.pricePaid = value; return this; }
public BigDecimal getInitialStoreCredit() { return initialStoreCredit; }
public OwnerCards setInitialStoreCredit(BigDecimal value) { this.initialStoreCredit = value; return this; }
public BigDecimal getCurrentStoreCredit() { return currentStoreCredit; }
public OwnerCards setCurrentStoreCredit(BigDecimal value) { this.currentStoreCredit = value; return this; }
public String getPhoneFullVerificationNumber() { return phoneFullVerificationNumber; }
public OwnerCards setPhoneFullVerificationNumber(String value) { this.phoneFullVerificationNumber = value; return this; }
public String getHolderId() { return holderId; }
public OwnerCards setHolderId(String value) { this.holderId = value; return this; }
public String getHolderName() { return holderName; }
public OwnerCards setHolderName(String value) { this.holderName = value; return this; }
public String getHolderEmail() { return holderEmail; }
public OwnerCards setHolderEmail(String value) { this.holderEmail = value; return this; }
public String getCardPriceCurrency() { return cardPriceCurrency; }
public OwnerCards setCardPriceCurrency(String value) { this.cardPriceCurrency = value; return this; }
public String getPricePaidCurrency() { return pricePaidCurrency; }
public OwnerCards setPricePaidCurrency(String value) { this.pricePaidCurrency = value; return this; }
public String getDeviceId() { return deviceId; }
public OwnerCards setDeviceId(String value) { this.deviceId = value; return this; }
public String getPaymentMethodId() { return paymentMethodId; }
public OwnerCards setPaymentMethodId(String value) { this.paymentMethodId = value; return this; }
public String getPaymentReference() { return paymentReference; }
public OwnerCards setPaymentReference(String value) { this.paymentReference = value; return this; }
public String getPhoneVerificationNumber() { return phoneVerificationNumber; }
public OwnerCards setPhoneVerificationNumber(String value) { this.phoneVerificationNumber = value; return this; }
public String getPaymentPhoneNumber() { return paymentPhoneNumber; }
public OwnerCards setPaymentPhoneNumber(String value) { this.paymentPhoneNumber = value; return this; }
public String getPaymentId() { return paymentId; }
public OwnerCards setPaymentId(String value) { this.paymentId = value; return this; }
public String getPaymentStatus() { return paymentStatus; }
public OwnerCards setPaymentStatus(String value) { this.paymentStatus = value; return this; }
public String getPaymentTokenId() { return paymentTokenId; }
public OwnerCards setPaymentTokenId(String value) { this.paymentTokenId = value; return this; }
public Integer getMaxTicketsPerEvent() { return maxTicketsPerEvent; }
public OwnerCards setMaxTicketsPerEvent(Integer value) { this.maxTicketsPerEvent = value; return this; }
public String getMultiplePaymentsId() { return multiplePaymentsId; }
public OwnerCards setMultiplePaymentsId(String value) { this.multiplePaymentsId = value; return this; }
public String getImageUrl() { return imageUrl; }
public OwnerCards setImageUrl(String value) { this.imageUrl = value; return this; }
public String getBackgroundImageUrl() { return backgroundImageUrl; }
public OwnerCards setBackgroundImageUrl(String value) { this.backgroundImageUrl = value; return this; }
public String getOrderReference() { return orderReference; }
public OwnerCards setOrderReference(String value) { this.orderReference = value; return this; }
public Integer getUpgradedFromOwnerCardId() { return upgradedFromOwnerCardId; }
public OwnerCards setUpgradedFromOwnerCardId(Integer value) { this.upgradedFromOwnerCardId = value; return this; }
}
}
Java OwnerCardsUpgradeRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /OrderOwnerCards/upgrade HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"buyerPhone":"String","sourceOwnerCardId":0,"targetOwnerCardTypeId":0,"idempotencyKey":"String","paymentMethodId":"String","borgun3DFinalInfo":{"transactionType":"String","amount":0,"currency":"String","transactionDate":"0001-01-01T00:00:00.0000000","orderId":"String","paymentMethod":{"paymentType":"String","token":"String","virtualNumber":"String","expYear":"String","expMonth":"String","panLastFour":"String"},"threeDSecure":{"dataType":"String","mpiToken":"String"}},"tenders":[{"kind":"String","code":"String","amountMinor":0,"idempotencyKey":"String","holdId":0,"appliedMinor":0}],"holderName":"String","holderEmail":"String","deviceId":"String","returnCards":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"sourceOwnerCardId":0,"sourceOwnerCardTypeId":0,"sourceTypeName":"String","newOwnerCardId":0,"targetOwnerCardTypeId":0,"targetTypeName":"String","relinkedTickets":0,"paymentReference":"String","refundPending":false,"cards":[{"id":0,"ownerId":0,"ownerCardTypeId":0,"phoneVerificationId":0,"initialMaxTickets":0,"currentAvailableTickets":0,"timeStampCreatedUTC":"0001-01-01T00:00:00.0000000","timeStampLastChangedUTC":"0001-01-01T00:00:00.0000000","timeStampBoughtUTC":"0001-01-01T00:00:00.0000000","timeStampOrderedUTC":"0001-01-01T00:00:00.0000000","cardValidFromUTC":"0001-01-01T00:00:00.0000000","cardValidToUTC":"0001-01-01T00:00:00.0000000","hasStoreCredit":false,"cardPrice":0,"pricePaid":0,"initialStoreCredit":0,"currentStoreCredit":0,"phoneFullVerificationNumber":"String","holderId":"String","holderName":"String","holderEmail":"String","cardPriceCurrency":"String","pricePaidCurrency":"String","deviceId":"String","paymentMethodId":"String","paymentReference":"String","phoneVerificationNumber":"String","paymentPhoneNumber":"String","paymentId":"String","paymentStatus":"String","paymentTokenId":"String","maxTicketsPerEvent":0,"multiplePaymentsId":"String","imageUrl":"String","backgroundImageUrl":"String","orderReference":"String","upgradedFromOwnerCardId":0}],"orderReference":"String","isSubscription":false,"monthlyPrice":0,"transactionFee":0,"months":0,"paymentTokenId":"String","subscriptionTokenMissing":false,"priceTotal":0,"discountAmount":0,"giftCardAmount":0,"donationAmount":0,"chargedAmount":0,"reason":"String","statusCode":0,"message":"String","success":false,"paymentIsPending":false,"orderTokenId":"String"}