swish_qr 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/swish_qr.rb +2 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d7a0d29f45bcd41a9c91d3e9a600524576958fe
4
- data.tar.gz: 68cf5fbf651feadea7f4bdf68e00780f8f6b8c88
3
+ metadata.gz: 93326fd5d9efd57f41c00e3c72d66ae379a7326b
4
+ data.tar.gz: 5fb2b8a6e5d5231f02ed1611f61ec2a247224bf8
5
5
  SHA512:
6
- metadata.gz: f6830d15acbc6a82628c2dd67f5c86d2f0fc6d2d7b6b09a7590fcce3aab12bbc9e2c2039e67819e6a0e3cf7f26c1e60b312d5052cc946a8a17f45b443a53faa8
7
- data.tar.gz: fd21233a86c8ae588d0a310db14e3e3e98b90f67d89c8c784e0491a86af62562ccd8b9356ca311325d14fd54d9b36eb7dd293febd8377afd0df105bf673190b2
6
+ metadata.gz: 21778b12357f0b50ee25a56121beb6d8ec61f25291b662399bff4f02acb83d1983f5bf2ceb3fbab482857d99a35f887fd130abf8bc469e0c9f4dc1e81b4a4187
7
+ data.tar.gz: d9b41f3149996f00179a28e7df6caf94e933e18f2f202639044871690f054a90a7231f75081dc3fe20fbb3ee95b8566e29392349bb22cc7c243be6c49a9427a6
@@ -49,6 +49,7 @@ class SwishQr
49
49
  @image_format = args[:format]
50
50
  @request_hash = get_simple_values_from_args(args)
51
51
  @request_hash.merge!(get_complex_values_from_args(args))
52
+ @request_hash.delete(:amount) if @request_hash[:amount] && @request_hash[:amount][:value].to_i == 0
52
53
  #puts @request_hash
53
54
  @request_hash.to_json
54
55
  end
@@ -60,7 +61,7 @@ class SwishQr
60
61
  def get_complex_values_from_args(args)
61
62
  ret = {}
62
63
  COMPLEX_VALUES.each do |k|
63
- ret[k] = { value: args[k], editable: (args[:editable].include?(k)) } if args[k]
64
+ ret[k] = { value: args[k], editable: ((args[:editable]||[]).include?(k)) } if args[k]
64
65
  end
65
66
  ret
66
67
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swish_qr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linus Corin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-14 00:00:00.000000000 Z
11
+ date: 2017-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty