lobbying_disclosure_client 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rubocop.yml +50 -0
- data/.ruby-version +1 -0
- data/LICENSE.txt +21 -0
- data/README.md +78 -0
- data/Rakefile +17 -0
- data/lefthook.yml +9 -0
- data/lib/lobbying_disclosure_client/auth/login.rb +33 -0
- data/lib/lobbying_disclosure_client/auth/password/reset/confirm.rb +39 -0
- data/lib/lobbying_disclosure_client/auth/password/reset.rb +34 -0
- data/lib/lobbying_disclosure_client/auth/password.rb +9 -0
- data/lib/lobbying_disclosure_client/auth.rb +7 -0
- data/lib/lobbying_disclosure_client/client.rb +108 -0
- data/lib/lobbying_disclosure_client/enums/contribution_type.rb +16 -0
- data/lib/lobbying_disclosure_client/enums/country.rb +269 -0
- data/lib/lobbying_disclosure_client/enums/expenses_method.rb +14 -0
- data/lib/lobbying_disclosure_client/enums/filer_type.rb +13 -0
- data/lib/lobbying_disclosure_client/enums/filing_period.rb +17 -0
- data/lib/lobbying_disclosure_client/enums/filing_type.rb +61 -0
- data/lib/lobbying_disclosure_client/enums/general_issue_code.rb +90 -0
- data/lib/lobbying_disclosure_client/enums/prefix.rb +18 -0
- data/lib/lobbying_disclosure_client/enums/route.rb +103 -0
- data/lib/lobbying_disclosure_client/enums/state.rb +71 -0
- data/lib/lobbying_disclosure_client/enums/suffix.rb +34 -0
- data/lib/lobbying_disclosure_client/enums.rb +7 -0
- data/lib/lobbying_disclosure_client/errors/bad_request_error.rb +8 -0
- data/lib/lobbying_disclosure_client/errors/invalid_api_key_error.rb +8 -0
- data/lib/lobbying_disclosure_client/errors/not_found_error.rb +8 -0
- data/lib/lobbying_disclosure_client/errors/request_throttled_error.rb +26 -0
- data/lib/lobbying_disclosure_client/errors/unknown_error.rb +8 -0
- data/lib/lobbying_disclosure_client/errors/unsupported_http_method_error.rb +8 -0
- data/lib/lobbying_disclosure_client/errors.rb +7 -0
- data/lib/lobbying_disclosure_client/types/affiliated_organization.rb +26 -0
- data/lib/lobbying_disclosure_client/types/client.rb +42 -0
- data/lib/lobbying_disclosure_client/types/client_with_registrant.rb +43 -0
- data/lib/lobbying_disclosure_client/types/constant.rb +11 -0
- data/lib/lobbying_disclosure_client/types/contribution_item.rb +34 -0
- data/lib/lobbying_disclosure_client/types/contribution_report.rb +53 -0
- data/lib/lobbying_disclosure_client/types/conviction_disclosure.rb +29 -0
- data/lib/lobbying_disclosure_client/types/filing.rb +59 -0
- data/lib/lobbying_disclosure_client/types/foreign_entity.rb +41 -0
- data/lib/lobbying_disclosure_client/types/government_entity.rb +11 -0
- data/lib/lobbying_disclosure_client/types/lobbying_activity.rb +15 -0
- data/lib/lobbying_disclosure_client/types/lobbyist.rb +18 -0
- data/lib/lobbying_disclosure_client/types/lobbyist_for_lobbying_activity.rb +12 -0
- data/lib/lobbying_disclosure_client/types/lobbyist_with_registrant.rb +19 -0
- data/lib/lobbying_disclosure_client/types/registrant.rb +46 -0
- data/lib/lobbying_disclosure_client/types.rb +7 -0
- data/lib/lobbying_disclosure_client/util/constants_validator.rb +122 -0
- data/lib/lobbying_disclosure_client/util.rb +7 -0
- data/lib/lobbying_disclosure_client/v1/clients/list_clients.rb +49 -0
- data/lib/lobbying_disclosure_client/v1/clients/retrieve_client.rb +36 -0
- data/lib/lobbying_disclosure_client/v1/clients.rb +9 -0
- data/lib/lobbying_disclosure_client/v1/constants/contribution/list_contribution_item_types.rb +26 -0
- data/lib/lobbying_disclosure_client/v1/constants/contribution.rb +11 -0
- data/lib/lobbying_disclosure_client/v1/constants/filing/list_filing_types.rb +26 -0
- data/lib/lobbying_disclosure_client/v1/constants/filing/list_government_entities.rb +26 -0
- data/lib/lobbying_disclosure_client/v1/constants/filing/list_lobbying_activity_general_issues.rb +26 -0
- data/lib/lobbying_disclosure_client/v1/constants/filing.rb +11 -0
- data/lib/lobbying_disclosure_client/v1/constants/general/list_countries.rb +26 -0
- data/lib/lobbying_disclosure_client/v1/constants/general/list_states.rb +26 -0
- data/lib/lobbying_disclosure_client/v1/constants/general.rb +11 -0
- data/lib/lobbying_disclosure_client/v1/constants/lobbyist/list_lobbyist_prefixes.rb +26 -0
- data/lib/lobbying_disclosure_client/v1/constants/lobbyist/list_lobbyist_suffixes.rb +26 -0
- data/lib/lobbying_disclosure_client/v1/constants/lobbyist.rb +11 -0
- data/lib/lobbying_disclosure_client/v1/constants.rb +9 -0
- data/lib/lobbying_disclosure_client/v1/contribution_reports/list_contribution_reports.rb +60 -0
- data/lib/lobbying_disclosure_client/v1/contribution_reports/retrieve_contribution_report.rb +36 -0
- data/lib/lobbying_disclosure_client/v1/contribution_reports.rb +9 -0
- data/lib/lobbying_disclosure_client/v1/filings/list_filings.rb +77 -0
- data/lib/lobbying_disclosure_client/v1/filings/retrieve_filing.rb +36 -0
- data/lib/lobbying_disclosure_client/v1/filings.rb +9 -0
- data/lib/lobbying_disclosure_client/v1/lobbyists/list_lobbyists.rb +45 -0
- data/lib/lobbying_disclosure_client/v1/lobbyists/retrieve_lobbyist.rb +36 -0
- data/lib/lobbying_disclosure_client/v1/lobbyists.rb +9 -0
- data/lib/lobbying_disclosure_client/v1/registrants/list_registrants.rb +48 -0
- data/lib/lobbying_disclosure_client/v1/registrants/retrieve_registrant.rb +36 -0
- data/lib/lobbying_disclosure_client/v1/registrants.rb +9 -0
- data/lib/lobbying_disclosure_client/v1.rb +16 -0
- data/lib/lobbying_disclosure_client/version.rb +6 -0
- data/lib/lobbying_disclosure_client.rb +105 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
- data/sorbet/rbi/gems/minitest-stub-const@0.6.rbi +72 -0
- data/sorbet/rbi/gems/minitest@5.20.0.rbi +1498 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
- data/sorbet/rbi/gems/parallel@1.26.2.rbi +291 -0
- data/sorbet/rbi/gems/prism@0.30.0.rbi +37863 -0
- data/sorbet/rbi/gems/rake@13.1.0.rbi +3220 -0
- data/sorbet/rbi/gems/rbi@0.1.14.rbi +3305 -0
- data/sorbet/rbi/gems/spoom@1.4.2.rbi +4932 -0
- data/sorbet/rbi/gems/tapioca@0.16.0.rbi +3543 -0
- data/sorbet/rbi/gems/thor@1.3.1.rbi +4319 -0
- data/sorbet/rbi/gems/vcr@6.3.1.rbi +3040 -0
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
- data/sorbet/rbi/gems/yard@0.9.36.rbi +18086 -0
- data/sorbet/rbi/shims/faraday.rbi +10 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +5 -0
- metadata +185 -0
@@ -0,0 +1,269 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Enums
|
6
|
+
class Country < T::Enum
|
7
|
+
enums do
|
8
|
+
Us = new('US')
|
9
|
+
Ca = new('CA')
|
10
|
+
Af = new('AF')
|
11
|
+
Ax = new('AX')
|
12
|
+
Al = new('AL')
|
13
|
+
Dz = new('DZ')
|
14
|
+
As = new('AS')
|
15
|
+
Ad = new('AD')
|
16
|
+
Ao = new('AO')
|
17
|
+
Ai = new('AI')
|
18
|
+
Aq = new('AQ')
|
19
|
+
Ag = new('AG')
|
20
|
+
Ar = new('AR')
|
21
|
+
Am = new('AM')
|
22
|
+
Aw = new('AW')
|
23
|
+
Au = new('AU')
|
24
|
+
At = new('AT')
|
25
|
+
Az = new('AZ')
|
26
|
+
Bs = new('BS')
|
27
|
+
Bh = new('BH')
|
28
|
+
Bd = new('BD')
|
29
|
+
Bb = new('BB')
|
30
|
+
By = new('BY')
|
31
|
+
Be = new('BE')
|
32
|
+
Bz = new('BZ')
|
33
|
+
Bj = new('BJ')
|
34
|
+
Bm = new('BM')
|
35
|
+
Bt = new('BT')
|
36
|
+
Bo = new('BO')
|
37
|
+
Bq = new('BQ')
|
38
|
+
Ba = new('BA')
|
39
|
+
Bw = new('BW')
|
40
|
+
Bv = new('BV')
|
41
|
+
Br = new('BR')
|
42
|
+
Io = new('IO')
|
43
|
+
Bn = new('BN')
|
44
|
+
Bg = new('BG')
|
45
|
+
Bf = new('BF')
|
46
|
+
Bi = new('BI')
|
47
|
+
Cv = new('CV')
|
48
|
+
Kh = new('KH')
|
49
|
+
Cm = new('CM')
|
50
|
+
Ky = new('KY')
|
51
|
+
Cf = new('CF')
|
52
|
+
Td = new('TD')
|
53
|
+
Cl = new('CL')
|
54
|
+
Cn = new('CN')
|
55
|
+
Cx = new('CX')
|
56
|
+
Cc = new('CC')
|
57
|
+
Co = new('CO')
|
58
|
+
Km = new('KM')
|
59
|
+
Cg = new('CG')
|
60
|
+
Cd = new('CD')
|
61
|
+
Ck = new('CK')
|
62
|
+
Cr = new('CR')
|
63
|
+
Ci = new('CI')
|
64
|
+
Hr = new('HR')
|
65
|
+
Cu = new('CU')
|
66
|
+
Cw = new('CW')
|
67
|
+
Cy = new('CY')
|
68
|
+
Cz = new('CZ')
|
69
|
+
Dk = new('DK')
|
70
|
+
Dj = new('DJ')
|
71
|
+
Dm = new('DM')
|
72
|
+
Do = new('DO')
|
73
|
+
Ec = new('EC')
|
74
|
+
Eg = new('EG')
|
75
|
+
Sv = new('SV')
|
76
|
+
Gq = new('GQ')
|
77
|
+
Er = new('ER')
|
78
|
+
Ee = new('EE')
|
79
|
+
Sz = new('SZ')
|
80
|
+
Et = new('ET')
|
81
|
+
Fk = new('FK')
|
82
|
+
Fo = new('FO')
|
83
|
+
Fj = new('FJ')
|
84
|
+
Fi = new('FI')
|
85
|
+
Fr = new('FR')
|
86
|
+
Gf = new('GF')
|
87
|
+
Pf = new('PF')
|
88
|
+
Tf = new('TF')
|
89
|
+
Ga = new('GA')
|
90
|
+
Gm = new('GM')
|
91
|
+
Ge = new('GE')
|
92
|
+
De = new('DE')
|
93
|
+
Gh = new('GH')
|
94
|
+
Gi = new('GI')
|
95
|
+
Gr = new('GR')
|
96
|
+
Gl = new('GL')
|
97
|
+
Gd = new('GD')
|
98
|
+
Gp = new('GP')
|
99
|
+
Gu = new('GU')
|
100
|
+
Gt = new('GT')
|
101
|
+
Gg = new('GG')
|
102
|
+
Gn = new('GN')
|
103
|
+
Gw = new('GW')
|
104
|
+
Gy = new('GY')
|
105
|
+
Ht = new('HT')
|
106
|
+
Hm = new('HM')
|
107
|
+
Va = new('VA')
|
108
|
+
Hn = new('HN')
|
109
|
+
Hk = new('HK')
|
110
|
+
Hu = new('HU')
|
111
|
+
Is = new('IS')
|
112
|
+
In = new('IN')
|
113
|
+
Id = new('ID')
|
114
|
+
Ir = new('IR')
|
115
|
+
Iq = new('IQ')
|
116
|
+
Ie = new('IE')
|
117
|
+
Im = new('IM')
|
118
|
+
Il = new('IL')
|
119
|
+
It = new('IT')
|
120
|
+
Jm = new('JM')
|
121
|
+
Jp = new('JP')
|
122
|
+
Je = new('JE')
|
123
|
+
Jo = new('JO')
|
124
|
+
Kz = new('KZ')
|
125
|
+
Ke = new('KE')
|
126
|
+
Ki = new('KI')
|
127
|
+
Xk = new('XK')
|
128
|
+
Kw = new('KW')
|
129
|
+
Kg = new('KG')
|
130
|
+
La = new('LA')
|
131
|
+
Lv = new('LV')
|
132
|
+
Lb = new('LB')
|
133
|
+
Ls = new('LS')
|
134
|
+
Lr = new('LR')
|
135
|
+
Ly = new('LY')
|
136
|
+
Li = new('LI')
|
137
|
+
Lt = new('LT')
|
138
|
+
Lu = new('LU')
|
139
|
+
Mo = new('MO')
|
140
|
+
Mg = new('MG')
|
141
|
+
Mw = new('MW')
|
142
|
+
My = new('MY')
|
143
|
+
Mv = new('MV')
|
144
|
+
Ml = new('ML')
|
145
|
+
Mt = new('MT')
|
146
|
+
Mh = new('MH')
|
147
|
+
Mq = new('MQ')
|
148
|
+
Mr = new('MR')
|
149
|
+
Mu = new('MU')
|
150
|
+
Yt = new('YT')
|
151
|
+
Mx = new('MX')
|
152
|
+
Fm = new('FM')
|
153
|
+
Md = new('MD')
|
154
|
+
Mc = new('MC')
|
155
|
+
Mn = new('MN')
|
156
|
+
Me = new('ME')
|
157
|
+
Ms = new('MS')
|
158
|
+
Ma = new('MA')
|
159
|
+
Mz = new('MZ')
|
160
|
+
Mm = new('MM')
|
161
|
+
Na = new('NA')
|
162
|
+
Nr = new('NR')
|
163
|
+
Np = new('NP')
|
164
|
+
Nl = new('NL')
|
165
|
+
Nc = new('NC')
|
166
|
+
Nz = new('NZ')
|
167
|
+
Ni = new('NI')
|
168
|
+
Ne = new('NE')
|
169
|
+
Ng = new('NG')
|
170
|
+
Nu = new('NU')
|
171
|
+
Nf = new('NF')
|
172
|
+
Kp = new('KP')
|
173
|
+
Mk = new('MK')
|
174
|
+
Mp = new('MP')
|
175
|
+
No = new('NO')
|
176
|
+
Om = new('OM')
|
177
|
+
Pk = new('PK')
|
178
|
+
Pw = new('PW')
|
179
|
+
Ps = new('PS')
|
180
|
+
Pa = new('PA')
|
181
|
+
Pg = new('PG')
|
182
|
+
Py = new('PY')
|
183
|
+
Pe = new('PE')
|
184
|
+
Ph = new('PH')
|
185
|
+
Pn = new('PN')
|
186
|
+
Pl = new('PL')
|
187
|
+
Pt = new('PT')
|
188
|
+
Pr = new('PR')
|
189
|
+
Qa = new('QA')
|
190
|
+
Re = new('RE')
|
191
|
+
Ro = new('RO')
|
192
|
+
Ru = new('RU')
|
193
|
+
Rw = new('RW')
|
194
|
+
Bl = new('BL')
|
195
|
+
Sh = new('SH')
|
196
|
+
Kn = new('KN')
|
197
|
+
Lc = new('LC')
|
198
|
+
Mf = new('MF')
|
199
|
+
Pm = new('PM')
|
200
|
+
Vc = new('VC')
|
201
|
+
Ws = new('WS')
|
202
|
+
Sm = new('SM')
|
203
|
+
St = new('ST')
|
204
|
+
Sa = new('SA')
|
205
|
+
Sn = new('SN')
|
206
|
+
Rs = new('RS')
|
207
|
+
Sc = new('SC')
|
208
|
+
Sl = new('SL')
|
209
|
+
Sg = new('SG')
|
210
|
+
Sx = new('SX')
|
211
|
+
Sk = new('SK')
|
212
|
+
Si = new('SI')
|
213
|
+
Sb = new('SB')
|
214
|
+
So = new('SO')
|
215
|
+
Za = new('ZA')
|
216
|
+
Gs = new('GS')
|
217
|
+
Kr = new('KR')
|
218
|
+
Ss = new('SS')
|
219
|
+
Es = new('ES')
|
220
|
+
Lk = new('LK')
|
221
|
+
Sd = new('SD')
|
222
|
+
Sr = new('SR')
|
223
|
+
Sj = new('SJ')
|
224
|
+
Se = new('SE')
|
225
|
+
Ch = new('CH')
|
226
|
+
Sy = new('SY')
|
227
|
+
Tw = new('TW')
|
228
|
+
Tj = new('TJ')
|
229
|
+
Tz = new('TZ')
|
230
|
+
Th = new('TH')
|
231
|
+
Tl = new('TL')
|
232
|
+
Tg = new('TG')
|
233
|
+
Tk = new('TK')
|
234
|
+
To = new('TO')
|
235
|
+
Tt = new('TT')
|
236
|
+
Tn = new('TN')
|
237
|
+
Tr = new('TR')
|
238
|
+
Tm = new('TM')
|
239
|
+
Tc = new('TC')
|
240
|
+
Tv = new('TV')
|
241
|
+
Ug = new('UG')
|
242
|
+
Ua = new('UA')
|
243
|
+
Ae = new('AE')
|
244
|
+
Gb = new('GB')
|
245
|
+
Um = new('UM')
|
246
|
+
Uy = new('UY')
|
247
|
+
Uz = new('UZ')
|
248
|
+
Vu = new('VU')
|
249
|
+
Ve = new('VE')
|
250
|
+
Vn = new('VN')
|
251
|
+
Vg = new('VG')
|
252
|
+
Vi = new('VI')
|
253
|
+
Wf = new('WF')
|
254
|
+
Eh = new('EH')
|
255
|
+
Ye = new('YE')
|
256
|
+
Zm = new('ZM')
|
257
|
+
Zw = new('ZW')
|
258
|
+
|
259
|
+
# This is listed as a possible value in the API documentation,
|
260
|
+
# but it's unclear what it's intended to represent
|
261
|
+
ZeroZero = new('00')
|
262
|
+
|
263
|
+
# This is not returned as a possible value in the constants API endpoint,
|
264
|
+
# but empirically it does get returned by other endpoints
|
265
|
+
Blank = new('')
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
269
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Enums
|
6
|
+
class FilingPeriod < T::Enum
|
7
|
+
enums do
|
8
|
+
FirstQuarter = new('first_quarter')
|
9
|
+
SecondQuarter = new('second_quarter')
|
10
|
+
ThirdQuarter = new('third_quarter')
|
11
|
+
FourthQuarter = new('fourth_quarter')
|
12
|
+
MidYear = new('mid_year')
|
13
|
+
YearEnd = new('year_end')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Enums
|
6
|
+
class FilingType < T::Enum
|
7
|
+
enums do
|
8
|
+
Registration = new('RR')
|
9
|
+
RegistrationAmendment = new('RA')
|
10
|
+
FirstQuarterReport = new('Q1')
|
11
|
+
FirstQuarterReportNoActivity = new('Q1Y')
|
12
|
+
FirstQuarterTermination = new('1T')
|
13
|
+
FirstQuarterTerminationNoActivity = new('1TY')
|
14
|
+
FirstQuarterAmendment = new('1A')
|
15
|
+
FirstQuarterAmendmentNoActivity = new('1AY')
|
16
|
+
FirstQuarterTerminationAmendment = new('1@')
|
17
|
+
FirstQuarterTerminationAmendmentNoActivity = new('1@Y')
|
18
|
+
SecondQuarterReport = new('Q2')
|
19
|
+
SecondQuarterReportNoActivity = new('Q2Y')
|
20
|
+
SecondQuarterTermination = new('2T')
|
21
|
+
SecondQuarterTerminationNoActivity = new('2TY')
|
22
|
+
SecondQuarterAmendment = new('2A')
|
23
|
+
SecondQuarterAmendmentNoActivity = new('2AY')
|
24
|
+
SecondQuarterTerminationAmendment = new('2@')
|
25
|
+
SecondQuarterTerminationAmendmentNoActivity = new('2@Y')
|
26
|
+
ThirdQuarterReport = new('Q3')
|
27
|
+
ThirdQuarterReportNoActivity = new('Q3Y')
|
28
|
+
ThirdQuarterTermination = new('3T')
|
29
|
+
ThirdQuarterTerminationNoActivity = new('3TY')
|
30
|
+
ThirdQuarterAmendment = new('3A')
|
31
|
+
ThirdQuarterAmendmentNoActivity = new('3AY')
|
32
|
+
ThirdQuarterTerminationAmendment = new('3@')
|
33
|
+
ThirdQuarterTerminationAmendmentNoActivity = new('3@Y')
|
34
|
+
FourthQuarterReport = new('Q4')
|
35
|
+
FourthQuarterReportNoActivity = new('Q4Y')
|
36
|
+
FourthQuarterTermination = new('4T')
|
37
|
+
FourthQuarterTerminationNoActivity = new('4TY')
|
38
|
+
FourthQuarterAmendment = new('4A')
|
39
|
+
FourthQuarterAmendmentNoActivity = new('4AY')
|
40
|
+
FourthQuarterTerminationAmendment = new('4@')
|
41
|
+
FourthQuarterTerminationAmendmentNoActivity = new('4@Y')
|
42
|
+
MidYearReport = new('MM')
|
43
|
+
MidYearReportNoActivity = new('MMY')
|
44
|
+
MidYearTermination = new('MT')
|
45
|
+
MidYearTerminationNoActivity = new('MTY')
|
46
|
+
MidYearAmendment = new('MA')
|
47
|
+
MidYearAmendmentNoActivity = new('MAY')
|
48
|
+
MidYearTerminationAmendment = new('M@')
|
49
|
+
MidYearTerminationAmendmentNoActivity = new('M@Y')
|
50
|
+
YearEndReport = new('YY')
|
51
|
+
YearEndReportNoActivity = new('YYY')
|
52
|
+
YearEndTermination = new('YT')
|
53
|
+
YearEndTerminationNoActivity = new('YTY')
|
54
|
+
YearEndAmendment = new('YA')
|
55
|
+
YearEndAmendmentNoActivity = new('YAY')
|
56
|
+
YearEndTerminationAmendment = new('Y@')
|
57
|
+
YearEndTerminationAmendmentNoActivity = new('Y@Y')
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Enums
|
6
|
+
class GeneralIssueCode < T::Enum
|
7
|
+
enums do
|
8
|
+
Acc = new('ACC')
|
9
|
+
Adv = new('ADV')
|
10
|
+
Aer = new('AER')
|
11
|
+
Agr = new('AGR')
|
12
|
+
Alc = new('ALC')
|
13
|
+
Ani = new('ANI')
|
14
|
+
App = new('APP')
|
15
|
+
Art = new('ART')
|
16
|
+
Aut = new('AUT')
|
17
|
+
Avi = new('AVI')
|
18
|
+
Ban = new('BAN')
|
19
|
+
Bnk = new('BNK')
|
20
|
+
Bev = new('BEV')
|
21
|
+
Bud = new('BUD')
|
22
|
+
Civ = new('CIV')
|
23
|
+
Chm = new('CHM')
|
24
|
+
Caw = new('CAW')
|
25
|
+
Cdt = new('CDT')
|
26
|
+
Com = new('COM')
|
27
|
+
Cpi = new('CPI')
|
28
|
+
Con = new('CON')
|
29
|
+
Csp = new('CSP')
|
30
|
+
Cpt = new('CPT')
|
31
|
+
Def = new('DEF')
|
32
|
+
Dis = new('DIS')
|
33
|
+
Doc = new('DOC')
|
34
|
+
Ecn = new('ECN')
|
35
|
+
Edu = new('EDU')
|
36
|
+
Eng = new('ENG')
|
37
|
+
Env = new('ENV')
|
38
|
+
Fam = new('FAM')
|
39
|
+
Fin = new('FIN')
|
40
|
+
Fir = new('FIR')
|
41
|
+
Foo = new('FOO')
|
42
|
+
For = new('FOR')
|
43
|
+
Fue = new('FUE')
|
44
|
+
Gam = new('GAM')
|
45
|
+
Gov = new('GOV')
|
46
|
+
Hcr = new('HCR')
|
47
|
+
Hom = new('HOM')
|
48
|
+
Hou = new('HOU')
|
49
|
+
Imm = new('IMM')
|
50
|
+
Ind = new('IND')
|
51
|
+
Ins = new('INS')
|
52
|
+
Int = new('INT')
|
53
|
+
Lbr = new('LBR')
|
54
|
+
Law = new('LAW')
|
55
|
+
Man = new('MAN')
|
56
|
+
Mar = new('MAR')
|
57
|
+
Mia = new('MIA')
|
58
|
+
Med = new('MED')
|
59
|
+
Mmm = new('MMM')
|
60
|
+
Mon = new('MON')
|
61
|
+
Nat = new('NAT')
|
62
|
+
Pha = new('PHA')
|
63
|
+
Pos = new('POS')
|
64
|
+
Rrr = new('RRR')
|
65
|
+
Res = new('RES')
|
66
|
+
Rel = new('REL')
|
67
|
+
Ret = new('RET')
|
68
|
+
Rod = new('ROD')
|
69
|
+
Sci = new('SCI')
|
70
|
+
Smb = new('SMB')
|
71
|
+
Spo = new('SPO')
|
72
|
+
Tar = new('TAR')
|
73
|
+
Tax = new('TAX')
|
74
|
+
Tec = new('TEC')
|
75
|
+
Tob = new('TOB')
|
76
|
+
Tor = new('TOR')
|
77
|
+
Trd = new('TRD')
|
78
|
+
Tra = new('TRA')
|
79
|
+
Tou = new('TOU')
|
80
|
+
Tru = new('TRU')
|
81
|
+
Urb = new('URB')
|
82
|
+
Unm = new('UNM')
|
83
|
+
Uti = new('UTI')
|
84
|
+
Vet = new('VET')
|
85
|
+
Was = new('WAS')
|
86
|
+
Wel = new('WEL')
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Enums
|
6
|
+
class Prefix < T::Enum
|
7
|
+
enums do
|
8
|
+
Dr = new('dr')
|
9
|
+
Mr = new('mr')
|
10
|
+
Mrs = new('mrs')
|
11
|
+
Ms = new('ms')
|
12
|
+
Mx = new('mx')
|
13
|
+
Ptr = new('ptr')
|
14
|
+
Rev = new('rev')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Enums
|
6
|
+
class Route < T::Enum
|
7
|
+
extend T::Sig
|
8
|
+
|
9
|
+
enums do
|
10
|
+
V1 = new
|
11
|
+
|
12
|
+
V1_Constants_Contribution_ItemTypes = new
|
13
|
+
|
14
|
+
V1_Constants_Filing_ListFilingTypes = new
|
15
|
+
V1_Constants_Filing_LobbyingActivityIssues = new
|
16
|
+
V1_Constants_Filing_GovernmentEntities = new
|
17
|
+
|
18
|
+
V1_Constants_General_Countries = new
|
19
|
+
V1_Constants_General_States = new
|
20
|
+
|
21
|
+
V1_Constants_Lobbyist_Prefixes = new
|
22
|
+
V1_Constants_Lobbyist_Suffixes = new
|
23
|
+
|
24
|
+
V1_Contributions_ListContributionReports = new
|
25
|
+
V1_Contributions_RetrieveContributionReport = new
|
26
|
+
|
27
|
+
V1_Filings_ListFilings = new
|
28
|
+
V1_Filings_RetrieveFiling = new
|
29
|
+
|
30
|
+
V1_Registrants_ListRegistrants = new
|
31
|
+
V1_Registrants_RetrieveRegistrant = new
|
32
|
+
|
33
|
+
V1_Clients_ListClients = new
|
34
|
+
V1_Clients_RetrieveClient = new
|
35
|
+
|
36
|
+
V1_Lobbyists_ListLobbyists = new
|
37
|
+
V1_Lobbyists_RetrieveLobbyist = new
|
38
|
+
|
39
|
+
Auth_Login = new
|
40
|
+
Auth_Password_Reset = new
|
41
|
+
Auth_Password_Reset_Confirm = new
|
42
|
+
end
|
43
|
+
|
44
|
+
BASE_URL = T.let(
|
45
|
+
'https://lda.senate.gov/api',
|
46
|
+
String
|
47
|
+
)
|
48
|
+
private_constant(:BASE_URL)
|
49
|
+
|
50
|
+
sig do
|
51
|
+
params(
|
52
|
+
path_params: T::Array[T.any(String, Integer)]
|
53
|
+
).returns(String)
|
54
|
+
end
|
55
|
+
def to_full_api_path(path_params: [])
|
56
|
+
path = case self
|
57
|
+
when V1
|
58
|
+
'/v1/'
|
59
|
+
when V1_Constants_Contribution_ItemTypes
|
60
|
+
'/v1/constants/contribution/itemtypes/'
|
61
|
+
when V1_Constants_Filing_ListFilingTypes
|
62
|
+
'/v1/constants/filing/filingtypes/'
|
63
|
+
when V1_Constants_Filing_LobbyingActivityIssues
|
64
|
+
'/v1/constants/filing/lobbyingactivityissues/'
|
65
|
+
when V1_Constants_Filing_GovernmentEntities
|
66
|
+
'/v1/constants/filing/governmententities/'
|
67
|
+
when V1_Constants_General_Countries
|
68
|
+
'/v1/constants/general/countries/'
|
69
|
+
when V1_Constants_General_States
|
70
|
+
'/v1/constants/general/states/'
|
71
|
+
when V1_Constants_Lobbyist_Prefixes
|
72
|
+
'/v1/constants/lobbyist/prefixes/'
|
73
|
+
when V1_Constants_Lobbyist_Suffixes
|
74
|
+
'/v1/constants/lobbyist/suffixes/'
|
75
|
+
when V1_Contributions_ListContributionReports, V1_Contributions_RetrieveContributionReport
|
76
|
+
'/v1/contributions/'
|
77
|
+
when V1_Filings_ListFilings, V1_Filings_RetrieveFiling
|
78
|
+
'/v1/filings/'
|
79
|
+
when V1_Registrants_ListRegistrants, V1_Registrants_RetrieveRegistrant
|
80
|
+
'/v1/registrants/'
|
81
|
+
when V1_Clients_ListClients, V1_Clients_RetrieveClient
|
82
|
+
'/v1/clients/'
|
83
|
+
when V1_Lobbyists_ListLobbyists, V1_Lobbyists_RetrieveLobbyist
|
84
|
+
'/v1/lobbyists/'
|
85
|
+
when Auth_Login
|
86
|
+
'/auth/login/'
|
87
|
+
when Auth_Password_Reset
|
88
|
+
'/auth/password/reset/'
|
89
|
+
when Auth_Password_Reset_Confirm
|
90
|
+
'/auth/password/reset/confirm/'
|
91
|
+
else
|
92
|
+
T.absurd(self)
|
93
|
+
end
|
94
|
+
|
95
|
+
if path_params.empty?
|
96
|
+
[BASE_URL, path].join
|
97
|
+
else
|
98
|
+
"#{[BASE_URL, path].join}#{path_params.join('/')}/"
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Enums
|
6
|
+
class State < T::Enum
|
7
|
+
enums do
|
8
|
+
Al = new('AL')
|
9
|
+
Ak = new('AK')
|
10
|
+
Az = new('AZ')
|
11
|
+
Ar = new('AR')
|
12
|
+
Ca = new('CA')
|
13
|
+
Co = new('CO')
|
14
|
+
Ct = new('CT')
|
15
|
+
De = new('DE')
|
16
|
+
Dc = new('DC')
|
17
|
+
Fl = new('FL')
|
18
|
+
Ga = new('GA')
|
19
|
+
Hi = new('HI')
|
20
|
+
Id = new('ID')
|
21
|
+
Il = new('IL')
|
22
|
+
In = new('IN')
|
23
|
+
Ia = new('IA')
|
24
|
+
Ks = new('KS')
|
25
|
+
Ky = new('KY')
|
26
|
+
La = new('LA')
|
27
|
+
Me = new('ME')
|
28
|
+
Md = new('MD')
|
29
|
+
Ma = new('MA')
|
30
|
+
Mi = new('MI')
|
31
|
+
Mn = new('MN')
|
32
|
+
Ms = new('MS')
|
33
|
+
Mo = new('MO')
|
34
|
+
Mt = new('MT')
|
35
|
+
Ne = new('NE')
|
36
|
+
Nv = new('NV')
|
37
|
+
Nh = new('NH')
|
38
|
+
Nj = new('NJ')
|
39
|
+
Nm = new('NM')
|
40
|
+
Ny = new('NY')
|
41
|
+
Nc = new('NC')
|
42
|
+
Nd = new('ND')
|
43
|
+
Oh = new('OH')
|
44
|
+
Ok = new('OK')
|
45
|
+
Or = new('OR')
|
46
|
+
Pa = new('PA')
|
47
|
+
Ri = new('RI')
|
48
|
+
Sc = new('SC')
|
49
|
+
Sd = new('SD')
|
50
|
+
Tn = new('TN')
|
51
|
+
Tx = new('TX')
|
52
|
+
Ut = new('UT')
|
53
|
+
Vt = new('VT')
|
54
|
+
Va = new('VA')
|
55
|
+
Wa = new('WA')
|
56
|
+
Wv = new('WV')
|
57
|
+
Wi = new('WI')
|
58
|
+
Wy = new('WY')
|
59
|
+
|
60
|
+
As = new('AS')
|
61
|
+
Aa = new('AA')
|
62
|
+
Ae = new('AE')
|
63
|
+
Ap = new('AP')
|
64
|
+
Gu = new('GU')
|
65
|
+
Mp = new('MP')
|
66
|
+
Pr = new('PR')
|
67
|
+
Vi = new('VI')
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Enums
|
6
|
+
class Suffix < T::Enum
|
7
|
+
enums do
|
8
|
+
Jr = new('jr')
|
9
|
+
Sr = new('sr')
|
10
|
+
I = new('i')
|
11
|
+
Ii = new('ii')
|
12
|
+
Iii = new('iii')
|
13
|
+
Iv = new('iv')
|
14
|
+
V = new('v')
|
15
|
+
Cae = new('cae')
|
16
|
+
Dvm = new('dvm')
|
17
|
+
Dmd = new('dmd')
|
18
|
+
Dppd = new('dppd')
|
19
|
+
Edd = new('edd')
|
20
|
+
Esq = new('esq')
|
21
|
+
Jd = new('jd')
|
22
|
+
Md = new('md')
|
23
|
+
Ma = new('ma')
|
24
|
+
Med = new('med')
|
25
|
+
Mhsa = new('mhsa')
|
26
|
+
Mph = new('mph')
|
27
|
+
Od = new('od')
|
28
|
+
Pa = new('pa')
|
29
|
+
Pe = new('pe')
|
30
|
+
Phd = new('phd')
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|