diff --git a/src/Xero.hs b/src/Xero.hs index 2fb8745..ae6d8e0 100644 --- a/src/Xero.hs +++ b/src/Xero.hs @@ -180,7 +180,7 @@ data XeroInvoice = , xi_number :: T.Text , xi_contact :: T.Text , xi_currency :: T.Text - , xi_currRate :: Double + , xi_currRate :: Maybe Double , xi_total :: Double , xi_status :: T.Text , xi_date :: T.Text @@ -199,7 +199,7 @@ instance FromJSON XeroInvoice where c <- obj .: "Contact" cN <- c .: "Name" cu <- obj .: "CurrencyCode" - cR <- obj .: "CurrencyRate" + cR <- obj .:? "CurrencyRate" total <- obj .: "AmountDue" status <- obj .: "Status" d <- obj .: "Date"