Billhighway Cloud API

<back to all web services

InvoiceCollection

The following routes are available for this service:
POST/invoices/misc
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class InvoiceCollection
    {
        public ArrayList<Invoice> InvoiceList = null;
        
        public ArrayList<Invoice> getInvoiceList() { return InvoiceList; }
        public InvoiceCollection setInvoiceList(ArrayList<Invoice> value) { this.InvoiceList = value; return this; }
    }

    public static class Invoice implements IInvoiceValidation
    {
        public String UniqueId = null;
        public Integer ClientId = null;
        public String GroupId = null;
        public String Description = null;
        public String OpportunityId = null;
        public Integer Installments = null;
        public Integer Frequency = null;
        public Date InvoiceDueDate = null;
        public Boolean Deliver = null;
        public String UserId = null;
        public Integer BhUserId = null;
        public String CurrencyType = null;
        public ArrayList<InvoiceItem> InvoiceItems = null;
        public Integer InvoiceNo = null;
        public BigDecimal InvoiceAmt = null;
        public String ExternalInvBatchNo = null;
        public Boolean ExemptFromLateFee = null;
        
        public String getUniqueId() { return UniqueId; }
        public Invoice setUniqueId(String value) { this.UniqueId = value; return this; }
        public Integer getClientId() { return ClientId; }
        public Invoice setClientId(Integer value) { this.ClientId = value; return this; }
        public String getGroupId() { return GroupId; }
        public Invoice setGroupId(String value) { this.GroupId = value; return this; }
        public String getDescription() { return Description; }
        public Invoice setDescription(String value) { this.Description = value; return this; }
        public String getOpportunityId() { return OpportunityId; }
        public Invoice setOpportunityId(String value) { this.OpportunityId = value; return this; }
        public Integer getInstallments() { return Installments; }
        public Invoice setInstallments(Integer value) { this.Installments = value; return this; }
        public Integer getFrequency() { return Frequency; }
        public Invoice setFrequency(Integer value) { this.Frequency = value; return this; }
        public Date getInvoiceDueDate() { return InvoiceDueDate; }
        public Invoice setInvoiceDueDate(Date value) { this.InvoiceDueDate = value; return this; }
        public Boolean isDeliver() { return Deliver; }
        public Invoice setDeliver(Boolean value) { this.Deliver = value; return this; }
        public String getUserId() { return UserId; }
        public Invoice setUserId(String value) { this.UserId = value; return this; }
        public Integer getBhUserId() { return BhUserId; }
        public Invoice setBhUserId(Integer value) { this.BhUserId = value; return this; }
        public String getCurrencyType() { return CurrencyType; }
        public Invoice setCurrencyType(String value) { this.CurrencyType = value; return this; }
        public ArrayList<InvoiceItem> getInvoiceItems() { return InvoiceItems; }
        public Invoice setInvoiceItems(ArrayList<InvoiceItem> value) { this.InvoiceItems = value; return this; }
        public Integer getInvoiceNo() { return InvoiceNo; }
        public Invoice setInvoiceNo(Integer value) { this.InvoiceNo = value; return this; }
        public BigDecimal getInvoiceAmt() { return InvoiceAmt; }
        public Invoice setInvoiceAmt(BigDecimal value) { this.InvoiceAmt = value; return this; }
        public String getExternalInvBatchNo() { return ExternalInvBatchNo; }
        public Invoice setExternalInvBatchNo(String value) { this.ExternalInvBatchNo = value; return this; }
        public Boolean isExemptFromLateFee() { return ExemptFromLateFee; }
        public Invoice setExemptFromLateFee(Boolean value) { this.ExemptFromLateFee = value; return this; }
    }

    public static class InvoiceItem implements IInvoiceItemValidation
    {
        public String UniqueId = null;
        public String ProductName = null;
        public BigDecimal AmountDue = null;
        public String ProductType = null;
        public Integer ActPatternTypeID = null;
        public Date TermStartDate = null;
        public Date TermEndDate = null;
        public Integer RecognitionPeriod = null;
        public String RevenueAccount = null;
        public String AccountsReceivableAccount = null;
        public String LiabilityAccount = null;
        public String CreditExpenseAccount = null;
        public String InvoiceClearingAccount = null;
        public String CostCenter = null;
        public String Region = null;
        
        public String getUniqueId() { return UniqueId; }
        public InvoiceItem setUniqueId(String value) { this.UniqueId = value; return this; }
        public String getProductName() { return ProductName; }
        public InvoiceItem setProductName(String value) { this.ProductName = value; return this; }
        public BigDecimal getAmountDue() { return AmountDue; }
        public InvoiceItem setAmountDue(BigDecimal value) { this.AmountDue = value; return this; }
        public String getProductType() { return ProductType; }
        public InvoiceItem setProductType(String value) { this.ProductType = value; return this; }
        public Integer getActPatternTypeID() { return ActPatternTypeID; }
        public InvoiceItem setActPatternTypeID(Integer value) { this.ActPatternTypeID = value; return this; }
        public Date getTermStartDate() { return TermStartDate; }
        public InvoiceItem setTermStartDate(Date value) { this.TermStartDate = value; return this; }
        public Date getTermEndDate() { return TermEndDate; }
        public InvoiceItem setTermEndDate(Date value) { this.TermEndDate = value; return this; }
        public Integer getRecognitionPeriod() { return RecognitionPeriod; }
        public InvoiceItem setRecognitionPeriod(Integer value) { this.RecognitionPeriod = value; return this; }
        public String getRevenueAccount() { return RevenueAccount; }
        public InvoiceItem setRevenueAccount(String value) { this.RevenueAccount = value; return this; }
        public String getAccountsReceivableAccount() { return AccountsReceivableAccount; }
        public InvoiceItem setAccountsReceivableAccount(String value) { this.AccountsReceivableAccount = value; return this; }
        public String getLiabilityAccount() { return LiabilityAccount; }
        public InvoiceItem setLiabilityAccount(String value) { this.LiabilityAccount = value; return this; }
        public String getCreditExpenseAccount() { return CreditExpenseAccount; }
        public InvoiceItem setCreditExpenseAccount(String value) { this.CreditExpenseAccount = value; return this; }
        public String getInvoiceClearingAccount() { return InvoiceClearingAccount; }
        public InvoiceItem setInvoiceClearingAccount(String value) { this.InvoiceClearingAccount = value; return this; }
        public String getCostCenter() { return CostCenter; }
        public InvoiceItem setCostCenter(String value) { this.CostCenter = value; return this; }
        public String getRegion() { return Region; }
        public InvoiceItem setRegion(String value) { this.Region = value; return this; }
    }

    public static class InvoiceCollectionReply implements IHaveErrorField
    {
        public ArrayList<InvoiceReply> InvoiceReply = null;
        public Boolean IsError = null;
        
        public ArrayList<InvoiceReply> getInvoiceReply() { return InvoiceReply; }
        public InvoiceCollectionReply setInvoiceReply(ArrayList<InvoiceReply> value) { this.InvoiceReply = value; return this; }
        public Boolean getIsError() { return IsError; }
        public InvoiceCollectionReply setIsError(Boolean value) { this.IsError = value; return this; }
    }

    public static class InvoiceReply
    {
        public String UniqueId = null;
        public Integer ErrorCode = null;
        public String ErrorMessage = null;
        public Integer InvBatchNo = null;
        public BigDecimal InvAmount = null;
        
        public String getUniqueId() { return UniqueId; }
        public InvoiceReply setUniqueId(String value) { this.UniqueId = value; return this; }
        public Integer getErrorCode() { return ErrorCode; }
        public InvoiceReply setErrorCode(Integer value) { this.ErrorCode = value; return this; }
        public String getErrorMessage() { return ErrorMessage; }
        public InvoiceReply setErrorMessage(String value) { this.ErrorMessage = value; return this; }
        public Integer getInvBatchNo() { return InvBatchNo; }
        public InvoiceReply setInvBatchNo(Integer value) { this.InvBatchNo = value; return this; }
        public BigDecimal getInvAmount() { return InvAmount; }
        public InvoiceReply setInvAmount(BigDecimal value) { this.InvAmount = value; return this; }
    }

}

Java InvoiceCollection 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 /invoices/misc HTTP/1.1 
Host: devapi.billhighway.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<InvoiceCollection xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
  <InvoiceList>
    <Invoice>
      <BhUserId>0</BhUserId>
      <ClientId>0</ClientId>
      <CurrencyType>String</CurrencyType>
      <Deliver>false</Deliver>
      <Description>String</Description>
      <ExemptFromLateFee>false</ExemptFromLateFee>
      <ExternalInvBatchNo>String</ExternalInvBatchNo>
      <Frequency>0</Frequency>
      <GroupId>String</GroupId>
      <Installments>0</Installments>
      <InvoiceAmt>0</InvoiceAmt>
      <InvoiceDueDate>0001-01-01T00:00:00</InvoiceDueDate>
      <InvoiceItems>
        <InvoiceItem>
          <AmountDue>String</AmountDue>
          <ProductName>String</ProductName>
          <RevenueAccount>String</RevenueAccount>
        </InvoiceItem>
      </InvoiceItems>
      <InvoiceNo>0</InvoiceNo>
      <OpportunityId>String</OpportunityId>
      <UniqueId>String</UniqueId>
      <UserId>String</UserId>
    </Invoice>
  </InvoiceList>
</InvoiceCollection>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<InvoiceCollectionReply xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
  <InvoiceReply>
    <InvoiceReply>
      <ErrorCode>0</ErrorCode>
      <ErrorMessage>String</ErrorMessage>
      <InvAmount>0</InvAmount>
      <InvBatchNo>0</InvBatchNo>
      <UniqueId>String</UniqueId>
    </InvoiceReply>
  </InvoiceReply>
</InvoiceCollectionReply>