tessitura_rest 1.0.0 → 1.1.0
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 +4 -4
- data/README.md +0 -1
- data/lib/tessitura_rest.rb +1 -0
- data/lib/tessitura_rest/txn/payments.rb +7 -0
- data/lib/tessitura_rest/version.rb +1 -1
- data/lib/tessitura_rest/web/cart.rb +11 -5
- data/lib/tessitura_rest/web/session.rb +0 -10
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 756f139c6c04605bc3d6d3c7fecc06c9d94e4031ff78e063b99fcb603a8a55b5
|
4
|
+
data.tar.gz: 2094ec104b796bab763a1e59842a56b23cdb63d80eaeb884854e8357a868f22b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b612ffcedc87093f5814596d30d7f81e709a0bcbf6dd2bb57812453f61a17f7487768fd761efaba9b983b1d1baa95131b1ec6da8bac3a26c0ed43d2bce0d6dcb
|
7
|
+
data.tar.gz: 2e0cfa715990553519e21a9493cfba05f437fe54204db64f7e7700563bbebb86e0b2f9cc8351923e174868926b709706d0fc0794b7e9e01965fe4c6ba843893a
|
data/README.md
CHANGED
@@ -46,7 +46,6 @@ followed by the method and arguments you would like to use.
|
|
46
46
|
* USERNAME # the username to authenticate to your TessituraRest REST instance
|
47
47
|
* PASSWORD # the password to authenticate to your TessituraRest REST instance
|
48
48
|
* WEB_CART_TEXT # the ID to the pricing rule you have setup for Cart
|
49
|
-
* ORDER_CONFIRM_TEXT # the ID to the pricing rule you have setup for Order Confirmations
|
50
49
|
* SESSION_KEY # an existing session key in your TessituraRest instance
|
51
50
|
* EMAIL # an email tied to an existing web login in your TessituraRest instance
|
52
51
|
* CONSTITUENT_ID # an active constituent in your TessituraRest instance
|
data/lib/tessitura_rest.rb
CHANGED
@@ -0,0 +1,7 @@
|
|
1
|
+
module Payments
|
2
|
+
def get_on_account_balance(current_user, payment_method_id, options={})
|
3
|
+
options.merge!(basic_auth: @auth, headers: @headers)
|
4
|
+
response = self.class.get(base_api_endpoint("TXN/Payments/OnAccount?constituentId=#{current_user}&paymentMethodId=#{payment_method_id}"), options)
|
5
|
+
JSON.parse(response.body)
|
6
|
+
end
|
7
|
+
end
|
@@ -14,11 +14,6 @@ module Cart
|
|
14
14
|
options.merge!(basic_auth: @auth, headers: @headers)
|
15
15
|
self.class.delete(base_api_endpoint("Web/Cart/#{session_key}"), options)
|
16
16
|
end
|
17
|
-
|
18
|
-
def order_confirm_text(session_key, options={})
|
19
|
-
options.merge!(basic_auth: @auth, headers: @headers)
|
20
|
-
self.class.get(base_api_endpoint("Web/Cart/#{session_key}?messageTypes=#{ENV['ORDER_CONFIRM_TEXT']}&savedCart=true"), options)
|
21
|
-
end
|
22
17
|
|
23
18
|
def change_mode_of_sale(session_key, code, options={})
|
24
19
|
parameters =
|
@@ -94,6 +89,17 @@ module Cart
|
|
94
89
|
self.class.post(base_api_endpoint("Web/Cart/#{session_key}/OnAccount"), options)
|
95
90
|
end
|
96
91
|
|
92
|
+
def apply_on_account(session_key, amount, payment_method_id, options={})
|
93
|
+
parameters =
|
94
|
+
{
|
95
|
+
'Amount': amount,
|
96
|
+
"PaymentMethodId": payment_method_id
|
97
|
+
}
|
98
|
+
options.merge!(basic_auth: @auth, headers: @headers)
|
99
|
+
options.merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'})
|
100
|
+
self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Payments/OnAccount"), options)
|
101
|
+
end
|
102
|
+
|
97
103
|
def remove_on_account(session_key, payment_id, options={})
|
98
104
|
options.merge!(basic_auth: @auth, headers: @headers)
|
99
105
|
self.class.delete(base_api_endpoint("Web/Cart/#{session_key}/OnAccount/#{payment_id}"), options)
|
@@ -18,16 +18,6 @@ module Session
|
|
18
18
|
JSON.parse(response.body)
|
19
19
|
end
|
20
20
|
|
21
|
-
def transfer_session(session_key, new_session_key, options={})
|
22
|
-
parameters =
|
23
|
-
{
|
24
|
-
'NewSessionKey': new_session_key,
|
25
|
-
}
|
26
|
-
options.merge!(basic_auth: @auth, headers: @headers)
|
27
|
-
options.merge!(body: parameters)
|
28
|
-
self.class.post(base_api_endpoint("Web/Session/#{session_key}/Transfer"), options)
|
29
|
-
end
|
30
|
-
|
31
21
|
def get_expiration(key, options={})
|
32
22
|
options.merge!(basic_auth: @auth, headers: @headers)
|
33
23
|
response = self.class.get(base_api_endpoint("Web/Session/#{key}/Expiration"), 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: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brittany Martin, Danielle Greaves, Craig Donavin, Patrick FitzGerald
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -152,6 +152,7 @@ files:
|
|
152
152
|
- lib/tessitura_rest/security/security_user_groups.rb
|
153
153
|
- lib/tessitura_rest/txn/orders.rb
|
154
154
|
- lib/tessitura_rest/txn/package.rb
|
155
|
+
- lib/tessitura_rest/txn/payments.rb
|
155
156
|
- lib/tessitura_rest/txn/performance_extension.rb
|
156
157
|
- lib/tessitura_rest/txn/performance_package_mode_of_sales.rb
|
157
158
|
- lib/tessitura_rest/txn/price_types.rb
|
@@ -186,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
187
|
- !ruby/object:Gem::Version
|
187
188
|
version: '0'
|
188
189
|
requirements: []
|
189
|
-
rubygems_version: 3.2.
|
190
|
+
rubygems_version: 3.2.15
|
190
191
|
signing_key:
|
191
192
|
specification_version: 4
|
192
193
|
summary: Rest API Endpoint for the Tessitura Rest API (v14+).
|