Method: Fedex::Rate#initialize
- Defined in:
- lib/fedex/rate.rb
#initialize(options = {}) ⇒ Rate
Returns a new instance of Rate.
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/fedex/rate.rb', line 22 def initialize( = {}) @rate_type = [:rate_type] @rate_zone = [:rate_zone] @total_billing_weight = "#{[:total_billing_weight][:value]} #{[:total_billing_weight][:units]}" @total_freight_discounts = [:total_freight_discounts] @total_net_charge = [:total_net_charge][:amount] @total_taxes = [:total_taxes][:amount] @total_net_freight = [:total_net_freight][:amount] @total_surcharges = [:total_surcharges][:amount] @total_base_charge = [:total_base_charge][:amount] @total_net_fedex_charge = ([:total_net_fe_dex_charge]||{})[:amount] @total_rebates = ([:total_rebates]||{})[:amount] end |