lib/tessitura_rest/web/session.rb in tessitura_rest-1.4.6 vs lib/tessitura_rest/web/session.rb in tessitura_rest-1.5.1

- old
+ new

@@ -10,11 +10,11 @@ { 'IpAddress': ip, 'Organization': 'Tessitura Web', } options.merge!(basic_auth: @auth, headers: @headers) - options.merge!(body: parameters) + options.merge!(body: parameters.to_json) response = self.class.post(base_api_endpoint('Web/Session'), options) JSON.parse(response.body) end def get_expiration(key, options = {}) @@ -27,11 +27,11 @@ parameters = { 'NewSessionKey': new_session_key, } options.merge!(basic_auth: @auth, headers: @headers) - options.merge!(body: parameters) + options.merge!(body: parameters.to_json) self.class.post(base_api_endpoint("Web/Session/#{session_key}/Transfer"), options) end def get_variables(key, options = {}) options.merge!(basic_auth: @auth, headers: @headers) @@ -44,11 +44,11 @@ { 'Expiration': expiration, 'TimeOffset': timeoffset, } options.merge!(basic_auth: @auth, headers: @headers) - options.merge!(:body => parameters) + options.merge!(:body => parameters.to_json) response = self.class.put(base_api_endpoint("Web/Session/#{key}/Expiration"), options) JSON.parse(response.body) end def load_existing_order(key, order_id, options = {}) @@ -61,11 +61,11 @@ { 'PromoCode': code, 'PromoCodeString': code_string, } options.merge!(basic_auth: @auth, headers: @headers) - options.merge!(:body => parameters) + options.merge!(:body => parameters.to_json) response = self.class.post(base_api_endpoint("Web/Session/#{key}/PromoCode"), options) JSON.parse(response.body) end def get_renewals(key, season_id, renewal, mode_of_sale, options = {}) @@ -80,11 +80,11 @@ 'TemplateFormatId': template_id, 'LoginTypeId': login_type, 'EmailAddress': email, } options.merge!(basic_auth: @auth, headers: @headers) - options.merge!(:body => parameters) + options.merge!(:body => parameters.to_json) self.class.post(base_api_endpoint("/Web/Session/#{key}/Login/SendCredentials"), options) end def update_login(key, user_name, old_password, new_password, email, new_email, options = {}) parameters = @@ -97,10 +97,10 @@ 'NewEmailAddress': new_email, 'LoginTypeId': 1, 'PromotionCode': 0, } options.merge!(basic_auth: @auth, headers: @headers) - options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' }) + options.merge!(:body => parameters.to_json) self.class.put(base_api_endpoint("Web/Session/#{key}/WebLogins"), options) end def get_shipping_methods(key, options = {}) options.merge!(basic_auth: @auth, headers: @headers)