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
177 lines (176 loc) • 5.9 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 { SubTransaction } from './SubTransaction';
/**
*
* @export
* @interface TransactionDetail
*/
export interface TransactionDetail {
/**
*
* @type {string}
* @memberof TransactionDetail
*/
id: string;
/**
* The transaction date in ISO format (e.g. 2016-12-01)
* @type {string}
* @memberof TransactionDetail
*/
date: string;
/**
* The transaction amount in milliunits format
* @type {number}
* @memberof TransactionDetail
*/
amount: number;
/**
*
* @type {string}
* @memberof TransactionDetail
*/
memo?: string | null;
/**
*
* @type {TransactionClearedStatus}
* @memberof TransactionDetail
*/
cleared: TransactionClearedStatus;
/**
* Whether or not the transaction is approved
* @type {boolean}
* @memberof TransactionDetail
*/
approved: boolean;
/**
*
* @type {TransactionFlagColor}
* @memberof TransactionDetail
*/
flag_color?: TransactionFlagColor | null;
/**
* The customized name of a transaction flag
* @type {string}
* @memberof TransactionDetail
*/
flag_name?: string | null;
/**
*
* @type {string}
* @memberof TransactionDetail
*/
account_id: string;
/**
*
* @type {string}
* @memberof TransactionDetail
*/
payee_id?: string | null;
/**
*
* @type {string}
* @memberof TransactionDetail
*/
category_id?: string | null;
/**
* If a transfer transaction, the account to which it transfers
* @type {string}
* @memberof TransactionDetail
*/
transfer_account_id?: string | null;
/**
* If a transfer transaction, the id of transaction on the other side of the transfer
* @type {string}
* @memberof TransactionDetail
*/
transfer_transaction_id?: string | null;
/**
* If transaction is matched, the id of the matched transaction
* @type {string}
* @memberof TransactionDetail
*/
matched_transaction_id?: string | null;
/**
* If the transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.
* @type {string}
* @memberof TransactionDetail
*/
import_id?: string | null;
/**
* If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules
* @type {string}
* @memberof TransactionDetail
*/
import_payee_name?: string | null;
/**
* If the transaction was imported, the original payee name as it appeared on the statement
* @type {string}
* @memberof TransactionDetail
*/
import_payee_name_original?: string | null;
/**
* If the transaction is a debt/loan account transaction, the type of transaction
* @type {string}
* @memberof TransactionDetail
*/
debt_transaction_type?: TransactionDetailDebtTransactionTypeEnum | null;
/**
* Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
* @type {boolean}
* @memberof TransactionDetail
*/
deleted: boolean;
/**
*
* @type {string}
* @memberof TransactionDetail
*/
account_name: string;
/**
*
* @type {string}
* @memberof TransactionDetail
*/
payee_name?: string | null;
/**
* The name of the category. If a split transaction, this will be 'Split'.
* @type {string}
* @memberof TransactionDetail
*/
category_name?: string | null;
/**
* If a split transaction, the subtransactions.
* @type {Array<SubTransaction>}
* @memberof TransactionDetail
*/
subtransactions: Array<SubTransaction>;
}
/**
* @export
*/
export declare const TransactionDetailDebtTransactionTypeEnum: {
readonly Payment: "payment";
readonly Refund: "refund";
readonly Fee: "fee";
readonly Interest: "interest";
readonly Escrow: "escrow";
readonly BalanceAdjustment: "balanceAdjustment";
readonly Credit: "credit";
readonly Charge: "charge";
};
export type TransactionDetailDebtTransactionTypeEnum = typeof TransactionDetailDebtTransactionTypeEnum[keyof typeof TransactionDetailDebtTransactionTypeEnum];
/**
* Check if a given object implements the TransactionDetail interface.
*/
export declare function instanceOfTransactionDetail(value: object): value is TransactionDetail;
export declare function TransactionDetailFromJSON(json: any): TransactionDetail;
export declare function TransactionDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionDetail;
export declare function TransactionDetailToJSON(json: any): TransactionDetail;
export declare function TransactionDetailToJSONTyped(value?: TransactionDetail | null, ignoreDiscriminator?: boolean): any;