Skip to content

Instantly share code, notes, and snippets.

@Beyarz
Created July 4, 2026 18:09
Show Gist options
  • Select an option

  • Save Beyarz/1bc72010ce1228813135a73935ee72a0 to your computer and use it in GitHub Desktop.

Select an option

Save Beyarz/1bc72010ce1228813135a73935ee72a0 to your computer and use it in GitHub Desktop.
Validate tickets for Filmstaden
require 'JSON'
requier 'net/http'
biljetter = %w(123 456 789)
biljetter.each do |biljett|
uri = URI("https://services.cinema-api.com/Discount/Sys99-SE/#{biljett}")
response = Net::HTTP.get_response(uri)
data = JSON.parse(response.body)
puts data if data["activeForSaleTransaction"]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment