tessitura_rest 0.8.1 → 0.8.2
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/tessitura_rest/crm/constituencies.rb +44 -1
- data/lib/tessitura_rest/crm/web_logins.rb +23 -0
- 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: 5e9e251334a6a2a5ff55a138575ba4b8d344b7372cc063c6bb7d3502edbca902
|
4
|
+
data.tar.gz: efeaa20c189d02d0e699420e7c15fd095ac24536c4dff4dcfc00eadf21577887
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60aa12cf535e632ae67ef8742c8adb4ef4e2749ae6ddbca4afb20256ae932e65e4cbb6eeb904bd5c14d0a30b270c771f29ef8be8261fc89f235cfd43b3cad403
|
7
|
+
data.tar.gz: 85e76c4e58ff6a32c034722057acb17d9193668b224f5abd01d41f32d46cd5c0dfbe4aa56fbbf57997ecef04090eb3f16cc67155acbb99b56336dd1a67529136
|
@@ -12,6 +12,49 @@ module Constituencies
|
|
12
12
|
JSON.parse(response.body)
|
13
13
|
end
|
14
14
|
|
15
|
+
def create_constituent_by_snapshot(first_name, last_name, email, constituent_type, city, zip, state, street1, country, options={})
|
16
|
+
parameters = {
|
17
|
+
"ConstituentType": {
|
18
|
+
"Id": constituent_type,
|
19
|
+
"Inactive": false,
|
20
|
+
},
|
21
|
+
"DisplayName": "#{first_name} #{last_name}",
|
22
|
+
"FirstName": first_name,
|
23
|
+
"LastName": last_name,
|
24
|
+
"ElectronicAddress": {
|
25
|
+
"Address": email,
|
26
|
+
"ElectronicAddressType": {
|
27
|
+
"Id": 1,
|
28
|
+
},
|
29
|
+
"AllowHtmlFormat": true,
|
30
|
+
"Inactive": false,
|
31
|
+
"AllowMarketing": false,
|
32
|
+
"Months": 'YYYYYYYYYYYY',
|
33
|
+
"PrimaryIndicator": true,
|
34
|
+
},
|
35
|
+
"OriginalSource": {
|
36
|
+
"Id": 3,
|
37
|
+
},
|
38
|
+
"Address": {
|
39
|
+
"AddressType": {
|
40
|
+
"Id": 3,
|
41
|
+
},
|
42
|
+
"City": city,
|
43
|
+
"PostalCode": zip,
|
44
|
+
"State": {
|
45
|
+
"Id": state,
|
46
|
+
},
|
47
|
+
"Street1": street1,
|
48
|
+
"Country": {
|
49
|
+
"Id": country,
|
50
|
+
},
|
51
|
+
}
|
52
|
+
}
|
53
|
+
options.merge!(basic_auth: @auth, headers: @headers)
|
54
|
+
options.merge!(:body => parameters)
|
55
|
+
response = self.class.post(base_api_endpoint('CRM/Constituents/Snapshot'), options)
|
56
|
+
end
|
57
|
+
|
15
58
|
def create_constituencies(constituency, id, options={})
|
16
59
|
parameters =
|
17
60
|
{
|
@@ -26,4 +69,4 @@ module Constituencies
|
|
26
69
|
options.merge!(:body => parameters)
|
27
70
|
response = self.class.post(base_api_endpoint('CRM/Constituencies'), options)
|
28
71
|
end
|
29
|
-
end
|
72
|
+
end
|
@@ -5,4 +5,27 @@ module WebLogins
|
|
5
5
|
response = self.class.get(base_api_endpoint("CRM/WebLogins/Search?emailAddress=#{email}&loginTypeId=#{login_type}"), options)
|
6
6
|
JSON.parse(response.body)
|
7
7
|
end
|
8
|
+
|
9
|
+
def create_web_login(constituent, email_id, email, login_type, primary, temporary, options={})
|
10
|
+
parameters = {
|
11
|
+
'Constituent': {
|
12
|
+
'Id': constituent,
|
13
|
+
},
|
14
|
+
'Email': {
|
15
|
+
'Id': email_id,
|
16
|
+
},
|
17
|
+
'FailedAttempts': 3,
|
18
|
+
'Inactive': false,
|
19
|
+
'Login': email,
|
20
|
+
'LoginType': {
|
21
|
+
'Id': login_type,
|
22
|
+
},
|
23
|
+
'PrimaryIndicator': primary,
|
24
|
+
'TemporaryIndicator': temporary,
|
25
|
+
}
|
26
|
+
options.merge!(basic_auth: @auth, headers: @headers)
|
27
|
+
options.merge!(:body => parameters)
|
28
|
+
self.class.post(base_api_endpoint('CRM/WebLogins'), options)
|
29
|
+
end
|
30
|
+
|
8
31
|
end
|
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.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brittany Martin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|