def generate
   [*('a'..'z'),*('0'..'9')].shuffle[0,10].join.upcase
end

def gc_10
	CSV.open("gift-card-10.csv", "wb") do |csv|
		for i in  1..150
			csv << [generate()]
		end
	end
end

def gc_20
	CSV.open("gift-card-20.csv", "wb") do |csv|
		for i in  1..100
			csv << [generate()]
		end
	end
end


# round to.  we make

#One set of 200 codes that when redeemed translate into 5 (not 10) JamTracks each.

#One set of 200 codes that when redeemed translate into 4 JamClass lessons each.

def gc_5jt_2
	CSV.open("posa-cards-jt-5.csv", "wb") do |csv|
		for i in  1..250
			csv << [generate()]
		end
	end
end

def gc_4jc_2
	CSV.open("posa-cards-jc-4.csv", "wb") do |csv|
		for i in  1..250
			csv << [generate()]
		end
	end
end


def amazon_gift_cards
	CSV.open("posa-cards-amazon-test-drive-paid-4.csv", "wb") do |csv|
		for i in  1..250
			csv << [generate(), 'amazon-test-drive-paid-4', true, true]
		end
	end

	CSV.open("posa-cards-amazon-test-drive-free-4.csv", "wb") do |csv|
		for i in  1..250
			csv << [generate(), 'amazon-test-drive-free-4',true, false]
		end
	end

	CSV.open("posa-cards-amazon-test-drive-free-2.csv", "wb") do |csv|
		for i in  1..250
			csv << [generate(), 'amazon-test-drive-free-2',true, false]
		end
	end
end


def sample_amazon_gift_cards
	CSV.open("test-posa-cards-amazon-test-drive-paid-4.csv", "wb") do |csv|
		for i in  1..20
			csv << [generate(), 'amazon-test-drive-paid-4', true, true]
		end
	end

	CSV.open("test-posa-cards-amazon-test-drive-free-4.csv", "wb") do |csv|
		for i in  1..20
			csv << [generate(), 'amazon-test-drive-free-4',true, false]
		end
	end

	CSV.open("test-posa-cards-amazon-test-drive-free-2.csv", "wb") do |csv|
		for i in  1..20
			csv << [generate(), 'amazon-test-drive-free-2',true, false]
		end
	end
end



