all webhooks have type and timestamp in them
{
"type": "subscribe",
"timestamp": "2017-04-24T12:43:59-04:00",
trial_start_date = current_provider.created_at | |
if free_trial_completed?(trial_start_date) | |
current_provider.update(in_free_trial: false) | |
elsif in_sixty_day_trial?(trial_start_date) | |
current_provider.update(in_free_trial: true) | |
elsif in_thirty_day_trial?(trial_start_date) | |
current_provider.update(in_free_trial: true) | |
end |
Connecting to memcache url: "memcached-main.swi5ut.0001.usw2.cache.amazonaws.com:11211" | |
number,sms,mms,total | |
+17877640000,5,0,5 | |
+17875351985,5,0,5 | |
+17877602038,4,0,4 | |
+17878324040,5,0,5 | |
+17879159424,8,0,8 | |
+17877671652,4,0,4 | |
+17879923200,4,0,4 | |
+17877582525,3,0,3 |
7877640000 | |
7875351985 | |
7877602038 | |
7878324040 | |
7879159424 | |
7877671652 | |
7879923200 | |
7877582525 | |
7876221720 | |
3178735861 |
0,6132132320,"","","","","",No customer agreement for region:Canada | |
1,5715282698,11152019,"",AT&T Mobility,AT&T,Wireless,"","",No | |
2,2144781439,11152019,469688,T-Mobile,T-Mobile,Wireless,"",04292017,Yes,AT&T Mobility,AT&T,"",Wireless | |
3,8175222733,11152019,469688,T-Mobile,T-Mobile,Wireless,"",12222016,Yes,AT&T Mobility,AT&T,"",Wireless | |
4,9096371391,11152019,"",Metro PCS,T-Mobile,Wireless,"",05312018,Yes,Sprint,Sprint,"",Wireless | |
5,6297720417,11152019,"",Metro PCS,T-Mobile,Wireless,"","",No | |
6,3462171537,11152019,000000,AT&T Mobility,AT&T,Wireless,"","",No | |
7,4702952819,11152019,"",AT&T Mobility,AT&T,Wireless,"",09302019,Yes,Verizon Wireless,Verizon,"",Wireless | |
8,8313259804,11152019,650732,Verizon Wireless,Verizon,Wireless,"",09302019,Yes,AT&T Mobility,AT&T,"",Wireless | |
9,7084766023,11152019,224515,AT&T Mobility,AT&T,Wireless,"",10112019,Yes,T-Mobile,T-Mobile,"",Wireless |
Connecting to memcache url: "memcached-main.swi5ut.0001.usw2.cache.amazonaws.com:11211" | |
number,sms,mms,total | |
+16132132320,0,0,0 | |
+15715282698,21,55,76 | |
+12144781439,24,194,218 | |
+18175222733,4,4,8 | |
+19096371391,9,2,11 | |
+16297720417,0,0,0 | |
+13462171537,0,0,0 | |
+14702952819,35,209,244 |
6132132320 | |
5715282698 | |
2144781439 | |
8175222733 | |
9096371391 | |
6297720417 | |
3462171537 | |
4702952819 | |
8313259804 | |
7084766023 |
Connecting to memcache url: "memcached-main.swi5ut.0001.usw2.cache.amazonaws.com:11211" | |
5715282698;0;0;;false | |
2144781439;0;0;;false | |
8175222733;7;7;;true | |
9096371391;7;7;neustar;true | |
6297720417;0;0;neustar;true | |
3462171537;0;0;neustar;true | |
4702952819;0;0;;false | |
8313259804;36;36;;true | |
7084766023;33;33;;true |
// @flow | |
import { isFuture, subSeconds } from 'date-fns'; | |
import { sortBy, uniq } from 'lodash'; | |
import Sequelize from 'sequelize'; | |
import sequelize from '../../../db/sequelize'; | |
import { Input, Output } from '../../../api'; | |
import { Course } from '../../../models'; | |
const { Op } = Sequelize; |
namespace :actblue do | |
task :import_csv => :environment do | |
list_id = ENV['LIST_ID'] | |
list = List.find(list_id) | |
puts "Importing #{list.name}" | |
processed = 0 | |
csv_path = ENV['CSV_PATH'] | |
line_count = `wc -l "#{csv_path}"`.strip.split(' ')[0].to_i |