BokaMera.API.Host

<back to all web services

PreviewSummarizedInvoice

Requires Authentication
The following routes are available for this service:
GET/eaccounting/summarizedinvoice/previewPreview eligible bookings for summarized invoicingReturns 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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	TotalCustomers: 0,
	TotalBookings: 0,
	Customers: 
	[
		{
			CustomerName: String,
			Email: String,
			BookingCount: 0,
			BookingIds: 
			[
				0
			],
			MissingInvoiceAddress: False,
			MissingEmail: False
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}