UNPKG

wallee

Version:
166 lines (165 loc) 6.93 kB
import http = require("http"); import Promise = require("bluebird"); import { Authentication } from '../auth/Authentication'; import { DebtCollectionCase } from '../models/DebtCollectionCase'; import { DebtCollectionCaseCreate } from '../models/DebtCollectionCaseCreate'; import { DebtCollectionCaseDocument } from '../models/DebtCollectionCaseDocument'; import { DebtCollectionCaseUpdate } from '../models/DebtCollectionCaseUpdate'; import { DebtCollectionReceipt } from '../models/DebtCollectionReceipt'; import { EntityQuery } from '../models/EntityQuery'; import { EntityQueryFilter } from '../models/EntityQueryFilter'; declare class DebtCollectionCaseService { protected _basePath: string; protected _defaultHeaders: any; protected _useQuerystring: boolean; protected _timeout: number; protected _defaultAuthentication: Authentication; constructor(configuration: any); /** * Set timeout in seconds. Default timeout: 25 seconds * @param {number} timeout */ set timeout(timeout: number); private setTimeout; set basePath(basePath: string); get basePath(): string; protected setDefaultAuthentication(auth: Authentication): void; private getVersion; /** * Deletes the entity with the given id. * @summary Delete * @param spaceId * @param id * @param {*} [options] Override http request options. */ _delete(spaceId: number, id: number, options?: any): Promise<{ response: http.IncomingMessage; body?: any; }>; /** * Adds a new collected amount to the case, creating a new payment receipt. * @summary Add Collected Amount * @param spaceId * @param id The id of the debt collection case for which the amount should be added. * @param collectedAmount The amount that has been collected. * @param externalId The unique external id of this payment receipt. * @param {*} [options] Override http request options. */ addCollectedAmount(spaceId: number, id: number, collectedAmount: number, externalId: string, options?: any): Promise<{ response: http.IncomingMessage; body: DebtCollectionReceipt; }>; /** * Attach an additional supporting document to the case. * @summary Attach Document * @param spaceId * @param id The id of the debt collection case. * @param fileName The file name of the document that is uploaded. * @param contentBase64 The BASE64 encoded contents of the document. * @param {*} [options] Override http request options. */ attachDocument(spaceId: number, id: number, fileName: string, contentBase64: string, options?: any): Promise<{ response: http.IncomingMessage; body: DebtCollectionCaseDocument; }>; /** * Closes the debt collection case, meaning no further money can be collected. * @summary Close * @param spaceId * @param id The id of the debt collection case which should be closed. * @param {*} [options] Override http request options. */ close(spaceId: number, id: number, options?: any): Promise<{ response: http.IncomingMessage; body: DebtCollectionCase; }>; /** * Counts the number of items in the database as restricted by the given filter. * @summary Count * @param spaceId * @param filter The filter which restricts the entities which are used to calculate the count. * @param {*} [options] Override http request options. */ count(spaceId: number, filter?: EntityQueryFilter, options?: any): Promise<{ response: http.IncomingMessage; body: number; }>; /** * Creates the entity with the given properties. * @summary Create * @param spaceId * @param entity The debt collection case object with the properties which should be created. * @param {*} [options] Override http request options. */ create(spaceId: number, entity: DebtCollectionCaseCreate, options?: any): Promise<{ response: http.IncomingMessage; body: DebtCollectionCase; }>; /** * Returns all documents that are attached to a debt collection case. * @summary Documents * @param spaceId * @param id The id of the debt collection case for which the attached documents are returned. * @param {*} [options] Override http request options. */ documents(spaceId: number, id: number, options?: any): Promise<{ response: http.IncomingMessage; body: Array<DebtCollectionCaseDocument>; }>; /** * This operation will mark a debt collection case as prepared and allow the collection process to proceed. * @summary Mark Case As Prepared * @param spaceId * @param id The id of the debt collection case which should be marked as prepared. * @param {*} [options] Override http request options. */ markAsPrepared(spaceId: number, id: number, options?: any): Promise<{ response: http.IncomingMessage; body: DebtCollectionCase; }>; /** * This operation will mark a debt collection case as reviewed and allow the collection process to proceed. * @summary Mark Case As Reviewed * @param spaceId * @param id The id of the debt collection case which should be reviewed. * @param {*} [options] Override http request options. */ markAsReviewed(spaceId: number, id: number, options?: any): Promise<{ response: http.IncomingMessage; body: DebtCollectionCase; }>; /** * Reads the entity with the given 'id' and returns it. * @summary Read * @param spaceId * @param id The id of the debt collection case which should be returned. * @param {*} [options] Override http request options. */ read(spaceId: number, id: number, options?: any): Promise<{ response: http.IncomingMessage; body: DebtCollectionCase; }>; /** * Searches for the entities as specified by the given query. * @summary Search * @param spaceId * @param query The query restricts the cases which are returned by the search. * @param {*} [options] Override http request options. */ search(spaceId: number, query: EntityQuery, options?: any): Promise<{ response: http.IncomingMessage; body: Array<DebtCollectionCase>; }>; /** * This updates the entity with the given properties. Only those properties which should be updated can be provided. The 'id' and 'version' are required to identify the entity. * @summary Update * @param spaceId * @param entity The object with all the properties which should be updated. The id and the version are required properties. * @param {*} [options] Override http request options. */ update(spaceId: number, entity: DebtCollectionCaseUpdate, options?: any): Promise<{ response: http.IncomingMessage; body: DebtCollectionCase; }>; } export { DebtCollectionCaseService };