lib/tessitura_rest/web/session.rb in tessitura_rest-0.5.6 vs lib/tessitura_rest/web/session.rb in tessitura_rest-0.5.7

- old
+ new

@@ -39,24 +39,14 @@ def load_existing_order(key, order_id, options={}) options.merge!(basic_auth: @auth, headers: @headers) self.class.post(base_api_endpoint("Web/Session/#{key}/LoadOrder/#{order_id}"), options) end - def get_promotion(key, code, options={}) + def get_promotion(key, code, code_string, options={}) parameters = { - 'PromoCode': code - } - options.merge!(basic_auth: @auth, headers: @headers) - options.merge!(:body => parameters) - response = self.class.post(base_api_endpoint("Web/Session/#{key}/PromoCode"), options) - JSON.parse(response.body) - end - - def get_promotion_code(key, code, options={}) - parameters = - { - 'PromoCodeString': code + 'PromoCode': code, + 'PromoCodeString': code_string } options.merge!(basic_auth: @auth, headers: @headers) options.merge!(:body => parameters) response = self.class.post(base_api_endpoint("Web/Session/#{key}/PromoCode"), options) JSON.parse(response.body)