lib/tessitura_rest/web/session.rb in tessitura_rest-0.7.5 vs lib/tessitura_rest/web/session.rb in tessitura_rest-0.7.6
- old
+ new
@@ -85,9 +85,26 @@
options.merge!(basic_auth: @auth, headers: @headers)
options.merge!(:body => parameters)
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 =
+ {
+ 'LoginName': user_name,
+ 'NewLoginName': user_name,
+ 'Password': old_password,
+ 'NewPassword': new_password,
+ 'EmailAddress': email,
+ 'NewEmailAddress': new_email,
+ 'LoginTypeId': 1,
+ 'PromotionCode': 0,
+ }
+ options.merge!(basic_auth: @auth, headers: @headers)
+ options.merge!(:body => parameters)
+ 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)
response = self.class.get(base_api_endpoint("Web/Session/#{key}/DeliveryMethods"), options)
JSON.parse(response.body)
end