paid 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a65354aaa827caf02fc1b825ba0bc3b1f072a611
4
- data.tar.gz: c357437af8ccd7a09ac93f0781bcb247ea42763c
3
+ metadata.gz: 3307eff83a065d02481db812a81462841b28476b
4
+ data.tar.gz: 6ee3484e8b4c3fa2de298ef41ab408548ccb07fa
5
5
  SHA512:
6
- metadata.gz: ad46bf19a8036d9bf2a35ed7ddc255938fac154c9eb400b834f1e4e2335cf8481813690e448d3bf99fe82504af8ac291cc248135809d90498e1846a7267fb690
7
- data.tar.gz: b08898a0c4816a4bf13b9d73d3603ebb0df7c77db726c70808c57ab258f08b780c98fe59815805016dfc94d818590f2d294bf2e1cdef171a395bd520dc538669
6
+ metadata.gz: 5a902105387a2f9cc6be3fe04fc88c7f62a7eb2929f9104434c0ad36d4c03920d130665ca675f81725e21bc1a9f2f1b3ee4ae722f3d4311df8debba5275fc90f
7
+ data.tar.gz: 6509ccea99f1f77e41523f2aa2fe3a269b8b7a99964ca79ea177e73dd2e6122fa8a6bf8264f38f2073fea4ac89ce611f3f12c33f3da1d8d186ec329c6b2990d2
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ pkg
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paid (0.0.6)
4
+ paid (0.0.7)
5
5
  json (~> 1.8.1)
6
6
  mime-types (>= 1.25, < 3.0)
7
7
  rest-client (~> 1.4)
data/lib/paid/alias.rb CHANGED
@@ -4,9 +4,13 @@ module Paid
4
4
 
5
5
  def self.retrieve(id, api_key=nil)
6
6
  customer_alias = super(id, api_key)
7
- instance = Paid::Customer.new(customer_alias.id, api_key)
8
- instance.refresh
9
- instance
7
+ if customer_alias.respond_to? "error"
8
+ customer_alias
9
+ else
10
+ instance = Paid::Customer.new(customer_alias.id, api_key)
11
+ instance.refresh
12
+ instance
13
+ end
10
14
  end
11
15
  end
12
16
  end
@@ -16,7 +16,7 @@ module Paid
16
16
  unless id = self['id']
17
17
  raise InvalidRequestError.new("Could not determine which URL to request: #{self.class} instance has invalid ID: #{id.inspect}", 'id')
18
18
  end
19
- "#{self.class.api_url}/#{CGI.escape(id)}"
19
+ "#{self.class.api_url}/#{CGI.escape(id.to_s)}"
20
20
  end
21
21
 
22
22
  def refresh
data/lib/paid/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Paid
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Jackson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-20 00:00:00.000000000 Z
11
+ date: 2015-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -122,6 +122,7 @@ executables: []
122
122
  extensions: []
123
123
  extra_rdoc_files: []
124
124
  files:
125
+ - ".gitignore"
125
126
  - Gemfile
126
127
  - Gemfile.lock
127
128
  - MIT-LICENSE