0.0
No commit activity in last 3 years
No release in over 3 years
Ruby SOAP Api Client for EmailVision / CampaignCommander
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

EmailVision SOAP Api Client

gem install email_vision

Usage

emv = EmailVision.new(:password => 'foo', :login => 'bar', :key => 'token')
emv.find 'me@host.com'
emv.create_or_update :email => 'me@host.com', :foo => 1

emv.create :email => 'me@host.com', :foo => 1
emv.update :email => 'me@host.com', :foo => 1
emv.update :email_was => 'me@host.com', :email => 'you@host.com'

emv.columns

emv.unjoin 'me@host.com'
emv.rejoin 'me@host.com'

# create, create_or_update, update, change_email return a job-id
# it can be used to wait for the job or fetch its status
job_id = emv.update :email => 'me@host.com', :foo => 1
puts "Status is #{emv.job_status job_id}"
emv.wait_for_job_to_finish job_id # raises when job failed


# :dateunjoin cannot be set via update, use a separate rejoin / unjoin request
class User < ActiveRecord::Base
  after_save :update_email_vision

  def update_email_vision
    case receive_newsletter_change
    when [false, true]
      emv.rejoin(email)
      emv.update(...data for emailv vision...)
    when [true, false]
      emv.unjoin(email)
    end
  end
end

Docs

Author

Michael Grosser
michael@grosser.it
Hereby placed under public domain, do what you want, just do not hold me accountable...