UNPKG

ofx4js

Version:

A javascript OFX library, ported from OFX4J

261 lines (260 loc) 9.76 kB
import { BaseOtherInvestmentTransaction } from "./BaseOtherInvestmentTransaction"; import { TransactionWithSecurity } from "./TransactionWithSecurity"; import { SecurityId } from "../../seclist/SecurityId"; import { OriginalCurrency } from "./OriginalCurrency"; import { IncomeType } from "./IncomeType"; import { SubAccountType } from "../accounts/SubAccountType"; import { Inv401KSource } from "../positions/Inv401KSource"; /** * Transaction for reinvestment transactions. * @see "Section 13.9.2.4.4, OFX Spec" */ export declare class ReinvestIncomeTransaction extends BaseOtherInvestmentTransaction implements TransactionWithSecurity { private securityId; private incomeType; private total; private subAccountSecurity; private units; private unitPrice; private commission; private taxes; private fees; private load; private taxExempt; private currencyCode; private originalCurrencyInfo; private inv401kSource; constructor(); /** * Gets the id of the security that was reinvested in. This is a required field according to the * OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @return the security id of the security that was reinvested in */ getSecurityId(): SecurityId; /** * Sets the id of the security that was reinvested in. This is a required field according to the * OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @param securityId the security id of the security that was reinvested in */ setSecurityId(securityId: SecurityId): void; /** * Gets the type of income. One of "CGLONG" (long term capital gains), "CGSHORT" (short term * capital gains), "DIV" (dividend), INTEREST, or MISC. This is a required field according to the * OFX spec. * @see "Section 13.9.2.4.4, OFX Spec" This is a required field according to the OFX spec. * * @return the type of income */ getIncomeType(): string; /** * Sets the type of income. One of "CGLONG" (long term capital gains), "CGSHORT" (short term * capital gains), "DIV" (dividend), INTEREST, or MISC. This is a required field according to the * OFX spec. * @see "Section 13.9.2.4.4, OFX Spec" This is a required field according to the OFX spec. * * @param incomeType the type of income */ setIncomeType(incomeType: string): void; /** * Gets the type of income as one of the well-known types. * * @return the income type or null if it's not one of the well-known types */ getIncomeTypeEnum(): IncomeType; /** * Gets the total income received. This is a required field according to the OFX spec. * @see "Section 13.9.2.4.4, OFX Spec" * * @return the total */ getTotal(): number; /** * Sets the total income received. This is a required field according to the OFX spec. * @see "Section 13.9.2.4.4, OFX Spec" * * @param total the total */ setTotal(total: number): void; /** * Gets the sub account type for the security (e.g. CASH, MARGIN, SHORT, OTHER). This is a * required field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @return the sub account type */ getSubAccountSecurity(): string; /** * Sets the sub account type for the security (e.g. CASH, MARGIN, SHORT, OTHER). This is a * required field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @param subAccountSecurity the sub account type */ setSubAccountSecurity(subAccountSecurity: string): void; /** * Gets the result of getSubAccountSecurity as one of the well-known types. * * @return the type of null if it wasn't one of the well known types */ getSubAccountSecurityEnum(): SubAccountType; /** * Gets the number of units of the security that was reinvested in. This is a required field * according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @return the number of units purchased */ getUnits(): number; /** * Sets the number of units of the security that was reinvested in. This is a required field * according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @param units the number of units purchased */ setUnits(units: number): void; /** * Gets the price per commonly-quoted unit. This is a required field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @return the per unit price */ getUnitPrice(): number; /** * Sets the price per commonly-quoted unit. This is a required field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @param unitPrice the per unit price */ setUnitPrice(unitPrice: number): void; /** * Gets the transaction commission for the reinvestment. This is an optional field according to * the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @return the transaction commision */ getCommission(): number; /** * Sets the transaction commission for the reinvestment. This is an optional field according to * the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @param commission the transaction commision */ setCommission(commission: number): void; /** * Gets the taxes for the reinvestment. This is an optional field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @return the transaction taxes */ getTaxes(): number; /** * Sets the taxes for the reinvestment. This is an optional field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @param taxes the transaction taxes */ setTaxes(taxes: number): void; /** * Gets the fees for the reinvestment. This is an optional field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @return the transaction fees */ getFees(): number; /** * Sets the fees for the reinvestment. This is an optional field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @param fees the transaction fees */ setFees(fees: number): void; /** * Gets the load for the reinvestment. This is an optional field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @return the load */ getLoad(): number; /** * Sets the load for the reinvestment. This is an optional field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @param load the load */ setLoad(load: number): void; /** * Gets whether the income was tax exempt. This is an optional field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @return whether the transaction was tax exempt */ getTaxExempt(): boolean; /** * Sets whether the income was tax exempt. This is an optional field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @param taxExempt whether the transaction was tax exempt */ setTaxExempt(taxExempt: boolean): void; /** * Gets the currency code for the transaction. Only one of currency code or original currency * info should be set according to the OFX spec. If neither are set, means the default currency. * @see "Section 13.9.2.4.3, OFX Spec" * * @return the currency code for the transaction */ getCurrencyCode(): string; /** * Sets the currency code for the transaction. Only one of currency code or original currency * info should be set according to the OFX spec. If neither are set, means the default currency. * @see "Section 13.9.2.4.3, OFX Spec" * * @param currencyCode the currency code for the transaction */ setCurrencyCode(currencyCode: string): void; /** * Gets the original currency info for the transaction. * @see "Section 13.9.2.4.3, OFX Spec" * * @return the original currency info for the transaction. */ getOriginalCurrencyInfo(): OriginalCurrency; /** * Sets the original currency info for the transaction. * @see "Section 13.9.2.4.3, OFX Spec" * * @param originalCurrencyInfo the original currency info for the transaction. */ setOriginalCurrencyInfo(originalCurrencyInfo: OriginalCurrency): void; /** * Gets the 401K source for the reinvestment. Should be one of "PRETAX", "AFTERTAX", "MATCH", * "PROFITSHARING", "ROLLOVER", "OTHERVEST", "OTHERNONVEST". This is an optional field * according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @return the state withholding */ get401kSource(): string; /** * Sets the 401K source for the reinvestment. Should be one of "PRETAX", "AFTERTAX", "MATCH", * "PROFITSHARING", "ROLLOVER", "OTHERVEST", "OTHERNONVEST". This is an optional field * according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @param inv401kSource the state withholding */ set401kSource(inv401kSource: string): void; /** * Gets the 401(k) source as one of the well-known types. * * @return the type of close or null if it's not well known */ get401kSourceEnum(): Inv401KSource; }