CenResService

<back to all web services

TransactionPost

The following routes are available for this service:
POST/transaction/{SubscriptionId}/{CendynPropertyId}
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class TransactionPost
    {
        public TransactionContainer transactionContainer = null;
        public String subscriptionId = null;
        public String cendynPropertyId = null;
        
        public TransactionContainer getTransactionContainer() { return transactionContainer; }
        public TransactionPost setTransactionContainer(TransactionContainer value) { this.transactionContainer = value; return this; }
        public String getSubscriptionId() { return subscriptionId; }
        public TransactionPost setSubscriptionId(String value) { this.subscriptionId = value; return this; }
        public String getCendynPropertyId() { return cendynPropertyId; }
        public TransactionPost setCendynPropertyId(String value) { this.cendynPropertyId = value; return this; }
    }

    public static class TransactionContainer
    {
        public String echoToken = null;
        public TransactionHeader transactionHeader = null;
        public ArrayList<Transaction> transactions = null;
        
        public String getEchoToken() { return echoToken; }
        public TransactionContainer setEchoToken(String value) { this.echoToken = value; return this; }
        public TransactionHeader getTransactionHeader() { return transactionHeader; }
        public TransactionContainer setTransactionHeader(TransactionHeader value) { this.transactionHeader = value; return this; }
        public ArrayList<Transaction> getTransactions() { return transactions; }
        public TransactionContainer setTransactions(ArrayList<Transaction> value) { this.transactions = value; return this; }
    }

    public static class TransactionHeader
    {
        public String cendynPropertyID = null;
        public String sourcePropertyID = null;
        public String externalResID1 = null;
        public String externalProfileID = null;
        public String externalRefType = null;
        public String externalRefID = null;
        public String transactionHeaderSource = null;
        public String externalID1 = null;
        public String externalID2 = null;
        public Date openedDate = null;
        public Date closedDate = null;
        public Date postedDate = null;
        public String userID = null;
        public String userName = null;
        public String salesRep = null;
        public String shippingCode = null;
        public String referenceNum = null;
        public String customCode1 = null;
        public String customCode2 = null;
        public Integer customCode3 = null;
        public String taxCode = null;
        public Boolean isTaxExempt = null;
        public BigDecimal taxAmount = null;
        public BigDecimal feeAmount = null;
        public BigDecimal discountAmount = null;
        public BigDecimal netAmount = null;
        public BigDecimal totalAmount = null;
        public String currencyCode = null;
        public String importSource = null;
        public String importSourceID = null;
        
        public String getCendynPropertyID() { return cendynPropertyID; }
        public TransactionHeader setCendynPropertyID(String value) { this.cendynPropertyID = value; return this; }
        public String getSourcePropertyID() { return sourcePropertyID; }
        public TransactionHeader setSourcePropertyID(String value) { this.sourcePropertyID = value; return this; }
        public String getExternalResID1() { return externalResID1; }
        public TransactionHeader setExternalResID1(String value) { this.externalResID1 = value; return this; }
        public String getExternalProfileID() { return externalProfileID; }
        public TransactionHeader setExternalProfileID(String value) { this.externalProfileID = value; return this; }
        public String getExternalRefType() { return externalRefType; }
        public TransactionHeader setExternalRefType(String value) { this.externalRefType = value; return this; }
        public String getExternalRefID() { return externalRefID; }
        public TransactionHeader setExternalRefID(String value) { this.externalRefID = value; return this; }
        public String getTransactionHeaderSource() { return transactionHeaderSource; }
        public TransactionHeader setTransactionHeaderSource(String value) { this.transactionHeaderSource = value; return this; }
        public String getExternalID1() { return externalID1; }
        public TransactionHeader setExternalID1(String value) { this.externalID1 = value; return this; }
        public String getExternalID2() { return externalID2; }
        public TransactionHeader setExternalID2(String value) { this.externalID2 = value; return this; }
        public Date getOpenedDate() { return openedDate; }
        public TransactionHeader setOpenedDate(Date value) { this.openedDate = value; return this; }
        public Date getClosedDate() { return closedDate; }
        public TransactionHeader setClosedDate(Date value) { this.closedDate = value; return this; }
        public Date getPostedDate() { return postedDate; }
        public TransactionHeader setPostedDate(Date value) { this.postedDate = value; return this; }
        public String getUserID() { return userID; }
        public TransactionHeader setUserID(String value) { this.userID = value; return this; }
        public String getUserName() { return userName; }
        public TransactionHeader setUserName(String value) { this.userName = value; return this; }
        public String getSalesRep() { return salesRep; }
        public TransactionHeader setSalesRep(String value) { this.salesRep = value; return this; }
        public String getShippingCode() { return shippingCode; }
        public TransactionHeader setShippingCode(String value) { this.shippingCode = value; return this; }
        public String getReferenceNum() { return referenceNum; }
        public TransactionHeader setReferenceNum(String value) { this.referenceNum = value; return this; }
        public String getCustomCode1() { return customCode1; }
        public TransactionHeader setCustomCode1(String value) { this.customCode1 = value; return this; }
        public String getCustomCode2() { return customCode2; }
        public TransactionHeader setCustomCode2(String value) { this.customCode2 = value; return this; }
        public Integer getCustomCode3() { return customCode3; }
        public TransactionHeader setCustomCode3(Integer value) { this.customCode3 = value; return this; }
        public String getTaxCode() { return taxCode; }
        public TransactionHeader setTaxCode(String value) { this.taxCode = value; return this; }
        public Boolean getIsTaxExempt() { return isTaxExempt; }
        public TransactionHeader setIsTaxExempt(Boolean value) { this.isTaxExempt = value; return this; }
        public BigDecimal getTaxAmount() { return taxAmount; }
        public TransactionHeader setTaxAmount(BigDecimal value) { this.taxAmount = value; return this; }
        public BigDecimal getFeeAmount() { return feeAmount; }
        public TransactionHeader setFeeAmount(BigDecimal value) { this.feeAmount = value; return this; }
        public BigDecimal getDiscountAmount() { return discountAmount; }
        public TransactionHeader setDiscountAmount(BigDecimal value) { this.discountAmount = value; return this; }
        public BigDecimal getNetAmount() { return netAmount; }
        public TransactionHeader setNetAmount(BigDecimal value) { this.netAmount = value; return this; }
        public BigDecimal getTotalAmount() { return totalAmount; }
        public TransactionHeader setTotalAmount(BigDecimal value) { this.totalAmount = value; return this; }
        public String getCurrencyCode() { return currencyCode; }
        public TransactionHeader setCurrencyCode(String value) { this.currencyCode = value; return this; }
        public String getImportSource() { return importSource; }
        public TransactionHeader setImportSource(String value) { this.importSource = value; return this; }
        public String getImportSourceID() { return importSourceID; }
        public TransactionHeader setImportSourceID(String value) { this.importSourceID = value; return this; }
    }

    public static class Transaction
    {
        public String cendynPropertyID = null;
        public String sourcePropertyID = null;
        public String externalResID1 = null;
        public String externalProfileID = null;
        public String externalRefType = null;
        public String externalRefID = null;
        public String transactionSource = null;
        public String transactionID = null;
        public String transactionGroup = null;
        public Date transactionDate = null;
        public String folioID = null;
        public String folioGroupingID = null;
        public String transactionCode = null;
        public String description = null;
        public BigDecimal creditAmount = null;
        public BigDecimal debitAmount = null;
        public BigDecimal netAmount = null;
        public Boolean displayOnInvoice = null;
        public String ledgerAccountNum = null;
        public String ccTransactionType = null;
        public String roomNumber = null;
        public String transferType = null;
        public String transferredResID = null;
        public String referenceNum = null;
        public Integer postedNights = null;
        public Integer itemQty = null;
        public String userID = null;
        public String currencyCode = null;
        public Integer decimals = null;
        public BigDecimal customValue1 = null;
        public BigDecimal customValue2 = null;
        
        public String getCendynPropertyID() { return cendynPropertyID; }
        public Transaction setCendynPropertyID(String value) { this.cendynPropertyID = value; return this; }
        public String getSourcePropertyID() { return sourcePropertyID; }
        public Transaction setSourcePropertyID(String value) { this.sourcePropertyID = value; return this; }
        public String getExternalResID1() { return externalResID1; }
        public Transaction setExternalResID1(String value) { this.externalResID1 = value; return this; }
        public String getExternalProfileID() { return externalProfileID; }
        public Transaction setExternalProfileID(String value) { this.externalProfileID = value; return this; }
        public String getExternalRefType() { return externalRefType; }
        public Transaction setExternalRefType(String value) { this.externalRefType = value; return this; }
        public String getExternalRefID() { return externalRefID; }
        public Transaction setExternalRefID(String value) { this.externalRefID = value; return this; }
        public String getTransactionSource() { return transactionSource; }
        public Transaction setTransactionSource(String value) { this.transactionSource = value; return this; }
        public String getTransactionID() { return transactionID; }
        public Transaction setTransactionID(String value) { this.transactionID = value; return this; }
        public String getTransactionGroup() { return transactionGroup; }
        public Transaction setTransactionGroup(String value) { this.transactionGroup = value; return this; }
        public Date getTransactionDate() { return transactionDate; }
        public Transaction setTransactionDate(Date value) { this.transactionDate = value; return this; }
        public String getFolioID() { return folioID; }
        public Transaction setFolioID(String value) { this.folioID = value; return this; }
        public String getFolioGroupingID() { return folioGroupingID; }
        public Transaction setFolioGroupingID(String value) { this.folioGroupingID = value; return this; }
        public String getTransactionCode() { return transactionCode; }
        public Transaction setTransactionCode(String value) { this.transactionCode = value; return this; }
        public String getDescription() { return description; }
        public Transaction setDescription(String value) { this.description = value; return this; }
        public BigDecimal getCreditAmount() { return creditAmount; }
        public Transaction setCreditAmount(BigDecimal value) { this.creditAmount = value; return this; }
        public BigDecimal getDebitAmount() { return debitAmount; }
        public Transaction setDebitAmount(BigDecimal value) { this.debitAmount = value; return this; }
        public BigDecimal getNetAmount() { return netAmount; }
        public Transaction setNetAmount(BigDecimal value) { this.netAmount = value; return this; }
        public Boolean isDisplayOnInvoice() { return displayOnInvoice; }
        public Transaction setDisplayOnInvoice(Boolean value) { this.displayOnInvoice = value; return this; }
        public String getLedgerAccountNum() { return ledgerAccountNum; }
        public Transaction setLedgerAccountNum(String value) { this.ledgerAccountNum = value; return this; }
        public String getCcTransactionType() { return ccTransactionType; }
        public Transaction setCcTransactionType(String value) { this.ccTransactionType = value; return this; }
        public String getRoomNumber() { return roomNumber; }
        public Transaction setRoomNumber(String value) { this.roomNumber = value; return this; }
        public String getTransferType() { return transferType; }
        public Transaction setTransferType(String value) { this.transferType = value; return this; }
        public String getTransferredResID() { return transferredResID; }
        public Transaction setTransferredResID(String value) { this.transferredResID = value; return this; }
        public String getReferenceNum() { return referenceNum; }
        public Transaction setReferenceNum(String value) { this.referenceNum = value; return this; }
        public Integer getPostedNights() { return postedNights; }
        public Transaction setPostedNights(Integer value) { this.postedNights = value; return this; }
        public Integer getItemQty() { return itemQty; }
        public Transaction setItemQty(Integer value) { this.itemQty = value; return this; }
        public String getUserID() { return userID; }
        public Transaction setUserID(String value) { this.userID = value; return this; }
        public String getCurrencyCode() { return currencyCode; }
        public Transaction setCurrencyCode(String value) { this.currencyCode = value; return this; }
        public Integer getDecimals() { return decimals; }
        public Transaction setDecimals(Integer value) { this.decimals = value; return this; }
        public BigDecimal getCustomValue1() { return customValue1; }
        public Transaction setCustomValue1(BigDecimal value) { this.customValue1 = value; return this; }
        public BigDecimal getCustomValue2() { return customValue2; }
        public Transaction setCustomValue2(BigDecimal value) { this.customValue2 = value; return this; }
    }

    public static class Response
    {
        public String statusCode = null;
        public Integer recordCount = null;
        public Integer errorCount = null;
        
        public String getStatusCode() { return statusCode; }
        public Response setStatusCode(String value) { this.statusCode = value; return this; }
        public Integer getRecordCount() { return recordCount; }
        public Response setRecordCount(Integer value) { this.recordCount = value; return this; }
        public Integer getErrorCount() { return errorCount; }
        public Response setErrorCount(Integer value) { this.errorCount = value; return this; }
    }

}

Java TransactionPost 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 /transaction/{SubscriptionId}/{CendynPropertyId} HTTP/1.1 
Host: cert.cendyn.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"transactionContainer":{"echoToken":"String","transactionHeader":{"cendynPropertyID":"String","sourcePropertyID":"String","externalResID1":"String","externalProfileID":"String","externalRefType":"String","externalRefID":"String","transactionHeaderSource":"String","externalID1":"String","externalID2":"String","openedDate":"0001-01-01T00:00:00.0000000","closedDate":"0001-01-01T00:00:00.0000000","postedDate":"0001-01-01T00:00:00.0000000","userID":"String","userName":"String","salesRep":"String","shippingCode":"String","referenceNum":"String","customCode1":"String","customCode2":"String","customCode3":0,"taxCode":"String","isTaxExempt":false,"taxAmount":0,"feeAmount":0,"discountAmount":0,"netAmount":0,"totalAmount":0,"currencyCode":"String","importSource":"String","importSourceID":"String"},"transactions":[{"cendynPropertyID":"String","sourcePropertyID":"String","externalResID1":"String","externalProfileID":"String","externalRefType":"String","externalRefID":"String","transactionSource":"String","transactionID":"String","transactionGroup":"String","transactionDate":"0001-01-01T00:00:00.0000000","folioID":"String","folioGroupingID":"String","transactionCode":"String","description":"String","creditAmount":0,"debitAmount":0,"netAmount":0,"displayOnInvoice":false,"ledgerAccountNum":"String","ccTransactionType":"String","roomNumber":"String","transferType":"String","transferredResID":"String","referenceNum":"String","postedNights":0,"itemQty":0,"userID":"String","currencyCode":"String","decimals":0,"customValue1":0,"customValue2":0}]},"subscriptionId":"String","cendynPropertyId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"statusCode":"String","recordCount":0,"errorCount":0}