chargify_api_ares 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.8
1
+ 0.3.9
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{chargify_api_ares}
8
- s.version = "0.3.8"
8
+ s.version = "0.3.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Klett", "Nathan Verni", "The Lab Rats @ Phase Two Labs", "Brian Rose"]
12
- s.date = %q{2011-2-20}
12
+ s.date = %q{2011-3-2}
13
13
  s.description = %q{}
14
14
  s.email = %q{mklett@grasshopper.com}
15
15
  s.extra_rdoc_files = [
@@ -63,6 +63,7 @@ module Chargify
63
63
 
64
64
  Base.site = site
65
65
  Subscription::Component.site = site + "/subscriptions/:subscription_id"
66
+ Subscription::Statement.site = site + "/subscriptions/:subscription_id"
66
67
  Subscription::Transaction.site = site + "/subscriptions/:subscription_id"
67
68
  end
68
69
  end
@@ -157,6 +158,17 @@ module Chargify
157
158
  def migrate(attrs = {})
158
159
  post :migrations, :migration => attrs
159
160
  end
161
+
162
+ def statement(id)
163
+ statement = Chargify::Statement.find(id)
164
+ raise ActiveResource::ResourceNotFound.new(nil) if (statement.subscription_id != self.id)
165
+ statement
166
+ end
167
+
168
+ def statements(params = {})
169
+ params.merge!(:subscription_id => self.id)
170
+ Statement.find(:all, :params => params)
171
+ end
160
172
 
161
173
  def transactions(params = {})
162
174
  params.merge!(:subscription_id => self.id)
@@ -169,6 +181,9 @@ module Chargify
169
181
  self.component_id
170
182
  end
171
183
  end
184
+
185
+ class Statement < Base
186
+ end
172
187
 
173
188
  class Transaction < Base
174
189
  def full_refund(attrs = {})
@@ -228,7 +243,10 @@ module Chargify
228
243
 
229
244
  class Component < Base
230
245
  end
231
-
246
+
247
+ class Statement < Base
248
+ end
249
+
232
250
  class Transaction < Base
233
251
  def full_refund(attrs = {})
234
252
  return false if self.transaction_type != 'payment'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chargify_api_ares
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 8
10
- version: 0.3.8
9
+ - 9
10
+ version: 0.3.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Klett
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2011-02-20 00:00:00 -05:00
21
+ date: 2011-03-02 00:00:00 -05:00
22
22
  default_executable:
23
23
  dependencies: []
24
24