companies_house_hub 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1df1e95e70af9bf7d63ab8d0d96e701692beeb3e132c84438ab9531488ee936
|
4
|
+
data.tar.gz: 713df242f9a48182170c450748d14b3b8b0b321969adc2678eef960ba5acc503
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e71bb8896b010072d7ad78f2ccbb1cf8213d73ece90308a425e51b7b579791797eac970c580b35a160439e243947238fb0ba9db359754590b0785c1f64094531
|
7
|
+
data.tar.gz: fdeabdc9834742fbb7e51fc4855ba46424e002eeb8b4562c56e1e8ed507591648888514ef0b3653457121281e9de57d75c1d9e2c32220dc2603c1d1f749bb47e
|
@@ -7,6 +7,7 @@ module CompaniesHouseHub
|
|
7
7
|
attr_reader :address_line1, :address_line2, :postal_code, :locality, :country
|
8
8
|
|
9
9
|
def initialize(json = {})
|
10
|
+
p json
|
10
11
|
@address_line1 = json.dig(:address_line_1)
|
11
12
|
@address_line2 = json.dig(:address_line_2)
|
12
13
|
@country = json.dig(:country)
|
@@ -22,7 +22,7 @@ module CompaniesHouseHub
|
|
22
22
|
|
23
23
|
result = get(SEARCH_PATH, options)
|
24
24
|
|
25
|
-
result.body.
|
25
|
+
result.body[:items].map { |company_json| new(company_json) }
|
26
26
|
end
|
27
27
|
|
28
28
|
def self.find(company_number, params = {})
|
@@ -36,16 +36,17 @@ module CompaniesHouseHub
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def initialize(json = {})
|
39
|
+
p json
|
39
40
|
@number = json.dig(:company_number)
|
40
41
|
@has_been_liquidated = json.dig(:has_been_liquidated)
|
41
42
|
@jurisdiction = json.dig(:jurisdiction)
|
42
|
-
@name = json.dig(:company_name)
|
43
|
+
@name = json.dig(:company_name) || json.dig(:title)
|
43
44
|
@created_at = json.dig(:date_of_creation)
|
44
|
-
@address = Address.new(json.dig(:registered_office_address))
|
45
|
+
@address = Address.new(json.dig(:registered_office_address) || json.dig(:address))
|
45
46
|
@status = json.dig(:company_status)
|
46
|
-
@type = json.dig(:type)
|
47
|
+
@type = json.dig(:type) || json.dig(:company_type)
|
47
48
|
@accounts = json.dig(:accounts)
|
48
|
-
@full_address = @address.full
|
49
|
+
@full_address = json.dig(:address_snippet) || @address.full
|
49
50
|
end
|
50
51
|
|
51
52
|
def filing_histories
|