ofx4js
Version:
A javascript OFX library, ported from OFX4J
93 lines (92 loc) • 3.19 kB
TypeScript
import { BaseSecurityInfo } from "./BaseSecurityInfo";
import { StockType } from "./StockType";
import { AssetClass } from "./AssetClass";
/**
* Info about a stock security.
* @see "Section 13.8.5.6, OFX Spec"
*/
export declare class StockSecurityInfo extends BaseSecurityInfo {
private stockType;
private yield;
private dateYieldAsOf;
private assetClass;
private fiAssetClass;
/**
* Gets the type of stock. One of "COMMON", "PREFERRED", "CONVERTIBLE", or "OTHER". This is an
* optional field according to the OFX spec.
*
* @return the type of stock
*/
getType(): string;
/**
* Sets the type of stock. One of "COMMON", "PREFERRED", "CONVERTIBLE", or "OTHER". This is an
* optional field according to the OFX spec.
*
* @param stockType the type of stock
*/
setType(stockType: string): void;
/**
* Gets the type of stock as one of the well-known types.
*
* @return the type of stock or null if it's not one of the well-known types
*/
getTypeEnum(): StockType;
/**
* Gets the current yield reported as the dividend expressed as a portion of the current stock
* price, a rate. This is an optional field according to the OFX spec.
*
* @return the dividend yield
*/
getYield(): number;
/**
* Sets the current yield reported as the dividend expressed as a portion of the current stock
* price, a rate. This is an optional field according to the OFX spec.
*
* @param yield the dividend yield
*/
setYield(yield_: number): void;
/**
* Gets the as-of date for the yield. This is an optional field according to the OFX spec.
*
* @return the as-of date for the yield
*/
getDateYieldAsOf(): Date;
/**
* Sets the as-of date for the yield. This is an optional field according to the OFX spec.
*
* @param dateYieldAsOf the as-of date for the yield
*/
setDateYieldAsOf(dateYieldAsOf: Date): void;
/**
* Gets the asset class of the stock. This is an optional field according to the OFX spec.
*
* @return the asset class of the stock
*/
getAssetClass(): string;
/**
* Sets the asset class of the stock. This is an optional field according to the OFX spec.
*
* @param assetClass the asset class of the stock
*/
setAssetClass(assetClass: string): void;
/**
* Gets the assert class as one of the well-known types.
*
* @return the asset class or null if it's not one of the well-known types
*/
getAssetClassEnum(): AssetClass;
/**
* Gets the FI-defined asset class of the stock. This is an optional field according to the OFX
* spec.
*
* @return the FI-defined asset class of the stock
*/
getFiAssetClass(): string;
/**
* Sets the FI-defined asset class of the stock. This is an optional field according to the OFX
* spec.
*
* @param fiAssetClass the FI-defined asset class of the stock
*/
setFiAssetClass(fiAssetClass: string): void;
}