tessitura_rest 0.2.8 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -3
- data/lib/tessitura_rest.rb +2 -0
- data/lib/tessitura_rest/txn/orders.rb +9 -0
- data/lib/tessitura_rest/txn/package.rb +7 -1
- data/lib/tessitura_rest/txn/production.rb +15 -0
- data/lib/tessitura_rest/version.rb +1 -1
- data/lib/tessitura_rest/web/cart.rb +5 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a39207a1e71b60ae10ece37198a7de404b76674
|
4
|
+
data.tar.gz: 53c4f0d53c6e371099e146e0b0dd1ffc9957bb08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc9224bf30c7f69e429683b1403cd0349a1850f71ddb23b4ee02c394322fab229fa80a0637fedbe6d7917ae21926d23646841b64a6a356ac553cc80793dbb4c8
|
7
|
+
data.tar.gz: 4f57752416ded0657c10c8855c3313d93bee049fbc9ff19ea3722b01149d53156b40ad207655787d794e871e1f98ffd3476b2bb44f184fb786ea6150d96dd243
|
data/README.md
CHANGED
@@ -16,15 +16,15 @@ $ bundle
|
|
16
16
|
```
|
17
17
|
Or install it yourself as:
|
18
18
|
```
|
19
|
-
$ gem install
|
19
|
+
$ gem install tessitura_rest
|
20
20
|
```
|
21
21
|
## Usage
|
22
22
|
|
23
23
|
Create a .env file in the root of your directory. The following fields are required:
|
24
24
|
|
25
25
|
* TESSITURA_URL # the url to your Production TessituraRest REST instance
|
26
|
-
*
|
27
|
-
*
|
26
|
+
* TESSITURA_USERNAME # the username to authenticate to your TessituraRest REST instance
|
27
|
+
* TESSITURA_PASSWORD # the password to authenticate to your TessituraRest REST instance
|
28
28
|
|
29
29
|
To run the gem locally, use:
|
30
30
|
```
|
@@ -58,6 +58,13 @@ followed by the method and arguments you would like to use.
|
|
58
58
|
* ACTION_TYPE # a valid action type that can be attributed to an action on a customer service inquiry
|
59
59
|
* PROMO_CODE # a valid integer tied to an active promotion code
|
60
60
|
* PROMO_CODE_STRING # a valid string tied to an active promotion code
|
61
|
+
* FUND # an active fund to apply money to
|
62
|
+
* FUND2 # another active fund to apply money to
|
63
|
+
* MEMBER # an active membership level
|
64
|
+
* PAYMENT_ID # active payment auth ID
|
65
|
+
* GIFT_CARD_NO # a valid gift certificate number that has been purchased
|
66
|
+
* APPLIED_GC # a valid gift certificate number that can be used to purchase products
|
67
|
+
* RETURN_TICKET_KEY # a logged in session that contains a exchangeable ticket
|
61
68
|
|
62
69
|
To run the tests:
|
63
70
|
```
|
data/lib/tessitura_rest.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
module Package
|
2
2
|
|
3
|
-
def
|
3
|
+
def get_package_by_id(id, options={})
|
4
|
+
options.merge!({:basic_auth => @auth})
|
5
|
+
response = self.class.get(base_api_endpoint("TXN/Packages/#{id}"), options)
|
6
|
+
JSON.parse(response.body)
|
7
|
+
end
|
8
|
+
|
9
|
+
def packages_by_performance_date(start_date=nil, end_date=nil, options={})
|
4
10
|
parameters =
|
5
11
|
{
|
6
12
|
'PerformanceStartDate': start_date,
|
@@ -0,0 +1,15 @@
|
|
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
|
@@ -5,6 +5,11 @@ module Cart
|
|
5
5
|
self.class.get(base_api_endpoint("Web/Cart/#{session_key}"), options)
|
6
6
|
end
|
7
7
|
|
8
|
+
def empty_cart(session_key, options={})
|
9
|
+
options.merge!({:basic_auth => @auth})
|
10
|
+
self.class.delete(base_api_endpoint("Web/Cart/#{session_key}"), options)
|
11
|
+
end
|
12
|
+
|
8
13
|
def web_cart_text(session_key, options={})
|
9
14
|
options.merge!({:basic_auth => @auth})
|
10
15
|
self.class.get(base_api_endpoint("Web/Cart/#{session_key}/Messages?messageTypes=#{ENV['WEB_CART_TEXT']}&savedCart=false"), options)
|
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.
|
4
|
+
version: 0.3.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: 2018-
|
11
|
+
date: 2018-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -140,7 +140,9 @@ files:
|
|
140
140
|
- lib/tessitura_rest/reference_data/countries.rb
|
141
141
|
- lib/tessitura_rest/reference_data/states.rb
|
142
142
|
- lib/tessitura_rest/security/security_user_groups.rb
|
143
|
+
- lib/tessitura_rest/txn/orders.rb
|
143
144
|
- lib/tessitura_rest/txn/package.rb
|
145
|
+
- lib/tessitura_rest/txn/production.rb
|
144
146
|
- lib/tessitura_rest/version.rb
|
145
147
|
- lib/tessitura_rest/web/cart.rb
|
146
148
|
- lib/tessitura_rest/web/login.rb
|