ofx4js
Version:
A javascript OFX library, ported from OFX4J
86 lines (85 loc) • 2.96 kB
TypeScript
import { SecurityInfo } from "./SecurityInfo";
import { SecurityId } from "./SecurityId";
/**
* Base class for info about the various types of securities.
* @see "Section 13.8.5.1, OFX Spec"
* <br>
* This class exposes a read-only view of the flattened aggregates that are
* common to all security info as a convenience to application
* developers who may not find the ofx aggregation model intuitive.
*/
export declare class BaseSecurityInfo {
private securityInfo;
/**
* Gets the security info aggregate.
*
* @return the security info aggregate.
*/
getSecurityInfo(): SecurityInfo;
/**
* Sets the security info aggregate.
*
* @param securityInfo the security info aggregate.
*/
setSecurityInfo(securityInfo: SecurityInfo): void;
/**
* Gets the unique security id for the security. This is a required field according to the OFX
* spec.
*
* @return the security id
*/
getSecurityId(): SecurityId;
/**
* Gets the full name of the security. This is a required field according to the OFX spec.
*
* @return the full name of the security.
*/
getSecurityName(): string;
/**
* Gets the ticker symbol for the security. This is an optional field according to the OFX spec.
*
* @return the ticket symbol or null if there's no ticker symbol
*/
getTickerSymbol(): string;
/**
* Gets the FI ID number for the security. This is an optional field according to the OFX spec.
*
* @return the FI ID number for the security
*/
getFiId(): string;
/**
* Gets the rating of the security. This is an optional field according to the OFX spec.
*
* @return the rating
*/
getRating(): string;
/**
* Gets the price per commonly-quoted unit. For stocks, mutual funds, and others, this is the
* share price. For bonds, this is the percentage of par. For options, this is the per share (not
* per contact) price. This is a noptional field according to the OFX spec.
* @see "Section 13.9.2.4.3, OFX Spec"
*
* @return the per unit price
*/
getUnitPrice(): number;
/**
* Gets the date as-of for the unit price. This is an optional field according to the OFX spec.
*
* @return the date as-of for the unit price
*/
getUnitPriceAsOfDate(): Date;
/**
* Gets the overriding currency code for the security. If not set, implies the default currency.
* This is an optional field according to the OFX spec.
*
* @return the overriding currency code or null to mean the default currency
*/
getCurrencyCode(): string;
/**
* Gets any memo associated with the security. This is an optional field according to the OFX
* spec.
*
* @return the memo
*/
getMemo(): string;
}