tessitura_rest 0.3.4 → 0.3.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
  SHA1:
3
- metadata.gz: bf14389b3884d901fa26cf21b6080c1823b7099e
4
- data.tar.gz: d30af96d1eaff649a7f1d77ae79a27723aa9e650
3
+ metadata.gz: a7d151bbeb3cc3751855e28fb3fca6ddbaa62541
4
+ data.tar.gz: 17c07c9f298ca4ef116bdf07f1c9249a43e41b24
5
5
  SHA512:
6
- metadata.gz: f0d4c7ff4122a4791822fabc2f490f90f33902959d037b999bd54a2b5636b50c136909d0d06dcb82e1d5c7d2e7c4d613fc32f84d0d62a917025152bd3906a559
7
- data.tar.gz: d38020b12d1a9f0bb0cab06e737af8ce32b685c0b5e2b5cc2d38f019510b5cafe14b4ed863da849546c9c0c6f4bfbda542c661dcbeca1178f437c1d51ccbeb31
6
+ metadata.gz: 95be4436370fc6141d7c51c04b86a4b22d3c0eff39d943e1fee4e7e76d53be5087615a46ea98265b2327786392ae14e0876c8e435612f2687a60d700a2aa30da
7
+ data.tar.gz: 212b3ee054512d73de022480142367a1e240c9468731e92cd1d4fe94caa75437e17940698ec3043a879b3394090cc5e320d84ba2cc4f7b829504612b81f2c41a
@@ -21,11 +21,16 @@ class TessituraRest
21
21
  include Login
22
22
  include Orders
23
23
  include Package
24
+ include PerformanceExtension
24
25
  include Phones
25
- include Production
26
+ include PriceTypes
27
+ include ProductionExtension
28
+ include ProductKeywords
29
+ include ProductionSeason
26
30
  include Session
27
31
  include SecurityUserGroups
28
32
  include States
33
+ include WebContents
29
34
  include WebLogins
30
35
 
31
36
  def initialize(options={})
@@ -17,4 +17,22 @@ module Package
17
17
  response = self.class.post(base_api_endpoint('TXN/Packages/Search'), options)
18
18
 
19
19
  end
20
+
21
+ def get_package_detail(id, mode_of_sale, options={})
22
+ options.merge!({:basic_auth => @auth})
23
+ response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/Details?modeOfSaleId=#{mode_of_sale}"), options)
24
+ JSON.parse(response.body)
25
+ end
26
+
27
+ def get_package_prices(id, mode_of_sale, options={})
28
+ options.merge!({:basic_auth => @auth})
29
+ response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/Prices?modeOfSaleId=#{mode_of_sale}"), options)
30
+ JSON.parse(response.body)
31
+ end
32
+
33
+ def get_package_performance_groups(id, mode_of_sale=nil, options={})
34
+ options.merge!({:basic_auth => @auth})
35
+ response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/PerformanceGroups?modeOfSaleId=#{mode_of_sale}"), options)
36
+ JSON.parse(response.body)
37
+ end
20
38
  end
@@ -0,0 +1,25 @@
1
+ module PerformanceExtension
2
+
3
+ def get_performances_by_production(ids, options={})
4
+ parameters =
5
+ {
6
+ 'ProductionSeasonIds': ids
7
+ }
8
+ options.merge!({:basic_auth => @auth})
9
+ options.merge!(:body => parameters)
10
+ response = self.class.post(base_api_endpoint('TXN/Performances/Search'), options)
11
+ end
12
+
13
+ def get_performance_detail(id, options={})
14
+ options.merge!({:basic_auth => @auth})
15
+ response = self.class.get(base_api_endpoint("TXN/Performances?performanceIds=#{id}"), options)
16
+ JSON.parse(response.body)
17
+ end
18
+
19
+ def get_performance_availability(ids, sections_ids=nil, options={})
20
+ options.merge!({:basic_auth => @auth})
21
+ response = self.class.get(base_api_endpoint("TXN/Performances/Zones?performanceIds=#{ids}&sectionIds=#{sections_ids}"), options)
22
+ JSON.parse(response.body)
23
+ end
24
+
25
+ end
@@ -0,0 +1,9 @@
1
+ module PriceTypes
2
+
3
+ def get_price_type(id, options={})
4
+ options.merge!({:basic_auth => @auth})
5
+ response = self.class.get(base_api_endpoint("TXN/PriceTypes/#{id}"), options)
6
+ JSON.parse(response.body)
7
+ end
8
+
9
+ end
@@ -0,0 +1,9 @@
1
+ module ProductKeywords
2
+
3
+ def get_keywords(ids, options={})
4
+ options.merge!({:basic_auth => @auth})
5
+ response = self.class.get(base_api_endpoint("TXN/ProductKeywords?productionElementIds=#{ids}"), options)
6
+ JSON.parse(response.body)
7
+ end
8
+
9
+ end
@@ -0,0 +1,14 @@
1
+ module ProductionExtension
2
+
3
+ def get_production(id, options={})
4
+ options.merge!({:basic_auth => @auth})
5
+ response = self.class.get(base_api_endpoint("TXN/Productions/#{id}"), options)
6
+ JSON.parse(response.body)
7
+ end
8
+
9
+ def get_production_details(id, options={})
10
+ options.merge!({:basic_auth => @auth})
11
+ response = self.class.get(base_api_endpoint("TXN/Productions/#{id}"), options)
12
+ JSON.parse(response.body)
13
+ end
14
+ end
@@ -0,0 +1,20 @@
1
+ module ProductionSeason
2
+
3
+ def get_production_season(id, options={})
4
+ options.merge!({:basic_auth => @auth})
5
+ response = self.class.get(base_api_endpoint("TXN/ProductionSeasons/#{id}"), options)
6
+ JSON.parse(response.body)
7
+ end
8
+
9
+ def productions_by_performance_date(start_date=nil, end_date=nil, options={})
10
+ parameters =
11
+ {
12
+ 'PerformanceStartDate': start_date,
13
+ 'PerformanceEndDate': end_date
14
+ }
15
+ options.merge!({:basic_auth => @auth})
16
+ options.merge!(:body => parameters)
17
+ response = self.class.post(base_api_endpoint('TXN/ProductionSeasons/Search'), options)
18
+ end
19
+
20
+ end
@@ -0,0 +1,9 @@
1
+ module WebContents
2
+
3
+ def get_web_contents(production_ids=nil, package_ids=nil, content_type_ids=nil, options={})
4
+ options.merge!({:basic_auth => @auth})
5
+ response = self.class.get(base_api_endpoint("TXN/WebContents?productionElementIds=#{production_ids}&packageIds=#{package_ids}&contentTypeIds=#{content_type_ids}"), options)
6
+ JSON.parse(response.body)
7
+ end
8
+
9
+ end
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
@@ -18,4 +18,18 @@ module Login
18
18
  post = self.class.post(base_api_endpoint("Web/Session/#{session_key}/Login/External"), options)
19
19
  post.success?
20
20
  end
21
+
22
+ def login_with_token(email, login_type_id, token, promotion, session_key, options={})
23
+ parameters =
24
+ {
25
+ 'EmailAddress': email,
26
+ 'ForgotLoginToken': token,
27
+ 'LoginTypeId': login_type_id,
28
+ 'PromotionCode': promotion
29
+ }
30
+ options.merge!({:basic_auth => @auth})
31
+ options.merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'})
32
+ post = self.class.post(base_api_endpoint("Web/Session/#{session_key}/Login/Token"), options)
33
+ post.success?
34
+ end
21
35
  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.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brittany Martin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-10 00:00:00.000000000 Z
11
+ date: 2019-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -144,7 +144,12 @@ files:
144
144
  - lib/tessitura_rest/security/security_user_groups.rb
145
145
  - lib/tessitura_rest/txn/orders.rb
146
146
  - lib/tessitura_rest/txn/package.rb
147
- - lib/tessitura_rest/txn/production.rb
147
+ - lib/tessitura_rest/txn/performance_extension.rb
148
+ - lib/tessitura_rest/txn/price_types.rb
149
+ - lib/tessitura_rest/txn/product_keywords.rb
150
+ - lib/tessitura_rest/txn/production_extension.rb
151
+ - lib/tessitura_rest/txn/production_season.rb
152
+ - lib/tessitura_rest/txn/web_contents.rb
148
153
  - lib/tessitura_rest/version.rb
149
154
  - lib/tessitura_rest/web/cart.rb
150
155
  - lib/tessitura_rest/web/login.rb
@@ -1,15 +0,0 @@
1
- module Production
2
-
3
- def productions_by_performance_date(mode_of_sale, start_date=nil, end_date=nil, options={})
4
- parameters =
5
- {
6
- 'PerformanceStartDate': start_date,
7
- 'PerformanceEndDate': end_date,
8
- 'ModeOfSaleId': mode_of_sale
9
- }
10
- options.merge!({:basic_auth => @auth})
11
- options.merge!(:body => parameters)
12
- response = self.class.post(base_api_endpoint('TXN/ProductionSeasons/Search'), options)
13
- JSON.parse(response.body)
14
- end
15
- end