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,26 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Errors
|
6
|
+
class RequestThrottledError < StandardError
|
7
|
+
extend T::Sig
|
8
|
+
|
9
|
+
sig do
|
10
|
+
returns(Integer)
|
11
|
+
end
|
12
|
+
attr_reader :retry_after
|
13
|
+
|
14
|
+
sig do
|
15
|
+
params(
|
16
|
+
message: String,
|
17
|
+
retry_after: Integer
|
18
|
+
).void
|
19
|
+
end
|
20
|
+
def initialize(message, retry_after)
|
21
|
+
super(message)
|
22
|
+
@retry_after = retry_after
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class AffiliatedOrganization < T::Struct
|
7
|
+
const :address_1, T.nilable(String)
|
8
|
+
const :address_2, T.nilable(String)
|
9
|
+
const :address_3, T.nilable(String)
|
10
|
+
const :address_4, T.nilable(String)
|
11
|
+
const :city, T.nilable(String)
|
12
|
+
const :country, LobbyingDisclosureClient::Enums::Country
|
13
|
+
const :country_display, String
|
14
|
+
const :name, String
|
15
|
+
const :ppb_city, T.nilable(String)
|
16
|
+
const :ppb_country, LobbyingDisclosureClient::Enums::Country
|
17
|
+
const :ppb_country_display, String
|
18
|
+
const :ppb_state, LobbyingDisclosureClient::Enums::State
|
19
|
+
const :ppb_state_display, String
|
20
|
+
const :state, LobbyingDisclosureClient::Enums::State
|
21
|
+
const :state_display, String
|
22
|
+
const :url, String
|
23
|
+
const :zip, T.nilable(String)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class Client < T::Struct
|
7
|
+
extend T::Sig
|
8
|
+
|
9
|
+
const :client_government_entity, T.nilable(T::Boolean)
|
10
|
+
const :client_id, String
|
11
|
+
const :client_self_select, T.nilable(T::Boolean)
|
12
|
+
const :country, LobbyingDisclosureClient::Enums::Country
|
13
|
+
const :country_display, String
|
14
|
+
const :effective_date, T.nilable(Date)
|
15
|
+
const :general_description, T.nilable(String)
|
16
|
+
const :id, Integer
|
17
|
+
const :name, String
|
18
|
+
const :ppb_country, LobbyingDisclosureClient::Enums::Country
|
19
|
+
const :ppb_country_display, String
|
20
|
+
const :ppb_state, T.nilable(LobbyingDisclosureClient::Enums::State)
|
21
|
+
const :ppb_state_display, T.nilable(String)
|
22
|
+
const :state, T.nilable(LobbyingDisclosureClient::Enums::State)
|
23
|
+
const :state_display, T.nilable(String)
|
24
|
+
const :url, String
|
25
|
+
|
26
|
+
sig do
|
27
|
+
params(
|
28
|
+
hash: T::Hash[String, T.untyped],
|
29
|
+
strict: T::Boolean
|
30
|
+
).returns(T.self_type)
|
31
|
+
end
|
32
|
+
def deserialize(hash, strict = false)
|
33
|
+
super(
|
34
|
+
hash.merge(
|
35
|
+
'effective_date' => hash['effective_date'] ? Date.parse(hash['effective_date']) : nil
|
36
|
+
),
|
37
|
+
strict
|
38
|
+
)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class ClientWithRegistrant < T::Struct
|
7
|
+
extend T::Sig
|
8
|
+
|
9
|
+
const :client_government_entity, T.nilable(T::Boolean)
|
10
|
+
const :client_id, String
|
11
|
+
const :client_self_select, T.nilable(T::Boolean)
|
12
|
+
const :country, LobbyingDisclosureClient::Enums::Country
|
13
|
+
const :country_display, String
|
14
|
+
const :effective_date, T.nilable(Date)
|
15
|
+
const :general_description, T.nilable(String)
|
16
|
+
const :id, Integer
|
17
|
+
const :name, String
|
18
|
+
const :ppb_country, LobbyingDisclosureClient::Enums::Country
|
19
|
+
const :ppb_country_display, String
|
20
|
+
const :ppb_state, T.nilable(LobbyingDisclosureClient::Enums::State)
|
21
|
+
const :ppb_state_display, T.nilable(String)
|
22
|
+
const :registrant, LobbyingDisclosureClient::Types::Registrant
|
23
|
+
const :state, T.nilable(LobbyingDisclosureClient::Enums::State)
|
24
|
+
const :state_display, T.nilable(String)
|
25
|
+
const :url, String
|
26
|
+
|
27
|
+
sig do
|
28
|
+
params(
|
29
|
+
hash: T::Hash[String, T.untyped],
|
30
|
+
strict: T::Boolean
|
31
|
+
).returns(T.self_type)
|
32
|
+
end
|
33
|
+
def deserialize(hash, strict = false)
|
34
|
+
super(
|
35
|
+
hash.merge(
|
36
|
+
'effective_date' => hash['effective_date'] ? Date.parse(hash['effective_date']) : nil
|
37
|
+
),
|
38
|
+
strict
|
39
|
+
)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class ContributionItem < T::Struct
|
7
|
+
extend T::Sig
|
8
|
+
|
9
|
+
const :amount, T.nilable(BigDecimal)
|
10
|
+
const :contribution_type, LobbyingDisclosureClient::Enums::ContributionType
|
11
|
+
const :contribution_type_display, String
|
12
|
+
const :contributor_name, String
|
13
|
+
const :date, Date
|
14
|
+
const :honoree_name, String
|
15
|
+
const :payee_name, String
|
16
|
+
|
17
|
+
sig do
|
18
|
+
params(
|
19
|
+
hash: T::Hash[String, T.untyped],
|
20
|
+
strict: T::Boolean
|
21
|
+
).returns(T.self_type)
|
22
|
+
end
|
23
|
+
def deserialize(hash, strict = false)
|
24
|
+
super(
|
25
|
+
hash.merge(
|
26
|
+
'amount' => hash['amount']&.to_d,
|
27
|
+
'date' => hash['date'] ? Date.parse(hash['date']) : nil
|
28
|
+
),
|
29
|
+
strict
|
30
|
+
)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class ContributionReport < T::Struct
|
7
|
+
extend T::Sig
|
8
|
+
|
9
|
+
const :address_1, T.nilable(String)
|
10
|
+
const :address_2, T.nilable(String)
|
11
|
+
const :city, T.nilable(String)
|
12
|
+
const :comments, T.nilable(String)
|
13
|
+
const :contact_name, T.nilable(String)
|
14
|
+
const :contribution_items, T::Array[LobbyingDisclosureClient::Types::ContributionItem]
|
15
|
+
const :country, LobbyingDisclosureClient::Enums::Country
|
16
|
+
const :country_display, T.nilable(String)
|
17
|
+
const :dt_posted, DateTime
|
18
|
+
const :filer_type, LobbyingDisclosureClient::Enums::FilerType
|
19
|
+
const :filer_type_display, String
|
20
|
+
const :filing_document_content_type, String
|
21
|
+
const :filing_document_url, String
|
22
|
+
const :filing_period, LobbyingDisclosureClient::Enums::FilingPeriod
|
23
|
+
const :filing_period_display, String
|
24
|
+
const :filing_type, LobbyingDisclosureClient::Enums::FilingType
|
25
|
+
const :filing_type_display, String
|
26
|
+
const :filing_uuid, String
|
27
|
+
const :filing_year, Integer
|
28
|
+
const :lobbyist, T.nilable(LobbyingDisclosureClient::Types::Lobbyist)
|
29
|
+
const :no_contributions, T.nilable(T::Boolean)
|
30
|
+
const :pacs, T.nilable(T::Array[String])
|
31
|
+
const :registrant, LobbyingDisclosureClient::Types::Registrant
|
32
|
+
const :state, LobbyingDisclosureClient::Enums::State
|
33
|
+
const :state_display, String
|
34
|
+
const :url, String
|
35
|
+
const :zip, T.nilable(String)
|
36
|
+
|
37
|
+
sig do
|
38
|
+
params(
|
39
|
+
hash: T::Hash[String, T.untyped],
|
40
|
+
strict: T::Boolean
|
41
|
+
).returns(T.self_type)
|
42
|
+
end
|
43
|
+
def deserialize(hash, strict = false)
|
44
|
+
super(
|
45
|
+
hash.merge(
|
46
|
+
'dt_posted' => hash['dt_posted'] ? DateTime.parse(hash['dt_posted']) : nil
|
47
|
+
),
|
48
|
+
strict
|
49
|
+
)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class ConvictionDisclosure < T::Struct
|
7
|
+
extend T::Sig
|
8
|
+
|
9
|
+
const :date, Date
|
10
|
+
const :description, String
|
11
|
+
const :lobbyist, LobbyingDisclosureClient::Types::Lobbyist
|
12
|
+
|
13
|
+
sig do
|
14
|
+
params(
|
15
|
+
hash: T::Hash[String, T.untyped],
|
16
|
+
strict: T::Boolean
|
17
|
+
).returns(T.self_type)
|
18
|
+
end
|
19
|
+
def deserialize(hash, strict = false)
|
20
|
+
super(
|
21
|
+
hash.merge(
|
22
|
+
'date' => hash['date'] ? Date.parse(hash['date']) : nil
|
23
|
+
),
|
24
|
+
strict
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class Filing < T::Struct
|
7
|
+
extend T::Sig
|
8
|
+
|
9
|
+
const :affiliated_organizations, T::Array[LobbyingDisclosureClient::Types::AffiliatedOrganization]
|
10
|
+
const :client, LobbyingDisclosureClient::Types::Client
|
11
|
+
const :conviction_disclosures, T::Array[LobbyingDisclosureClient::Types::ConvictionDisclosure]
|
12
|
+
const :foreign_entities, T::Array[LobbyingDisclosureClient::Types::ForeignEntity]
|
13
|
+
const :lobbying_activities, T::Array[LobbyingDisclosureClient::Types::LobbyingActivity]
|
14
|
+
const :registrant, LobbyingDisclosureClient::Types::Registrant
|
15
|
+
const :dt_posted, DateTime
|
16
|
+
const :expenses, T.nilable(BigDecimal)
|
17
|
+
const :expenses_method, T.nilable(LobbyingDisclosureClient::Enums::ExpensesMethod)
|
18
|
+
const :expenses_method_display, T.nilable(String)
|
19
|
+
const :filing_document_content_type, String
|
20
|
+
const :filing_document_url, String
|
21
|
+
const :filing_period, LobbyingDisclosureClient::Enums::FilingPeriod
|
22
|
+
const :filing_period_display, String
|
23
|
+
const :filing_type, LobbyingDisclosureClient::Enums::FilingType
|
24
|
+
const :filing_type_display, String
|
25
|
+
const :filing_uuid, String
|
26
|
+
const :filing_year, Integer
|
27
|
+
const :income, T.nilable(BigDecimal)
|
28
|
+
const :posted_by_name, T.nilable(String)
|
29
|
+
const :registrant_address_1, T.nilable(String)
|
30
|
+
const :registrant_address_2, T.nilable(String)
|
31
|
+
const :registrant_city, T.nilable(String)
|
32
|
+
const :registrant_country, String
|
33
|
+
const :registrant_different_address, T.nilable(T::Boolean)
|
34
|
+
const :registrant_ppb_country, T.nilable(String)
|
35
|
+
const :registrant_state, LobbyingDisclosureClient::Enums::State
|
36
|
+
const :registrant_zip, T.nilable(String)
|
37
|
+
const :termination_date, T.nilable(Date)
|
38
|
+
const :url, String
|
39
|
+
|
40
|
+
sig do
|
41
|
+
params(
|
42
|
+
hash: T::Hash[String, T.untyped],
|
43
|
+
strict: T::Boolean
|
44
|
+
).returns(T.self_type)
|
45
|
+
end
|
46
|
+
def deserialize(hash, strict = false)
|
47
|
+
super(
|
48
|
+
hash.merge(
|
49
|
+
'dt_posted' => hash['dt_posted'] ? DateTime.parse(hash['dt_posted']) : nil,
|
50
|
+
'expenses' => hash['expenses']&.to_d,
|
51
|
+
'income' => hash['income']&.to_d,
|
52
|
+
'termination_date' => hash['termination_date'] ? Date.parse(hash['termination_date']) : nil
|
53
|
+
),
|
54
|
+
strict
|
55
|
+
)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class ForeignEntity < T::Struct
|
7
|
+
extend T::Sig
|
8
|
+
|
9
|
+
const :address, T.nilable(String)
|
10
|
+
const :city, T.nilable(String)
|
11
|
+
const :contribution, T.nilable(BigDecimal)
|
12
|
+
const :country, LobbyingDisclosureClient::Enums::Country
|
13
|
+
const :country_display, String
|
14
|
+
const :name, String
|
15
|
+
const :ownership_percentage, T.nilable(BigDecimal)
|
16
|
+
const :ppb_city, T.nilable(String)
|
17
|
+
const :ppb_country, LobbyingDisclosureClient::Enums::Country
|
18
|
+
const :ppb_country_display, String
|
19
|
+
const :ppb_state, T.nilable(LobbyingDisclosureClient::Enums::State)
|
20
|
+
const :ppb_state_display, String
|
21
|
+
const :state, T.nilable(LobbyingDisclosureClient::Enums::State)
|
22
|
+
const :state_display, String
|
23
|
+
|
24
|
+
sig do
|
25
|
+
params(
|
26
|
+
hash: T::Hash[String, T.untyped],
|
27
|
+
strict: T::Boolean
|
28
|
+
).returns(T.self_type)
|
29
|
+
end
|
30
|
+
def deserialize(hash, strict = false)
|
31
|
+
super(
|
32
|
+
hash.merge(
|
33
|
+
'contribution' => hash['contribution']&.to_d,
|
34
|
+
'ownership_percentage' => hash['ownership_percentage']&.to_d
|
35
|
+
),
|
36
|
+
strict
|
37
|
+
)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class LobbyingActivity < T::Struct
|
7
|
+
const :description, T.nilable(String)
|
8
|
+
const :foreign_entity_issues, T.nilable(String)
|
9
|
+
const :general_issue_code, LobbyingDisclosureClient::Enums::GeneralIssueCode
|
10
|
+
const :general_issue_code_display, String
|
11
|
+
const :government_entities, T::Array[LobbyingDisclosureClient::Types::GovernmentEntity]
|
12
|
+
const :lobbyists, T::Array[LobbyingDisclosureClient::Types::LobbyistForLobbyingActivity]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class Lobbyist < T::Struct
|
7
|
+
const :first_name, T.nilable(String)
|
8
|
+
const :id, Integer
|
9
|
+
const :last_name, T.nilable(String)
|
10
|
+
const :middle_name, T.nilable(String)
|
11
|
+
const :nickname, T.nilable(String)
|
12
|
+
const :prefix, T.nilable(LobbyingDisclosureClient::Enums::Prefix)
|
13
|
+
const :prefix_display, T.nilable(String)
|
14
|
+
const :suffix, T.nilable(LobbyingDisclosureClient::Enums::Suffix)
|
15
|
+
const :suffix_display, T.nilable(String)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class LobbyistForLobbyingActivity < T::Struct
|
7
|
+
const :covered_position, T.nilable(String)
|
8
|
+
const :lobbyist, LobbyingDisclosureClient::Types::Lobbyist
|
9
|
+
const :new, T.nilable(T::Boolean)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class LobbyistWithRegistrant < T::Struct
|
7
|
+
const :first_name, T.nilable(String)
|
8
|
+
const :id, Integer
|
9
|
+
const :last_name, T.nilable(String)
|
10
|
+
const :middle_name, T.nilable(String)
|
11
|
+
const :nickname, T.nilable(String)
|
12
|
+
const :prefix, T.nilable(LobbyingDisclosureClient::Enums::Prefix)
|
13
|
+
const :prefix_display, T.nilable(String)
|
14
|
+
const :registrant, LobbyingDisclosureClient::Types::Registrant
|
15
|
+
const :suffix, T.nilable(LobbyingDisclosureClient::Enums::Suffix)
|
16
|
+
const :suffix_display, T.nilable(String)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module LobbyingDisclosureClient
|
5
|
+
module Types
|
6
|
+
class Registrant < T::Struct
|
7
|
+
extend T::Sig
|
8
|
+
|
9
|
+
const :address_1, String
|
10
|
+
const :address_2, T.nilable(String)
|
11
|
+
const :address_3, T.nilable(String)
|
12
|
+
const :address_4, T.nilable(String)
|
13
|
+
const :city, T.nilable(String)
|
14
|
+
const :contact_name, String
|
15
|
+
const :contact_telephone, String
|
16
|
+
const :country, LobbyingDisclosureClient::Enums::Country
|
17
|
+
const :country_display, String
|
18
|
+
const :description, T.nilable(String)
|
19
|
+
const :dt_updated, DateTime
|
20
|
+
const :house_registrant_id, T.nilable(Integer)
|
21
|
+
const :id, Integer
|
22
|
+
const :name, String
|
23
|
+
const :ppb_country, LobbyingDisclosureClient::Enums::Country
|
24
|
+
const :ppb_country_display, String
|
25
|
+
const :state, T.nilable(LobbyingDisclosureClient::Enums::State)
|
26
|
+
const :state_display, String
|
27
|
+
const :url, String
|
28
|
+
const :zip, T.nilable(String)
|
29
|
+
|
30
|
+
sig do
|
31
|
+
params(
|
32
|
+
hash: T::Hash[String, T.untyped],
|
33
|
+
strict: T::Boolean
|
34
|
+
).returns(T.self_type)
|
35
|
+
end
|
36
|
+
def deserialize(hash, strict = false)
|
37
|
+
super(
|
38
|
+
hash.merge(
|
39
|
+
'dt_updated' => hash['dt_updated'] ? DateTime.parse(hash['dt_updated']) : nil
|
40
|
+
),
|
41
|
+
strict
|
42
|
+
)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|