Billiecart API

<back to all web services

ForecastRequest

Requires Authentication
Requires the role:manager
The following routes are available for this service:
PUT/packages/{id}/forecast
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


open class ForecastRequest : PutOperationTenanted<ForecastResponse>()
{
    var id:String? = null
}

open class PutOperationTenanted<TResponse> : PutOperationUnTenanted<TResponse>(), ITenantedRequest
{
    var organisationId:String? = null
}

open class PutOperationUnTenanted<TResponse> : IPut
{
}

open class ForecastResponse
{
    var responseStatus:ResponseStatus? = null
    var salaryPackage:SalaryPackage? = null
}

open class SalaryPackage : IIdentifiableResource
{
    var customerId:String? = null
    var customerFirstName:String? = null
    var customerLastName:String? = null
    var status:String? = null
    var notes:String? = null
    var budgetBreakdown:BudgetBreakdown? = null
    var employment:Employment? = null
    var vehicle:Vehicle? = null
    var leaseDetails:LeaseDetails? = null
    var budgetBalances:BudgetBalances? = null
    var currentBalance:BigDecimal? = null
    var forecastedSalarySacrifices:ArrayList<ForecastedSalarySacrifice> = ArrayList<ForecastedSalarySacrifice>()
    var forecastedOutgoingPayments:ArrayList<ForecastedOutgoingPayment> = ArrayList<ForecastedOutgoingPayment>()
    var adjustments:ArrayList<Adjustment> = ArrayList<Adjustment>()
    var transactions:ArrayList<Transaction> = ArrayList<Transaction>()
    var id:String? = null
}

open class BudgetBreakdown
{
    var leaseAmount:BigDecimal? = null
    var administrationFee:BigDecimal? = null
    var fuel:BigDecimal? = null
    var servicing:BigDecimal? = null
    var tyres:BigDecimal? = null
    var insurance:BigDecimal? = null
    var carWash:BigDecimal? = null
    var registration:BigDecimal? = null
    var roadSideAssistance:BigDecimal? = null
    var anythingExtra:BigDecimal? = null
}

open class Employment
{
    var payrollCycle:String? = null
    var firstPayDate:Date? = null
    var employerId:String? = null
    var employerName:String? = null
}

open class Vehicle
{
    var make:String? = null
    var model:String? = null
    var colour:String? = null
    var bodyShape:String? = null
    var licensePlate:String? = null
    var transmission:String? = null
    var manufactureYear:Int? = null
}

open class LeaseDetails
{
    var term:Int? = null
    var startDate:Date? = null
    var amountFinanced:BigDecimal? = null
    var paymentAmount:BigDecimal? = null
    var financeProvider:String? = null
    var residualValue:BigDecimal? = null
    var yearlyKmsTravelled:Int? = null
    var fringeBenefitTaxValue:BigDecimal? = null
    var fringeBenefitTaxMethod:String? = null
    var fringeBenefitTaxBusinessUse:Int? = null
    var fringeBenefitTaxStartDate:Date? = null
    var preTaxDeduction:BigDecimal? = null
    var postTaxDeduction:BigDecimal? = null
    var gstOnPostTaxDeduction:BigDecimal? = null
    var luxuryVehicleCharge:BigDecimal? = null
    var onRoadCost:BigDecimal? = null
    var registrationDueDate:Date? = null
    var insuranceDueDate:Date? = null
    var leaseProviderBankAccount:BankAccount? = null
}

open class BankAccount
{
    var bsbNumber:String? = null
    var accountNumber:String? = null
}

open class BudgetBalances
{
    var leaseAmount:BigDecimal? = null
    var administrationFee:BigDecimal? = null
    var fuel:BigDecimal? = null
    var servicing:BigDecimal? = null
    var tyres:BigDecimal? = null
    var insurance:BigDecimal? = null
    var carWash:BigDecimal? = null
    var registration:BigDecimal? = null
    var roadSideAssistance:BigDecimal? = null
    var anythingExtra:BigDecimal? = null
}

open class ForecastedSalarySacrifice
{
    var paymentDate:Date? = null
    var amount:BigDecimal? = null
    var matched:SalarySacrifice? = null
}

open class SalarySacrifice
{
    var paymentDate:Date? = null
    var salarySacrificeBreakdown:SalarySacrificeBreakdown? = null
    var preTaxDeduction:BigDecimal? = null
    var postTaxDeduction:BigDecimal? = null
    var contributionId:String? = null
}

open class SalarySacrificeBreakdown
{
    var leaseAmount:BigDecimal? = null
    var administrationFee:BigDecimal? = null
    var fuel:BigDecimal? = null
    var servicing:BigDecimal? = null
    var tyres:BigDecimal? = null
    var insurance:BigDecimal? = null
    var carWash:BigDecimal? = null
    var registration:BigDecimal? = null
    var roadSideAssistance:BigDecimal? = null
    var anythingExtra:BigDecimal? = null
}

open class ForecastedOutgoingPayment
{
    var scheduled:Date? = null
    var amount:BigDecimal? = null
    var budgetCategory:String? = null
    var matched:Expense? = null
}

open class Expense
{
    var budgetCategory:String? = null
    var amount:BigDecimal? = null
    var gst:BigDecimal? = null
}

open class Adjustment : IIdentifiableResource
{
    var budgetCategory:String? = null
    var amount:BigDecimal? = null
    var gst:BigDecimal? = null
    var description:String? = null
    var received:Date? = null
    var id:String? = null
}

open class Transaction
{
    var received:Date? = null
    var budgetCategory:String? = null
    var amount:BigDecimal? = null
    var gst:BigDecimal? = null
    var description:String? = null
    @SerializedName("type") var Type:String? = null
}

Kotlin ForecastRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /packages/{id}/forecast HTTP/1.1 
Host: staging-api.billiecart.com.au 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"id":"String","organisationId":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"salaryPackage":{"customerId":"String","customerFirstName":"String","customerLastName":"String","status":"String","notes":"String","budgetBreakdown":{"leaseAmount":0,"administrationFee":0,"fuel":0,"servicing":0,"tyres":0,"insurance":0,"carWash":0,"registration":0,"roadSideAssistance":0,"anythingExtra":0},"employment":{"payrollCycle":"String","employerId":"String","employerName":"String"},"vehicle":{"make":"String","model":"String","colour":"String","bodyShape":"String","licensePlate":"String","transmission":"String","manufactureYear":0},"leaseDetails":{"term":0,"startDate":null,"amountFinanced":0,"paymentAmount":0,"financeProvider":"String","residualValue":0,"yearlyKmsTravelled":0,"fringeBenefitTaxValue":0,"fringeBenefitTaxMethod":"String","fringeBenefitTaxBusinessUse":0,"preTaxDeduction":0,"postTaxDeduction":0,"gstOnPostTaxDeduction":0,"luxuryVehicleCharge":0,"onRoadCost":0,"leaseProviderBankAccount":{"bsbNumber":"String","accountNumber":"String"}},"budgetBalances":{"leaseAmount":0,"administrationFee":0,"fuel":0,"servicing":0,"tyres":0,"insurance":0,"carWash":0,"registration":0,"roadSideAssistance":0,"anythingExtra":0},"currentBalance":0,"forecastedSalarySacrifices":[{"amount":0,"matched":{"salarySacrificeBreakdown":{"leaseAmount":0,"administrationFee":0,"fuel":0,"servicing":0,"tyres":0,"insurance":0,"carWash":0,"registration":0,"roadSideAssistance":0,"anythingExtra":0},"preTaxDeduction":0,"postTaxDeduction":0,"contributionId":"String"}}],"forecastedOutgoingPayments":[{"amount":0,"budgetCategory":"String","matched":{"budgetCategory":"String","amount":0,"gst":0}}],"adjustments":[{"budgetCategory":"String","amount":0,"gst":0,"description":"String","id":"String"}],"transactions":[{"budgetCategory":"String","amount":0,"gst":0,"description":"String","type":"String"}],"id":"String"}}