recurly 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of recurly might be problematic. Click here for more details.

data/Manifest CHANGED
@@ -9,9 +9,9 @@ lib/recurly/base.rb
9
9
  lib/recurly/billing_info.rb
10
10
  lib/recurly/charge.rb
11
11
  lib/recurly/credit.rb
12
+ lib/recurly/invoice.rb
12
13
  lib/recurly/plan.rb
13
14
  lib/recurly/subscription.rb
14
- recurly.gemspec
15
15
  test/account_test.rb
16
16
  test/billing_info_test.rb
17
17
  test/charge_test.rb
data/README.md CHANGED
@@ -38,6 +38,11 @@ Create a file in your Rails app at __/config/initializers/recurly_config.rb__ wi
38
38
  end
39
39
 
40
40
 
41
+ Demo Application
42
+ ----------------
43
+
44
+ [Recurly Ruby Demo App](http://github.com/recurly/recurly-client-ruby-demo)
45
+
41
46
  Examples
42
47
  --------
43
48
 
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('recurly', '0.1.1') do |p|
5
+ Echoe.new('recurly', '0.1.2') do |p|
6
6
  p.description = "A Ruby API wrapper for Recurly. Super Simple Subscription billing."
7
7
  p.url = "http://github.com/recurly/recurly-client-ruby"
8
8
  p.author = "Isaac Hall"
data/lib/recurly.rb CHANGED
@@ -5,5 +5,6 @@ require File.dirname(__FILE__) + '/recurly/account'
5
5
  require File.dirname(__FILE__) + '/recurly/billing_info'
6
6
  require File.dirname(__FILE__) + '/recurly/charge'
7
7
  require File.dirname(__FILE__) + '/recurly/credit'
8
+ require File.dirname(__FILE__) + '/recurly/invoice'
8
9
  require File.dirname(__FILE__) + '/recurly/plan'
9
10
  require File.dirname(__FILE__) + '/recurly/subscription'
@@ -0,0 +1,9 @@
1
+ module Recurly
2
+ class Invoice < RecurlyBase
3
+ self.element_name = "invoice"
4
+
5
+ def self.list(account_code)
6
+ Invoice.find(:all, :from => "/accounts/#{account_code}/invoices")
7
+ end
8
+ end
9
+ end
@@ -10,8 +10,8 @@ module Recurly
10
10
 
11
11
  # Stops the subscription from renewing. The subscription remains valid until the end of
12
12
  # the current term (current_period_ends_at).
13
- def cancel
14
- Subscription.delete(self.subscription_account_code)
13
+ def cancel (account_code)
14
+ Subscription.delete(account_code)
15
15
  end
16
16
 
17
17
  # Terminates the subscription immediately and processes a full or partial refund
data/recurly.gemspec CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{recurly}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Isaac Hall"]
9
- s.date = %q{2010-01-15}
9
+ s.date = %q{2010-02-10}
10
10
  s.description = %q{A Ruby API wrapper for Recurly. Super Simple Subscription billing.}
11
11
  s.email = %q{support@recurly.com}
12
- s.extra_rdoc_files = ["LICENSE", "README.md", "lib/recurly.rb", "lib/recurly/account.rb", "lib/recurly/base.rb", "lib/recurly/billing_info.rb", "lib/recurly/charge.rb", "lib/recurly/credit.rb", "lib/recurly/plan.rb", "lib/recurly/subscription.rb"]
13
- s.files = ["LICENSE", "Manifest", "README.md", "Rakefile", "init.rb", "lib/recurly.rb", "lib/recurly/account.rb", "lib/recurly/base.rb", "lib/recurly/billing_info.rb", "lib/recurly/charge.rb", "lib/recurly/credit.rb", "lib/recurly/plan.rb", "lib/recurly/subscription.rb", "recurly.gemspec", "test/account_test.rb", "test/billing_info_test.rb", "test/charge_test.rb", "test/credit_test.rb", "test/plan_test.rb", "test/subscription_test.rb", "test/test_helper.rb"]
12
+ s.extra_rdoc_files = ["LICENSE", "README.md", "lib/recurly.rb", "lib/recurly/account.rb", "lib/recurly/base.rb", "lib/recurly/billing_info.rb", "lib/recurly/charge.rb", "lib/recurly/credit.rb", "lib/recurly/invoice.rb", "lib/recurly/plan.rb", "lib/recurly/subscription.rb"]
13
+ s.files = ["LICENSE", "Manifest", "README.md", "Rakefile", "init.rb", "lib/recurly.rb", "lib/recurly/account.rb", "lib/recurly/base.rb", "lib/recurly/billing_info.rb", "lib/recurly/charge.rb", "lib/recurly/credit.rb", "lib/recurly/invoice.rb", "lib/recurly/plan.rb", "lib/recurly/subscription.rb", "test/account_test.rb", "test/billing_info_test.rb", "test/charge_test.rb", "test/credit_test.rb", "test/plan_test.rb", "test/subscription_test.rb", "test/test_helper.rb", "recurly.gemspec"]
14
14
  s.homepage = %q{http://github.com/recurly/recurly-client-ruby}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Recurly", "--main", "README.md"]
16
16
  s.require_paths = ["lib"]
data/test/plan_test.rb CHANGED
@@ -10,7 +10,7 @@ class PlanTest < Test::Unit::TestCase
10
10
  end
11
11
 
12
12
  def test_get_plan
13
- plan = Recurly::Plan.find('trial')
13
+ plan = Recurly::Plan.find(TEST_PLAN_CODE)
14
14
  assert_not_nil plan
15
15
  assert_not_nil plan.name
16
16
  end
@@ -1,4 +1,5 @@
1
1
  require 'test_helper'
2
+ require "test/unit"
2
3
 
3
4
  class SubscriptionTest < Test::Unit::TestCase
4
5
 
@@ -38,7 +39,7 @@ class SubscriptionTest < Test::Unit::TestCase
38
39
  account = create_account('cancel-subscription')
39
40
  subscription = create_subscription(account, TEST_PLAN_CODE)
40
41
 
41
- subscription.cancel
42
+ subscription.cancel(account.account_code)
42
43
 
43
44
  sub = Recurly::Subscription.find(account.account_code)
44
45
  assert_equal sub.state, 'canceled'
data/test/test_helper.rb CHANGED
@@ -17,4 +17,4 @@ def create_account(account_code)
17
17
  :last_name => 'Test',
18
18
  :email => 'verena@test.com',
19
19
  :company_name => 'Recurly Ruby Gem')
20
- end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Hall
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-15 00:00:00 -08:00
12
+ date: 2010-02-10 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -28,6 +28,7 @@ extra_rdoc_files:
28
28
  - lib/recurly/billing_info.rb
29
29
  - lib/recurly/charge.rb
30
30
  - lib/recurly/credit.rb
31
+ - lib/recurly/invoice.rb
31
32
  - lib/recurly/plan.rb
32
33
  - lib/recurly/subscription.rb
33
34
  files:
@@ -42,9 +43,9 @@ files:
42
43
  - lib/recurly/billing_info.rb
43
44
  - lib/recurly/charge.rb
44
45
  - lib/recurly/credit.rb
46
+ - lib/recurly/invoice.rb
45
47
  - lib/recurly/plan.rb
46
48
  - lib/recurly/subscription.rb
47
- - recurly.gemspec
48
49
  - test/account_test.rb
49
50
  - test/billing_info_test.rb
50
51
  - test/charge_test.rb
@@ -52,6 +53,7 @@ files:
52
53
  - test/plan_test.rb
53
54
  - test/subscription_test.rb
54
55
  - test/test_helper.rb
56
+ - recurly.gemspec
55
57
  has_rdoc: true
56
58
  homepage: http://github.com/recurly/recurly-client-ruby
57
59
  licenses: []