tessitura_rest 0.8.9 → 0.9.1.3

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: 2cdd0d5adc67f9c68b508adf39b49cec2ec71868eb0ef5633205fadfa8b45262
4
- data.tar.gz: ee02aa086e1e479df36baccc539763c3a69df96f00bd3993141585bd0faf4afa
3
+ metadata.gz: c3100b55b92c58b20a9ae1b1ffc3f597d4726de02f3b5b02ed7ca8cb4d04246b
4
+ data.tar.gz: 19e9edda27905c7c64337f1afa726ebe4e9944c78b778fae3e084792f4bb2434
5
5
  SHA512:
6
- metadata.gz: 9464e333ecfa2ee5cef2107222b4cfdd5c87554212ffc1033879f701791c6b07227de8be355caf6e7833dcd47a526bc20e60923b7a1e576d06b35f4aadcfdf22
7
- data.tar.gz: 59a6b8d9c468050f0d70046fca94d1b2672d7b211251522af3c1a18e2035aed3bdc85858b2c55ba637d21e092d0cbc323fc2d640f263452172d3ec3816ccc558
6
+ metadata.gz: 3780e7bca5e5955fe1ab04ad727ee9f97bc9c142451921e8facf0c283f49bf76f1e570fb51653412f5c5c6ab0ef13a97f658f29106607acb6a8b96932b8aee12
7
+ data.tar.gz: 8bfcd262368963d16ccf66321aa7238a58e60866893eaf6920141259b73c777eb12e1e33c9f277c8b2b367c72a0bd7efcd08ecca44e670e49a5776af04b00851
@@ -69,14 +69,15 @@ module Constituents
69
69
  parameters =
70
70
  {
71
71
  "ConstituentType": {
72
- "Id": current["ConstituentType"]["Id"],
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["OriginalSource"]["Id"],
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["ConstituentType"]["Id"] == 9
103
+ snapshot['ConstituentType']['Id'] == 9
103
104
  end
104
105
 
105
106
  def update_household(params, current, options={})
106
- constituents = current["Affiliates"].map{|c| c["RelatedConstituentId"]}
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["ConstituentType"]["Id"],
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["UpdatedDateTime"],
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["OriginalSource"]["Id"],
130
+ "Id": snapshot['OriginalSource']['Id'],
130
131
  "Inactive": false
131
132
  },
132
133
  }
@@ -6,9 +6,9 @@ module PriceTypes
6
6
  JSON.parse(response.body)
7
7
  end
8
8
 
9
- def get_price_type_details(id, mode_of_sale, options={})
9
+ def get_price_type_details(id, mode_of_sale, source, options={})
10
10
  options.merge!(basic_auth: @auth, headers: @headers)
11
- response = self.class.get(base_api_endpoint("TXN/PriceTypes/Details?performanceIds=#{id}&modeOfSaleId=#{mode_of_sale}"), options)
11
+ response = self.class.get(base_api_endpoint("TXN/PriceTypes/Details?performanceIds=#{id}&modeOfSaleId=#{mode_of_sale}&sourceId=#{source}"), options)
12
12
  JSON.parse(response.body)
13
13
  end
14
14
 
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = '0.8.9'.freeze
2
+ VERSION = '0.9.1.3'.freeze
3
3
  end
@@ -109,15 +109,9 @@ module Cart
109
109
  self.class.get(base_api_endpoint("Web/Cart/#{session_key}/Properties"), options)
110
110
  end
111
111
 
112
- def update_properties(session_key, category=0, solicitor='webapi', channel=0, options={})
112
+ def update_properties(session_key, get_properties_response, options={})
113
113
  options.merge!(basic_auth: @auth, headers: @headers)
114
- parameters =
115
- {
116
- "Solicitor": solicitor,
117
- "ChannelId": channel
118
- }
119
- parameters["CategoryId"] = category if category != 0
120
- options.merge!(:body => parameters)
114
+ options.merge!(:body => get_properties_response)
121
115
  self.class.put(base_api_endpoint("Web/Cart/#{session_key}/Properties"), options)
122
116
  end
123
117
 
@@ -182,9 +176,8 @@ module Cart
182
176
  "ParentPackageLineItemId": parent_package_line_item_id,
183
177
  "Unseated": unseated
184
178
  }
185
-
186
179
  options.merge!(basic_auth: @auth, headers: @headers)
187
- options.merge!(:body => parameters)
180
+ options.merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'})
188
181
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Packages/Fixed"), options)
189
182
  end
190
183
 
@@ -311,7 +304,7 @@ module Cart
311
304
  "AuthorizationCode": order_authorization_code,
312
305
  }
313
306
  options.merge!(basic_auth: @auth, headers: @headers)
314
- options.merge!(:body => parameters)
307
+ options.merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'})
315
308
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Checkout"), options)
316
309
  end
317
310
 
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.9
4
+ version: 0.9.1.3
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-19 00:00:00.000000000 Z
11
+ date: 2021-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  requirements: []
189
- rubygems_version: 3.0.3
189
+ rubygems_version: 3.2.16
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: Rest API Endpoint for the Tessitura Rest API (v14+).