@mytiki/tiki-sdk-js
Version:
JS SDK for client-side integration with TIKI
37 lines (36 loc) • 1.49 kB
TypeScript
import { ReceiptRecord } from "./receipt-record";
export { ReceiptRecord } from "./receipt-record";
/**
* Creates a new {@link ReceiptRecord} object.
*
* Note: This method requires an existing {@link Payable.PayableRecord}. Use {@link Payable.create} first.
*
* @param payableId - The identifier for the corresponding payable record
*
* @param amount - The total amount paid.
*
* @param description - A short, human-readable description of the {@link Title.TitleRecord} as a future reminder.
* This parameter is used only if a {@link Title.TitleRecord} does not already exist for the provided ptr.
*
* @param reference - A customer-specific reference identifier
*/
export declare function create(payableId: string, amount: string, description?: string, reference?: string): Promise<ReceiptRecord>;
/**
* Returns all {@link ReceiptRecord}s associated with a given {@link Payable.PayableRecord}.
*
* @param payableId - The id of the PayableRecord
*/
export declare function getByPayable(payableId: string): Array<ReceiptRecord>;
/**
* Retrieves the {@link ReceiptRecord} with the specified ID, or `undefined` if the record is not found.
*
* @param id - The ID of the ReceiptRecord to retrieve.
*/
export declare function getById(id: string): ReceiptRecord | undefined;
/**
* @hidden
* Marshall the {@link RspTitle} object to {@link ReceiptRecord}
*
* @param rsp - The response object to marshall
*/
export declare function _toReceipt(rsp: RspReceipt): ReceiptRecord;