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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 855f571dcb5cc93d9df4dede2da070cd50325a78
4
- data.tar.gz: 6f5752a89a65548fc3cbb4a62d94ffab2cee0f26
3
+ metadata.gz: 6a39207a1e71b60ae10ece37198a7de404b76674
4
+ data.tar.gz: 53c4f0d53c6e371099e146e0b0dd1ffc9957bb08
5
5
  SHA512:
6
- metadata.gz: 6d1c00b945edb9d0d18e1164f4dba47a621049c52b177cfd2d1591cb11b1b2bf1b5e43d17ffc2c0aeadd426f6e1ff4004c650ac487c20b65857ebe671e377694
7
- data.tar.gz: a20afb3cf6ce9d4b70929619581a9d8048721f023579401a3e85061fa2f0ad517ca02c5a31a69cb01fa6504531ec10586c5f9f78d4cb5a1e28695396693cd1b7
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 tessitura
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
- * USERNAME # the username to authenticate to your TessituraRest REST instance
27
- * PASSWORD # the password to authenticate to your TessituraRest REST instance
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
  ```
@@ -17,7 +17,9 @@ class TessituraRest
17
17
  include GiftCertificates
18
18
  include Issues
19
19
  include LocalProcedure
20
+ include Orders
20
21
  include Package
22
+ include Production
21
23
  include Session
22
24
  include SecurityUserGroups
23
25
  include States
@@ -0,0 +1,9 @@
1
+ module Orders
2
+
3
+ def get_products_view(id, options={})
4
+ options.merge!({:basic_auth => @auth})
5
+ response = self.class.get(base_api_endpoint("TXN/Orders/#{id}/ProductsView"), options)
6
+ JSON.parse(response.body)
7
+ end
8
+
9
+ end
@@ -1,6 +1,12 @@
1
1
  module Package
2
2
 
3
- def search_by_performance_date(start_date=nil, end_date=nil, options={})
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
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = "0.2.8"
2
+ VERSION = "0.3.0"
3
3
  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.2.8
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-06-12 00:00:00.000000000 Z
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