Ruby library to access the FastSpring Saasy API.
geminstallfastspring-saasyFastSpring::Account.setupdo |config|
config[:username]='user'config[:password]='password'config[:company]='company'endsub=FastSpring::Subscription.find('reference')sub.renewattributes={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)sub.cancel!FastSpring::Subscription.create_subscription_url('test_product','new_co')# => http://sites.fastspring.com/acme/product/test_product?referrer=new_coorders=FastSpring::Order.search('search-string')orders.eachdo |order|
putsorder.inspectendorder=FastSpring::Order.find('reference')order.items.eachdo |item|
putsitem.inspectendorder.payments.eachdo |payment|
putspayment.inspectend#customer detailsorder.purchaser.inspectstore_pricing=FastSpring::LocalizedStorePricing.find(['/standard'],http_request)putsstore_pricing.inspectCopyright (c) 2016 Richard Patching. See LICENSE.txt for further details.