Fix JSON schema for Xero Invoice

This commit is contained in:
Rene Vergara 2022-09-08 11:26:54 -05:00
parent 74ebb9d61a
commit e475a4e471
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2

View file

@ -180,7 +180,7 @@ data XeroInvoice =
, xi_number :: T.Text , xi_number :: T.Text
, xi_contact :: T.Text , xi_contact :: T.Text
, xi_currency :: T.Text , xi_currency :: T.Text
, xi_currRate :: Double , xi_currRate :: Maybe Double
, xi_total :: Double , xi_total :: Double
, xi_status :: T.Text , xi_status :: T.Text
, xi_date :: T.Text , xi_date :: T.Text
@ -199,7 +199,7 @@ instance FromJSON XeroInvoice where
c <- obj .: "Contact" c <- obj .: "Contact"
cN <- c .: "Name" cN <- c .: "Name"
cu <- obj .: "CurrencyCode" cu <- obj .: "CurrencyCode"
cR <- obj .: "CurrencyRate" cR <- obj .:? "CurrencyRate"
total <- obj .: "AmountDue" total <- obj .: "AmountDue"
status <- obj .: "Status" status <- obj .: "Status"
d <- obj .: "Date" d <- obj .: "Date"