Sha256: 6ae960b4b653bd0bf5ab1c7f438c158598076ecfe7dc249f381e9faad9f55867
Contents?: true
Size: 1.11 KB
Versions: 19
Compression:
Stored size: 1.11 KB
Contents
module Email def send_login_credentials(template_id, email, profile_id, _params = '', options = {}) login_id = get_web_login(email, 1) return false if login_id.empty? parameters = { 'TemplateId': template_id, 'EmailAddress': email, 'EmailProfileId': profile_id, } options.merge!(basic_auth: @auth, headers: @headers) options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' }) post = self.class.post(base_api_endpoint("Emails/LoginCredentials/#{login_id.first['Id']}/Send"), options) post.success? end def send_order_confirmation(template_id, email, profile_id, order_id, _params = '', options = {}) parameters = { 'TemplateId': template_id, 'EmailAddress': email, 'EmailProfileId': profile_id, } options.merge!(basic_auth: @auth, headers: @headers) options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' }) post = self.class.post(base_api_endpoint("Emails/OrderConfirmation/#{order_id}/Send"), options) post.success? end end
Version data entries
19 entries across 19 versions & 1 rubygems