lib/tessitura_rest/web/session.rb in tessitura_rest-0.7.4 vs lib/tessitura_rest/web/session.rb in tessitura_rest-0.7.5
- old
+ new
@@ -6,17 +6,27 @@
JSON.parse(response.body)
end
def create_session(ip, options={})
parameters =
- {
- 'IpAddress': ip,
- 'Organization': 'Tessitura Web'
- }
+ {
+ 'IpAddress': ip,
+ 'Organization': 'Tessitura Web'
+ }
options.merge!(basic_auth: @auth, headers: @headers)
options.merge!(body: parameters)
response = self.class.post(base_api_endpoint('Web/Session'), options)
JSON.parse(response.body)
+ end
+
+ def transfer_session(session_key, new_session_key, options={})
+ parameters =
+ {
+ 'NewSessionKey': new_session_key,
+ }
+ options.merge!(basic_auth: @auth, headers: @headers)
+ options.merge!(body: parameters)
+ self.class.post(base_api_endpoint("Web/Session/#{session_key}/Transfer"), options)
end
def get_expiration(key, options={})
options.merge!(basic_auth: @auth, headers: @headers)
response = self.class.get(base_api_endpoint("Web/Session/#{key}/Expiration"), options)