tessitura_rest 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: e72ad521fd865e86e07f2048a129be9ca0f9ef99
4
- data.tar.gz: 3a5c9c303c2432f09227a112c439930b91dcdf1c
3
+ metadata.gz: 83db577e34c3d823d26079b995c9ba2cb9fcf0a7
4
+ data.tar.gz: d62c657920e2470e7011cd99983fb2a66e3633ba
5
5
  SHA512:
6
- metadata.gz: 772cddc0b6203755c5fc2eb25b20eaaa99d8c47def731bff6076bf8b47da162b79f5ad4811fbd4e2c6cca85202efdccab97026e3388deea6f358d0cc4dc3b73f
7
- data.tar.gz: 63592a4136ab350c21e46dbf20ea341507a0b0117d43b880713c0b9cfa7565a1d96708d3919ecc328627655aa15baa742d40347bb86ef9c024bfa98138e6091f
6
+ metadata.gz: a53fb92237daf14a0845603adbe16b94feb648a02295b4eacfce0ea5d7bef84a99087b5f24c10dc488d7f701bedb5e75547c1e5f1c5c8d8495967767cfeb646e
7
+ data.tar.gz: 1b5fd0a301fcf2939b8cca5d2661a0733a9ef708f081b5d38f7e973ac60db28d08e763972f29633f9741d58fceb9f1002980eb1706aeb76ad37391b6db7ea268
data/README.md CHANGED
@@ -56,6 +56,8 @@ followed by the method and arguments you would like to use.
56
56
  * PATRON_ID # the patron ID of a user whom submits CSIs
57
57
  * ACTION_ID # the id of an action made against a customer service inquiry in your TessituraRest instance
58
58
  * ACTION_TYPE # a valid action type that can be attributed to an action on a customer service inquiry
59
+ * PROMO_CODE # a valid integer tied to an active promotion code
60
+ * PROMO_CODE_STRING # a valid string tied to an active promotion code
59
61
 
60
62
  To run the tests:
61
63
  ```
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -2,13 +2,21 @@ module Cart
2
2
 
3
3
  def web_cart_text(session_key, options={})
4
4
  options.merge!({:basic_auth => @auth})
5
- response = self.class.get(base_api_endpoint("Web/Cart/#{session_key}/Messages?messageTypes=#{ENV['WEB_CART_TEXT']}&savedCart=false"), options)
6
- JSON.parse(response.body).first["Message"]
5
+ self.class.get(base_api_endpoint("Web/Cart/#{session_key}/Messages?messageTypes=#{ENV['WEB_CART_TEXT']}&savedCart=false"), options)
7
6
  end
8
7
 
9
8
  def order_confirm_text(session_key, options={})
10
9
  options.merge!({:basic_auth => @auth})
11
- response = self.class.get(base_api_endpoint("Web/Cart/#{session_key}?messageTypes=#{ENV['ORDER_CONFIRM_TEXT']}&savedCart=true"), options)
12
- !response["Message"].nil? ? JSON.parse(response.body).first["Message"] : ""
10
+ self.class.get(base_api_endpoint("Web/Cart/#{session_key}?messageTypes=#{ENV['ORDER_CONFIRM_TEXT']}&savedCart=true"), options)
11
+ end
12
+
13
+ def change_mode_of_sale(session_key, code, options={})
14
+ parameters =
15
+ {
16
+ 'ModeOfSaleId': code
17
+ }
18
+ options.merge!({:basic_auth => @auth})
19
+ options.merge!(:body => parameters)
20
+ self.class.put(base_api_endpoint("Web/Cart/#{session_key}/Properties"), options)
13
21
  end
14
22
  end
@@ -1,14 +1,30 @@
1
1
  module Session
2
2
 
3
- def create(ip_address, business_unit_id, options={})
3
+ def get_session(key, options={})
4
4
  options.merge!({:basic_auth => @auth})
5
- response = self.class.get(base_api_endpoint("Web/Session/"), options)
5
+ response = self.class.get(base_api_endpoint("Web/Session/#{key}"), options)
6
6
  JSON.parse(response.body)
7
7
  end
8
8
 
9
- def shipping_methods(key, options={})
9
+ def get_promotion(key, code, options={})
10
+ parameters =
11
+ {
12
+ 'PromoCode': code
13
+ }
10
14
  options.merge!({:basic_auth => @auth})
11
- response = self.class.get(base_api_endpoint("Web/Session/Shippingmethods/#{key}"), options)
15
+ options.merge!(:body => parameters)
16
+ response = self.class.post(base_api_endpoint("Web/Session/#{key}/PromoCode"), options)
17
+ JSON.parse(response.body)
18
+ end
19
+
20
+ def get_promotion_code(key, code, options={})
21
+ parameters =
22
+ {
23
+ 'PromoCodeString': code
24
+ }
25
+ options.merge!({:basic_auth => @auth})
26
+ options.merge!(:body => parameters)
27
+ response = self.class.post(base_api_endpoint("Web/Session/#{key}/PromoCode"), options)
12
28
  JSON.parse(response.body)
13
29
  end
14
30
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Brittany Martin"]
10
10
  spec.email = ["martin@trustarts.org"]
11
11
 
12
- spec.summary = "Rest API Endpoint for TessituraRest"
12
+ spec.summary = "Rest API Endpoint for the Tessitura Rest API (v14+)."
13
13
  spec.description = "TessituraRest is an enterprise-wide, fully integrated software system for arts & cultural organizations."
14
14
  spec.homepage = "https://github.com/pgharts/tessitura"
15
15
  spec.license = "MIT"
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.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brittany Martin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-06 00:00:00.000000000 Z
11
+ date: 2017-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -164,5 +164,5 @@ rubyforge_project:
164
164
  rubygems_version: 2.6.13
165
165
  signing_key:
166
166
  specification_version: 4
167
- summary: Rest API Endpoint for TessituraRest
167
+ summary: Rest API Endpoint for the Tessitura Rest API (v14+).
168
168
  test_files: []