Sha256: bf53433d482e83e143a35918f287318e3d50a8508353b1ddfe30cf2b47fec76a
Contents?: true
Size: 1 KB
Versions: 18
Compression:
Stored size: 1 KB
Contents
namespace :stripe do desc 'verify your stripe.com authentication configuration' task 'verify' => :environment do begin Stripe::Plan.all puts "[OK] - connection to stripe.com is functioning properly" rescue Stripe::AuthenticationError => e puts "[FAIL] - authentication failed" end end task 'products:prepare' => 'environment' do if CurrentApiVersion.after_switch_to_products_in_plans? Stripe::Products.put! else puts '[SKIPPED] Current API version does not support Products' end end task 'plans:prepare' => 'environment' do Stripe::Plans.put! end task 'coupons:prepare' => 'environment' do Stripe::Coupons.put! end desc 'delete and redefine all coupons defined in config/stripe/coupons.rb' task 'coupons:reset!' => 'environment' do Stripe::Coupons.reset! end desc "create all plans and coupons defined in config/stripe/{products|plans|coupons}.rb" task 'prepare' => ['products:prepare', 'plans:prepare', 'coupons:prepare'] end
Version data entries
18 entries across 18 versions & 1 rubygems