chargify 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
- require 'rubygems'
2
1
  require 'rake'
2
+ require 'shoulda/tasks'
3
3
 
4
4
  begin
5
5
  require 'jeweler'
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{chargify}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Wynn Netherland", "Nash Kabbara"]
12
- s.date = %q{2010-03-19}
12
+ s.date = %q{2010-05-11}
13
13
  s.description = %q{Ruby wrapper for the chargify.com SAAS and billing API}
14
14
  s.email = %q{wynn.netherland@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -1,12 +1,5 @@
1
- require 'rubygems'
2
-
3
- gem 'hashie', '~> 0.1.3'
4
1
  require 'hashie'
5
-
6
- gem 'httparty', '~> 0.4.5'
7
2
  require 'httparty'
8
-
9
- gem 'json', '~> 1.1.9'
10
3
  require "json"
11
4
 
12
5
  directory = File.expand_path(File.dirname(__FILE__))
@@ -37,7 +37,7 @@ module Chargify
37
37
  end
38
38
 
39
39
  def customer(chargify_id)
40
- Hashie::Mash.new(self.class.get("/customers/#{chargify_id}.json")).customer
40
+ Hashie::Mash.new(self.class.get("/customers/lookup.json?reference=#{chargify_id}")).customer
41
41
  end
42
42
 
43
43
  #
@@ -32,7 +32,7 @@ class TestChargify < Test::Unit::TestCase
32
32
 
33
33
 
34
34
  should "return info for a customer" do
35
- stub_get "https://OU812:x@pengwynn.chargify.com/customers/16.json", "customer.json"
35
+ stub_get "https://OU812:x@pengwynn.chargify.com/customers/lookup.json?reference=16", "customer.json"
36
36
  customer = @client.customer(16)
37
37
  customer.reference.should == 'bradleyjoyce'
38
38
  customer.organization.should == 'Squeejee'
@@ -60,6 +60,14 @@ class TestChargify < Test::Unit::TestCase
60
60
  customer = @client.update_customer(info)
61
61
  customer.first_name.should == "Wynn"
62
62
  end
63
+
64
+ should_eventually "raise an exception if a customer is not found" do
65
+
66
+ end
67
+
68
+ should_eventually "delete a customer" do
69
+
70
+ end
63
71
 
64
72
  should "return a list of customer subscriptions" do
65
73
  stub_get "https://OU812:x@pengwynn.chargify.com/customers/16/subscriptions.json", "subscriptions.json"
@@ -192,6 +200,26 @@ class TestChargify < Test::Unit::TestCase
192
200
  subscription.success?.should == true
193
201
  end
194
202
 
203
+ should_eventually "create a one-off charge for a subscription" do
204
+
205
+ end
206
+
207
+ should_eventually "list metered usage for a subscription" do
208
+
209
+ end
210
+
211
+ should_eventually "record metered usage for a subscription" do
212
+
213
+ end
214
+
215
+ should_eventually "migrate a subscription to a new product" do
216
+
217
+ end
218
+
219
+ should_eventually "create one-time coupons" do
220
+
221
+ end
222
+
195
223
  should "return a list of products" do
196
224
  stub_get "https://OU812:x@pengwynn.chargify.com/products.json", "products.json"
197
225
  products = @client.list_products
@@ -209,6 +237,7 @@ class TestChargify < Test::Unit::TestCase
209
237
  product = @client.product_by_handle('tweetsaver')
210
238
  product.accounting_code.should == 'TSMO'
211
239
  end
240
+
212
241
 
213
242
  end
214
243
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Wynn Netherland
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-03-19 00:00:00 -05:00
18
+ date: 2010-05-11 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency