| POST | /api/Financial/ExchangeRateBase |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class ExchangeRateBaseParams extends ExchangeRateBaseParams
{
}
public static class ExchangeRateBase
{
public ExchangeRate ExchangeRate = null;
public BigDecimal BaseAmount = null;
public ExchangeRate getExchangeRate() { return ExchangeRate; }
public ExchangeRateBase setExchangeRate(ExchangeRate value) { this.ExchangeRate = value; return this; }
public BigDecimal getBaseAmount() { return BaseAmount; }
public ExchangeRateBase setBaseAmount(BigDecimal value) { this.BaseAmount = value; return this; }
}
public static class ExchangeRate implements ILazyLoadMemoryCacheValue
{
public String BaseCurrency = null;
public String ForeignCurrency = null;
public BigDecimal Rate = null;
public Date TimeStamp = null;
public Boolean FromCache = null;
public String getBaseCurrency() { return BaseCurrency; }
public ExchangeRate setBaseCurrency(String value) { this.BaseCurrency = value; return this; }
public String getForeignCurrency() { return ForeignCurrency; }
public ExchangeRate setForeignCurrency(String value) { this.ForeignCurrency = value; return this; }
public BigDecimal getRate() { return Rate; }
public ExchangeRate setRate(BigDecimal value) { this.Rate = value; return this; }
public Date getTimeStamp() { return TimeStamp; }
public ExchangeRate setTimeStamp(Date value) { this.TimeStamp = value; return this; }
public Boolean isFromCache() { return FromCache; }
public ExchangeRate setFromCache(Boolean value) { this.FromCache = value; return this; }
}
}
Java ExchangeRateBaseParams DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/Financial/ExchangeRateBase HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ExchangeRateBaseParams xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.billhighway.com/api">
<AmountDue xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common.DTO">0</AmountDue>
<BaseCurrency xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common.DTO">String</BaseCurrency>
<ProcessingCurrency xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common.DTO">String</ProcessingCurrency>
</ExchangeRateBaseParams>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ExchangeRateBase xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common.DTO">
<BaseAmount>0</BaseAmount>
<ExchangeRate>
<BaseCurrency>String</BaseCurrency>
<ForeignCurrency>String</ForeignCurrency>
<FromCache>false</FromCache>
<Rate>0</Rate>
<TimeStamp>0001-01-01T00:00:00</TimeStamp>
</ExchangeRate>
</ExchangeRateBase>