Billiecart API

<back to all web services

DistributeContributionRequest

Requires Authentication
Requires the role:manager
The following routes are available for this service:
POST/contributions/{Id}/distribute
import java.math.*
import java.util.*
import net.servicestack.client.*


open class DistributeContributionRequest : PostOperationTenanted<DistributeContributionResponse>()
{
    var id:String? = null
    var salaryPackages:ArrayList<ContributionSalaryPackage> = ArrayList<ContributionSalaryPackage>()
}

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

open class PostOperationUnTenanted<TResponse> : IPost
{
}

open class DistributeContributionResponse
{
    var responseStatus:ResponseStatus? = null
}

open class ContributionSalaryPackage : IIdentifiableResource
{
    var preTaxDeduction:BigDecimal? = null
    var postTaxDeduction:BigDecimal? = null
    var salarySacrificeBreakdown:SalarySacrificeBreakdown? = null
    var id: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
}

Kotlin DistributeContributionRequest 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.

POST /contributions/{Id}/distribute HTTP/1.1 
Host: staging-api.billiecart.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	salaryPackages: 
	[
		{
			preTaxDeduction: 0,
			postTaxDeduction: 0,
			salarySacrificeBreakdown: 
			{
				leaseAmount: 0,
				administrationFee: 0,
				fuel: 0,
				servicing: 0,
				tyres: 0,
				insurance: 0,
				carWash: 0,
				registration: 0,
				roadSideAssistance: 0,
				anythingExtra: 0
			},
			id: String
		}
	],
	organisationId: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}