1+ using System ;
2+ using System . Collections . Generic ;
3+
4+ namespace YahooFinanceApi ;
5+
6+ public class SecurityProfile
7+ {
8+ public IReadOnlyDictionary < string , dynamic > Fields { get ; private set ; }
9+
10+ // ctor
11+ internal SecurityProfile ( IReadOnlyDictionary < string , dynamic > fields ) => Fields = fields ;
12+
13+ public dynamic this [ string fieldName ] => Fields [ fieldName ] ;
14+ public dynamic this [ ProfileFields field ] => Fields [ field . ToString ( ) ] ;
15+
16+ public string Address1 => this [ ProfileFields . Address1 ] ;
17+ public string City => this [ ProfileFields . City ] ;
18+ public string State => this [ ProfileFields . State ] ;
19+ public string Zip => this [ ProfileFields . Zip ] ;
20+ public string Country => this [ ProfileFields . Country ] ;
21+ public string Phone => this [ ProfileFields . Phone ] ;
22+ public string Website => this [ ProfileFields . Website ] ;
23+ public string Industry => this [ ProfileFields . Industry ] ;
24+ public string IndustryKey => this [ ProfileFields . IndustryKey ] ;
25+ public string IndustryDisp => this [ ProfileFields . IndustryDisp ] ;
26+ public string Sector => this [ ProfileFields . Sector ] ;
27+ public string SectorKey => this [ ProfileFields . SectorKey ] ;
28+ public string SectorDisp => this [ ProfileFields . SectorDisp ] ;
29+ public string LongBusinessSummary => this [ ProfileFields . LongBusinessSummary ] ;
30+ public long FullTimeEmployees => this [ ProfileFields . FullTimeEmployees ] ;
31+ public List < dynamic > CompanyOfficers => this [ ProfileFields . CompanyOfficers ] ;
32+ public long AuditRisk => this [ ProfileFields . AuditRisk ] ;
33+ public long BoardRisk => this [ ProfileFields . BoardRisk ] ;
34+ public long CompensationRisk => this [ ProfileFields . CompensationRisk ] ;
35+ public long ShareHolderRightsRisk => this [ ProfileFields . ShareHolderRightsRisk ] ;
36+ public long OverallRisk => this [ ProfileFields . OverallRisk ] ;
37+ public DateTime GovernanceEpochDate => DateTimeOffset . FromUnixTimeSeconds ( ( long ) this [ ProfileFields . GovernanceEpochDate ] ) . LocalDateTime ;
38+ public DateTime CompensationAsOfEpochDate => DateTimeOffset . FromUnixTimeSeconds ( ( long ) this [ ProfileFields . CompensationAsOfEpochDate ] ) . LocalDateTime ;
39+ public long MaxAge => this [ ProfileFields . MaxAge ] ;
40+ }
0 commit comments