| GET | /eaccounting/summarizedinvoice/preview | Preview eligible bookings for summarized invoicing | Returns the customers and booking counts that would be included in a summarized invoice run, without actually creating anything. |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
@ValidateRequest(Validator="IsAuthenticated")
public static class PreviewSummarizedInvoice implements ICompany
{
/**
* The company id, if empty will use the company id for the user you are logged in with.
*/
@ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
public UUID CompanyId = null;
/**
* Start date for the booking range to include.
*/
@ApiMember(Description="Start date for the booking range to include.", IsRequired=true)
public Date DateFrom = null;
/**
* End date for the booking range to include.
*/
@ApiMember(Description="End date for the booking range to include.", IsRequired=true)
public Date DateTo = null;
/**
* Optional customer id filter.
*/
@ApiMember(Description="Optional customer id filter.")
public UUID CustomerId = null;
/**
* Optional service/event id filter.
*/
@ApiMember(Description="Optional service/event id filter.")
public Integer ServiceId = null;
/**
* Optional list of booking status ids to include. If empty, all statuses are included.
*/
@ApiMember(Description="Optional list of booking status ids to include. If empty, all statuses are included.")
public ArrayList<Integer> BookingStatusIds = null;
/**
* Send type for invoices. 0 = None, 1 = AutoInvoiceElectronic, 2 = AutoInvoicePrint, 3 = AutoInvoiceB2C. Used to validate customer addresses for postal delivery.
*/
@ApiMember(Description="Send type for invoices. 0 = None, 1 = AutoInvoiceElectronic, 2 = AutoInvoicePrint, 3 = AutoInvoiceB2C. Used to validate customer addresses for postal delivery.")
public EAccountingInvoiceSendTypes SendType = null;
public UUID getCompanyId() { return CompanyId; }
public PreviewSummarizedInvoice setCompanyId(UUID value) { this.CompanyId = value; return this; }
public Date getDateFrom() { return DateFrom; }
public PreviewSummarizedInvoice setDateFrom(Date value) { this.DateFrom = value; return this; }
public Date getDateTo() { return DateTo; }
public PreviewSummarizedInvoice setDateTo(Date value) { this.DateTo = value; return this; }
public UUID getCustomerId() { return CustomerId; }
public PreviewSummarizedInvoice setCustomerId(UUID value) { this.CustomerId = value; return this; }
public Integer getServiceId() { return ServiceId; }
public PreviewSummarizedInvoice setServiceId(Integer value) { this.ServiceId = value; return this; }
public ArrayList<Integer> getBookingStatusIds() { return BookingStatusIds; }
public PreviewSummarizedInvoice setBookingStatusIds(ArrayList<Integer> value) { this.BookingStatusIds = value; return this; }
public EAccountingInvoiceSendTypes getSendType() { return SendType; }
public PreviewSummarizedInvoice setSendType(EAccountingInvoiceSendTypes value) { this.SendType = value; return this; }
}
public static enum EAccountingInvoiceSendTypes
{
None,
AutoInvoiceElectronic,
AutoInvoicePrint,
AutoInvoiceB2C;
}
public static class PreviewSummarizedInvoiceResponse
{
public Integer TotalCustomers = null;
public Integer TotalBookings = null;
public ArrayList<PreviewCustomerGroup> Customers = new ArrayList<PreviewCustomerGroup>();
public ResponseStatus ResponseStatus = null;
public Integer getTotalCustomers() { return TotalCustomers; }
public PreviewSummarizedInvoiceResponse setTotalCustomers(Integer value) { this.TotalCustomers = value; return this; }
public Integer getTotalBookings() { return TotalBookings; }
public PreviewSummarizedInvoiceResponse setTotalBookings(Integer value) { this.TotalBookings = value; return this; }
public ArrayList<PreviewCustomerGroup> getCustomers() { return Customers; }
public PreviewSummarizedInvoiceResponse setCustomers(ArrayList<PreviewCustomerGroup> value) { this.Customers = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public PreviewSummarizedInvoiceResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class PreviewCustomerGroup
{
public UUID CustomerId = null;
public String CustomerName = null;
public String Email = null;
public Integer BookingCount = null;
public ArrayList<Integer> BookingIds = new ArrayList<Integer>();
public Boolean MissingInvoiceAddress = null;
public Boolean MissingEmail = null;
public UUID getCustomerId() { return CustomerId; }
public PreviewCustomerGroup setCustomerId(UUID value) { this.CustomerId = value; return this; }
public String getCustomerName() { return CustomerName; }
public PreviewCustomerGroup setCustomerName(String value) { this.CustomerName = value; return this; }
public String getEmail() { return Email; }
public PreviewCustomerGroup setEmail(String value) { this.Email = value; return this; }
public Integer getBookingCount() { return BookingCount; }
public PreviewCustomerGroup setBookingCount(Integer value) { this.BookingCount = value; return this; }
public ArrayList<Integer> getBookingIds() { return BookingIds; }
public PreviewCustomerGroup setBookingIds(ArrayList<Integer> value) { this.BookingIds = value; return this; }
public Boolean isMissingInvoiceAddress() { return MissingInvoiceAddress; }
public PreviewCustomerGroup setMissingInvoiceAddress(Boolean value) { this.MissingInvoiceAddress = value; return this; }
public Boolean isMissingEmail() { return MissingEmail; }
public PreviewCustomerGroup setMissingEmail(Boolean value) { this.MissingEmail = value; return this; }
}
}
Java PreviewSummarizedInvoice 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.
GET /eaccounting/summarizedinvoice/preview HTTP/1.1 Host: api.bokamera.se Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PreviewSummarizedInvoiceResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<Customers>
<PreviewCustomerGroup>
<BookingCount>0</BookingCount>
<BookingIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</BookingIds>
<CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
<CustomerName>String</CustomerName>
<Email>String</Email>
<MissingEmail>false</MissingEmail>
<MissingInvoiceAddress>false</MissingInvoiceAddress>
</PreviewCustomerGroup>
</Customers>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<TotalBookings>0</TotalBookings>
<TotalCustomers>0</TotalCustomers>
</PreviewSummarizedInvoiceResponse>