tessitura_rest 0.9.1.2 → 1.1.1

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
  SHA256:
3
- metadata.gz: 1539b3e5cf0a01c0c3176ad996ba759d5c4d4118b8804316e11f64f194c947f9
4
- data.tar.gz: 7691109aecb3d23b930be0ba696884b8ceb4987a5b9da6ecabbc684a892128f3
3
+ metadata.gz: 7e9c1cb0fd2da2fc334954e4a28b1a05188a2a0e96eac9e6965d9a54706c927f
4
+ data.tar.gz: db497ddfa592bf06b9519f39dcfa2ec4235bcc507903b8bf12ac76bb9da26ce8
5
5
  SHA512:
6
- metadata.gz: 5f41bd34bfd7d05ef981501ea882970e1b1c0540730f31442186538430d1abca31dacdee2786d4011fd3da501a71c68edc2088573133fc203b8b5219717e3e2c
7
- data.tar.gz: 36ef56980412433946e98d39f5d6dbcd9e834ad91c3989aa5f4b7a192f86cdc7a25d9027aa4339917c1b06098ec282ab10683ea3a6f9027ac1ababf476d74a61
6
+ metadata.gz: d80851535ed5c930f231efa350bafbb97f3ec447c469c9e30b96c1367f34e23f644f6dc1e0ad965072db48a5460ce4f9f208b34010ae9cb8fabca11365153443
7
+ data.tar.gz: 6a0838ac6f0fd0a8b0a86934b2ff97756b709603ae013c647e214f766903e4259730747407d25dd548cb2ba32b63b25bfc395819eba9278cca65d16b65283537
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
@@ -24,6 +24,7 @@ class TessituraRest
24
24
  include Login
25
25
  include Orders
26
26
  include Package
27
+ include Payments
27
28
  include PaymentPlanExtension
28
29
  include PerformanceExtension
29
30
  include PerformancePackageModeOfSales
@@ -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
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = '0.9.1.2'.freeze
2
+ VERSION = '1.1.1'.freeze
3
3
  end
@@ -2,7 +2,7 @@ module Cart
2
2
 
3
3
  def get_cart(session_key, options={})
4
4
  options.merge!(basic_auth: @auth, headers: @headers)
5
- self.class.get(base_api_endpoint("Web/Cart/#{session_key}"), options)
5
+ self.class.get(base_api_endpoint("Web/Cart/#{session_key}?messageTypes=-11"), options)
6
6
  end
7
7
 
8
8
  def get_checkout_complete(session_key, options={})
@@ -15,16 +15,6 @@ module Cart
15
15
  self.class.delete(base_api_endpoint("Web/Cart/#{session_key}"), options)
16
16
  end
17
17
 
18
- def web_cart_text(session_key, options={})
19
- options.merge!(basic_auth: @auth, headers: @headers)
20
- self.class.get(base_api_endpoint("Web/Cart/#{session_key}/Messages?messageTypes=#{ENV['WEB_CART_TEXT']}&savedCart=false"), options)
21
- end
22
-
23
- def order_confirm_text(session_key, options={})
24
- options.merge!(basic_auth: @auth, headers: @headers)
25
- self.class.get(base_api_endpoint("Web/Cart/#{session_key}?messageTypes=#{ENV['ORDER_CONFIRM_TEXT']}&savedCart=true"), options)
26
- end
27
-
28
18
  def change_mode_of_sale(session_key, code, options={})
29
19
  parameters =
30
20
  {
@@ -99,6 +89,17 @@ module Cart
99
89
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/OnAccount"), options)
100
90
  end
101
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
+
102
103
  def remove_on_account(session_key, payment_id, options={})
103
104
  options.merge!(basic_auth: @auth, headers: @headers)
104
105
  self.class.delete(base_api_endpoint("Web/Cart/#{session_key}/OnAccount/#{payment_id}"), options)
@@ -109,26 +110,9 @@ module Cart
109
110
  self.class.get(base_api_endpoint("Web/Cart/#{session_key}/Properties"), options)
110
111
  end
111
112
 
112
- def update_properties(session_key, category=0, solicitor='webapi', channel=0, options={})
113
+ def update_properties(session_key, get_properties_response, options={})
113
114
  options.merge!(basic_auth: @auth, headers: @headers)
114
- parameters =
115
- {
116
- "Solicitor": solicitor,
117
- "ChannelId": channel
118
- }
119
- parameters["CategoryId"] = category if category != 0
120
- options.merge!(:body => parameters)
121
- self.class.put(base_api_endpoint("Web/Cart/#{session_key}/Properties"), options)
122
- end
123
-
124
- def update_source(session_key, source_no, solicitor='webapi', options={})
125
- options.merge!(basic_auth: @auth, headers: @headers)
126
- parameters =
127
- {
128
- "Solicitor": solicitor,
129
- "SourceId": source_no
130
- }
131
- options.merge!(:body => parameters)
115
+ options.merge!(:body => get_properties_response)
132
116
  self.class.put(base_api_endpoint("Web/Cart/#{session_key}/Properties"), options)
133
117
  end
134
118
 
@@ -18,22 +18,22 @@ module Session
18
18
  JSON.parse(response.body)
19
19
  end
20
20
 
21
+ def get_expiration(key, options={})
22
+ options.merge!(basic_auth: @auth, headers: @headers)
23
+ response = self.class.get(base_api_endpoint("Web/Session/#{key}/Expiration"), options)
24
+ JSON.parse(response.body)
25
+ end
26
+
21
27
  def transfer_session(session_key, new_session_key, options={})
22
28
  parameters =
23
- {
24
- 'NewSessionKey': new_session_key,
25
- }
29
+ {
30
+ 'NewSessionKey': new_session_key,
31
+ }
26
32
  options.merge!(basic_auth: @auth, headers: @headers)
27
33
  options.merge!(body: parameters)
28
34
  self.class.post(base_api_endpoint("Web/Session/#{session_key}/Transfer"), options)
29
35
  end
30
36
 
31
- def get_expiration(key, options={})
32
- options.merge!(basic_auth: @auth, headers: @headers)
33
- response = self.class.get(base_api_endpoint("Web/Session/#{key}/Expiration"), options)
34
- JSON.parse(response.body)
35
- end
36
-
37
37
  def get_variables(key, options={})
38
38
  options.merge!(basic_auth: @auth, headers: @headers)
39
39
  response = self.class.get(base_api_endpoint("Web/Session/#{key}/Variables"), 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.9.1.2
4
+ version: 1.1.1
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-06-08 00:00:00.000000000 Z
11
+ date: 2021-08-19 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.0.3
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+).