Permalink
Browse files

recurly.js v2 support

  • Loading branch information...
1 parent 428acf9 commit 56abd42119f5789e3639f961a9238631ff72d198 @em em committed Jan 17, 2012
Showing with 7 additions and 4 deletions.
  1. +5 −2 lib/recurly/js.rb
  2. +2 −2 spec/recurly/js_spec.rb
View
@@ -23,8 +23,11 @@ def private_key
attr_writer :private_key
# @return [String]
- def sign_subscription account_code, extras = {}
- sign 'subscriptioncreate', { 'account_code' => account_code }, extras
+ def sign_subscription plan_code, account_code, extras = {}
+ sign 'subscriptioncreate', {
+ 'plan_code' => plan_code,
+ 'account_code' => account_code
+ }, extras
end
# @return [String]
View
@@ -80,8 +80,8 @@ class << self
end
it "must sign subscription" do
- sig = js.method(:sign_subscription).call 'acc', :a => { :a1 => 'v' }
- sig.must_equal 'f85e8ea59232af127ff417773027da927fcd15d0-1312806801+a.a1'
+ sig = js.method(:sign_subscription).call 'plan','acc', {:a => {:a1 => 'v'}}
+ sig.must_equal 'aef4df3aabfdfc414a6700b2a001231a4c0c91bd-1312806801+a.a1'
end
it "must sign billing_info" do

0 comments on commit 56abd42

Please sign in to comment.