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 CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 12eca7538a469a8a681e37ee9fb816e113941ceb
4
- data.tar.gz: c0b4b46f1dbe9b7da713f7e1b44d814bae1e11db
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Njk1NDMzYzQxNDM4ZmY5N2IxMjQ5ZGIzODcyMGY4ZTIzZjZjMDVlOQ==
5
+ data.tar.gz: !binary |-
6
+ OGFhMjkwODU0M2IwY2NkMTQxZTE5OGRlYTA5ZDZhNDc0OWU5ZjY2ZQ==
5
7
  SHA512:
6
- metadata.gz: 6bd161af6c85201b40d375d0a6d5833cf98216323d874204fe7d2e35b8e3d3f30dca9840c7d6dc655078dc902f8b4eb8f194f0a69e8184ba9ccca580d90e1fe4
7
- data.tar.gz: 0290013901adfb328ccbb28a556dd1761c3dd806018b6f9a4bb6b77c272cf3bc2724597a4ab86712553b29d69c4f64692e0a0c539cf2ec9145c1bab965fc7fbf
8
+ metadata.gz: !binary |-
9
+ MmI2ZDE4MWViNjhmNGZmNzU0NzA0ZDQ2YTM2NzUyNmQ1MGZlNWJmODY1OGUy
10
+ YzgzMTc0YzI2YjNiODkzMDk5Y2YxNWU3M2M4ZWEwNjJhODg0MzVkN2U0MGNl
11
+ YmIwYjhiMGNjMzg5NWFlMTMyNjYyODhmYzllZDhiYThlZGRmY2Q=
12
+ data.tar.gz: !binary |-
13
+ OGFjZDg3NTllYjNjNmNhNzJhNGM3ZTdjNjBiYzViZDQ5OTBlODM4MWUyNWFh
14
+ NGFhNmIwNmI5ZDM4MjZlNzNjZDZlNWQ3YWFlZDgzMzU0NDEzZjU5NmFiY2E0
15
+ MDZmMzIyMjJkYTdhMTczZGIwNWRiMmJmZmYzMDdiMTMzMmNmOGU=
@@ -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 method == :post
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
@@ -1,3 +1,3 @@
1
1
  module FatZebra
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  end
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.2
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: 2014-09-15 00:00:00.000000000 Z
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.2.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