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 +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/lib/paid/alias.rb +7 -3
- data/lib/paid/api_resource.rb +1 -1
- data/lib/paid/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3307eff83a065d02481db812a81462841b28476b
|
4
|
+
data.tar.gz: 6ee3484e8b4c3fa2de298ef41ab408548ccb07fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a902105387a2f9cc6be3fe04fc88c7f62a7eb2929f9104434c0ad36d4c03920d130665ca675f81725e21bc1a9f2f1b3ee4ae722f3d4311df8debba5275fc90f
|
7
|
+
data.tar.gz: 6509ccea99f1f77e41523f2aa2fe3a269b8b7a99964ca79ea177e73dd2e6122fa8a6bf8264f38f2073fea4ac89ce611f3f12c33f3da1d8d186ec329c6b2990d2
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
pkg
|
data/Gemfile.lock
CHANGED
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
|
-
|
8
|
-
|
9
|
-
|
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
|
data/lib/paid/api_resource.rb
CHANGED
@@ -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
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.
|
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-
|
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
|