rixml 0.5.8 → 0.5.9

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
  SHA1:
3
- metadata.gz: 6c60586519be43a5fb0669683e4d47d2c5a7594a
4
- data.tar.gz: b5722d8668141350d01db9b2cf7c87f4cf5fd580
3
+ metadata.gz: 7a9cf0213540b9355f433d7e280c8a862742aa0b
4
+ data.tar.gz: 7ddbe3cd9e2fc722545d0efd5d72cb3101d4e552
5
5
  SHA512:
6
- metadata.gz: cf8eb2d736839e514805f96b965537b14b5f270080843f378f4e685267a01f39583c998b2ea7393f3ad20e3930c9d24b3d1a7424cdfeb51abc226ace7bcf3b71
7
- data.tar.gz: 5fe517b958e989cab5f2ffa8a09128501139bd3e2472ec04ed7f8585da4e9fb9623065ccf54fbdfeeb03e06ff1425c6fa6a85446c166f76fd58ecaaa0683d346
6
+ metadata.gz: 8ce08d62717748769feb278eb34904e78fe8ae18b2168d46185e0b479db42f4189a8cc69339fc4475218a6cdb46ef73e1ada00513e04d28794737b4c3d5cc63f
7
+ data.tar.gz: 7978bea261a91661c5dac3234cf0458b20f4017134cdee039577c789ce8832bfba40bae73be63f84cb293fc84f6337daed19e7185ab0b33b51a540d4404ee46e
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+ require 'happymapper'
3
+ require_relative './node'
4
+ require_relative './rixml_type/normalized_string'
5
+
6
+ module RixmlDocument
7
+ class AudienceTypeEntitlement < Node
8
+ include HappyMapper
9
+ tag 'AudienceTypeEntitlement'
10
+
11
+ attribute :audience_type, RixmlType::NormalizedString, tag: 'audienceType'
12
+ attribute :external, RixmlType::NormalizedString, tag: 'external'
13
+ attribute :entitlement_context, String, tag: 'entitlementContext'
14
+ content :value, String
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+ require 'happymapper'
3
+ require_relative './node'
4
+ require_relative './audience_type_entitlement'
5
+ require_relative './rixml_type/yes_no_boolean'
6
+ require_relative './rixml_type/normalized_string'
7
+
8
+ module RixmlDocument
9
+ class Entitlement < Node
10
+ include HappyMapper
11
+ tag 'Entitlement'
12
+
13
+ has_one :audience_type_entitlement, AudienceTypeEntitlement, tag: 'AudienceTypeEntitlement', xpath: './'
14
+
15
+ attribute :primary_indicator, RixmlType::YesNoBoolean, tag: 'primaryIndicator'
16
+ attribute :include_exclude_indicator, RixmlType::NormalizedString, tag: 'includeExcludeIndicator'
17
+ end
18
+ end
@@ -23,7 +23,7 @@ module RixmlDocument
23
23
  attribute :domicile_country_code, RixmlType::UpcaseString, tag: 'domicileCountryCode'
24
24
 
25
25
  def securities
26
- security_details.securities
26
+ security_details&.securities || []
27
27
  end
28
28
  end
29
29
  end
@@ -2,16 +2,28 @@
2
2
  require 'happymapper'
3
3
  require_relative './node'
4
4
  require_relative './product_category'
5
+ require_relative './entitlement'
5
6
  require_relative './rixml_type/yes_no_boolean'
6
7
 
7
8
  module RixmlDocument
9
+ class EntitlementGroup < Node
10
+ include HappyMapper
11
+ tag 'EntitlementGroup'
12
+ has_many :entitlements, Entitlement, tag: 'Entitlement', xpath: './'
13
+ end
14
+
8
15
  class ProductDetails < Node
9
16
  include HappyMapper
10
17
  tag 'ProductDetails'
11
18
 
12
19
  has_one :product_category, ProductCategory, xpath: './'
20
+ has_many :entitlement_groups, EntitlementGroup, xpath: './'
13
21
 
14
22
  attribute :publication_date_time, Time, tag: 'publicationDateTime'
15
23
  attribute :periodical_indicator, RixmlType::YesNoBoolean, tag: 'periodicalIndicator'
24
+
25
+ def entitlements
26
+ entitlement_groups&.map(&:entitlements)&.flatten || []
27
+ end
16
28
  end
17
29
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'rixml'
4
- s.version = '0.5.8'
5
- s.date = '2017-10-26'
4
+ s.version = '0.5.9'
5
+ s.date = '2017-11-06'
6
6
  s.summary = 'RIXML Parser'
7
7
  s.description = 'Parse RIXML files'
8
8
  s.homepage = 'https://github.com/AlphaExchange/rixml'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rixml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Correia Santos
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-26 00:00:00.000000000 Z
12
+ date: 2017-11-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -157,10 +157,12 @@ files:
157
157
  - lib/rixml_document.rb
158
158
  - lib/rixml_document/asset_class.rb
159
159
  - lib/rixml_document/asset_type.rb
160
+ - lib/rixml_document/audience_type_entitlement.rb
160
161
  - lib/rixml_document/contact.rb
161
162
  - lib/rixml_document/content.rb
162
163
  - lib/rixml_document/context.rb
163
164
  - lib/rixml_document/country.rb
165
+ - lib/rixml_document/entitlement.rb
164
166
  - lib/rixml_document/issuer.rb
165
167
  - lib/rixml_document/length.rb
166
168
  - lib/rixml_document/node.rb