Module: Email
- Included in:
- TessituraRest
- Defined in:
- lib/tessitura_rest/custom/email.rb
Instance Method Summary collapse
- #send_login_credentials(template_id, email, profile_id, params = '', options = {}) ⇒ Object
- #send_order_confirmation(template_id, email, profile_id, order_id, params = '', options = {}) ⇒ Object
Instance Method Details
#send_login_credentials(template_id, email, profile_id, params = '', options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/tessitura_rest/custom/email.rb', line 3 def send_login_credentials(template_id, email, profile_id, params = '', ={}) login_id = get_web_login(email, 1) return false if login_id.empty? parameters = { 'TemplateId': template_id, 'EmailAddress': email, 'EmailProfileId': profile_id } .merge!(basic_auth: @auth, headers: @headers) .merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'}) post = self.class.post(base_api_endpoint("Emails/LoginCredentials/#{login_id.first['Id']}/Send"), ) post.success? end |
#send_order_confirmation(template_id, email, profile_id, order_id, params = '', options = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/tessitura_rest/custom/email.rb', line 18 def send_order_confirmation(template_id, email, profile_id, order_id, params = '', ={}) parameters = { 'TemplateId': template_id, 'EmailAddress': email, 'EmailProfileId': profile_id } .merge!(basic_auth: @auth, headers: @headers) .merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'}) post = self.class.post(base_api_endpoint("Emails/OrderConfirmation/#{order_id}/Send"), ) post.success? end |