Repository is archived
No commit activity in last 3 years
No release in over 3 years
A simple gem to ease/automate getting this data every month.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 4.0
 Project Readme

!!! This gem is not maintened anymore !!!

Replaced by fuel_surcharge, which handle more transporters.

Chronopost Fuel Multipliers fetcher

Retrieve current air and road rates applied to Chronopost shipping costs and convert them to multipliers we can directly use in our shipping cost calculators.

Usage

Install the gem:

$ gem install chronopost_fuel_adjustment_coefficients

Run the gem:

$ chronopost_fuel_adjustment_coefficients

Get the result:

# Fuel multipliers for 'FĂ©vrier 2017'
# Fetched from http://www.chronopost.fr/fr/surcharge-carburant

AIR_FUEL_MULTIPLIER  = 1.1685
ROAD_FUEL_MULTIPLIER = 1.1150

Or use it in your app:

require 'chronopost_fuel_adjustment_coefficients'

ch = ChronopostFuelAdjustmentCoefficients.new
ch.road_multiplier      # 0.11685e1
ch.air_multiplier       # 0.1115e1