class Delighted::SurveyRequest

Public Class Methods

delete_pending(attributes = {}, client = Delighted.shared_client) click to toggle source
# File lib/delighted/resources/survey_request.rb, line 5
def self.delete_pending(attributes = {}, client = Delighted.shared_client)
  raise ArgumentError, "You must pass :person_email" unless attributes[:person_email]
  interpolated_path = path.sub("{PERSON_EMAIL}", CGI.escape(attributes[:person_email]))
  interpolated_path << "/pending"
  json = client.delete_json(interpolated_path)
  json
end