tap-clutch 0.0.3 → 0.0.4

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: 5d29a50271fa545a4f78c7fe6ad108486ba8d4bb
4
- data.tar.gz: f92a609fb2960cdae03941b859028172e6ea7c0c
3
+ metadata.gz: fc0c366f42a789cc28072b003f91bd0ff0cd2daf
4
+ data.tar.gz: a84aa6da3d6592ece88f9e709069fdb41fbd64bb
5
5
  SHA512:
6
- metadata.gz: e767d11450b859de63ab9eb25a650005678565ac7512f7e8f73dba9af305f5e5cc03cc701df0cc9a5e4f7811324461717db71e911cb94df623ada479a250cda3
7
- data.tar.gz: ccf2a3463b288e38e2f74e89cb7a26ddea96ce4639d721b5142beb66e33705dc68c73c7a19892a3be7d2a4b41fd3847823daa387c0896f2f391229611d6310ff
6
+ metadata.gz: 3558a26172f43e71234aea65868915513edec48bac5edebaa0d348c991c8e115b5658eb065eecb435e1beb91cf5917cd2b624ce866b6a52f7cb4fcfeca9a3f90
7
+ data.tar.gz: 07a0de93e22b24f6067e15875734f108b91ce27d96038c82f4d9a1bfe391e640195624d39bc65b28153f6aa73f85499272827bc400e2600314f363e291127ccf
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative 'base'
4
4
  require_relative 'transaction'
5
+ require_relative '../hash'
5
6
 
6
7
  module TapClutch
7
8
  module Models
@@ -36,11 +37,12 @@ module TapClutch
36
37
  }
37
38
  )
38
39
 
39
- new(response.cards.first) if response.cards.first
40
+ return unless response.cards.first
41
+ new(response.cards.first.to_h.transform_keys(&:underscore))
40
42
  end
41
43
 
42
44
  def extra_records
43
- Transaction.history(data.cardNumber)
45
+ Transaction.history(data['card_number'])
44
46
  end
45
47
  end
46
48
  end
@@ -25,7 +25,8 @@ module TapClutch
25
25
  )
26
26
 
27
27
  response.transactions.map do |transaction|
28
- new(transaction.merge(cardNumber: card_number))
28
+ new(transaction.merge(card_number: card_number)
29
+ .deep_transform_keys(&:underscore))
29
30
  end
30
31
  end
31
32
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TapClutch
4
- VERSION = '0.0.3'
4
+ VERSION = '0.0.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tap-clutch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Lind