UNPKG

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

190 lines (189 loc) 6.37 kB
/** * 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'; /** * * @export * @interface HybridTransaction */ export interface HybridTransaction { /** * * @type {string} * @memberof HybridTransaction */ id: string; /** * The transaction date in ISO format (e.g. 2016-12-01) * @type {string} * @memberof HybridTransaction */ date: string; /** * The transaction amount in milliunits format * @type {number} * @memberof HybridTransaction */ amount: number; /** * * @type {string} * @memberof HybridTransaction */ memo?: string | null; /** * * @type {TransactionClearedStatus} * @memberof HybridTransaction */ cleared: TransactionClearedStatus; /** * Whether or not the transaction is approved * @type {boolean} * @memberof HybridTransaction */ approved: boolean; /** * * @type {TransactionFlagColor} * @memberof HybridTransaction */ flag_color?: TransactionFlagColor | null; /** * The customized name of a transaction flag * @type {string} * @memberof HybridTransaction */ flag_name?: string | null; /** * * @type {string} * @memberof HybridTransaction */ account_id: string; /** * * @type {string} * @memberof HybridTransaction */ payee_id?: string | null; /** * * @type {string} * @memberof HybridTransaction */ category_id?: string | null; /** * If a transfer transaction, the account to which it transfers * @type {string} * @memberof HybridTransaction */ transfer_account_id?: string | null; /** * If a transfer transaction, the id of transaction on the other side of the transfer * @type {string} * @memberof HybridTransaction */ transfer_transaction_id?: string | null; /** * If transaction is matched, the id of the matched transaction * @type {string} * @memberof HybridTransaction */ 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 HybridTransaction */ 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 HybridTransaction */ import_payee_name?: string | null; /** * If the transaction was imported, the original payee name as it appeared on the statement * @type {string} * @memberof HybridTransaction */ import_payee_name_original?: string | null; /** * If the transaction is a debt/loan account transaction, the type of transaction * @type {string} * @memberof HybridTransaction */ debt_transaction_type?: HybridTransactionDebtTransactionTypeEnum | null; /** * Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. * @type {boolean} * @memberof HybridTransaction */ deleted: boolean; /** * Whether the hybrid transaction represents a regular transaction or a subtransaction * @type {string} * @memberof HybridTransaction */ type: HybridTransactionTypeEnum; /** * For subtransaction types, this is the id of the parent transaction. For transaction types, this id will be always be null. * @type {string} * @memberof HybridTransaction */ parent_transaction_id?: string | null; /** * * @type {string} * @memberof HybridTransaction */ account_name: string; /** * * @type {string} * @memberof HybridTransaction */ payee_name?: string | null; /** * The name of the category. If a split transaction, this will be 'Split'. * @type {string} * @memberof HybridTransaction */ category_name?: string; } /** * @export */ export declare const HybridTransactionDebtTransactionTypeEnum: { 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 HybridTransactionDebtTransactionTypeEnum = typeof HybridTransactionDebtTransactionTypeEnum[keyof typeof HybridTransactionDebtTransactionTypeEnum]; /** * @export */ export declare const HybridTransactionTypeEnum: { readonly Transaction: "transaction"; readonly Subtransaction: "subtransaction"; }; export type HybridTransactionTypeEnum = typeof HybridTransactionTypeEnum[keyof typeof HybridTransactionTypeEnum]; /** * Check if a given object implements the HybridTransaction interface. */ export declare function instanceOfHybridTransaction(value: object): value is HybridTransaction; export declare function HybridTransactionFromJSON(json: any): HybridTransaction; export declare function HybridTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): HybridTransaction; export declare function HybridTransactionToJSON(json: any): HybridTransaction; export declare function HybridTransactionToJSONTyped(value?: HybridTransaction | null, ignoreDiscriminator?: boolean): any;