tessitura_rest 1.1.5 → 1.1.6
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/phones.rb +23 -18
- 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: b6b2fcc55c832163daaada90d305305c168190bc90d8ff8320b87d16dbf5e3dd
|
4
|
+
data.tar.gz: 54423f5d268a2ca8595288500edfd521c8774826279b0851b1d4331d24932645
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd82b97aec4322cdd20a48f1db2ed9b03611bf175d1ee376c8ab3e0dc050303f950d14d4c3668e3b3e7b67da909196d58588bd30ad2eb6341c1dc2246cf59853
|
7
|
+
data.tar.gz: d2e4457f4fbedcf849b25635df5a91202621c41b25f5f881a6f5e6155be6acca84af4e0118fbc1689d2e33c07d59222c3e01ae6a22ab531102ab47090ae2bec6
|
@@ -6,42 +6,47 @@ module Phones
|
|
6
6
|
JSON.parse(response.body)
|
7
7
|
end
|
8
8
|
|
9
|
-
def create_primary_phone(id, phone, options={})
|
9
|
+
def create_primary_phone(id, phone, options = {})
|
10
10
|
parameters =
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
{
|
12
|
+
'Constituent': {
|
13
|
+
'Id': id,
|
14
|
+
},
|
15
|
+
'PhoneNumber': phone,
|
16
|
+
'PhoneType': {
|
17
|
+
'Description': 'Phone 1',
|
18
|
+
'Id': 1,
|
19
|
+
'Inactive': false,
|
20
|
+
},
|
21
|
+
}
|
22
22
|
options.merge!(basic_auth: @auth, headers: @headers)
|
23
23
|
options.merge!(:body => parameters)
|
24
24
|
response = self.class.post(base_api_endpoint('CRM/Phones'), options)
|
25
25
|
JSON.parse(response.body)
|
26
26
|
end
|
27
27
|
|
28
|
-
def update_phone(id, phone, options={})
|
28
|
+
def update_phone(id, phone, options = {})
|
29
29
|
current = get_phone(id)
|
30
30
|
parameters =
|
31
31
|
{
|
32
|
+
"Address": {
|
33
|
+
"Id": current['Address']['Id'],
|
34
|
+
"AddressType": {
|
35
|
+
"Id": current['Address']['AddressType']['Id'],
|
36
|
+
},
|
37
|
+
},
|
32
38
|
"Constituent": {
|
33
|
-
"Id": current[
|
39
|
+
"Id": current['Constituent']['Id'],
|
34
40
|
},
|
35
41
|
"PhoneType": {
|
36
|
-
"Id": current[
|
42
|
+
"Id": current['PhoneType']['Id'],
|
37
43
|
},
|
38
|
-
"Id": current[
|
44
|
+
"Id": current['Id'],
|
39
45
|
"PhoneNumber": phone,
|
40
|
-
"UpdatedDateTime": current[
|
46
|
+
"UpdatedDateTime": current['UpdatedDateTime'],
|
41
47
|
}
|
42
48
|
options.merge!(basic_auth: @auth, headers: @headers)
|
43
49
|
options.merge!(:body => parameters)
|
44
50
|
self.class.put(base_api_endpoint("CRM/Phones/#{id}"), options)
|
45
51
|
end
|
46
|
-
|
47
52
|
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: 1.1.
|
4
|
+
version: 1.1.6
|
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-12-
|
11
|
+
date: 2021-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|