tessitura_rest 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/tessitura_rest/version.rb +1 -1
- data/lib/tessitura_rest/web/cart.rb +12 -4
- data/lib/tessitura_rest/web/session.rb +20 -4
- data/tessitura_rest.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83db577e34c3d823d26079b995c9ba2cb9fcf0a7
|
4
|
+
data.tar.gz: d62c657920e2470e7011cd99983fb2a66e3633ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
```
|
@@ -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
|
-
|
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
|
-
|
12
|
-
|
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
|
3
|
+
def get_session(key, options={})
|
4
4
|
options.merge!({:basic_auth => @auth})
|
5
|
-
response = self.class.get(base_api_endpoint("Web/Session
|
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
|
9
|
+
def get_promotion(key, code, options={})
|
10
|
+
parameters =
|
11
|
+
{
|
12
|
+
'PromoCode': code
|
13
|
+
}
|
10
14
|
options.merge!({:basic_auth => @auth})
|
11
|
-
|
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
|
data/tessitura_rest.gemspec
CHANGED
@@ -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
|
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.
|
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
|
+
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
|
167
|
+
summary: Rest API Endpoint for the Tessitura Rest API (v14+).
|
168
168
|
test_files: []
|