Class: FuelSurcharge::TNT
- Inherits:
-
Object
- Object
- FuelSurcharge::TNT
- Defined in:
- lib/fuel_surcharge/tnt.rb
Instance Method Summary collapse
- #air_multiplier ⇒ Object
- #air_percentage ⇒ Object
- #road_multiplier ⇒ Object
- #road_percentage ⇒ Object
- #time_period ⇒ Object
- #url ⇒ Object
Instance Method Details
#air_multiplier ⇒ Object
28 29 30 |
# File 'lib/fuel_surcharge/tnt.rb', line 28 def air_multiplier air_percentage&.to_multiplier end |
#air_percentage ⇒ Object
18 19 20 21 22 |
# File 'lib/fuel_surcharge/tnt.rb', line 18 def air_percentage if (value = air_value&.dig("list", 0, "surcharge")) value.tr(".", ",") << "%" end end |
#road_multiplier ⇒ Object
24 25 26 |
# File 'lib/fuel_surcharge/tnt.rb', line 24 def road_multiplier road_percentage&.to_multiplier end |
#road_percentage ⇒ Object
14 15 16 |
# File 'lib/fuel_surcharge/tnt.rb', line 14 def road_percentage road_value&.last&.to_s end |
#time_period ⇒ Object
10 11 12 |
# File 'lib/fuel_surcharge/tnt.rb', line 10 def time_period road_value&.first&.to_s end |
#url ⇒ Object
32 33 34 |
# File 'lib/fuel_surcharge/tnt.rb', line 32 def url "https://www.tnt.com/express/fr_fr/site/comment/facturation/comprendre-votre-facture/baremes-et-historiques.html" end |