fat_zebra 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/lib/fat_zebra/gateway.rb +1 -1
- data/lib/fat_zebra/models/card.rb +15 -0
- data/lib/fat_zebra/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
Njk1NDMzYzQxNDM4ZmY5N2IxMjQ5ZGIzODcyMGY4ZTIzZjZjMDVlOQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OGFhMjkwODU0M2IwY2NkMTQxZTE5OGRlYTA5ZDZhNDc0OWU5ZjY2ZQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MmI2ZDE4MWViNjhmNGZmNzU0NzA0ZDQ2YTM2NzUyNmQ1MGZlNWJmODY1OGUy
|
10
|
+
YzgzMTc0YzI2YjNiODkzMDk5Y2YxNWU3M2M4ZWEwNjJhODg0MzVkN2U0MGNl
|
11
|
+
YmIwYjhiMGNjMzg5NWFlMTMyNjYyODhmYzllZDhiYThlZGRmY2Q=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OGFjZDg3NTllYjNjNmNhNzJhNGM3ZTdjNjBiYzViZDQ5OTBlODM4MWUyNWFh
|
14
|
+
NGFhNmIwNmI5ZDM4MjZlNzNjZDZlNWQ3YWFlZDgzMzU0NDEzZjU5NmFiY2E0
|
15
|
+
MDZmMzIyMjJkYTdhMTczZGIwNWRiMmJmZmYzMDdiMTMzMmNmOGU=
|
data/lib/fat_zebra/gateway.rb
CHANGED
@@ -145,7 +145,7 @@ module FatZebra
|
|
145
145
|
def make_request(method, resource, data = nil)
|
146
146
|
resource = get_resource(resource, method, data)
|
147
147
|
|
148
|
-
if
|
148
|
+
if [:post, :put, :patch].include?(method)
|
149
149
|
data[:test] = options[:test_mode] if options[:test_mode]
|
150
150
|
payload = data.to_json
|
151
151
|
else
|
@@ -28,6 +28,21 @@ module FatZebra
|
|
28
28
|
response = FatZebra.gateway.make_request(:post, "credit_cards", params)
|
29
29
|
Response.new(response, :card)
|
30
30
|
end
|
31
|
+
|
32
|
+
# Update the credit card expiry date
|
33
|
+
#
|
34
|
+
# @param [String] token the credit card token
|
35
|
+
# @param [String] expiry the new expiry date (format: mm/yyyy)
|
36
|
+
#
|
37
|
+
# @return [Response]
|
38
|
+
def update_expiry(token, expiry)
|
39
|
+
params = {
|
40
|
+
card_expiry: expiry
|
41
|
+
}
|
42
|
+
|
43
|
+
response = FatZebra.gateway.make_request(:put, "credit_cards/#{token}", params)
|
44
|
+
Response.new(response, :card)
|
45
|
+
end
|
31
46
|
end
|
32
47
|
end
|
33
48
|
end
|
data/lib/fat_zebra/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fat_zebra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Savage
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project: fat_zebra
|
163
|
-
rubygems_version: 2.
|
163
|
+
rubygems_version: 2.4.3
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: Fat Zebra payments gem - integrate your ruby app with Fat Zebra
|