ynab
Version:
Official JavaScript client for the YNAB API. API documentation available at https://api.ynab.com. Generated from server specification version 1.76.0
91 lines (90 loc) • 4.04 kB
TypeScript
/**
* YNAB API Endpoints
* Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
*
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
import type { TransactionFlagColor } from './TransactionFlagColor';
import type { TransactionClearedStatus } from './TransactionClearedStatus';
import type { SaveSubTransaction } from './SaveSubTransaction';
/**
*
* @export
* @interface ExistingTransaction
*/
export interface ExistingTransaction {
/**
*
* @type {string}
* @memberof ExistingTransaction
*/
account_id?: string;
/**
* The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored.
* @type {string}
* @memberof ExistingTransaction
*/
date?: string;
/**
* The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
* @type {number}
* @memberof ExistingTransaction
*/
amount?: number;
/**
* The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource.
* @type {string}
* @memberof ExistingTransaction
*/
payee_id?: string | null;
/**
* The payee name. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee.
* @type {string}
* @memberof ExistingTransaction
*/
payee_name?: string | null;
/**
* The category for the transaction. To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object. If an existing transaction is a split, the `category_id` cannot be changed. Credit Card Payment categories are not permitted and will be ignored if supplied.
* @type {string}
* @memberof ExistingTransaction
*/
category_id?: string | null;
/**
*
* @type {string}
* @memberof ExistingTransaction
*/
memo?: string | null;
/**
*
* @type {TransactionClearedStatus}
* @memberof ExistingTransaction
*/
cleared?: TransactionClearedStatus;
/**
* Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default.
* @type {boolean}
* @memberof ExistingTransaction
*/
approved?: boolean;
/**
*
* @type {TransactionFlagColor}
* @memberof ExistingTransaction
*/
flag_color?: TransactionFlagColor | null;
/**
* An array of subtransactions to configure a transaction as a split. Updating `subtransactions` on an existing split transaction is not supported.
* @type {Array<SaveSubTransaction>}
* @memberof ExistingTransaction
*/
subtransactions?: Array<SaveSubTransaction>;
}
/**
* Check if a given object implements the ExistingTransaction interface.
*/
export declare function instanceOfExistingTransaction(value: object): value is ExistingTransaction;
export declare function ExistingTransactionFromJSON(json: any): ExistingTransaction;
export declare function ExistingTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExistingTransaction;
export declare function ExistingTransactionToJSON(json: any): ExistingTransaction;
export declare function ExistingTransactionToJSONTyped(value?: ExistingTransaction | null, ignoreDiscriminator?: boolean): any;