chargify 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/chargify.gemspec +2 -2
- data/lib/chargify.rb +0 -7
- data/lib/chargify/client.rb +1 -1
- data/test/test_chargify.rb +30 -1
- metadata +3 -3
data/Rakefile
CHANGED
data/chargify.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{chargify}
|
8
|
-
s.version = "0.2.
|
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-
|
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 = [
|
data/lib/chargify.rb
CHANGED
data/lib/chargify/client.rb
CHANGED
data/test/test_chargify.rb
CHANGED
@@ -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/
|
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
|
-
-
|
9
|
-
version: 0.2.
|
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-
|
18
|
+
date: 2010-05-11 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|