module Spreedly

Provides a convenient wrapper around the subs.pinpayments.com/info/integration API. Instead of mucking around with http you can just Spreedly::Subscriptions.configure and Spreedly::Subscriber.find. Much of the functionality is hung off of the Spreedly::Subscriptions::Subscriber class, and there's also a Spreedly::SubscriptionPlan class.

One of the goals of this wrapper is to keep your tests fast while also keeping your app working. It does this by providing a drop-in replacement for the real Spreedly functionality that skips the network and gives you a simple (some might call it stupid) implementation that will work for 90% of your tests. At least we hope so.

Help us make the mock work better by telling us when it doesn't work so we can improve it. Thanks!

Example mock usage:

if ENV["SPREEDLY"] == "REAL"
  require 'spreedly/subscriptions'
else
  require 'spreedly/subscriptions/mock'
end