TicketUserServices

<back to all web services

WebshopOrderPurchaseRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequired permission:Tickets.Add
The following routes are available for this service:
POST/Webshop/Order/Purchase
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class WebshopOrderPurchaseRequest
    {
        public Integer ownerId = null;
        public String externalId = null;
        public ArrayList<WebshopPurchaseLine> lines = null;
        public String buyerName = null;
        public String buyerEmail = null;
        public String buyerPhone = null;
        public String deliveryType = null;
        public String droppLocationId = null;
        public String address = null;
        public String city = null;
        public String zipCode = null;
        public String country = null;
        public String idempotencyKey = null;
        public String discountCode = null;
        public ArrayList<OrderTender> tenders = null;
        public String paymentMethodId = null;
        public String paymentId = null;
        public PaymentRequestCreditCard cardInfo = null;
        public Borgun3DFinalRequest borgun3DFinalInfo = null;
        public BorgunApplePayFinalInfo applePayInfo = null;
        
        public Integer getOwnerId() { return ownerId; }
        public WebshopOrderPurchaseRequest setOwnerId(Integer value) { this.ownerId = value; return this; }
        public String getExternalId() { return externalId; }
        public WebshopOrderPurchaseRequest setExternalId(String value) { this.externalId = value; return this; }
        public ArrayList<WebshopPurchaseLine> getLines() { return lines; }
        public WebshopOrderPurchaseRequest setLines(ArrayList<WebshopPurchaseLine> value) { this.lines = value; return this; }
        public String getBuyerName() { return buyerName; }
        public WebshopOrderPurchaseRequest setBuyerName(String value) { this.buyerName = value; return this; }
        public String getBuyerEmail() { return buyerEmail; }
        public WebshopOrderPurchaseRequest setBuyerEmail(String value) { this.buyerEmail = value; return this; }
        public String getBuyerPhone() { return buyerPhone; }
        public WebshopOrderPurchaseRequest setBuyerPhone(String value) { this.buyerPhone = value; return this; }
        public String getDeliveryType() { return deliveryType; }
        public WebshopOrderPurchaseRequest setDeliveryType(String value) { this.deliveryType = value; return this; }
        public String getDroppLocationId() { return droppLocationId; }
        public WebshopOrderPurchaseRequest setDroppLocationId(String value) { this.droppLocationId = value; return this; }
        public String getAddress() { return address; }
        public WebshopOrderPurchaseRequest setAddress(String value) { this.address = value; return this; }
        public String getCity() { return city; }
        public WebshopOrderPurchaseRequest setCity(String value) { this.city = value; return this; }
        public String getZipCode() { return zipCode; }
        public WebshopOrderPurchaseRequest setZipCode(String value) { this.zipCode = value; return this; }
        public String getCountry() { return country; }
        public WebshopOrderPurchaseRequest setCountry(String value) { this.country = value; return this; }
        public String getIdempotencyKey() { return idempotencyKey; }
        public WebshopOrderPurchaseRequest setIdempotencyKey(String value) { this.idempotencyKey = value; return this; }
        public String getDiscountCode() { return discountCode; }
        public WebshopOrderPurchaseRequest setDiscountCode(String value) { this.discountCode = value; return this; }
        public ArrayList<OrderTender> getTenders() { return tenders; }
        public WebshopOrderPurchaseRequest setTenders(ArrayList<OrderTender> value) { this.tenders = value; return this; }
        public String getPaymentMethodId() { return paymentMethodId; }
        public WebshopOrderPurchaseRequest setPaymentMethodId(String value) { this.paymentMethodId = value; return this; }
        public String getPaymentId() { return paymentId; }
        public WebshopOrderPurchaseRequest setPaymentId(String value) { this.paymentId = value; return this; }
        public PaymentRequestCreditCard getCardInfo() { return cardInfo; }
        public WebshopOrderPurchaseRequest setCardInfo(PaymentRequestCreditCard value) { this.cardInfo = value; return this; }
        public Borgun3DFinalRequest getBorgun3DFinalInfo() { return borgun3DFinalInfo; }
        public WebshopOrderPurchaseRequest setBorgun3DFinalInfo(Borgun3DFinalRequest value) { this.borgun3DFinalInfo = value; return this; }
        public BorgunApplePayFinalInfo getApplePayInfo() { return applePayInfo; }
        public WebshopOrderPurchaseRequest setApplePayInfo(BorgunApplePayFinalInfo value) { this.applePayInfo = value; return this; }
    }

    public static class WebshopPurchaseLine
    {
        public Integer variantId = null;
        public Integer quantity = null;
        
        public Integer getVariantId() { return variantId; }
        public WebshopPurchaseLine setVariantId(Integer value) { this.variantId = value; return this; }
        public Integer getQuantity() { return quantity; }
        public WebshopPurchaseLine setQuantity(Integer value) { this.quantity = 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 PaymentRequestCreditCard
    {
        public PaymentMethodCreditCardInfo paymentMethod = null;
        public BigDecimal amount = null;
        public String currency = null;
        public String orderId = null;
        public Date transActionDate = null;
        public Boolean saveCardToToken = null;
        
        public PaymentMethodCreditCardInfo getPaymentMethod() { return paymentMethod; }
        public PaymentRequestCreditCard setPaymentMethod(PaymentMethodCreditCardInfo value) { this.paymentMethod = value; return this; }
        public BigDecimal getAmount() { return amount; }
        public PaymentRequestCreditCard setAmount(BigDecimal value) { this.amount = value; return this; }
        public String getCurrency() { return currency; }
        public PaymentRequestCreditCard setCurrency(String value) { this.currency = value; return this; }
        public String getOrderId() { return orderId; }
        public PaymentRequestCreditCard setOrderId(String value) { this.orderId = value; return this; }
        public Date getTransActionDate() { return transActionDate; }
        public PaymentRequestCreditCard setTransActionDate(Date value) { this.transActionDate = value; return this; }
        public Boolean isSaveCardToToken() { return saveCardToToken; }
        public PaymentRequestCreditCard setSaveCardToToken(Boolean value) { this.saveCardToToken = value; return this; }
    }

    public static class PaymentMethodCreditCardInfo
    {
        public String paymentType = null;
        public String token = null;
        public String pan = null;
        public String expYear = null;
        public String expMonth = null;
        public String cvc = null;
        
        public String getPaymentType() { return paymentType; }
        public PaymentMethodCreditCardInfo setPaymentType(String value) { this.paymentType = value; return this; }
        public String getToken() { return token; }
        public PaymentMethodCreditCardInfo setToken(String value) { this.token = value; return this; }
        public String getPan() { return pan; }
        public PaymentMethodCreditCardInfo setPan(String value) { this.pan = value; return this; }
        public String getExpYear() { return expYear; }
        public PaymentMethodCreditCardInfo setExpYear(String value) { this.expYear = value; return this; }
        public String getExpMonth() { return expMonth; }
        public PaymentMethodCreditCardInfo setExpMonth(String value) { this.expMonth = value; return this; }
        public String getCvc() { return cvc; }
        public PaymentMethodCreditCardInfo setCvc(String value) { this.cvc = 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 BorgunApplePayFinalInfo
    {
        public String orderId = null;
        public BorgunApplePayThreeDSecureInfo threeDSecure = null;
        
        public String getOrderId() { return orderId; }
        public BorgunApplePayFinalInfo setOrderId(String value) { this.orderId = value; return this; }
        public BorgunApplePayThreeDSecureInfo getThreeDSecure() { return threeDSecure; }
        public BorgunApplePayFinalInfo setThreeDSecure(BorgunApplePayThreeDSecureInfo value) { this.threeDSecure = value; return this; }
    }

    public static class BorgunApplePayThreeDSecureInfo
    {
        public String dataType = null;
        public String securityLevelInd = null;
        public String cavv = null;
        public String ucaf = null;
        
        public String getDataType() { return dataType; }
        public BorgunApplePayThreeDSecureInfo setDataType(String value) { this.dataType = value; return this; }
        public String getSecurityLevelInd() { return securityLevelInd; }
        public BorgunApplePayThreeDSecureInfo setSecurityLevelInd(String value) { this.securityLevelInd = value; return this; }
        public String getCavv() { return cavv; }
        public BorgunApplePayThreeDSecureInfo setCavv(String value) { this.cavv = value; return this; }
        public String getUcaf() { return ucaf; }
        public BorgunApplePayThreeDSecureInfo setUcaf(String value) { this.ucaf = value; return this; }
    }

    public static class WebshopOrderResult
    {
        public Boolean success = null;
        public String reason = null;
        public LocalizedMessage message = null;
        public String orderReference = null;
        public WebshopOrderSummary order = null;
        public Integer statusCode = null;
        
        public Boolean isSuccess() { return success; }
        public WebshopOrderResult setSuccess(Boolean value) { this.success = value; return this; }
        public String getReason() { return reason; }
        public WebshopOrderResult setReason(String value) { this.reason = value; return this; }
        public LocalizedMessage getMessage() { return message; }
        public WebshopOrderResult setMessage(LocalizedMessage value) { this.message = value; return this; }
        public String getOrderReference() { return orderReference; }
        public WebshopOrderResult setOrderReference(String value) { this.orderReference = value; return this; }
        public WebshopOrderSummary getOrder() { return order; }
        public WebshopOrderResult setOrder(WebshopOrderSummary value) { this.order = value; return this; }
        public Integer getStatusCode() { return statusCode; }
        public WebshopOrderResult setStatusCode(Integer value) { this.statusCode = value; return this; }
    }

    public static class LocalizedMessage
    {
        public String is = null;
        public String en = null;
        
        public String getIs() { return is; }
        public LocalizedMessage setIs(String value) { this.is = value; return this; }
        public String getEn() { return en; }
        public LocalizedMessage setEn(String value) { this.en = value; return this; }
    }

    public static class WebshopOrderSummary
    {
        public Integer id = null;
        public String orderReference = null;
        public Integer ownerId = null;
        public String status = null;
        public Integer totalMinor = null;
        public Integer deliveryFeeMinor = null;
        public Integer totalDiscountMinor = null;
        public String currency = null;
        public String buyerName = null;
        public String buyerEmail = null;
        public String buyerPhone = null;
        public String address = null;
        public String city = null;
        public String zipCode = null;
        public String country = null;
        public String deliveryType = null;
        public String droppOrderId = null;
        public String droppLocationId = null;
        public Boolean needsDeliveryAttention = null;
        public String paymentMethodId = null;
        public String paymentId = null;
        public String paymentReference = null;
        public String discountCode = null;
        public Integer giftPaidMinor = null;
        public Date createdAt = null;
        public Date updatedAt = null;
        public ArrayList<WebshopOrderLineSummary> lines = null;
        
        public Integer getId() { return id; }
        public WebshopOrderSummary setId(Integer value) { this.id = value; return this; }
        public String getOrderReference() { return orderReference; }
        public WebshopOrderSummary setOrderReference(String value) { this.orderReference = value; return this; }
        public Integer getOwnerId() { return ownerId; }
        public WebshopOrderSummary setOwnerId(Integer value) { this.ownerId = value; return this; }
        public String getStatus() { return status; }
        public WebshopOrderSummary setStatus(String value) { this.status = value; return this; }
        public Integer getTotalMinor() { return totalMinor; }
        public WebshopOrderSummary setTotalMinor(Integer value) { this.totalMinor = value; return this; }
        public Integer getDeliveryFeeMinor() { return deliveryFeeMinor; }
        public WebshopOrderSummary setDeliveryFeeMinor(Integer value) { this.deliveryFeeMinor = value; return this; }
        public Integer getTotalDiscountMinor() { return totalDiscountMinor; }
        public WebshopOrderSummary setTotalDiscountMinor(Integer value) { this.totalDiscountMinor = value; return this; }
        public String getCurrency() { return currency; }
        public WebshopOrderSummary setCurrency(String value) { this.currency = value; return this; }
        public String getBuyerName() { return buyerName; }
        public WebshopOrderSummary setBuyerName(String value) { this.buyerName = value; return this; }
        public String getBuyerEmail() { return buyerEmail; }
        public WebshopOrderSummary setBuyerEmail(String value) { this.buyerEmail = value; return this; }
        public String getBuyerPhone() { return buyerPhone; }
        public WebshopOrderSummary setBuyerPhone(String value) { this.buyerPhone = value; return this; }
        public String getAddress() { return address; }
        public WebshopOrderSummary setAddress(String value) { this.address = value; return this; }
        public String getCity() { return city; }
        public WebshopOrderSummary setCity(String value) { this.city = value; return this; }
        public String getZipCode() { return zipCode; }
        public WebshopOrderSummary setZipCode(String value) { this.zipCode = value; return this; }
        public String getCountry() { return country; }
        public WebshopOrderSummary setCountry(String value) { this.country = value; return this; }
        public String getDeliveryType() { return deliveryType; }
        public WebshopOrderSummary setDeliveryType(String value) { this.deliveryType = value; return this; }
        public String getDroppOrderId() { return droppOrderId; }
        public WebshopOrderSummary setDroppOrderId(String value) { this.droppOrderId = value; return this; }
        public String getDroppLocationId() { return droppLocationId; }
        public WebshopOrderSummary setDroppLocationId(String value) { this.droppLocationId = value; return this; }
        public Boolean isNeedsDeliveryAttention() { return needsDeliveryAttention; }
        public WebshopOrderSummary setNeedsDeliveryAttention(Boolean value) { this.needsDeliveryAttention = value; return this; }
        public String getPaymentMethodId() { return paymentMethodId; }
        public WebshopOrderSummary setPaymentMethodId(String value) { this.paymentMethodId = value; return this; }
        public String getPaymentId() { return paymentId; }
        public WebshopOrderSummary setPaymentId(String value) { this.paymentId = value; return this; }
        public String getPaymentReference() { return paymentReference; }
        public WebshopOrderSummary setPaymentReference(String value) { this.paymentReference = value; return this; }
        public String getDiscountCode() { return discountCode; }
        public WebshopOrderSummary setDiscountCode(String value) { this.discountCode = value; return this; }
        public Integer getGiftPaidMinor() { return giftPaidMinor; }
        public WebshopOrderSummary setGiftPaidMinor(Integer value) { this.giftPaidMinor = value; return this; }
        public Date getCreatedAt() { return createdAt; }
        public WebshopOrderSummary setCreatedAt(Date value) { this.createdAt = value; return this; }
        public Date getUpdatedAt() { return updatedAt; }
        public WebshopOrderSummary setUpdatedAt(Date value) { this.updatedAt = value; return this; }
        public ArrayList<WebshopOrderLineSummary> getLines() { return lines; }
        public WebshopOrderSummary setLines(ArrayList<WebshopOrderLineSummary> value) { this.lines = value; return this; }
    }

    public static class WebshopOrderLineSummary
    {
        public Integer id = null;
        public Integer productId = null;
        public Integer variantId = null;
        public String productName = null;
        public String size = null;
        public String color = null;
        public Integer unitPriceMinor = null;
        public Integer quantity = null;
        public Integer lineTotalMinor = null;
        public String status = null;
        public Integer payoutInfoId = null;
        public String payoutTag = null;
        
        public Integer getId() { return id; }
        public WebshopOrderLineSummary setId(Integer value) { this.id = value; return this; }
        public Integer getProductId() { return productId; }
        public WebshopOrderLineSummary setProductId(Integer value) { this.productId = value; return this; }
        public Integer getVariantId() { return variantId; }
        public WebshopOrderLineSummary setVariantId(Integer value) { this.variantId = value; return this; }
        public String getProductName() { return productName; }
        public WebshopOrderLineSummary setProductName(String value) { this.productName = value; return this; }
        public String getSize() { return size; }
        public WebshopOrderLineSummary setSize(String value) { this.size = value; return this; }
        public String getColor() { return color; }
        public WebshopOrderLineSummary setColor(String value) { this.color = value; return this; }
        public Integer getUnitPriceMinor() { return unitPriceMinor; }
        public WebshopOrderLineSummary setUnitPriceMinor(Integer value) { this.unitPriceMinor = value; return this; }
        public Integer getQuantity() { return quantity; }
        public WebshopOrderLineSummary setQuantity(Integer value) { this.quantity = value; return this; }
        public Integer getLineTotalMinor() { return lineTotalMinor; }
        public WebshopOrderLineSummary setLineTotalMinor(Integer value) { this.lineTotalMinor = value; return this; }
        public String getStatus() { return status; }
        public WebshopOrderLineSummary setStatus(String value) { this.status = value; return this; }
        public Integer getPayoutInfoId() { return payoutInfoId; }
        public WebshopOrderLineSummary setPayoutInfoId(Integer value) { this.payoutInfoId = value; return this; }
        public String getPayoutTag() { return payoutTag; }
        public WebshopOrderLineSummary setPayoutTag(String value) { this.payoutTag = value; return this; }
    }

}

Java WebshopOrderPurchaseRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Webshop/Order/Purchase HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ownerId":0,"externalId":"String","lines":[{"variantId":0,"quantity":0}],"buyerName":"String","buyerEmail":"String","buyerPhone":"String","deliveryType":"String","droppLocationId":"String","address":"String","city":"String","zipCode":"String","country":"String","idempotencyKey":"String","discountCode":"String","tenders":[{"kind":"String","code":"String","amountMinor":0,"idempotencyKey":"String","holdId":0,"appliedMinor":0}],"paymentMethodId":"String","paymentId":"String","cardInfo":{"paymentMethod":{"paymentType":"String","token":"String","pan":"String","expYear":"String","expMonth":"String","cvc":"String"},"amount":0,"currency":"String","orderId":"String","transActionDate":"0001-01-01T00:00:00.0000000","saveCardToToken":false},"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"}},"applePayInfo":{"orderId":"String","threeDSecure":{"dataType":"String","securityLevelInd":"String","cavv":"String","ucaf":"String"}}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"success":false,"reason":"String","message":{"is":"String","en":"String"},"orderReference":"String","order":{"id":0,"orderReference":"String","ownerId":0,"status":"String","totalMinor":0,"deliveryFeeMinor":0,"totalDiscountMinor":0,"currency":"String","buyerName":"String","buyerEmail":"String","buyerPhone":"String","address":"String","city":"String","zipCode":"String","country":"String","deliveryType":"String","droppOrderId":"String","droppLocationId":"String","needsDeliveryAttention":false,"paymentMethodId":"String","paymentId":"String","paymentReference":"String","discountCode":"String","giftPaidMinor":0,"createdAt":"0001-01-01T00:00:00.0000000","updatedAt":"0001-01-01T00:00:00.0000000","lines":[{"id":0,"productId":0,"variantId":0,"productName":"String","size":"String","color":"String","unitPriceMinor":0,"quantity":0,"lineTotalMinor":0,"status":"String","payoutInfoId":0,"payoutTag":"String"}]},"statusCode":0}