mirror of
https://github.com/aclindsa/ofxgo.git
synced 2024-11-21 11:20:04 -05:00
Add SecurityInfo() SecInfo
to Security
interface.
This commit is contained in:
parent
1f657a5d18
commit
12aca9ab06
26
seclist.go
26
seclist.go
@ -94,6 +94,7 @@ func (r *SecListResponse) Type() messageType {
|
||||
// securities for SecurityList
|
||||
type Security interface {
|
||||
SecurityType() string
|
||||
SecurityInfo() SecInfo
|
||||
}
|
||||
|
||||
// SecInfo represents the generic information about a security. It is included
|
||||
@ -136,6 +137,11 @@ func (i DebtInfo) SecurityType() string {
|
||||
return "DEBTINFO"
|
||||
}
|
||||
|
||||
// SecurityInfo returns SecInfo
|
||||
func (i DebtInfo) SecurityInfo() SecInfo {
|
||||
return i.SecInfo
|
||||
}
|
||||
|
||||
// AssetPortion represents the percentage of a mutual fund with the given asset
|
||||
// classification
|
||||
type AssetPortion struct {
|
||||
@ -169,6 +175,11 @@ func (i MFInfo) SecurityType() string {
|
||||
return "MFINFO"
|
||||
}
|
||||
|
||||
// SecurityInfo returns SecInfo
|
||||
func (i MFInfo) SecurityInfo() SecInfo {
|
||||
return i.SecInfo
|
||||
}
|
||||
|
||||
// OptInfo provides information about an option
|
||||
type OptInfo struct {
|
||||
XMLName xml.Name `xml:"OPTINFO"`
|
||||
@ -187,6 +198,11 @@ func (i OptInfo) SecurityType() string {
|
||||
return "OPTINFO"
|
||||
}
|
||||
|
||||
// SecurityInfo returns SecInfo
|
||||
func (i OptInfo) SecurityInfo() SecInfo {
|
||||
return i.SecInfo
|
||||
}
|
||||
|
||||
// OtherInfo provides information about a security type not covered by the
|
||||
// other *Info elements
|
||||
type OtherInfo struct {
|
||||
@ -202,6 +218,11 @@ func (i OtherInfo) SecurityType() string {
|
||||
return "OTHERINFO"
|
||||
}
|
||||
|
||||
// SecurityInfo returns SecInfo
|
||||
func (i OtherInfo) SecurityInfo() SecInfo {
|
||||
return i.SecInfo
|
||||
}
|
||||
|
||||
// StockInfo provides information about a security type
|
||||
type StockInfo struct {
|
||||
XMLName xml.Name `xml:"STOCKINFO"`
|
||||
@ -218,6 +239,11 @@ func (i StockInfo) SecurityType() string {
|
||||
return "STOCKINFO"
|
||||
}
|
||||
|
||||
// SecurityInfo returns SecInfo
|
||||
func (i StockInfo) SecurityInfo() SecInfo {
|
||||
return i.SecInfo
|
||||
}
|
||||
|
||||
// SecurityList is a container for Security objects containaing information
|
||||
// about securities
|
||||
type SecurityList struct {
|
||||
|
Loading…
Reference in New Issue
Block a user