Requires the role: | manager |
POST | /payments |
---|
export class PostOperationUnTenanted<TResponse> implements IPost
{
public constructor(init?: Partial<PostOperationUnTenanted<TResponse>>) { (Object as any).assign(this, init); }
}
export class PostOperationTenanted<TResponse> extends PostOperationUnTenanted<TResponse> implements ITenantedRequest
{
public organisationId?: string;
public constructor(init?: Partial<PostOperationTenanted<TResponse>>) { super(init); (Object as any).assign(this, init); }
}
export class BankAccount
{
public bsbNumber?: string;
public accountNumber?: string;
public constructor(init?: Partial<BankAccount>) { (Object as any).assign(this, init); }
}
export class Payment implements IIdentifiableResource
{
public salaryPackageId?: string;
public amount: number;
public gstAmount: number;
public particulars?: string;
public budgetCategory?: string;
public status?: string;
public toAccount?: BankAccount;
public id?: string;
public constructor(init?: Partial<Payment>) { (Object as any).assign(this, init); }
}
export class CreatePaymentResponse
{
public responseStatus?: ResponseStatus;
public payment?: Payment;
public constructor(init?: Partial<CreatePaymentResponse>) { (Object as any).assign(this, init); }
}
export class CreatePaymentRequest extends PostOperationTenanted<CreatePaymentResponse>
{
public salaryPackageId?: string;
public amount: number;
public gstAmount: number;
public particulars?: string;
public budgetCategory?: string;
public constructor(init?: Partial<CreatePaymentRequest>) { super(init); (Object as any).assign(this, init); }
}
TypeScript CreatePaymentRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
Content-Type: application/json
Content-Length: length
{"salaryPackageId":"String","amount":0,"gstAmount":0,"particulars":"String","budgetCategory":"String","organisationId":"String"}
HTTP/1.1 200 OK Content-Type: application/json 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"}}