| GET | /v2/transaction/{Query}/{CendynPropertyId} | ||
|---|---|---|---|
| GET | /v2/transaction/{Query} |
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
public static class TransactionRequest
{
public String cendynPropertyId = null;
public String transactionSource = null;
public TransactionQueryType query = null;
public String id = null;
public Date startDate = null;
public Date endDate = null;
@DataMember(Name="Limit")
@SerializedName("Limit")
public Integer pageSize = null;
@DataMember(Name="Page")
@SerializedName("Page")
public Integer pageNumber = null;
public String getCendynPropertyId() { return cendynPropertyId; }
public TransactionRequest setCendynPropertyId(String value) { this.cendynPropertyId = value; return this; }
public String getTransactionSource() { return transactionSource; }
public TransactionRequest setTransactionSource(String value) { this.transactionSource = value; return this; }
public TransactionQueryType getQuery() { return query; }
public TransactionRequest setQuery(TransactionQueryType value) { this.query = value; return this; }
public String getId() { return id; }
public TransactionRequest setId(String value) { this.id = value; return this; }
public Date getStartDate() { return startDate; }
public TransactionRequest setStartDate(Date value) { this.startDate = value; return this; }
public Date getEndDate() { return endDate; }
public TransactionRequest setEndDate(Date value) { this.endDate = value; return this; }
public Integer getPageSize() { return pageSize; }
public TransactionRequest setPageSize(Integer value) { this.pageSize = value; return this; }
public Integer getPageNumber() { return pageNumber; }
public TransactionRequest setPageNumber(Integer value) { this.pageNumber = value; return this; }
}
public static enum TransactionQueryType
{
TransactionId,
LastUpdated,
TransactionDate;
}
public static class TransactionResponse extends CenResResponse
{
public ArrayList<Transaction> records = null;
public ArrayList<Transaction> getRecords() { return records; }
public TransactionResponse setRecords(ArrayList<Transaction> value) { this.records = value; return this; }
}
public static class CenResResponse
{
public RequestStatus status = null;
public String statusMessage = null;
public Integer recordsReturned = null;
public Integer recordsAvailable = null;
public Integer pageNumber = null;
public Integer pageSize = null;
public RequestStatus getStatus() { return status; }
public CenResResponse setStatus(RequestStatus value) { this.status = value; return this; }
public String getStatusMessage() { return statusMessage; }
public CenResResponse setStatusMessage(String value) { this.statusMessage = value; return this; }
public Integer getRecordsReturned() { return recordsReturned; }
public CenResResponse setRecordsReturned(Integer value) { this.recordsReturned = value; return this; }
public Integer getRecordsAvailable() { return recordsAvailable; }
public CenResResponse setRecordsAvailable(Integer value) { this.recordsAvailable = value; return this; }
public Integer getPageNumber() { return pageNumber; }
public CenResResponse setPageNumber(Integer value) { this.pageNumber = value; return this; }
public Integer getPageSize() { return pageSize; }
public CenResResponse setPageSize(Integer value) { this.pageSize = value; return this; }
}
public static enum RequestStatus
{
Success,
Warning,
Error,
NotAuthorized,
Failure;
}
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; }
}
}
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v2/transaction/{Query}/{CendynPropertyId} HTTP/1.1
Host: cert.cendyn.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"records":[{"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}],"status":"Success","statusMessage":"String","recordsReturned":0,"recordsAvailable":0,"pageNumber":0,"pageSize":0}