Permalink
Browse files

bump version

  • Loading branch information...
1 parent 796416f commit a32e5a96a963f26353eccc93f4061bb8f3dc8abc @pengwynn committed May 28, 2010
Showing with 25 additions and 29 deletions.
  1. +0 −2 README.markdown
  2. +1 −1 VERSION
  3. +1 −0 changelog.md
  4. +1 −1 lib/chargify.rb
  5. +22 −25 lib/chargify/client.rb
View
@@ -4,8 +4,6 @@ Ruby wrapper for the chargify.com SAAS and billing API
## Installation
- sudo gem install gemcutter
- gem tumble
sudo gem install chargify
## Example Usage
View
@@ -1 +1 @@
-0.2.5
+0.2.6
View
@@ -3,6 +3,7 @@
## 0.2.6 May 27, 2010
* Fix #charge_subscription to submit it's body as json [@will](http://github.com/will) and [@ignat](http://github.com/ignat)
* API coverage for quantity components [@will](http://github.com/will)
+* API coverage for site and subscription transactions [@ignat](http://github.com/ignat)
## 0.2.5 May 24, 2010
* Require fix from [@will](http://github.com/will)
View
@@ -9,5 +9,5 @@
require File.join(directory, 'chargify', 'client')
module Chargify
- VERSION = "0.2.5".freeze
+ VERSION = "0.2.6".freeze
end
View
@@ -127,11 +127,7 @@ def reactivate_subscription(sub_id)
end
def charge_subscription(sub_id, subscription_attributes={})
-<<<<<<< HEAD
- raw_response = self.class.post("/subscriptions/#{sub_id}/charges.json", :body => { :charge => subscription_attributes }.to_json)
-=======
raw_response = post("/subscriptions/#{sub_id}/charges.json", :body => { :charge => subscription_attributes })
->>>>>>> 7b882dbb5e65d7ddd4b2be6ab6227fc13da6fa61
success = raw_response.code == 201
if raw_response.code == 404
raw_response = {}
@@ -169,13 +165,14 @@ def list_subscription_usage(subscription_id, component_id)
end
def subscription_transactions(sub_id, options={})
- transactions = self.class.get("/subscriptions/#{sub_id}/transactions.json", :query => options)
+ transactions = get("/subscriptions/#{sub_id}/transactions.json", :query => options)
transactions.map{|t| Hashie::Mash.new t['transaction']}
end
def site_transactions(options={})
- transactions = self.class.get("/transactions.json", :query => options)
+ transactions = get("/transactions.json", :query => options)
transactions.map{|t| Hashie::Mash.new t['transaction']}
+ end
def list_components(subscription_id)
components = get("/subscriptions/#{subscription_id}/components.json")
@@ -197,29 +194,29 @@ def update_subscription_component_allocated_quantity(subscription_id, component_
private
- def post(path, options={})
- jsonify_body!(options)
- self.class.post(path, options)
- end
+ def post(path, options={})
+ jsonify_body!(options)
+ self.class.post(path, options)
+ end
- def put(path, options={})
- jsonify_body!(options)
- self.class.put(path, options)
- end
+ def put(path, options={})
+ jsonify_body!(options)
+ self.class.put(path, options)
+ end
- def delete(path, options={})
- jsonify_body!(options)
- self.class.delete(path, options)
- end
+ def delete(path, options={})
+ jsonify_body!(options)
+ self.class.delete(path, options)
+ end
- def get(path, options={})
- jsonify_body!(options)
- self.class.get(path, options)
- end
+ def get(path, options={})
+ jsonify_body!(options)
+ self.class.get(path, options)
+ end
- def jsonify_body!(options)
- options[:body] = options[:body].to_json if options[:body]
+ def jsonify_body!(options)
+ options[:body] = options[:body].to_json if options[:body]
- end
+ end
end
end

0 comments on commit a32e5a9

Please sign in to comment.