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 .xml suffix or ?format=xml

HTTP + XML

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/xml
Content-Type: application/xml
Content-Length: length

<TransactionPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel">
  <CendynPropertyId>String</CendynPropertyId>
  <SubscriptionId>String</SubscriptionId>
  <TransactionContainer>
    <EchoToken>String</EchoToken>
    <TransactionHeader>
      <CendynPropertyID>String</CendynPropertyID>
      <ClosedDate>0001-01-01T00:00:00</ClosedDate>
      <CurrencyCode>String</CurrencyCode>
      <CustomCode1>String</CustomCode1>
      <CustomCode2>String</CustomCode2>
      <CustomCode3>0</CustomCode3>
      <DiscountAmount>0</DiscountAmount>
      <ExternalID1>String</ExternalID1>
      <ExternalID2>String</ExternalID2>
      <ExternalProfileID>String</ExternalProfileID>
      <ExternalRefID>String</ExternalRefID>
      <ExternalRefType>String</ExternalRefType>
      <ExternalResID1>String</ExternalResID1>
      <FeeAmount>0</FeeAmount>
      <ImportSource>String</ImportSource>
      <ImportSourceID>String</ImportSourceID>
      <IsTaxExempt>false</IsTaxExempt>
      <NetAmount>0</NetAmount>
      <OpenedDate>0001-01-01T00:00:00</OpenedDate>
      <PostedDate>0001-01-01T00:00:00</PostedDate>
      <ReferenceNum>String</ReferenceNum>
      <SalesRep>String</SalesRep>
      <ShippingCode>String</ShippingCode>
      <SourcePropertyID>String</SourcePropertyID>
      <TaxAmount>0</TaxAmount>
      <TaxCode>String</TaxCode>
      <TotalAmount>0</TotalAmount>
      <TransactionHeaderSource>String</TransactionHeaderSource>
      <UserID>String</UserID>
      <UserName>String</UserName>
    </TransactionHeader>
    <Transactions>
      <Transaction>
        <CCTransactionType>String</CCTransactionType>
        <CendynPropertyID>String</CendynPropertyID>
        <CreditAmount>0</CreditAmount>
        <CurrencyCode>String</CurrencyCode>
        <CustomValue1>0</CustomValue1>
        <CustomValue2>0</CustomValue2>
        <DebitAmount>0</DebitAmount>
        <Decimals>0</Decimals>
        <Description>String</Description>
        <DisplayOnInvoice>false</DisplayOnInvoice>
        <ExternalProfileID>String</ExternalProfileID>
        <ExternalRefID>String</ExternalRefID>
        <ExternalRefType>String</ExternalRefType>
        <ExternalResID1>String</ExternalResID1>
        <FolioGroupingID>String</FolioGroupingID>
        <FolioID>String</FolioID>
        <ItemQty>0</ItemQty>
        <LedgerAccountNum>String</LedgerAccountNum>
        <NetAmount>0</NetAmount>
        <PostedNights>0</PostedNights>
        <ReferenceNum>String</ReferenceNum>
        <RoomNumber>String</RoomNumber>
        <SourcePropertyID>String</SourcePropertyID>
        <TransactionCode>String</TransactionCode>
        <TransactionDate>0001-01-01T00:00:00</TransactionDate>
        <TransactionGroup>String</TransactionGroup>
        <TransactionID>String</TransactionID>
        <TransactionSource>String</TransactionSource>
        <TransferType>String</TransferType>
        <TransferredResID>String</TransferredResID>
        <UserID>String</UserID>
      </Transaction>
    </Transactions>
  </TransactionContainer>
</TransactionPost>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel">
  <ErrorCount>0</ErrorCount>
  <RecordCount>0</RecordCount>
  <StatusCode>String</StatusCode>
</Response>