Class: FuelSurcharge::TNT

Inherits:
Object
  • Object
show all
Defined in:
lib/fuel_surcharge/tnt.rb

Instance Method Summary collapse

Instance Method Details

#air_multiplierObject



28
29
30
# File 'lib/fuel_surcharge/tnt.rb', line 28

def air_multiplier
  air_percentage&.to_multiplier
end

#air_percentageObject



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_multiplierObject



24
25
26
# File 'lib/fuel_surcharge/tnt.rb', line 24

def road_multiplier
  road_percentage&.to_multiplier
end

#road_percentageObject



14
15
16
# File 'lib/fuel_surcharge/tnt.rb', line 14

def road_percentage
  road_value&.last&.to_s
end

#time_periodObject



10
11
12
# File 'lib/fuel_surcharge/tnt.rb', line 10

def time_period
  road_value&.first&.to_s
end

#urlObject



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