ofx4js
Version:
A javascript OFX library, ported from OFX4J
113 lines (112 loc) • 4.25 kB
TypeScript
import { BaseSellInvestmentTransaction } from "./BaseSellInvestmentTransaction";
import { OptionSellType } from "./OptionSellType";
import { RelatedOptionType } from "./RelatedOptionType";
import { ShortOptionSecurity } from "../positions/ShortOptionSecurity";
/**
* Transaction for selling options.
* @see "Section 13.9.2.4.4, OFX Spec"
*/
export declare class SellOptionTransaction extends BaseSellInvestmentTransaction {
private optionSellType;
private sharesPerContact;
private relatedTransactionId;
private relatedType;
private secured;
constructor();
/**
* Gets the type of option sale (i.e. "SELLTOCLOSE" or "SELLTOOPEN"). This is a required field
* according to the OFX spec.
* @see "Section 13.9.2.4.4, OFX Spec"
*
* @return the option sell type
*/
getOptionSellType(): string;
/**
* Sets the type of option sale (i.e. "SELLTOCLOSE" or "SELLTOOPEN"). This is a required field
* according to the OFX spec.
* @see "Section 13.9.2.4.4, OFX Spec"
*
* @param optionSellType the option sell type
*/
setOptionSellType(optionSellType: string): void;
/**
* Gets the option sell type as one of the well-known types.
*
* @return the type of sale or null if it's not known.
*/
getOptionSellTypeEnum(): OptionSellType;
/**
* Gets the number of shares per contact. This is a required field according to the OFX spec.
* @see "Section 13.9.2.4.4, OFX Spec"
*
* @return the number of shares per contact
*/
getSharesPerContact(): number;
/**
* Sets the number of shares per contact. This is a required field according to the OFX spec.
* @see "Section 13.9.2.4.4, OFX Spec"
*
* @param sharesPerContact the number of shares per contact
*/
setSharesPerContact(sharesPerContact: number): void;
/**
* Gets a related transaction for the option sale for complex option transactions. This
* is an optional field according to the OFX spec.
* @see "Section 13.9.2.4.4, OFX Spec"
*
* @return The related transaction id
*/
getRelatedTransactionId(): string;
/**
* Sets a related transaction for the option sale for complex option transactions. This
* is an optional field according to the OFX spec.
* @see "Section 13.9.2.4.4, OFX Spec"
*
* @param relatedTransactionId The related transaction id
*/
setRelatedTransactionId(relatedTransactionId: string): void;
/**
* Gets the type for the related transaction. One of "SPREAD", "STRADDLE", "NONE", "OTHER". This
* is an optional field according to the OFX spec.
* @see "Section 13.9.2.4.4, OFX Spec"
*
* @return The related tansaction type
*/
getRelatedType(): string;
/**
* Sets the type for the related transaction. One of "SPREAD", "STRADDLE", "NONE", "OTHER". This
* is an optional field according to the OFX spec.
* @see "Section 13.9.2.4.4, OFX Spec"
*
* @param relatedType The related tansaction type
*/
setRelatedType(relatedType: string): void;
/**
* Gets the related transaction as one of the well-known types.
*
* @return the related tansaction type or null if it's not well known
*/
getRelatedTypeEnum(): RelatedOptionType;
/**
* Gets how the option sale is secured. One of "NAKED" or "COVERED". This is an optional field
* according to the OFX spec.
* @see "Section 13.9.2.4.4, OFX Spec"
*
* @return how the option sale is secured
*/
getSecured(): string;
/**
* Sets how the option sale is secured. One of "NAKED" or "COVERED". This is an optional field
* according to the OFX spec.
* @see "Section 13.9.2.4.4, OFX Spec"
*
* @param secured how the option sale is secured
*/
setSecured(secured: string): void;
/**
* Gets how the option sale is secured as one of the well-known types.
*
* @return the type indicating how the option is secured or null if it's not well known.
*/
getSecuredEnum(): ShortOptionSecurity;
}