amex_tokenization_client 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: bc1bed91ec19fe5de22c7ff1f400beb1194b3dedb786cdaf0b9d5508cec2517e
4
- data.tar.gz: 1fda85c458678f521642fa5204bcab84a913b3f8a587bd27d29b0dccec06d2ea
3
+ metadata.gz: c62e09182ba57700d963be41b847603d89a6323bce020c9e55dc505f628a0e25
4
+ data.tar.gz: f762f6e1827b2e44ff8ecc3fafc58614b24bb7ae2640dfcb57aaff1efcf41855
5
5
  SHA512:
6
- metadata.gz: 7f3c8728670b59815678f7801dc7cbf3d0640bf223d16cbf102c577b36ff6a66ca8dada4acb052da1533224fd0fe33b068b109f70cd2bd1e231ce5754ffe3bcb
7
- data.tar.gz: 53ea08d13c512d49a99f126bd588fbae6c77ddad17576000b02f28a997ecacc29f9d14940fa8d99051b4053d5bdf2c0d95f5d53eff4f1758d219fb3db8bd6711
6
+ metadata.gz: 6fa54da88d1bbb087dff44abc4e3042e6dd459ca7fba71fa7245ed629878178cb8a3ee25eed4bf8a5e2ded85bba39b3e46724a640217e9662a031b7c8bbce937
7
+ data.tar.gz: 68e290243275f584da6367c737942e78ccad1d32b2e8cf3c3ff45562ec7b9208e9c0e09b51eac43f0193b996a5bd7bfb94c680f9276be3f7c0c7307e25c06244
data/README.md CHANGED
@@ -1,15 +1,17 @@
1
1
  # AmexTokenizationClient
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/amex_tokenization_client.svg)](https://badge.fury.io/rb/amex_tokenization_client)
3
4
  [![Travis CI Status](https://secure.travis-ci.org/varyonic/amex-api-ruby-client.svg)](https://travis-ci.org/varyonic/amex-api-ruby-client)
4
5
 
5
6
  Unofficial Ruby wrapper for the American Express Tokenization Service (AETS).
6
7
 
7
8
  ## Installation
8
9
 
9
- Add this line to your application's Gemfile:
10
+ Add to your application's Gemfile:
10
11
 
11
12
  ```ruby
12
13
  gem 'amex_tokenization_client'
14
+ gem 'jwe', git: 'https://github.com/varyonic/ruby-jwe', branch: 'PR18' # A256KW fix
13
15
  ```
14
16
 
15
17
  And then execute:
@@ -4,12 +4,14 @@ require 'net/http'
4
4
  class AmexTokenizationClient
5
5
  class Request
6
6
  attr_reader :uri, :request
7
+ attr_reader :headers
7
8
  attr_reader :logger
8
9
 
9
10
  def initialize(method, path, headers, logger:)
10
11
  @logger = logger
11
12
  @uri = URI(path)
12
13
  @request = Net::HTTP.const_get(method.capitalize).new(uri)
14
+ @headers = headers
13
15
  headers.each_pair { |k, v| request[k] = v }
14
16
  end
15
17
 
@@ -37,6 +39,7 @@ class AmexTokenizationClient
37
39
  # Log response and time taken.
38
40
  def log_request_response(data = nil)
39
41
  logger.info "[#{self.class.name}] request = #{request.method} #{uri}#{data ? '?' + data : ''}"
42
+ logger.info "[#{self.class.name}] request_id = #{headers['x-amex-request-id']}"
40
43
  response = nil
41
44
  tms = Benchmark.measure do
42
45
  response = yield
@@ -1,3 +1,3 @@
1
1
  class AmexTokenizationClient
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amex_tokenization_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piers Chambers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-03 00:00:00.000000000 Z
11
+ date: 2019-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwe