tessitura_rest 1.1.1 → 1.1.5

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: 7e9c1cb0fd2da2fc334954e4a28b1a05188a2a0e96eac9e6965d9a54706c927f
4
- data.tar.gz: db497ddfa592bf06b9519f39dcfa2ec4235bcc507903b8bf12ac76bb9da26ce8
3
+ metadata.gz: 4413b32c8475cd019645654e16cf4411ffcf45a60077a90aed0c4a26bde7433f
4
+ data.tar.gz: 2ff3aae4c6c88153753514e99bbe99861a78b583f2b4eba8b9f392ad52976851
5
5
  SHA512:
6
- metadata.gz: d80851535ed5c930f231efa350bafbb97f3ec447c469c9e30b96c1367f34e23f644f6dc1e0ad965072db48a5460ce4f9f208b34010ae9cb8fabca11365153443
7
- data.tar.gz: 6a0838ac6f0fd0a8b0a86934b2ff97756b709603ae013c647e214f766903e4259730747407d25dd548cb2ba32b63b25bfc395819eba9278cca65d16b65283537
6
+ metadata.gz: b642eb2059d4bf940e5141163d6b9c0c9b27cd49bcaa04161149c69df52626164ecf309acb1dd24794ede75f47dbcc35653c383f8fb1b9c472a46f0e24d82a0b
7
+ data.tar.gz: c7888929ef29af48ea5db109578ab6706d765ebfd73f0fed1f55ae811e37b01dea6dbd0d811cc92447ee9f9bb3da4e3e7c70703795b5f4f7ac7bdb78e92c41bc
@@ -105,6 +105,7 @@ module Constituents
105
105
 
106
106
  def update_household(params, current, options={})
107
107
  constituents = current['Affiliates'].map{|c| c['RelatedConstituentId']}
108
+ update = []
108
109
  constituents.each_with_index do |constituent, i|
109
110
  snapshot = get_constituent_snapshot(constituent)
110
111
  parameters =
@@ -133,8 +134,9 @@ module Constituents
133
134
  }
134
135
  options.merge!(basic_auth: @auth, headers: @headers)
135
136
  options.merge!(:body => parameters)
136
- self.class.put(base_api_endpoint("CRM/Constituents/#{constituent}"), options)
137
+ update << self.class.put(base_api_endpoint("CRM/Constituents/#{constituent}"), options)
137
138
  end
139
+ update.last if update.present?
138
140
  end
139
141
 
140
142
 
@@ -25,35 +25,10 @@ module Phones
25
25
  JSON.parse(response.body)
26
26
  end
27
27
 
28
- def create_secondary_phone(id, phone, options={})
29
- parameters =
30
- {
31
- 'Constituent': {
32
- 'Id': id
33
- },
34
- 'PhoneNumber': phone,
35
- 'PhoneType': {
36
- 'Description': 'Phone 2',
37
- 'Id': 2,
38
- 'Inactive': false
39
- }
40
- }
41
- options.merge!(basic_auth: @auth, headers: @headers)
42
- options.merge!(:body => parameters)
43
- response = self.class.post(base_api_endpoint('CRM/Phones'), options)
44
- JSON.parse(response.body)
45
- end
46
-
47
28
  def update_phone(id, phone, options={})
48
29
  current = get_phone(id)
49
30
  parameters =
50
31
  {
51
- "Address": {
52
- "Id": current["Address"]["Id"],
53
- "AddressType": {
54
- "Id": current["Address"]["AddressType"]["Id"],
55
- }
56
- },
57
32
  "Constituent": {
58
33
  "Id": current["Constituent"]["Id"]
59
34
  },
@@ -1,32 +1,20 @@
1
1
  module LocalProcedure
2
-
3
- def execute_local_procedure(id, params = "", options={})
4
- parameters =
5
- {
6
- 'ProcedureId' => id.to_s,
7
- 'Parameters' => params
8
- }
9
- options.merge!(basic_auth: @auth, headers: @headers)
10
- options.merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'})
11
- self.class.post(base_api_endpoint('Custom/Execute'), options)
12
- end
13
-
14
- def execute_local_procedure_v2(id, params = [], options={})
2
+ def execute_local_procedure_v2(id, params = [], options = {})
15
3
  parameters =
16
4
  {
17
- 'ProcedureId' => id.to_s,
18
- 'ParameterValues' => params
5
+ 'ProcedureId' => id.to_s,
6
+ 'ParameterValues' => params,
19
7
  }
20
8
  options.merge!(basic_auth: @auth, headers: @headers)
21
9
  options.merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'})
22
10
  self.class.post(base_api_endpoint('Custom/Execute'), options)
23
11
  end
24
12
 
25
- def execute_local_procedure_with_multiple_result_sets(id, parameter_values= [], options={})
13
+ def execute_local_procedure_with_multiple_result_sets(id, parameter_values = [], options = {})
26
14
  parameters =
27
15
  {
28
- 'ProcedureId' => id.to_s,
29
- 'ParameterValues' => parameter_values
16
+ 'ProcedureId' => id.to_s,
17
+ 'ParameterValues' => parameter_values,
30
18
  }
31
19
  options.merge!(basic_auth: @auth, headers: @headers)
32
20
  options.merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'})
@@ -24,9 +24,9 @@ module Package
24
24
  JSON.parse(response.body)
25
25
  end
26
26
 
27
- def get_package_prices(id, mode_of_sale, options={})
27
+ def get_package_prices(id, mode_of_sale, source_id, options={})
28
28
  options.merge!(basic_auth: @auth, headers: @headers)
29
- response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/Prices?modeOfSaleId=#{mode_of_sale}"), options)
29
+ response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/Prices?modeOfSaleId=#{mode_of_sale}&sourceId=#{source_id}"), options)
30
30
  JSON.parse(response.body)
31
31
  end
32
32
 
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = '1.1.1'.freeze
2
+ VERSION = '1.1.5'.freeze
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: 1.1.1
4
+ version: 1.1.5
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-08-19 00:00:00.000000000 Z
11
+ date: 2021-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler