icalia-sdk-event-core 0.1.9 → 0.1.10

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: 4d0b420228bd44c3dbb31a280815b788f80e86810e0c3a4f813fc0ef5e25543d
4
- data.tar.gz: 35c9bc25041f5ac330cbaaf7c781b5089b29c99d7b5695411b84321e1c86256f
3
+ metadata.gz: 1b14f1c606f45ead0f2f2cfb73a3491baaba00a1bb20728c063a431cbaff147a
4
+ data.tar.gz: bb05b0c6c846cbaadcac90aff2c0f59eca3d7666cec6c2eef3fb77a5f8dee238
5
5
  SHA512:
6
- metadata.gz: 35944b6d72d6ec4fcd49eae65cc259073a1f009d8610c7a3649c9576564cf6b4d77243c20d53290816c709515feedc84053b461c49677b1bc64386bb118024d0
7
- data.tar.gz: 4f85f5b4de95d6faf82dc625763de5756c6c521104358c76d54ed61f8bbd95c6a1b22d0b2e16ab9f91c13cbad60f46a711a60e3666fe1f30abbc8b6e89f71701
6
+ metadata.gz: b0c80b2a2e50a73fc896a561f4c8551eb8e67e9e75cb3383b60424582b9111c9ae47fb61ea2ac662db671a6c023f178a0d49e375db35424980e0d2f1910dd155
7
+ data.tar.gz: 6ff894968465a9ce430579ae777f0bdb70e64604082d9780022c7ebf390fe5515e6a7f65126250a75e78cf27c5b7c8945f11ae639a5cde8a9f84310996722224
@@ -6,6 +6,7 @@ module Icalia::Event
6
6
  # This class is responsible for converting a JSONAPI.org representation of an
7
7
  # Icalia Event's `User` object
8
8
  class DeserializableCloudIdentity < JSONAPI::Deserializable::Resource
9
+ include DeserializableResourceIdentity
9
10
  include DeserializableResourceTimestamps
10
11
 
11
12
  attributes :name, :provider
@@ -13,10 +14,8 @@ module Icalia::Event
13
14
  attribute(:'identity-type') { |value| Hash[type: value] }
14
15
  attribute(:'id-at-provider') { |value| Hash[uid: value.to_s] }
15
16
 
16
- has_one :'directory-entry' do |_rel, id, type|
17
- next Hash[] if type.blank?
18
-
19
- Hash["#{type}_id".to_sym => id]
17
+ has_one :owner do |_rel, id, type|
18
+ Hash[owner_id: id, owner_type: classify_type(type)]
20
19
  end
21
20
  end
22
21
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Icalia::Event
4
+ #= DeserializableEmailAccount
5
+ #
6
+ # Converts a JSONAPI.org serialization of a `EmailAccount` object from a
7
+ # Notification topic into an `ActionController::Parameters` object that can be
8
+ # used to create or update an email account
9
+ class DeserializableEmailAccount < JSONAPI::Deserializable::Resource
10
+ include DeserializableResourceIdentity
11
+
12
+ attribute :address
13
+ attribute(:'created-at') { |value| Hash[created_at: value] }
14
+
15
+ has_one :owner do |_rel, id, type|
16
+ Hash[owner_id: id, owner_type: classify_type(type)]
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Icalia::Event
4
+ #= DeserializableMembership
5
+ #
6
+ # This class is responsible for converting a JSONAPI.org representation of an
7
+ # Icalia Event's `Membership` object
8
+ class DeserializableMembership < JSONAPI::Deserializable::Resource
9
+ include DeserializableResourceIdentity
10
+ include DeserializableResourceCreationTimestamp
11
+
12
+ has_one :member do |_rel, id, type|
13
+ Hash[member_id: id, member_type: classify_type(type)]
14
+ end
15
+
16
+ has_one :group do |_rel, id, type|
17
+ Hash[group_id: id, group_type: classify_type(type)]
18
+ end
19
+ end
20
+ end
@@ -10,12 +10,12 @@ module Icalia::Event
10
10
  include DeserializableResourceAction
11
11
  include DeserializableResourceCreationTimestamp
12
12
 
13
- has_one :member do |_rel, id, type|
14
- Hash[member_id: id, member_type: classify_type(type)]
13
+ has_one :membership do |_rel, id, type|
14
+ Hash[membership_id: id, membership_type: classify_type(type)]
15
15
  end
16
16
 
17
- has_one :organization do |_rel, id, type|
18
- Hash[organization_id: id, organization_type: classify_type(type)]
17
+ has_one :sender do |_rel, id, type|
18
+ Hash[sender_id: id, sender_type: classify_type(type)]
19
19
  end
20
20
  end
21
21
  end
@@ -10,5 +10,19 @@ module Icalia::Event
10
10
  include DeserializableResourceTimestamps
11
11
 
12
12
  attributes :name
13
+
14
+ has_many(:'email-accounts') do |_rel, ids, types|
15
+ Hash[
16
+ email_account_ids: ids,
17
+ email_account_types: types.map { |type| classify_type(type) }
18
+ ]
19
+ end
20
+
21
+ has_many(:'cloud-identities') do |_rel, ids, types|
22
+ Hash[
23
+ cloud_identity_ids: ids,
24
+ cloud_identity_types: types.map { |type| classify_type(type) }
25
+ ]
26
+ end
13
27
  end
14
28
  end
@@ -2,20 +2,20 @@
2
2
 
3
3
  module Icalia
4
4
  module Event
5
- serialization_path = 'icalia-sdk-event-core/serialization'
6
-
5
+ serialization_path = "icalia-sdk-event-core/serialization"
6
+
7
7
  # Deserialization Modules:
8
8
  autoload :DeserializableResourceIdentity,
9
- "#{serialization_path}/deserializable_resource_identity"
9
+ "#{serialization_path}/deserializable_resource_identity"
10
10
 
11
11
  autoload :DeserializableResourceAction,
12
- "#{serialization_path}/deserializable_resource_action"
12
+ "#{serialization_path}/deserializable_resource_action"
13
13
 
14
14
  autoload :DeserializableResourceCreationTimestamp,
15
- "#{serialization_path}/deserializable_resource_creation_timestamp"
15
+ "#{serialization_path}/deserializable_resource_creation_timestamp"
16
16
 
17
17
  autoload :DeserializableResourceTimestamps,
18
- "#{serialization_path}/deserializable_resource_timestamps"
18
+ "#{serialization_path}/deserializable_resource_timestamps"
19
19
 
20
20
  autoload :DeserializablePropertyResource,
21
21
  "#{serialization_path}/deserializable_property_resource"
@@ -33,6 +33,12 @@ module Icalia
33
33
 
34
34
  # Deserializable Objects
35
35
 
36
+ autoload :DeserializableMembership,
37
+ "#{serialization_path}/deserializable_membership"
38
+
39
+ autoload :DeserializableEmailAccount,
40
+ "#{serialization_path}/deserializable_email_account"
41
+
36
42
  autoload :DeserializableUser,
37
43
  "#{serialization_path}/deserializable_user"
38
44
 
@@ -46,10 +52,10 @@ module Icalia
46
52
  "#{serialization_path}/deserializable_oauth_application"
47
53
 
48
54
  autoload :DeserializableOrganization,
49
- "#{serialization_path}/deserializable_organization"
55
+ "#{serialization_path}/deserializable_organization"
50
56
 
51
57
  autoload :DeserializableCodeRepositoryEvent,
52
- "#{serialization_path}/deserializable_code_repository_event"
58
+ "#{serialization_path}/deserializable_code_repository_event"
53
59
 
54
60
  autoload :DeserializableCodeRepository,
55
61
  "#{serialization_path}/deserializable_code_repository"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Icalia
4
4
  module Event
5
- CORE_VERSION = '0.1.9'
5
+ CORE_VERSION = '0.1.10'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icalia-sdk-event-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Quintanilla
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-21 00:00:00.000000000 Z
11
+ date: 2019-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsonapi-deserializable
@@ -84,6 +84,8 @@ files:
84
84
  - lib/icalia-sdk-event-core/serialization/deserializable_code_issue_occurrence.rb
85
85
  - lib/icalia-sdk-event-core/serialization/deserializable_code_repository.rb
86
86
  - lib/icalia-sdk-event-core/serialization/deserializable_code_repository_event.rb
87
+ - lib/icalia-sdk-event-core/serialization/deserializable_email_account.rb
88
+ - lib/icalia-sdk-event-core/serialization/deserializable_membership.rb
87
89
  - lib/icalia-sdk-event-core/serialization/deserializable_membership_event.rb
88
90
  - lib/icalia-sdk-event-core/serialization/deserializable_oauth_access_token.rb
89
91
  - lib/icalia-sdk-event-core/serialization/deserializable_oauth_access_token_event.rb