File diff ec3b9e83f865 → 5b7f2b92a1f9
oxrlib/rate.py
Show inline comments
...
 
@@ -42,13 +42,13 @@ class Rate:
 
    @classmethod
 
    def serialize_timestamp(cls, value):
 
        return int(value.timestamp())
 

	
 
    @classmethod
 
    def from_json_file(cls, json_file):
 
        response = json.load(json_file, parse_float=decimal.Decimal)
 
        response = json.load(json_file, parse_int=decimal.Decimal, parse_float=decimal.Decimal)
 
        return cls(**response)
 

	
 
    def convert(self, amount, from_currency, to_currency):
 
        return amount * self.rates[to_currency] / self.rates[from_currency]
 

	
 
    def serialize(self):