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