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.20 app/jobs/wbase/dripable.rb
wbase-0.3.19 app/jobs/wbase/dripable.rb
wbase-0.3.18 app/jobs/wbase/dripable.rb
wbase-0.3.17 app/jobs/wbase/dripable.rb
wbase-0.3.16 app/jobs/wbase/dripable.rb
wbase-0.3.15 app/jobs/wbase/dripable.rb
wbase-0.3.14 app/jobs/wbase/dripable.rb
wbase-0.3.13 app/jobs/wbase/dripable.rb
wbase-0.3.12 app/jobs/wbase/dripable.rb
wbase-0.3.11 app/jobs/wbase/dripable.rb
wbase-0.3.10 app/jobs/wbase/dripable.rb
wbase-0.3.9 app/jobs/wbase/dripable.rb
wbase-0.3.8 app/jobs/wbase/dripable.rb
wbase-0.3.7 app/jobs/wbase/dripable.rb
wbase-0.3.6 app/jobs/wbase/dripable.rb
wbase-0.3.5 app/jobs/wbase/dripable.rb
wbase-0.3.4 app/jobs/wbase/dripable.rb
wbase-0.3.3 app/jobs/wbase/dripable.rb
wbase-0.3.2 app/jobs/wbase/dripable.rb
wbase-0.3.1 app/jobs/wbase/dripable.rb