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 +4 -4
- data/lib/tessitura_rest.rb +6 -1
- data/lib/tessitura_rest/txn/package.rb +18 -0
- data/lib/tessitura_rest/txn/performance_extension.rb +25 -0
- data/lib/tessitura_rest/txn/price_types.rb +9 -0
- data/lib/tessitura_rest/txn/product_keywords.rb +9 -0
- data/lib/tessitura_rest/txn/production_extension.rb +14 -0
- data/lib/tessitura_rest/txn/production_season.rb +20 -0
- data/lib/tessitura_rest/txn/web_contents.rb +9 -0
- data/lib/tessitura_rest/version.rb +1 -1
- data/lib/tessitura_rest/web/login.rb +14 -0
- metadata +8 -3
- data/lib/tessitura_rest/txn/production.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7d151bbeb3cc3751855e28fb3fca6ddbaa62541
|
4
|
+
data.tar.gz: 17c07c9f298ca4ef116bdf07f1c9249a43e41b24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95be4436370fc6141d7c51c04b86a4b22d3c0eff39d943e1fee4e7e76d53be5087615a46ea98265b2327786392ae14e0876c8e435612f2687a60d700a2aa30da
|
7
|
+
data.tar.gz: 212b3ee054512d73de022480142367a1e240c9468731e92cd1d4fe94caa75437e17940698ec3043a879b3394090cc5e320d84ba2cc4f7b829504612b81f2c41a
|
data/lib/tessitura_rest.rb
CHANGED
@@ -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
|
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}§ionIds=#{sections_ids}"), options)
|
22
|
+
JSON.parse(response.body)
|
23
|
+
end
|
24
|
+
|
25
|
+
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
|
@@ -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
|
+
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:
|
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/
|
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
|