Class: Fedex::Rate
 Inherits:

Object
 Object
 Fedex::Rate
 Defined in:
 lib/fedex/rate.rb
Overview
Visit / Fedex Developer Center for a complete list of values returned from the API
Rate totals are contained in the node
response[:rate_reply][:rate_reply_details][:rated_shipment_details]
Instance Attribute Summary collapse

#rate_type ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object] @rate_type #Type used for this specific set of rate data @rate_zone #Indicates the rate zone used(based on origin and destination) @total_billing_weight #The weight used to calculate these rates @total_freight_discounts #The toal discounts used in the rate calculation @total_net_charge #The net charge after applying all discounts and surcharges @total_taxes #Total of the transportationbased taxes @total_net_freight #The freight charge minus dicounts @total_surcharges #The total amount of all surcharges applied to this shipment @total_base_charge #The total base charge.

#rate_zone ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object] @rate_type #Type used for this specific set of rate data @rate_zone #Indicates the rate zone used(based on origin and destination) @total_billing_weight #The weight used to calculate these rates @total_freight_discounts #The toal discounts used in the rate calculation @total_net_charge #The net charge after applying all discounts and surcharges @total_taxes #Total of the transportationbased taxes @total_net_freight #The freight charge minus dicounts @total_surcharges #The total amount of all surcharges applied to this shipment @total_base_charge #The total base charge.

#service_type ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object] @rate_type #Type used for this specific set of rate data @rate_zone #Indicates the rate zone used(based on origin and destination) @total_billing_weight #The weight used to calculate these rates @total_freight_discounts #The toal discounts used in the rate calculation @total_net_charge #The net charge after applying all discounts and surcharges @total_taxes #Total of the transportationbased taxes @total_net_freight #The freight charge minus dicounts @total_surcharges #The total amount of all surcharges applied to this shipment @total_base_charge #The total base charge.

#total_base_charge ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object] @rate_type #Type used for this specific set of rate data @rate_zone #Indicates the rate zone used(based on origin and destination) @total_billing_weight #The weight used to calculate these rates @total_freight_discounts #The toal discounts used in the rate calculation @total_net_charge #The net charge after applying all discounts and surcharges @total_taxes #Total of the transportationbased taxes @total_net_freight #The freight charge minus dicounts @total_surcharges #The total amount of all surcharges applied to this shipment @total_base_charge #The total base charge.

#total_billing_weight ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object] @rate_type #Type used for this specific set of rate data @rate_zone #Indicates the rate zone used(based on origin and destination) @total_billing_weight #The weight used to calculate these rates @total_freight_discounts #The toal discounts used in the rate calculation @total_net_charge #The net charge after applying all discounts and surcharges @total_taxes #Total of the transportationbased taxes @total_net_freight #The freight charge minus dicounts @total_surcharges #The total amount of all surcharges applied to this shipment @total_base_charge #The total base charge.

#total_freight_discounts ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object] @rate_type #Type used for this specific set of rate data @rate_zone #Indicates the rate zone used(based on origin and destination) @total_billing_weight #The weight used to calculate these rates @total_freight_discounts #The toal discounts used in the rate calculation @total_net_charge #The net charge after applying all discounts and surcharges @total_taxes #Total of the transportationbased taxes @total_net_freight #The freight charge minus dicounts @total_surcharges #The total amount of all surcharges applied to this shipment @total_base_charge #The total base charge.

#total_net_charge ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object] @rate_type #Type used for this specific set of rate data @rate_zone #Indicates the rate zone used(based on origin and destination) @total_billing_weight #The weight used to calculate these rates @total_freight_discounts #The toal discounts used in the rate calculation @total_net_charge #The net charge after applying all discounts and surcharges @total_taxes #Total of the transportationbased taxes @total_net_freight #The freight charge minus dicounts @total_surcharges #The total amount of all surcharges applied to this shipment @total_base_charge #The total base charge.

#total_net_freight ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object] @rate_type #Type used for this specific set of rate data @rate_zone #Indicates the rate zone used(based on origin and destination) @total_billing_weight #The weight used to calculate these rates @total_freight_discounts #The toal discounts used in the rate calculation @total_net_charge #The net charge after applying all discounts and surcharges @total_taxes #Total of the transportationbased taxes @total_net_freight #The freight charge minus dicounts @total_surcharges #The total amount of all surcharges applied to this shipment @total_base_charge #The total base charge.

#total_surcharges ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object] @rate_type #Type used for this specific set of rate data @rate_zone #Indicates the rate zone used(based on origin and destination) @total_billing_weight #The weight used to calculate these rates @total_freight_discounts #The toal discounts used in the rate calculation @total_net_charge #The net charge after applying all discounts and surcharges @total_taxes #Total of the transportationbased taxes @total_net_freight #The freight charge minus dicounts @total_surcharges #The total amount of all surcharges applied to this shipment @total_base_charge #The total base charge.

#total_taxes ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object] @rate_type #Type used for this specific set of rate data @rate_zone #Indicates the rate zone used(based on origin and destination) @total_billing_weight #The weight used to calculate these rates @total_freight_discounts #The toal discounts used in the rate calculation @total_net_charge #The net charge after applying all discounts and surcharges @total_taxes #Total of the transportationbased taxes @total_net_freight #The freight charge minus dicounts @total_surcharges #The total amount of all surcharges applied to this shipment @total_base_charge #The total base charge.

#transit_time ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object] @rate_type #Type used for this specific set of rate data @rate_zone #Indicates the rate zone used(based on origin and destination) @total_billing_weight #The weight used to calculate these rates @total_freight_discounts #The toal discounts used in the rate calculation @total_net_charge #The net charge after applying all discounts and surcharges @total_taxes #Total of the transportationbased taxes @total_net_freight #The freight charge minus dicounts @total_surcharges #The total amount of all surcharges applied to this shipment @total_base_charge #The total base charge.
Instance Method Summary collapse

#initialize(options = {}) ⇒ Rate
constructor
A new instance of Rate.
Constructor Details
#initialize(options = {}) ⇒ Rate
Returns a new instance of Rate.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 
# File 'lib/fedex/rate.rb', line 22 def initialize( = {}) @service_type = [:service_type] @transit_time = [:transit_time] @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 
Instance Attribute Details
#rate_type ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object]
@rate_type #Type used for this specific set of rate data
@rate_zone #Indicates the rate zone used(based on origin and destination)
@total_billing_weight #The weight used to calculate these rates
@total_freight_discounts #The toal discounts used in the rate calculation
@total_net_charge #The net charge after applying all discounts and surcharges
@total_taxes #Total of the transportationbased taxes
@total_net_freight #The freight charge minus dicounts
@total_surcharges #The total amount of all surcharges applied to this shipment
@total_base_charge #The total base charge
21 22 23 
# File 'lib/fedex/rate.rb', line 21 def rate_type @rate_type end 
#rate_zone ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object]
@rate_type #Type used for this specific set of rate data
@rate_zone #Indicates the rate zone used(based on origin and destination)
@total_billing_weight #The weight used to calculate these rates
@total_freight_discounts #The toal discounts used in the rate calculation
@total_net_charge #The net charge after applying all discounts and surcharges
@total_taxes #Total of the transportationbased taxes
@total_net_freight #The freight charge minus dicounts
@total_surcharges #The total amount of all surcharges applied to this shipment
@total_base_charge #The total base charge
21 22 23 
# File 'lib/fedex/rate.rb', line 21 def rate_zone @rate_zone end 
#service_type ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object]
@rate_type #Type used for this specific set of rate data
@rate_zone #Indicates the rate zone used(based on origin and destination)
@total_billing_weight #The weight used to calculate these rates
@total_freight_discounts #The toal discounts used in the rate calculation
@total_net_charge #The net charge after applying all discounts and surcharges
@total_taxes #Total of the transportationbased taxes
@total_net_freight #The freight charge minus dicounts
@total_surcharges #The total amount of all surcharges applied to this shipment
@total_base_charge #The total base charge
21 22 23 
# File 'lib/fedex/rate.rb', line 21 def service_type @service_type end 
#total_base_charge ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object]
@rate_type #Type used for this specific set of rate data
@rate_zone #Indicates the rate zone used(based on origin and destination)
@total_billing_weight #The weight used to calculate these rates
@total_freight_discounts #The toal discounts used in the rate calculation
@total_net_charge #The net charge after applying all discounts and surcharges
@total_taxes #Total of the transportationbased taxes
@total_net_freight #The freight charge minus dicounts
@total_surcharges #The total amount of all surcharges applied to this shipment
@total_base_charge #The total base charge
21 22 23 
# File 'lib/fedex/rate.rb', line 21 def total_base_charge @total_base_charge end 
#total_billing_weight ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object]
@rate_type #Type used for this specific set of rate data
@rate_zone #Indicates the rate zone used(based on origin and destination)
@total_billing_weight #The weight used to calculate these rates
@total_freight_discounts #The toal discounts used in the rate calculation
@total_net_charge #The net charge after applying all discounts and surcharges
@total_taxes #Total of the transportationbased taxes
@total_net_freight #The freight charge minus dicounts
@total_surcharges #The total amount of all surcharges applied to this shipment
@total_base_charge #The total base charge
21 22 23 
# File 'lib/fedex/rate.rb', line 21 def total_billing_weight @total_billing_weight end 
#total_freight_discounts ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object]
@rate_type #Type used for this specific set of rate data
@rate_zone #Indicates the rate zone used(based on origin and destination)
@total_billing_weight #The weight used to calculate these rates
@total_freight_discounts #The toal discounts used in the rate calculation
@total_net_charge #The net charge after applying all discounts and surcharges
@total_taxes #Total of the transportationbased taxes
@total_net_freight #The freight charge minus dicounts
@total_surcharges #The total amount of all surcharges applied to this shipment
@total_base_charge #The total base charge
21 22 23 
# File 'lib/fedex/rate.rb', line 21 def total_freight_discounts @total_freight_discounts end 
#total_net_charge ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object]
@rate_type #Type used for this specific set of rate data
@rate_zone #Indicates the rate zone used(based on origin and destination)
@total_billing_weight #The weight used to calculate these rates
@total_freight_discounts #The toal discounts used in the rate calculation
@total_net_charge #The net charge after applying all discounts and surcharges
@total_taxes #Total of the transportationbased taxes
@total_net_freight #The freight charge minus dicounts
@total_surcharges #The total amount of all surcharges applied to this shipment
@total_base_charge #The total base charge
21 22 23 
# File 'lib/fedex/rate.rb', line 21 def total_net_charge @total_net_charge end 
#total_net_freight ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object]
@rate_type #Type used for this specific set of rate data
@rate_zone #Indicates the rate zone used(based on origin and destination)
@total_billing_weight #The weight used to calculate these rates
@total_freight_discounts #The toal discounts used in the rate calculation
@total_net_charge #The net charge after applying all discounts and surcharges
@total_taxes #Total of the transportationbased taxes
@total_net_freight #The freight charge minus dicounts
@total_surcharges #The total amount of all surcharges applied to this shipment
@total_base_charge #The total base charge
21 22 23 
# File 'lib/fedex/rate.rb', line 21 def total_net_freight @total_net_freight end 
#total_surcharges ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object]
@rate_type #Type used for this specific set of rate data
@rate_zone #Indicates the rate zone used(based on origin and destination)
@total_billing_weight #The weight used to calculate these rates
@total_freight_discounts #The toal discounts used in the rate calculation
@total_net_charge #The net charge after applying all discounts and surcharges
@total_taxes #Total of the transportationbased taxes
@total_net_freight #The freight charge minus dicounts
@total_surcharges #The total amount of all surcharges applied to this shipment
@total_base_charge #The total base charge
21 22 23 
# File 'lib/fedex/rate.rb', line 21 def total_surcharges @total_surcharges end 
#total_taxes ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object]
@rate_type #Type used for this specific set of rate data
@rate_zone #Indicates the rate zone used(based on origin and destination)
@total_billing_weight #The weight used to calculate these rates
@total_freight_discounts #The toal discounts used in the rate calculation
@total_net_charge #The net charge after applying all discounts and surcharges
@total_taxes #Total of the transportationbased taxes
@total_net_freight #The freight charge minus dicounts
@total_surcharges #The total amount of all surcharges applied to this shipment
@total_base_charge #The total base charge
21 22 23 
# File 'lib/fedex/rate.rb', line 21 def total_taxes @total_taxes end 
#transit_time ⇒ Object
Initialize Fedex::Rate Object return [Fedex::Rate Object]
@rate_type #Type used for this specific set of rate data
@rate_zone #Indicates the rate zone used(based on origin and destination)
@total_billing_weight #The weight used to calculate these rates
@total_freight_discounts #The toal discounts used in the rate calculation
@total_net_charge #The net charge after applying all discounts and surcharges
@total_taxes #Total of the transportationbased taxes
@total_net_freight #The freight charge minus dicounts
@total_surcharges #The total amount of all surcharges applied to this shipment
@total_base_charge #The total base charge
21 22 23 
# File 'lib/fedex/rate.rb', line 21 def transit_time @transit_time end 