No release in over 3 years
Low commit activity in last 3 years
Ruby lib for using the FastSpring (SaaSy) subscription management API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 10.0.3, ~> 10.0.3
>= 2.12.0, ~> 2.12.0
>= 1.9.0, ~> 1.9.0

Runtime

>= 1.0.0, ~> 1.0.0
>= 0.10.0, ~> 0.10.0
 Project Readme

fastspring-saasy

Ruby library to access the FastSpring Saasy API.

Installation

gem install fastspring-saasy

Usage

Setup account credentials

FastSpring::Account.setup do |config|
	config[:username] = 'user'
  config[:password] = 'password'
  config[:company] = 'company'
end

Get subscription

sub = FastSpring::Subscription.find('reference')

Renew subscription

sub.renew

Update subscription

attributes = {
	first_name: 'John',
  last_name: 'Doe',
  company: 'Doe Inc.',
  email: 'john.doe@example.com',
  phone_number: '+1 123 456 789',
  product_path: '/product',
  quantity: 1,
  tags: 'tag1, tag2, tag3',
  coupon: 'code',
  proration: true
}
sub.update!(attributes)

Cancel subscription

sub.cancel!

Create subscriptions url

FastSpring::Subscription.create_subscription_url('test_product', 'new_co')
# => http://sites.fastspring.com/acme/product/test_product?referrer=new_co

Search Orders

orders = FastSpring::Order.search('search-string')
orders.each do |order|
  puts order.inspect
end

Find Order

order = FastSpring::Order.find('reference')
order.items.each do |item|
  puts item.inspect
end

order.payments.each do |payment|
  puts payment.inspect
end

#customer details
order.purchaser.inspect

Localized Store Pricing

store_pricing = FastSpring::LocalizedStorePricing.find(['/standard'], http_request)

puts store_pricing.inspect

Copyright

Copyright (c) 2016 Richard Patching. See LICENSE.txt for further details.