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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a7e221c3479bb06ea467f5ff8b6a4bc4414157116ae4d361bbeedd34e069313
4
- data.tar.gz: 39ae040d981bfdafd8d229ee8e91a6fc22d6f88ca7476fa23d53fa7a967a2fba
3
+ metadata.gz: 5e9e251334a6a2a5ff55a138575ba4b8d344b7372cc063c6bb7d3502edbca902
4
+ data.tar.gz: efeaa20c189d02d0e699420e7c15fd095ac24536c4dff4dcfc00eadf21577887
5
5
  SHA512:
6
- metadata.gz: 271151ecb6c19230ee6f8812af937c3f2a10ce6d026e2db807e11d1f54e9cfa542aad930a4cdd6fc3b144f5e61d8c7cc4183067bf7076bc94849ddc36cb00c6d
7
- data.tar.gz: d09ceb5abf1f4e70fc1594286dea50fb1305e04ab1b9db099e358716ba3d38b4eadd0120807cb55ef2bd78cd94208006f3a44394dd2738552ce777a81dff0560
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
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = '0.8.1'
2
+ VERSION = '0.8.2'
3
3
  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.1
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-04 00:00:00.000000000 Z
11
+ date: 2020-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler