sec_api 1.0.0 → 1.0.4
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 +4 -4
- data/lib/sec_api/objects/document_format_file.rb +9 -1
- data/lib/sec_api/objects/filing.rb +2 -2
- data/lib/sec_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 124de69867f417e8c8db8630af582c2b12272f71e7daa0a08265d6c260ba8c4f
|
|
4
|
+
data.tar.gz: f0bd3f3b9ba8e856965c8c3aea0c2a22bc99b4b37326b424ba25198d4580702d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15d43787bb823f4d6e560389bb4088b1297f1440a9b2b4e046a422062f949c324f7a3e97f13e717e45677f1344658d64c2e3fc122e7a73b03d15913b16156344
|
|
7
|
+
data.tar.gz: 3ace738274c2ed903da7536582acd328fcd6740a431005d1c6bad0b232dc1395ad7029c2087d8b4ce9a5fadf614d0cc40b61015eb204c88b8b8454884b01c90c
|
|
@@ -26,7 +26,7 @@ module SecApi
|
|
|
26
26
|
attribute? :description, Types::String
|
|
27
27
|
attribute :type, Types::String
|
|
28
28
|
attribute :url, Types::String
|
|
29
|
-
attribute :size, Types::Coercible::Integer
|
|
29
|
+
attribute? :size, Types::Coercible::Integer.optional
|
|
30
30
|
|
|
31
31
|
# Creates a DocumentFormatFile from API response data.
|
|
32
32
|
#
|
|
@@ -38,6 +38,14 @@ module SecApi
|
|
|
38
38
|
def self.from_api(data)
|
|
39
39
|
data[:url] = data.delete(:documentUrl) if data.key?(:documentUrl)
|
|
40
40
|
|
|
41
|
+
# API sometimes returns whitespace (including non-breaking spaces) for size
|
|
42
|
+
# Use POSIX [[:space:]] to match all unicode whitespace including NBSP
|
|
43
|
+
[:size, "size"].each do |key|
|
|
44
|
+
if data.key?(key) && data[key].is_a?(String) && data[key].match?(/\A[[:space:]]*\z/)
|
|
45
|
+
data.delete(key)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
41
49
|
new(data)
|
|
42
50
|
end
|
|
43
51
|
end
|
|
@@ -61,8 +61,8 @@ module SecApi
|
|
|
61
61
|
attribute :form_type, Types::String
|
|
62
62
|
|
|
63
63
|
# @!attribute [r] period_of_report
|
|
64
|
-
# @return [String] reporting period end date
|
|
65
|
-
attribute :period_of_report, Types::String
|
|
64
|
+
# @return [String, nil] reporting period end date (may be nil for some filing types)
|
|
65
|
+
attribute? :period_of_report, Types::String.optional
|
|
66
66
|
|
|
67
67
|
# @!attribute [r] filed_at
|
|
68
68
|
# @return [Date] filing date (automatically coerced from string via Dry::Types)
|
data/lib/sec_api/version.rb
CHANGED