tessitura_rest 0.8.9 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tessitura_rest/crm/constituents.rb +9 -8
- data/lib/tessitura_rest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c238b78fe2ae60a7a0993b7ea8cee6c077cffeba4910bf1c70468266c884dbc
|
4
|
+
data.tar.gz: 03b3164ea44a297c7ddfaf4bcda9186554f26a5269fa5b598bf9b01272d81d01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23e3a270053585df8a542ad05ca62fdb339fea8d49f640dfc69fd12d1ad2e4d1cfc9cc5318b5070ef7009b0de624e2c8ca3cbf59812ff695b28f081c4e806e54
|
7
|
+
data.tar.gz: 3730a55a9c5832150699027560649fd6371824aec14d31dc6438d6d397a736eee2599b819ac49ffc43d2cd25186e86e954f52bbc4dd4638c29d98f598fa0b991
|
@@ -69,14 +69,15 @@ module Constituents
|
|
69
69
|
parameters =
|
70
70
|
{
|
71
71
|
"ConstituentType": {
|
72
|
-
"Id": current[
|
72
|
+
"Id": current['ConstituentType']['Id'],
|
73
73
|
"Inactive": false,
|
74
74
|
},
|
75
75
|
"Id": constituent_id,
|
76
|
+
"UpdatedDateTime": current['UpdatedDateTime'],
|
76
77
|
"FirstName": params[:first_name],
|
77
|
-
"UpdatedDateTime": current["UpdatedDateTime"],
|
78
78
|
"LastName": params[:last_name],
|
79
79
|
"MiddleName": params[:middle_name],
|
80
|
+
"SortName": current['SortName'],
|
80
81
|
"Prefix": {
|
81
82
|
"Id": params[:prefix],
|
82
83
|
"Inactive": false
|
@@ -86,7 +87,7 @@ module Constituents
|
|
86
87
|
"Inactive": false
|
87
88
|
},
|
88
89
|
"OriginalSource": {
|
89
|
-
"Id": current[
|
90
|
+
"Id": current['OriginalSource']['Id'],
|
90
91
|
"Inactive": false
|
91
92
|
},
|
92
93
|
}
|
@@ -99,22 +100,22 @@ module Constituents
|
|
99
100
|
end
|
100
101
|
|
101
102
|
def is_household?(snapshot)
|
102
|
-
snapshot[
|
103
|
+
snapshot['ConstituentType']['Id'] == 9
|
103
104
|
end
|
104
105
|
|
105
106
|
def update_household(params, current, options={})
|
106
|
-
constituents = current[
|
107
|
+
constituents = current['Affiliates'].map{|c| c['RelatedConstituentId']}
|
107
108
|
constituents.each_with_index do |constituent, i|
|
108
109
|
snapshot = get_constituent_snapshot(constituent)
|
109
110
|
parameters =
|
110
111
|
{
|
111
112
|
"ConstituentType": {
|
112
|
-
"Id": snapshot[
|
113
|
+
"Id": snapshot['ConstituentType']['Id'],
|
113
114
|
"Inactive": false,
|
114
115
|
},
|
115
116
|
"Id": constituent,
|
116
117
|
"FirstName": i == 0 ? params[:first_name] : params[:first_name_2],
|
117
|
-
"UpdatedDateTime": snapshot[
|
118
|
+
"UpdatedDateTime": snapshot['UpdatedDateTime'],
|
118
119
|
"LastName": i == 0 ? params[:last_name] : params[:last_name_2],
|
119
120
|
"MiddleName": i == 0 ? params[:middle_name] : params[:middle_name_2],
|
120
121
|
"Prefix": {
|
@@ -126,7 +127,7 @@ module Constituents
|
|
126
127
|
"Inactive": false
|
127
128
|
},
|
128
129
|
"OriginalSource": {
|
129
|
-
"Id": snapshot[
|
130
|
+
"Id": snapshot['OriginalSource']['Id'],
|
130
131
|
"Inactive": false
|
131
132
|
},
|
132
133
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tessitura_rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brittany Martin, Danielle Greaves, Craig Donavin, Patrick FitzGerald
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|