docdata-order 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1504b4d5df07a35ae4e4b403776da567d2bab632
4
- data.tar.gz: '079dfe209ce3bc7a99f1040721a5290f2ac29c9b'
3
+ metadata.gz: 10bb3f962150a565fe9b496efee90734099c09ff
4
+ data.tar.gz: 24489d017c6bd41765da9b4baf0bc46b8fff2bd1
5
5
  SHA512:
6
- metadata.gz: 9d0d115f0d0427605c95c3d1d128e0f8f1e8f2667789b95366fd9a97ea887fbed2a1e6cbcc733b91b7226e7ec4e20a70a6ad186344b19e16f945e0c912d1810a
7
- data.tar.gz: 69f6a2e859992879043497eb3d27f76e3e373e1bc965aab1e4ebfd87159d5912b97a1ecce6c388b21ccc5dfe738f4add1d39f2c9ca5ab4f3f5a35c2eeff86f63
6
+ metadata.gz: 80158fcacd7d4640785952e0f55561f8888e8f92c80926ad3e2e23ab3a4273586eb51017a20133b9828c0b2c73e7ac975d31fde137e0db7100d0ddf5248b6b7b
7
+ data.tar.gz: 1539b96288ca0faaefb15a7aecb88cbd26daab80329fde08b1b4c2f653aab9420a529eb32fd43816368315071c44a9f4e5a7219c630867e5c03f1efaf9538a0c
data/.rubocop.yml CHANGED
@@ -5,6 +5,10 @@ AllCops:
5
5
  DisplayCopNames: true
6
6
  DisplayStyleGuide: true
7
7
 
8
+ # We target 2.3, but still want to support 2.0.
9
+ Gemspec/RequiredRubyVersion:
10
+ Enabled: false
11
+
8
12
  Metrics/AbcSize:
9
13
  Max: 53
10
14
 
@@ -25,6 +29,9 @@ Style/BlockDelimiters:
25
29
  Exclude:
26
30
  - 'spec/**/*.rb'
27
31
 
32
+ Style/ExpandPathArguments:
33
+ Enabled: false
34
+
28
35
  Style/GuardClause:
29
36
  Enabled: false
30
37
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Docdata::Order changelog
2
2
 
3
+ ## 1.0.1 (2018-10-05)
4
+
5
+ - Added Moneyou to the list of iDEAL issuers.
6
+ - Fixed result of ExtendedStatusResponse#total_reversed.
7
+
3
8
  ## 1.0.0 (2018-02-09)
4
9
 
5
10
  - First public release.
data/Gemfile CHANGED
@@ -5,4 +5,4 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in docdata-order.gemspec
6
6
  gemspec
7
7
 
8
- gem 'rubocop', '~> 0.50.0'
8
+ gem 'rubocop', '~> 0.59.2'
@@ -6,9 +6,10 @@ module Docdata
6
6
  ISSUERS = {
7
7
  "ABNANL2A" => "ABN AMRO",
8
8
  "ASNBNL21" => "ASN Bank",
9
- "BUNQNL2A" => "Bunq",
9
+ "BUNQNL2A" => "bunq",
10
10
  "INGBNL2A" => "ING",
11
11
  "KNABNL2H" => "Knab bank",
12
+ "MOYONL21" => "Moneyou",
12
13
  "RABONL2U" => "Rabobank",
13
14
  "RBRBNL21" => "RegioBank",
14
15
  "SNSBNL2A" => "SNS Bank",
@@ -135,7 +135,7 @@ module Docdata
135
135
  private
136
136
 
137
137
  def amount
138
- decimal = BigDecimal.new(options.fetch(:amount).to_s)
138
+ decimal = BigDecimal(options.fetch(:amount).to_s)
139
139
  decimal *= 100 # to cents
140
140
  decimal.to_i
141
141
  end
@@ -178,7 +178,7 @@ module Docdata
178
178
 
179
179
  # When multiple payments are found, return the payment with the newest ID.
180
180
  if payment.is_a?(Array)
181
- payment.sort_by { |key, _value| key[:id] }.last
181
+ payment.max_by { |key, _value| key[:id] }
182
182
  else
183
183
  payment
184
184
  end
@@ -248,7 +248,7 @@ module Docdata
248
248
  end
249
249
 
250
250
  def total_reversed
251
- to_decimal(approximate_totals[:total_chargedback])
251
+ to_decimal(approximate_totals[:total_reversed])
252
252
  end
253
253
 
254
254
  def total_charged_back
@@ -319,7 +319,7 @@ module Docdata
319
319
  private
320
320
 
321
321
  def to_decimal(cents)
322
- total = BigDecimal.new(cents)
322
+ total = BigDecimal(cents)
323
323
  total /= 100.0
324
324
  total
325
325
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Docdata
4
4
  module Order
5
- VERSION = "1.0.0"
5
+ VERSION = "1.0.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docdata-order
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kentaa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-09 00:00:00.000000000 Z
11
+ date: 2018-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler