tessitura_rest 0.6.5 → 0.7.0

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: a023d5ffda909d256038eaec120622c7548a7698fc177d7559593f0917399892
4
- data.tar.gz: cd8dbcca2fcb9aa141fd9b08f50025b59710f3454b24314a66f54a4fb19de31d
3
+ metadata.gz: b936217b9709986f15f4d3c011c3bcf5eb2d400cf1e1e48a1e8db60cb83394c9
4
+ data.tar.gz: 3d41ace43e7148cadcdd47625e7e48cc9ae8113b3ac4ac73a3197807f2f5432b
5
5
  SHA512:
6
- metadata.gz: '0639c520220dc10df9544e3e2608d53f658789878fef410e12615180b5ff958d7d9f151816a88adeedfbbd6ca11880938984c1d36b6513b6e952941a0f02d4dd'
7
- data.tar.gz: 278a710df57ed289bd45789fe88decdc20f47ed79219c38f8d3dfb87b61b683d3cea4d6eb9dc730fa372b2e9474c316601975f6c7fc648228e2d6c413c0d950b
6
+ metadata.gz: 8b3d30873e149a738cd5ad05019029da6f0b79983d7b2278248cdfe2db5b06e12fcc55b6229450ccdde4c0116b1f340459db1d53ab90db20778d2cf6c833e7dd
7
+ data.tar.gz: 7dcc362adb6eb5786a5168e67d48c19409069484b5c809ca23e5aee61c32319f1b4dc6ef007205ca3f319e6449cbe65d5907fa97552aa81a62a24e1276fe90da
@@ -34,6 +34,7 @@ class TessituraRest
34
34
  include Session
35
35
  include SecurityUserGroups
36
36
  include States
37
+ include SubLineItems
37
38
  include WebContents
38
39
  include WebLogins
39
40
 
@@ -14,4 +14,17 @@ module Email
14
14
  post = self.class.post(base_api_endpoint("Emails/LoginCredentials/#{login_id.first['Id']}/Send"), options)
15
15
  post.success?
16
16
  end
17
+
18
+ def send_order_confirmation(template_id, email, profile_id, order_id, params = '', options={})
19
+ parameters =
20
+ {
21
+ 'TemplateId': template_id,
22
+ 'EmailAddress': email,
23
+ 'EmailProfileId': profile_id
24
+ }
25
+ options.merge!(basic_auth: @auth, headers: @headers)
26
+ options.merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'})
27
+ post = self.class.post(base_api_endpoint("Emails/OrderConfirmation/#{order_id}/Send"), options)
28
+ post.success?
29
+ end
17
30
  end
@@ -1,9 +1,10 @@
1
1
  module PerformanceExtension
2
2
 
3
- def get_performances_by_production(ids, options={})
3
+ def get_performances_by_production(ids, mode_of_sale=nil, options={})
4
4
  parameters =
5
5
  {
6
- 'ProductionSeasonIds': ids
6
+ 'ProductionSeasonIds': ids,
7
+ 'ModeOfSaleId': mode_of_sale
7
8
  }
8
9
  options.merge!(basic_auth: @auth, headers: @headers)
9
10
  options.merge!(:body => parameters)
@@ -0,0 +1,9 @@
1
+ module SubLineItems
2
+
3
+ def get_return_tickets(constituent_id, status_id, performance_start_date, performance_end_date, order_id, options={})
4
+ options.merge!(basic_auth: @auth, headers: @headers)
5
+ response = self.class.get(base_api_endpoint("TXN/SubLineItems?constituentId=#{constituent_id}&orderId=#{order_id}&subLineItemStatusIds=#{status_id}&performanceStartDate=#{performance_start_date}&performanceEndDate=#{performance_end_date}"), options)
6
+ JSON.parse(response.body)
7
+ end
8
+
9
+ end
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = '0.6.5'
2
+ VERSION = '0.7.0'
3
3
  end
@@ -278,4 +278,16 @@ module Cart
278
278
  options.merge!(:body => parameters)
279
279
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Validate"), options)
280
280
  end
281
+
282
+ def update_cart_properties_custom_data(session_key, index, value, options={})
283
+ parameters =
284
+ {
285
+ "Index": index,
286
+ "Value": value
287
+ }
288
+ options.merge!(basic_auth: @auth, headers: @headers)
289
+ options.merge!(:body => parameters)
290
+ put = self.class.put(base_api_endpoint("Web/Cart/#{session_key}/CustomData/#{index}"), options)
291
+ put.success?
292
+ end
281
293
  end
@@ -24,6 +24,12 @@ module Session
24
24
  JSON.parse(response.body)
25
25
  end
26
26
 
27
+ def get_variables(key, options={})
28
+ options.merge!(basic_auth: @auth, headers: @headers)
29
+ response = self.class.get(base_api_endpoint("Web/Session/#{key}/Variables"), options)
30
+ JSON.parse(response.body)
31
+ end
32
+
27
33
  def set_expiration(key, timeoffset, expiration, options={})
28
34
  parameters =
29
35
  {
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.6.5
4
+ version: 0.7.0
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-03-30 00:00:00.000000000 Z
11
+ date: 2020-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -154,6 +154,7 @@ files:
154
154
  - lib/tessitura_rest/txn/product_keywords.rb
155
155
  - lib/tessitura_rest/txn/production_extension.rb
156
156
  - lib/tessitura_rest/txn/production_season.rb
157
+ - lib/tessitura_rest/txn/sub_line_items.rb
157
158
  - lib/tessitura_rest/txn/web_contents.rb
158
159
  - lib/tessitura_rest/version.rb
159
160
  - lib/tessitura_rest/web/cart.rb