Skip to content

Instantly share code, notes, and snippets.

require "./lib/helpers"
events = [];
w.file_uploads.each do |f|
puts "NEXT FILE\n\n\n"
content = f.download
CSV.parse(content, headers: true) do |row|
d = row["AccountingDate"] || row["Accepted Date"] || row["Issued Date"]
missing = [{"amount_in_cents":2033,"description":"BROWSERSTACK INC","integrator_source_id":235,"is_one_time":false,"is_projected":false,"month":12,"year":2021,"metadata":"{}","payment_date":"2021-12-04","payment_method_id":25,"workspace_vendor_id":4726,"third_party_id":"AzjJMO9qkEhzKbbnLpdMS9zdDJwzONF6bkXM1"},{"amount_in_cents":30000,"description":"PIVOTAL TRACKER - VMWARE, INC.","integrator_source_id":235,"is_one_time":false,"is_projected":false,"month":11,"year":2021,"metadata":"{}","payment_date":"2021-11-20","payment_method_id":31,"workspace_vendor_id":4722,"third_party_id":"m3z9BqmKvnSj4pp0YdyKixDqqLgzZmtMZoZPJ"},{"amount_in_cents":499,"description":"HELLOSIGN INC","integrator_source_id":235,"is_one_time":false,"is_projected":false,"month":11,"year":2021,"metadata":"{}","payment_date":"2021-11-18","payment_method_id":33,"workspace_vendor_id":4716,"third_party_id":"nyz93Bqk0VCZ7ppboqr4TwzEbw75vbtAjVjRQ"},{"amount_in_cents":1711,"description":"Spotify","integrator_source_id":235,"is_one_time":false,"is_pro