ofx4js
Version:
A javascript OFX library, ported from OFX4J
149 lines (148 loc) • 5.88 kB
TypeScript
import { BaseOtherInvestmentTransaction } from "./BaseOtherInvestmentTransaction";
import { TransactionWithSecurity } from "./TransactionWithSecurity";
import { SecurityId } from "../../seclist/SecurityId";
import { OriginalCurrency } from "./OriginalCurrency";
import { SubAccountType } from "../accounts/SubAccountType";
import { Inv401KSource } from "../positions/Inv401KSource";
/**
* Transaction for return of capital transactions.
* @see "Section 13.9.2.4.4, OFX Spec"
*/
export declare class ReturnOfCapitalTransaction extends BaseOtherInvestmentTransaction implements TransactionWithSecurity {
private securityId;
private total;
private subAccountSecurity;
private subAccountFund;
private currencyCode;
private originalCurrencyInfo;
private inv401kSource;
constructor();
/**
* Gets the id of the security that capital was returned from. 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 capital was returned from
*/
getSecurityId(): SecurityId;
/**
* Sets the id of the security that capital was returned from. 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 capital was returned from
*/
setSecurityId(securityId: SecurityId): void;
/**
* Gets the total amount of capital returned. 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 amount of capital returned. 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 sub account type that the transaction affects.
* (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 fund
*/
getSubAccountFund(): string;
/**
* Sets the sub account type that the transaction affects.
* (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 subAccountFund the sub account fund
*/
setSubAccountFund(subAccountFund: string): void;
/**
* Gets the result of getSubAccountFund as one of the well-known types.
*
* @return the type of null if it wasn't one of the well known types
*/
getSubAccountFundEnum(): SubAccountType;
/**
* 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 currency code 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 currency code 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;
}