Repository is archived
No commit activity in last 3 years
No release in over 3 years
This gem provides a convenient Ruby wrapper for the Spreedly Subscriptions API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 2.5.1
>= 0

Runtime

 Project Readme

DEPRECATED - Spreedly no longer offers support for subscriptions.

Spreedly gem

Description

The spreedly_subscriptions gem provides a convenient Ruby wrapper for the Spreedly Subscriptions API.

Features

  • Makes it easy to get started.
  • Fully tested.
  • (Mostly) fully substitutable mock implementation for fast tests.
  • Great example code.

Synopsis

# For real
require 'spreedly/subscriptions'
Spreedly::Subscriptions.configure('site short name', 'crazy hash token')
url = Spreedly::Subscriptions.subscribe_url('customer id', 'plan id')
subscriber = Spreedly::Subscriptions::Subscriber.find('customer id')
subscriber.active?

# For fast tests
require 'spreedly/subscriptions/mock'
Spreedly::Subscriptions.configure('site short name', 'crazy hash token')
url = Spreedly::Subscriptions.subscribe_url('customer id', 'plan id')
subscriber = Spreedly::Subscriptions::Subscriber.find('customer id')
subscriber.active?

Yup, they're exactly the same except for the require and the speed!

Requirements

  • A Spreedly Subscriptions account.
  • HTTParty

Install

$ gem install spreedly_subscriptions