binarylogic-shippinglogic 1.0.6 → 1.0.7

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.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.0.7 released 2009-07-09
2
+
3
+ * Fix decimal conversion bug, cant convert a raw float to a decimal.
4
+
1
5
  == 1.0.6 released 2009-07-09
2
6
 
3
7
  * Reset the cached response if an attribute changes.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 0
3
- :patch: 6
3
+ :patch: 7
4
4
  :major: 1
@@ -103,8 +103,8 @@ module Shippinglogic
103
103
  value.to_i
104
104
  when :float
105
105
  value.to_f
106
- when :big_decimal
107
- BigDecimal.new(value)
106
+ when :decimal
107
+ BigDecimal.new(value.to_s)
108
108
  when :boolean
109
109
  ["true", "1"].include?(value.to_s)
110
110
  when :string, :text
@@ -119,7 +119,7 @@ module Shippinglogic
119
119
 
120
120
  # monetary options
121
121
  attribute :currency_type, :string
122
- attribute :insured_value, :big_decimal
122
+ attribute :insured_value, :decimal
123
123
  attribute :payment_type, :string, :default => "SENDER"
124
124
  attribute :payor_account_number, :string, :default => lambda { |shipment| shipment.base.account }
125
125
  attribute :payor_country, :string
@@ -84,7 +84,7 @@ module Shippinglogic
84
84
  # )
85
85
  #
86
86
  # shipment.inspect
87
- # #<Shippinglogic::FedEx::Ship::Shipment rate:big_decimal, currency:string, delivery_date:date, tracking_number:string,
87
+ # #<Shippinglogic::FedEx::Ship::Shipment rate:decimal, currency:string, delivery_date:date, tracking_number:string,
88
88
  # label:string(base64 decoded), barcode:string(base64 decoded) >
89
89
  #
90
90
  # # to show accessor methods
@@ -136,7 +136,7 @@ module Shippinglogic
136
136
 
137
137
  # monetary options
138
138
  attribute :currency_type, :string
139
- attribute :insured_value, :big_decimal
139
+ attribute :insured_value, :decimal
140
140
  attribute :payment_type, :string, :default => "SENDER"
141
141
  attribute :payor_account_number, :string, :default => lambda { |shipment| shipment.base.account }
142
142
  attribute :payor_country, :string
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shippinglogic}
8
- s.version = "1.0.6"
8
+ s.version = "1.0.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ben Johnson of Binary Logic"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: binarylogic-shippinglogic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Johnson of Binary Logic