Requires the role: | manager |
POST | /payments |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class CreatePaymentRequest : PostOperationTenanted<CreatePaymentResponse>()
{
var salaryPackageId:String? = null
var amount:BigDecimal? = null
var gstAmount:BigDecimal? = null
var particulars:String? = null
var budgetCategory:String? = null
}
open class PostOperationTenanted<TResponse> : PostOperationUnTenanted<TResponse>(), ITenantedRequest
{
var organisationId:String? = null
}
open class PostOperationUnTenanted<TResponse> : IPost
{
}
open class CreatePaymentResponse
{
var responseStatus:ResponseStatus? = null
var payment:Payment? = null
}
open class Payment : IIdentifiableResource
{
var salaryPackageId:String? = null
var amount:BigDecimal? = null
var gstAmount:BigDecimal? = null
var particulars:String? = null
var budgetCategory:String? = null
var status:String? = null
var toAccount:BankAccount? = null
var id:String? = null
}
open class BankAccount
{
var bsbNumber:String? = null
var accountNumber:String? = null
}
Kotlin CreatePaymentRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /payments HTTP/1.1
Host: staging-api.billiecart.com.au
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
salaryPackageId: String,
amount: 0,
gstAmount: 0,
particulars: String,
budgetCategory: 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 } }, payment: { salaryPackageId: String, amount: 0, gstAmount: 0, particulars: String, budgetCategory: String, status: String, toAccount: { bsbNumber: String, accountNumber: String }, id: String } }