add lib/v2/subscriptions.rb and its test script