Requires the role: | manager |
POST | /packages/{Id}/adjustments |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Infrastructure.Api.Interfaces.ServiceOperations.SalaryPackages;
using Infrastructure.Api.Interfaces.ServiceOperations;
using Application.Interfaces.Resources;
namespace Application.Interfaces.Resources
{
public partial class Adjustment
: IIdentifiableResource
{
public virtual string BudgetCategory { get; set; }
public virtual decimal Amount { get; set; }
public virtual decimal Gst { get; set; }
public virtual string Description { get; set; }
public virtual DateTime Received { get; set; }
public virtual string Id { get; set; }
}
public partial class BankAccount
{
public virtual string BsbNumber { get; set; }
public virtual string AccountNumber { get; set; }
}
public partial class BudgetBalances
{
public virtual decimal LeaseAmount { get; set; }
public virtual decimal AdministrationFee { get; set; }
public virtual decimal Fuel { get; set; }
public virtual decimal Servicing { get; set; }
public virtual decimal Tyres { get; set; }
public virtual decimal Insurance { get; set; }
public virtual decimal CarWash { get; set; }
public virtual decimal Registration { get; set; }
public virtual decimal RoadSideAssistance { get; set; }
public virtual decimal AnythingExtra { get; set; }
}
public partial class BudgetBreakdown
{
public virtual decimal? LeaseAmount { get; set; }
public virtual decimal? AdministrationFee { get; set; }
public virtual decimal? Fuel { get; set; }
public virtual decimal? Servicing { get; set; }
public virtual decimal? Tyres { get; set; }
public virtual decimal? Insurance { get; set; }
public virtual decimal? CarWash { get; set; }
public virtual decimal? Registration { get; set; }
public virtual decimal? RoadSideAssistance { get; set; }
public virtual decimal? AnythingExtra { get; set; }
}
public partial class Employment
{
public virtual string PayrollCycle { get; set; }
public virtual DateTime FirstPayDate { get; set; }
public virtual string EmployerId { get; set; }
public virtual string EmployerName { get; set; }
}
public partial class Expense
{
public virtual string BudgetCategory { get; set; }
public virtual decimal Amount { get; set; }
public virtual decimal Gst { get; set; }
}
public partial class ForecastedOutgoingPayment
{
public virtual DateTime Scheduled { get; set; }
public virtual decimal Amount { get; set; }
public virtual string BudgetCategory { get; set; }
public virtual Expense Matched { get; set; }
}
public partial class ForecastedSalarySacrifice
{
public virtual DateTime PaymentDate { get; set; }
public virtual decimal Amount { get; set; }
public virtual SalarySacrifice Matched { get; set; }
}
public partial class LeaseDetails
{
public virtual int? Term { get; set; }
public virtual DateTime? StartDate { get; set; }
public virtual decimal? AmountFinanced { get; set; }
public virtual decimal? PaymentAmount { get; set; }
public virtual string FinanceProvider { get; set; }
public virtual decimal? ResidualValue { get; set; }
public virtual int? YearlyKmsTravelled { get; set; }
public virtual decimal? FringeBenefitTaxValue { get; set; }
public virtual string FringeBenefitTaxMethod { get; set; }
public virtual int FringeBenefitTaxBusinessUse { get; set; }
public virtual DateTime FringeBenefitTaxStartDate { get; set; }
public virtual decimal? PreTaxDeduction { get; set; }
public virtual decimal? PostTaxDeduction { get; set; }
public virtual decimal? GstOnPostTaxDeduction { get; set; }
public virtual decimal? LuxuryVehicleCharge { get; set; }
public virtual decimal OnRoadCost { get; set; }
public virtual DateTime RegistrationDueDate { get; set; }
public virtual DateTime InsuranceDueDate { get; set; }
public virtual BankAccount LeaseProviderBankAccount { get; set; }
}
public partial class SalaryPackage
: IIdentifiableResource
{
public SalaryPackage()
{
ForecastedSalarySacrifices = new List<ForecastedSalarySacrifice>{};
ForecastedOutgoingPayments = new List<ForecastedOutgoingPayment>{};
Adjustments = new List<Adjustment>{};
Transactions = new List<Transaction>{};
}
public virtual string CustomerId { get; set; }
public virtual string CustomerFirstName { get; set; }
public virtual string CustomerLastName { get; set; }
public virtual string Status { get; set; }
public virtual string Notes { get; set; }
public virtual BudgetBreakdown BudgetBreakdown { get; set; }
public virtual Employment Employment { get; set; }
public virtual Vehicle Vehicle { get; set; }
public virtual LeaseDetails LeaseDetails { get; set; }
public virtual BudgetBalances BudgetBalances { get; set; }
public virtual decimal CurrentBalance { get; set; }
public virtual List<ForecastedSalarySacrifice> ForecastedSalarySacrifices { get; set; }
public virtual List<ForecastedOutgoingPayment> ForecastedOutgoingPayments { get; set; }
public virtual List<Adjustment> Adjustments { get; set; }
public virtual List<Transaction> Transactions { get; set; }
public virtual string Id { get; set; }
}
public partial class SalarySacrifice
{
public virtual DateTime PaymentDate { get; set; }
public virtual SalarySacrificeBreakdown SalarySacrificeBreakdown { get; set; }
public virtual decimal PreTaxDeduction { get; set; }
public virtual decimal PostTaxDeduction { get; set; }
public virtual string ContributionId { get; set; }
}
public partial class SalarySacrificeBreakdown
{
public virtual decimal? LeaseAmount { get; set; }
public virtual decimal? AdministrationFee { get; set; }
public virtual decimal? Fuel { get; set; }
public virtual decimal? Servicing { get; set; }
public virtual decimal? Tyres { get; set; }
public virtual decimal? Insurance { get; set; }
public virtual decimal? CarWash { get; set; }
public virtual decimal? Registration { get; set; }
public virtual decimal? RoadSideAssistance { get; set; }
public virtual decimal? AnythingExtra { get; set; }
}
public partial class Transaction
{
public virtual DateTime Received { get; set; }
public virtual string BudgetCategory { get; set; }
public virtual decimal Amount { get; set; }
public virtual decimal Gst { get; set; }
public virtual string Description { get; set; }
public virtual string Type { get; set; }
}
public partial class Vehicle
{
public virtual string Make { get; set; }
public virtual string Model { get; set; }
public virtual string Colour { get; set; }
public virtual string BodyShape { get; set; }
public virtual string LicensePlate { get; set; }
public virtual string Transmission { get; set; }
public virtual int ManufactureYear { get; set; }
}
}
namespace Infrastructure.Api.Interfaces.ServiceOperations
{
public partial class PostOperationTenanted<TResponse>
: PostOperationUnTenanted<TResponse>, ITenantedRequest
{
public virtual string OrganisationId { get; set; }
}
public partial class PostOperationUnTenanted<TResponse>
: IPost
{
}
}
namespace Infrastructure.Api.Interfaces.ServiceOperations.SalaryPackages
{
public partial class AddAdjustmentRequest
: PostOperationTenanted<AddAdjustmentResponse>
{
public virtual string Id { get; set; }
public virtual decimal Amount { get; set; }
public virtual decimal Gst { get; set; }
public virtual string BudgetCategory { get; set; }
public virtual string Description { get; set; }
public virtual DateTime Received { get; set; }
}
public partial class AddAdjustmentResponse
{
public virtual ResponseStatus ResponseStatus { get; set; }
public virtual SalaryPackage SalaryPackage { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /packages/{Id}/adjustments HTTP/1.1
Host: staging-api.billiecart.com.au
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"id":"String","amount":0,"gst":0,"budgetCategory":"String","description":"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"}}