virtual_merchant 0.0.2 → 0.0.3

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.
@@ -2,7 +2,11 @@ class VMAmount
2
2
  attr_accessor :total, :tax
3
3
 
4
4
  def initialize(info)
5
- @total = info[:total].to_s
6
- @tax = info[:tax].to_s || "0.00"
5
+ @total = sprintf( "%0.02f", info[:total])
6
+ if info[:tax]
7
+ @tax = sprintf( "%0.02f", info[:tax])
8
+ else
9
+ @tax = "0.00"
10
+ end
7
11
  end
8
12
  end
@@ -4,7 +4,7 @@ class VMCredentials
4
4
  @account_id = info[:account_id].to_s
5
5
  @user_id = info[:user_id].to_s
6
6
  @pin = info[:pin].to_s
7
- @referer = info[:referer.to_s] || false
7
+ @referer = info[:referer].to_s
8
8
  @demo = info[:demo] || false
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virtual_merchant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: