Sha256: 9266ac06de2e6dfce3465e6e583a9fd35b5aaf4285136107422e06ea4117d406

Contents?: true

Size: 456 Bytes

Versions: 49

Compression:

Stored size: 456 Bytes

Contents

module Wbase
  module Dripable
    def update_subscriber!
      drip.create_or_update_subscriber(
        user.email,
        status: user.status,
        user_id: user.id,
        custom_fields: {
          name: user.name,
          api_key: user.api_key,
        }
      )
    end

    def drip
      @client ||= Drip::Client.new do |c|
        c.api_key = ENV['DRIP_API_TOKEN']
        c.account_id = ENV['DRIP_ACCOUNT_ID']
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
wbase-0.3.0 app/jobs/wbase/dripable.rb
wbase-0.2.9 app/jobs/wbase/dripable.rb
wbase-0.2.8 app/jobs/wbase/dripable.rb
wbase-0.2.7 app/jobs/wbase/dripable.rb
wbase-0.2.6 app/jobs/wbase/dripable.rb
wbase-0.2.5 app/jobs/wbase/dripable.rb
wbase-0.2.4 app/jobs/wbase/dripable.rb
wbase-0.2.3 app/jobs/wbase/dripable.rb
wbase-0.2.2 app/jobs/wbase/dripable.rb
wbase-0.2.1 app/jobs/wbase/dripable.rb
wbase-0.2.0 app/jobs/wbase/dripable.rb
wbase-0.1.7 app/jobs/wbase/dripable.rb
wbase-0.1.6 app/jobs/wbase/dripable.rb
wbase-0.1.5 app/jobs/wbase/dripable.rb
wbase-0.1.4 app/jobs/wbase/dripable.rb
wbase-0.1.3 app/jobs/wbase/dripable.rb
wbase-0.1.2 app/jobs/wbase/dripable.rb
wbase-0.1.0 app/jobs/wbase/dripable.rb
wbase-0.0.15 app/jobs/wbase/dripable.rb
wbase-0.0.14 app/jobs/wbase/dripable.rb